@Override public String getInitEvent( Event evt, String evtVarName, ClientDocumentStfulDelegateWebImpl clientDoc) { // Leer notas del render del MouseEvent UIEvent uiEvt = (UIEvent) evt; StringBuilder code = new StringBuilder(); code.append(super.getInitEvent(evt, evtVarName, clientDoc)); code.append(evtVarName + ".view = " + getViewPath(uiEvt.getView(), clientDoc) + ";\n"); code.append(evtVarName + ".detail = " + uiEvt.getDetail() + ";\n"); return code.toString(); }
/** * Fires a 'DOMActivate' event to the specified target. * * @param target the event target * @param detailArg the detailArg parameter of the event */ protected void fireDOMActivateEvent(EventTarget target, int detailArg) { DocumentEvent docEvt = (DocumentEvent) ((Element) target).getOwnerDocument(); UIEvent uiEvt = (UIEvent) docEvt.createEvent("UIEvents"); uiEvt.initUIEvent("DOMActivate", true, true, null, detailArg); target.dispatchEvent(uiEvt); }
/** * Fires a 'DOMFocusOut' event to the specified target. * * @param target the event target */ protected void fireDOMFocusOutEvent(EventTarget target) { DocumentEvent docEvt = (DocumentEvent) ((Element) target).getOwnerDocument(); UIEvent uiEvt = (UIEvent) docEvt.createEvent("UIEvents"); uiEvt.initUIEvent("DOMFocusOut", true, false, null, 0); target.dispatchEvent(uiEvt); }