public void onEvent(Event event) { Events.sendEvent(Tabbox.this, event); }
@Override public Patient select() { Events.sendEvent("onShow", dlg, null); return (Patient) dlg.getAttribute(Constants.SELECTED_PATIENT_ATTRIB); } };
/** Sends the event to the target specified in the event, and processes it immediately. * * <p>Note: {@link Event#getTarget} cannot be null. */ public static void sendEvent(Event event) { sendEvent(event.getTarget(), event); }
/** Sends the event to the target, and processes it immediately. * @param target the target of the event (never null) * @since 5.0.4 */ public static void sendEvent(String name, Component target, Object data) { sendEvent(new Event(name, target, data)); }
private static void doBindChildrenInFilter(Component[] shadows) { for (Component shadow : shadows) { if (shadow instanceof ShadowElement) { ShadowElement se = (ShadowElement) shadow; if (!se.getDistributedChildren().isEmpty() || !((ShadowElementCtrl) se).isDynamicValue()) continue; List<Component> children = shadow.getChildren(); if (children.size() == 0) { Events.sendEvent(new Event("onBindInit", (Component) se)); Events.sendEvent(new Event("onBindingReady", (Component) se)); children = shadow.getChildren(); } if (children.size() > 0) doBindChildrenInFilter(children.toArray(new Component[children.size()])); } } } }
public void onEvent(Event event) { final ForwardInfo info = _auxinf.forwards.get(_orgEvent); if (info != null) for (TargetInfo ti : new ArrayList<TargetInfo>(info.targets)) { Component target = resolveForwardTarget(ti.target); if (target == null) { final IdSpace owner = getSpaceOwner(); if (owner instanceof Component) { target = (Component) owner; } else { //Use the root component instead for (target = AbstractComponent.this;;) { final Component p = target.getParent(); if (p == null) break; target = p; } } } //bug #2790393 Forward event listener shall be called immediately //(since 3.6.2) change from postEvent to sendEvent to //make forward event deterministic Events.sendEvent(new ForwardEvent(ti.event, target, event, ti.data)); } }
/** * 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")); } }
private boolean checkShadowElementAndCreateSubChildren(Component parent) { boolean hasShadow = false; if (parent instanceof ComponentCtrl) { ComponentCtrl pCtrl = (ComponentCtrl) parent; for (ShadowElement se : pCtrl.getShadowRoots()) { if (se instanceof HtmlShadowElement) { HtmlShadowElement hse = (HtmlShadowElement) se; if (hse.hasBindingAnnotation() || hse.hasSubBindingAnnotation()) { // used for shadow addon to be rendered directly hse.setAttribute(BinderCtrl.BINDRENDERING, true); try { Events.sendEvent(new Event(BinderCtrl.ON_BIND_INIT, hse)); // fixed for @ref case Events.sendEvent(new Event("onBindingReady", hse)); } finally { hse.removeAttribute(BinderCtrl.BINDRENDERING); } } } hasShadow = true; } } return hasShadow; }
refs.add(dataTarget); bindings.add(binding); Events.sendEvent(new BindingSaveEvent("onBindingSave", dataTarget, target, binding, vals[0])); refs.add(dataTarget1); bindings.add(binding); Events.sendEvent( new BindingSaveEvent("onBindingSave", dataTarget1, target, binding, vals[0])); Events.sendEvent(new BindingValidateEvent("onBindingValidate", target, refs, bindings, values));
/** * Submits the authentication request. */ private void doSubmit() { showMessage(""); final Organization organization = getSelectedOrganization(); String instId = organization == null ? null : organization.getId().getIdPart(); String username = j_username.getValue().trim(); final String password = j_password.getValue(); if (username.contains("\\")) { String[] pcs = username.split("\\\\", 2); instId = pcs[0]; username = pcs[1]; } if (!username.isEmpty() && !password.isEmpty() && !instId.isEmpty()) { session.setAttribute(Constants.DEFAULT_INSTITUTION, instId); FrameworkWebSupport.setCookie(Constants.DEFAULT_INSTITUTION, instId); session.setAttribute(Constants.DEFAULT_USERNAME, username); //FrameworkWebSupport.setCookie(Constants.DEFAULT_USERNAME, username); j_username.setValue(instId + "\\" + username); showState(Labels.getLabel(Constants.LBL_LOGIN_PROGRESS)); session.setAttribute(org.carewebframework.security.spring.Constants.SAVED_REQUEST, savedRequest); Events.sendEvent("onSubmit", loginRoot.getRoot(), null); } else { showMessage(Labels.getLabel(Constants.LBL_LOGIN_REQUIRED_FIELDS)); } }
/** * Submits the authentication request. */ public void onSubmit() { showMessage(""); ISecurityDomain securityDomain = getSelectedSecurityDomain(); String securityDomainId = securityDomain == null ? null : securityDomain.getLogicalId(); String username = txtUsername.getValue().trim(); String password = txtPassword.getValue(); if (username.contains("\\")) { String[] pcs = username.split("\\\\", 2); securityDomainId = pcs[0]; username = pcs[1]; } if (!username.isEmpty() && !password.isEmpty() && !securityDomainId.isEmpty()) { session.setAttribute(Constants.DEFAULT_SECURITY_DOMAIN, securityDomainId); FrameworkWebSupport.setCookie(Constants.DEFAULT_SECURITY_DOMAIN, securityDomainId); session.setAttribute(Constants.DEFAULT_USERNAME, username); txtUsername.setValue(securityDomainId + "\\" + username); showStatus(StrUtil.getLabel(Constants.LBL_LOGIN_PROGRESS)); session.setAttribute(org.carewebframework.security.spring.Constants.SAVED_REQUEST, savedRequest); Events.sendEvent("onSubmit", loginRoot.getRoot(), null); } else { showMessage(StrUtil.getLabel(Constants.LBL_LOGIN_REQUIRED_FIELDS)); pane.setVisible(true); } }
String inst = user.getSecurityDomain().getLogicalId(); txtUsername.setValue(inst + "\\" + user.getLoginName()); Events.sendEvent("onSubmit", panel.getRoot(), null); } else { doCancel();
String inst = user.getOrganization().getId().getIdPart(); j_username.setValue(inst + "\\" + user.getLogin()); Events.sendEvent("onSubmit", panel.getRoot(), null); } else { doCancel();
/** * First, posts any pending echo requests to the event queue. Then empties the event queue, * sending each queued event to its target. Finally, processes any events on the server push * event queue. * * @return True if events were flushed. */ public boolean flushEvents() { Event event; boolean result = false; for (AuEcho echo : execution.getEchoedEvents()) { Events.postEvent(toEvent(echo)); } execution.getEchoedEvents().clear(); while ((event = execution.getNextEvent()) != null) { Events.sendEvent(event); result = true; } result |= serverPush.flush(); return result; }
public void onEvent(Event evt) throws Exception { for (int j = _targets.length; --j >= 0;) _targets[j].removeEventListener(_evtnms[j], this); //one shot only final Execution exec = Executions.getCurrent(); execCreate0( new CreateInfo(((WebAppCtrl) exec.getDesktop().getWebApp()).getUiFactory(), exec, _comp.getPage(), null), //technically sys composer can be used but we don't (to simplify it) _compInfo, _comp, null); if (_uri != null) { final String uri = (String) Evaluators.evaluate(_compInfo.getEvaluator(), _comp, _uri, String.class); if (uri != null) exec.createComponents(uri, _comp, null); } Events.sendEvent(new FulfillEvent(Events.ON_FULFILL, _comp, evt)); //Use sendEvent so onFulfill will be processed before //the event triggers the fulfill (i.e., evt) }
Events.sendEvent(new Event(BinderCtrl.ON_BIND_CLEAN, comp));
Events.sendEvent(new Event(BinderCtrl.ON_BIND_INIT, comp));
Events.sendEvent(new Event(BinderImpl.ON_BIND_INIT, lbl)); lbl.detach(); return lbl.getValue();
Events.sendEvent(new Event(BinderCtrl.ON_BIND_INIT, nci));