public void onDeferredClose() { root.detach(); }
/** * Close the main dialog. */ private void close() { getParent().detach(); }
/** * Update the original recipient list, set the response attribute, and close the dialog */ public void onClick$btnOK() { recipients.clear(); recipients.addAll(modelRecipients); root.setAttribute("ok", txtComment.isVisible() ? txtComment.getText() : true); root.detach(); } }
/** Detaches all child components and then recreate them by use of * {@link #compose}. */ public void recreate() { if (_inlines != null) { for (int j = 0; j < _inlines.length; ++j) _inlines[j].detach(); _inlines = null; } else { getChildren().clear(); invalidate(); //invalidate is redudant, but less memory leak in IE } compose(); }
/** Replaces a component with another. * @param oldc the component to remove. * @param newc the component to add * @exception IllegalArgumentException if oldc's parent and page are * both null. * @since 3.5.2 */ public static void replace(Component oldc, Component newc) { final Component p = oldc.getParent(), sib = oldc.getNextSibling(); if (p != null) { oldc.detach(); p.insertBefore(newc, sib); } else { final Page page = oldc.getPage(); if (page == null) throw new IllegalArgumentException("Neither child nor attached, " + oldc); oldc.detach(); if (newc.getParent() != null) newc.detach(); newc.setPageBefore(page, sib); } }
private void resolveDefineComponents(Collection<Component> comps, Map<String, Component> map) { if (!comps.isEmpty()) { Component comp = comps.iterator().next(); // join "define" components as children of "insert" component do { final Component nextRoot = comp.getNextSibling(); final Annotation annt = ((ComponentCtrl) comp).getAnnotation(null, "define"); if (annt != null) { final String joinId = annt.getAttribute("value"); final Component insertComp = map.get(joinId); if (insertComp != null) { comp.setParent(insertComp); } else { comp.detach(); //no where to insert } } resolveDefineComponents(comp.getChildren(), map); comp = nextRoot; } while (comp != null); } }
/** * Cancel the password change request. */ private void doCancel() { if (!forced) { panel.getRoot().detach(); } else { Events.sendEvent(Events.ON_CLOSE, panel.getRoot(), StrUtil.getLabel("password.change.dialog.password.change.canceled")); } }
/** * Cancel the password change request. */ private void doCancel() { if (!forced) { panel.getRoot().detach(); } else { Events.sendEvent(Events.ON_CLOSE, panel.getRoot(), Labels.getLabel("change.password.dialog.password.change.canceled")); } }
public void clearChildren() { if (getFirstChild() != null) { removeChildren(getFirstChild()); } if (_firstInsertion != null) { for (Component next = _firstInsertion, end = _lastInsertion.getNextSibling(); next != end;) { Component tmp = next.getNextSibling(); next.detach(); next = tmp; } } }
@SuppressWarnings("unchecked") private void syncModel(ListModel<?> model) { //clear all List<Component[]> cbrCompsList = (List<Component[]>) _owner .getAttribute(BinderCtrl.CHILDREN_BINDING_RENDERED_COMPONENTS); if (cbrCompsList != null) { _owner.removeAttribute(BinderCtrl.CHILDREN_BINDING_RENDERED_COMPONENTS); for (Component[] oldComps : cbrCompsList) { if (oldComps != null) { for (Component oc : oldComps) { oc.detach(); } } } } renderModelData(model, 0, model.getSize() - 1); }
public void onClick$btnOK() { clearMessages(); Radio radio = rgReason.getSelectedItem(); String reasonCode = radio == null ? null : (String) radio.getValue(); if (reasonCode == null) { Clients.wrongValue(rgReason, "You must select a reason for the deletion."); return; } String reasonText = "3".equals(reasonCode) ? txtOther.getText().trim() : null; if (reasonText != null && reasonText.isEmpty()) { Clients.wrongValue(txtOther, "Please enter text describing the reason for the deletion."); return; } try { service.delete(record, reasonCode, reasonText); } catch (Exception e) { PromptDialog.showError(e.getMessage()); return; } root.setAttribute("ok", true); root.detach(); } }
include.detach();
if (!(_renderer instanceof RowRendererExt) || (((RowRendererExt) _renderer).getControls() & RowRendererExt.DETACH_ON_RENDER) != 0) { //detach (default) cell.detach();
if (!(items[0] instanceof Label)) throw new UiException("The model template can only support Label component, not " + items[0]); items[0].detach(); //remove the label from owner return ((Label) items[0]).getValue();
public void onClick$btnSave() { if (validateInputs()) { if (record.getVisitIEN() == null) { Encounter encounter = EncounterContext.getActiveEncounter(); EncounterUtil.forceCreate(encounter); record.setVisitCategory(EncounterUtil.getServiceCategory(encounter)); record.setVisitDate(encounter.getPeriod().getStart()); record.setVisitIEN(encounter.getId().getIdPart()); record.setVisitLocked(EncounterUtil.isLocked(encounter)); } try { service.update(record); } catch (Exception e) { PromptDialog.showError(e.getMessage()); return; } root.setAttribute(ATTR_RESULT, record); root.detach(); } }
/** * Update the scheduled notification with new input values and send to the server, then close * the dialog if successful. */ public void onClick$btnOK() { if (validate()) { notification.setDeliveryDate(new FMDate(dtbDelivery.getDate())); notification.setDfn(chkAssociate.isChecked() ? (String) chkAssociate.getValue() : null); notification.setPatientName(chkAssociate.isChecked() ? lblPatient.getValue() : null); notification.setSubject(txtSubject.getValue()); notification.setPriority((Priority) cboPriority.getSelectedItem().getValue()); List<String> message = StrUtil.toList(txtMessage.getText()); if (service.scheduleNotification(notification, message, recipients)) { root.setAttribute("notification", notification); root.detach(); } else { PromptDialog.showError("@vistanotification.schedule.save.failure"); } } }