public void processAction(ActionEvent actionEvent) throws AbortProcessingException { if (!JsfUtils.isFlowRequest()) { delegate.processAction(actionEvent); return; } FacesContext context = FacesContext.getCurrentInstance(); ActionSource source = (ActionSource) actionEvent.getSource(); String eventId = null; if (source.getAction() != null) { if (logger.isDebugEnabled()) { logger.debug("Invoking action " + source.getAction()); } eventId = (String) source.getAction().invoke(context, null); } if (StringUtils.hasText(eventId)) { if (logger.isDebugEnabled()) { logger.debug("Event '" + eventId + "' detected"); } if (source.isImmediate() || validateModel(context, eventId)) { context.getExternalContext().getRequestMap().put(JsfView.EVENT_KEY, eventId); } } else { logger.debug("No action event detected"); context.getExternalContext().getRequestMap().remove(JsfView.EVENT_KEY); } // tells JSF lifecycle that rendering should now happen and any subsequent phases should be skipped // required in the case of this action listener firing immediately (immediate=true) before validation context.renderResponse(); }
public void processAction(ActionEvent actionEvent) throws AbortProcessingException { if (!JsfUtils.isFlowRequest()) { this.delegate.processAction(actionEvent); return; } FacesContext context = FacesContext.getCurrentInstance(); ActionSource2 source = (ActionSource2) actionEvent.getSource(); String eventId = null; if (source.getActionExpression() != null) { if (logger.isDebugEnabled()) { logger.debug("Invoking action " + source.getActionExpression()); } eventId = (String) source.getActionExpression().invoke(context.getELContext(), null); } if (StringUtils.hasText(eventId)) { if (logger.isDebugEnabled()) { logger.debug("Event '" + eventId + "' detected"); } if (source.isImmediate() || validateModel(context, eventId)) { context.getExternalContext().getRequestMap().put(JsfView.EVENT_KEY, eventId); } } else { logger.debug("No action event detected"); context.getExternalContext().getRequestMap().remove(JsfView.EVENT_KEY); } // tells JSF lifecycle that rendering should now happen and any subsequent phases should be skipped // required in the case of this action listener firing immediately (immediate=true) before validation context.renderResponse(); }
public void processAction(ActionEvent actionEvent) throws AbortProcessingException { if (!JsfUtils.isFlowRequest()) { this.delegate.processAction(actionEvent); return; } FacesContext context = FacesContext.getCurrentInstance(); ActionSource2 source = (ActionSource2) actionEvent.getSource(); String eventId = null; if (source.getActionExpression() != null) { if (logger.isDebugEnabled()) { logger.debug("Invoking action " + source.getActionExpression()); } eventId = (String) source.getActionExpression().invoke(context.getELContext(), null); } if (StringUtils.hasText(eventId)) { if (logger.isDebugEnabled()) { logger.debug("Event '" + eventId + "' detected"); } if (source.isImmediate() || validateModel(context, eventId)) { context.getExternalContext().getRequestMap().put(JsfView.EVENT_KEY, eventId); } } else { logger.debug("No action event detected"); context.getExternalContext().getRequestMap().remove(JsfView.EVENT_KEY); } // tells JSF lifecycle that rendering should now happen and any subsequent phases should be skipped // required in the case of this action listener firing immediately (immediate=true) before validation context.renderResponse(); }
UIComponent command = (UIComponent) event.getSource(); if (command == null) { throw new IllegalArgumentException(