@Override public void decode(FacesContext context, UIComponent component) { CommandButton button = (CommandButton) component; if (button.isDisabled()) { return; } String param = component.getClientId(context); if (context.getExternalContext().getRequestParameterMap().containsKey(param)) { component.queueEvent(new ActionEvent(component)); } decodeBehaviors(context, component); }
@Override public void decode(FacesContext context, UIComponent component) { CommandLink link = (CommandLink) component; if (link.isDisabled()) { return; } String param = component.getClientId(context); if (context.getExternalContext().getRequestParameterMap().containsKey(param)) { component.queueEvent(new ActionEvent(component)); } decodeBehaviors(context, component); }
@Override public void decode(FacesContext context, UIComponent component, ClientBehavior behavior) { AjaxBehavior ajaxBehavior = (AjaxBehavior) behavior; if (!ajaxBehavior.isDisabled()) { AjaxBehaviorEvent event = new AjaxBehaviorEvent(component, behavior); PhaseId phaseId = isImmediate(component, ajaxBehavior) ? PhaseId.APPLY_REQUEST_VALUES : PhaseId.INVOKE_APPLICATION; event.setPhaseId(phaseId); component.queueEvent(event); } }
@Override public void decode(FacesContext context, UIComponent component) { SplitButton button = (SplitButton) component; if (button.isDisabled()) { return; } String clientId = button.getClientId(context); Map<String, String> params = context.getExternalContext().getRequestParameterMap(); String param = button.isAjax() ? clientId : clientId + "_button"; String itemParam = clientId + "_menuid"; if (params.containsKey(itemParam)) { String menuid = params.get(clientId + "_menuid"); MenuItem menuitem = button.findMenuitem(button.getElements(), menuid); MenuActionEvent event = new MenuActionEvent(button, menuitem); if (menuitem.isImmediate()) { event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES); } else { event.setPhaseId(PhaseId.INVOKE_APPLICATION); } component.queueEvent(event); } else if (params.containsKey(param)) { component.queueEvent(new ActionEvent(component)); } }
/** * @see javax.faces.component.UIComponent#queueEvent(javax.faces.event.FacesEvent) */ public void queueEvent(FacesEvent event) { parent.queueEvent(event); }
/** * @see javax.faces.component.UIComponent#queueEvent(javax.faces.event.FacesEvent) */ @Override public void queueEvent(FacesEvent event) { parent.queueEvent(event); }
/** * <p>Convenience method to queue this event for broadcast at the end * of the current request processing lifecycle phase.</p> * * @throws IllegalStateException if the source component for this * event is not a descendant of a {@link UIViewRoot} */ public void queue() { getComponent().queueEvent(this); }
/** * <p>Convenience method to queue this event for broadcast at the end * of the current request processing lifecycle phase.</p> * * @throws IllegalStateException if the source component for this * event is not a descendant of a {@link UIViewRoot} */ public void queue() { getComponent().queueEvent(this); }
/** * <p>Convenience method to queue this event for broadcast at the end * of the current request processing lifecycle phase.</p> * * @throws IllegalStateException if the source component for this * event is not a descendant of a {@link UIViewRoot} */ public void queue() { getComponent().queueEvent(this); }
/** * <p>Convenience method to queue this event for broadcast at the end * of the current request processing lifecycle phase.</p> * * @throws IllegalStateException if the source component for this * event is not a descendant of a {@link UIViewRoot} */ public void queue() { getComponent().queueEvent(this); }
public void queueEvent(FacesEvent event) { AssertionUtil.assertNotNull("event", event); UIComponent parent = getParent(); if (parent == null) { throw new IllegalStateException("parent not found"); } parent.queueEvent(event); }
public void decode(FacesContext context, UIComponent component) { if (context.getExternalContext().getRequestParameterMap().containsKey(component.getClientId(context))) { component.queueEvent(new ActionEvent(component)); } }
@Override public void decode(FacesContext context, UIComponent component) { validateParameters(context, component); if (wasClicked(context, component) && !isReset(component)) { component.queueEvent(new ActionEvent(component)); if (log.isDebugEnabled()) { log.debug("This command resulted in form submission - ActionEvent queued. Finished decoding " + component.getClass().getSimpleName() + " component with id " + component.getId() + "."); } } }
public void queueEventIfEnterKeyPressed(FacesContext facesContext, UIComponent uiComponent) { try { KeyEvent keyEvent = new KeyEvent(uiComponent, facesContext.getExternalContext().getRequestParameterMap()); if (keyEvent.getKeyCode() == KeyEvent.CARRIAGE_RETURN) { uiComponent.queueEvent(new ActionEvent(uiComponent)); } } catch (Exception e) { e.printStackTrace(); } }
@Override public void decode(FacesContext context, UIComponent component) { SplitButton button = (SplitButton) component; if (button.isDisabled()) { return; } String clientId = button.getClientId(context); String param = button.isAjax() ? clientId : clientId + "_button"; if (context.getExternalContext().getRequestParameterMap().containsKey(param)) { component.queueEvent(new ActionEvent(component)); } }
@Override public void decode(FacesContext context, UIComponent component) { CommandLink link = (CommandLink) component; if (link.isDisabled()) { return; } String param = component.getClientId(context); if (context.getExternalContext().getRequestParameterMap().containsKey(param)) { component.queueEvent(new ActionEvent(component)); } decodeBehaviors(context, component); }
public void queueEvent(FacesEvent e) { // ICE-1956 UICommand subclasses shouldn't call super.queueEvent // on ActionEvents or else the immediate flag is ignored if( (e instanceof ActionEvent) && !this.equals(e.getComponent()) && getParent() != null) { getParent().queueEvent(e); } else { super.queueEvent(e); } }
@Override public void decode(FacesContext context, UIComponent component) { CommandButton button = (CommandButton) component; if (button.isDisabled()) { return; } String param = component.getClientId(context); if (context.getExternalContext().getRequestParameterMap().containsKey(param)) { component.queueEvent(new ActionEvent(component)); } decodeBehaviors(context, component); }
public void queueEvent(FacesEvent e) { // ICE-1956 UICommand subclasses shouldn't call super.queueEvent // on ActionEvents or else the immediate flag is ignored if( (e instanceof ActionEvent) && !this.equals(e.getComponent()) && getParent() != null) { getParent().queueEvent(e); } else { super.queueEvent(e); } }
@Override public void decode(FacesContext context, UIComponent component, ClientBehavior behavior) { AjaxBehavior ajaxBehavior = (AjaxBehavior) behavior; if (!ajaxBehavior.isDisabled()) { AjaxBehaviorEvent event = new AjaxBehaviorEvent(component, behavior); PhaseId phaseId = isImmediate(component, ajaxBehavior) ? PhaseId.APPLY_REQUEST_VALUES : PhaseId.INVOKE_APPLICATION; event.setPhaseId(phaseId); component.queueEvent(event); } }