@Override protected void setValue(Object value) { editor.setValue((String) value); textbox.setValue((String) value); updateValue(); }
@Override protected void onChange(ChangeEvent event) { textbox.setValue(event.getValue(String.class)); super.onChange(event); } }
@EventHandler(value = "click", target = "btnUnlock") private void onClick$btnUnlock() { String s = txtPassword.getValue(); txtPassword.setValue(null); lblInfo.setLabel(null); txtPassword.focus(); if (!StringUtils.isEmpty(s)) { if (securityService.validatePassword(s)) { setMode(Mode.BASELINE); } else { lblInfo.setLabel(StrUtil.getLabel("cwf.sessionmonitor.lock.badpassword.message")); } } }
private void displayResource() { IBaseResource resource = getSelectedResource(); if (resource == null) { txtResource.setValue(null); btnDelete.setDisabled(true); } else { FhirContext ctx = fhirService.getClient().getFhirContext(); IParser parser = rbJSON.isChecked() ? ctx.newJsonParser() : ctx.newXmlParser(); parser.setPrettyPrint(true); txtResource.setValue(parser.encodeResourceToString(resource)); txtResource.selectRange(0, 0); btnDelete.setDisabled(false); } }
@EventHandler(value = "click", target = "btnNewEvent") private void onClick$btnNewEvent() { String eventName = StringUtils.trimToNull(tboxNewEvent.getValue()); if (eventName != null && !containsEvent(eventName)) { Listitem item = new Listitem(); item.setLabel(eventName); lboxEventList.addChild(item); } tboxNewEvent.setValue(""); }
/** * Place the specified tree node in edit mode. In this mode, the node's label is replaced with a * text box containing the label's value. * * @param node Target tree node. */ private void editNodeStart(Treenode node) { txtLabel.setAttribute(ITEM_ATTR, node); if (node == null) { popLabel.close(); } else { String label = node.getLabel(); node.setAttribute(LABEL_ATTR, label); txtLabel.setValue(label); node.setLabel(null); popLabel.open(node, "left top", "left top"); txtLabel.setFocus(true); } }
@Override public void afterInitialized(BaseComponent comp) { this.root = (Window) comp; root.setAttribute("controller", this); root.setTitle(root.getAttribute("title", "")); root.addClass("flavor:" + root.getAttribute("panelClass", "panel-primary")); prompt.setLabel(root.getAttribute("prompt", "")); textbox.setValue(root.getAttribute("oldValue", null)); textbox.selectAll(); updateState(); }
@Override public void afterInitialized(BaseComponent root) { window = (Window) root; window.setTitle(StrUtil.formatMessage(root.getAttribute("title", ""))); lblPrompt.setLabel(StrUtil.formatMessage(root.getAttribute("prompt", ""))); LayoutIdentifier dfltLayout = root.getAttribute("dfltLayout", LayoutIdentifier.class); txtLayout.setValue(dfltLayout == null ? null : dfltLayout.name); boolean shared = dfltLayout == null ? LayoutManager.defaultIsShared() : dfltLayout.shared; (shared ? rbShared : rbPrivate).setChecked(true); radioGroup.setVisible(!root.getAttribute("hideScope", false)); allowDups = root.getAttribute("allowDups", true); }