private Object getValueFromBinding(ValueBinding vb) { return vb.getValue(getFacesContext()); } }
public boolean isImmediate() { if (this.immediate != null) { return (this.immediate); } ValueExpression ve = getValueExpression("immediate"); if (ve != null) { try { return (Boolean.TRUE.equals(ve.getValue(getFacesContext().getELContext()))); } catch (ELException e) { throw new FacesException(e); } } else { return (false); } }
/** * Gets The initial value of this component. * * @return the new value value */ public Object getValue() { if (_value != null) { return _value; } ValueExpression expression = getValueExpression("value"); if (expression != null) { return expression.getValue(getFacesContext().getELContext()); } return null; }
/** * Gets A method binding EL expression that identifies an action listener method * to be invoked if this component is activated by the user. An action * listener method accepts a parameter of type javax.faces.event.ActionEvent * and returns void. The phase that this event is fired in can be controlled * via the immediate attribute. * * @return the new actionListener value * @deprecated */ public MethodBinding getActionListener() { if (_actionListener != null) { return _actionListener; } ValueExpression expression = getValueExpression("actionListener"); if (expression != null) { return (MethodBinding)expression.getValue(getFacesContext().getELContext()); } return null; }
/** * Gets A boolean value that identifies the phase during which action events * should fire. During normal event processing, action methods and * action listener methods are fired during the "invoke application" * phase of request processing. If this attribute is set to "true", * these methods are fired instead at the end of the "apply request * values" phase. * * @return the new immediate value */ public boolean isImmediate() { if (_immediateSet) { return _immediate; } ValueExpression expression = getValueExpression("immediate"); if (expression != null) { return (Boolean)expression.getValue(getFacesContext().getELContext()); } return false; }
/** * Gets Specifies the action to take when this command is invoked. * If the value is an expression, it is expected to be a method * binding EL expression that identifies an action method. An action method * accepts no parameters and has a String return value, called the action * outcome, that identifies the next view displayed. The phase that this * event is fired in can be controlled via the immediate attribute. * * If the value is a string literal, it is treated as a navigation outcome * for the current view. This is functionally equivalent to a reference to * an action method that returns the string literal. * * @return the new actionExpression value */ public MethodExpression getActionExpression() { if (_actionExpression != null) { return _actionExpression; } ValueExpression expression = getValueExpression("actionExpression"); if (expression != null) { return (MethodExpression)expression.getValue(getFacesContext().getELContext()); } return null; }
/** * <p>Returns the <code>value</code> property of the * <code>UICommand</code>. This is most often rendered as a label.</p> */ public Object getValue() { if (this.value != null) { return (this.value); } ValueExpression ve = getValueExpression("value"); if (ve != null) { try { return (ve.getValue(getFacesContext().getELContext())); } catch (ELException e) { throw new FacesException(e); } } else { return (null); } }
public void broadcast(FacesEvent event) throws AbortProcessingException { super.broadcast(event); if (event instanceof ActionEvent) { FacesContext context = getFacesContext(); MethodBinding mb = getActionListener(); if (mb != null) { mb.invoke(context, new Object[] { event }); } ActionListener listener = context.getApplication() .getActionListener(); if (listener != null) { listener.processAction((ActionEvent) event); } } }
@Override public void broadcast(FacesEvent event) throws AbortProcessingException { super.broadcast(event); if (event instanceof ActionEvent) { FacesContext context = getFacesContext(); MethodBinding mb = getActionListener(); if (mb != null) { mb.invoke(context, new Object[] { event }); } ActionListener defaultActionListener = context.getApplication() .getActionListener(); if (defaultActionListener != null) { defaultActionListener.processAction((ActionEvent) event); } } }
@Override public void broadcast(FacesEvent event) throws AbortProcessingException { super.broadcast(event); if (event instanceof ActionEvent) { FacesContext context = getFacesContext(); MethodBinding mb = getActionListener(); if(mb != null) { mb.invoke(context, new Object[] { event }); } ActionListener defaultActionListener = context.getApplication().getActionListener(); if (defaultActionListener != null) { defaultActionListener.processAction((ActionEvent)event); } } }
public void queueEvent(FacesEvent event) { if (event instanceof ActionEvent) { if (isImmediate()) { event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES); } else { event.setPhaseId(PhaseId.INVOKE_APPLICATION); } final FacesContext facesContext = getFacesContext(); UICommandUtil.setSubmittedCommand(facesContext, this); } super.queueEvent(event); }
FacesContext context = getFacesContext();
FacesContext context = getFacesContext();
FacesContext context = getFacesContext();