Class UICommand

    • Field Detail

      • COMPONENT_TYPE

        public static final String COMPONENT_TYPE

        The standard component type for this component.

        See Also:
        Constant Field Values
      • COMPONENT_FAMILY

        public static final String COMPONENT_FAMILY

        The standard component family for this component.

        See Also:
        Constant Field Values
    • Constructor Detail

      • UICommand

        public UICommand()

        Create a new UICommand instance with default property values.

    • Method Detail

      • getFamily

        public String getFamily()
        Description copied from class: UIComponent

        Return the identifier of the component family to which this component belongs. This identifier, in conjunction with the value of the rendererType property, may be used to select the appropriate Renderer for this component instance. Note this method should NOT return null

        Specified by:
        getFamily in class UIComponent
        Returns:
        the component family (not null).
      • isImmediate

        public boolean isImmediate()

        The immediate flag.

        Specified by:
        isImmediate in interface ActionSource
        Returns:
        true if immediate, false otherwise.
      • setImmediate

        public void setImmediate​(boolean immediate)
        Description copied from interface: ActionSource

        Set the "immediate execution" flag for this UIComponent.

        Specified by:
        setImmediate in interface ActionSource
        Parameters:
        immediate - The new immediate execution flag
      • getValue

        public Object getValue()

        Returns the value property of the UICommand. This is most often rendered as a label.

        Returns:
        The object representing the value of this component.
      • setValue

        public void setValue​(Object value)

        Sets the value property of the UICommand. This is most often rendered as a label.

        Parameters:
        value - the new value
      • getActionExpression

        public MethodExpression getActionExpression()
        Description copied from interface: ActionSource2

        Return the MethodExpression pointing at the application action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property.

        Specified by:
        getActionExpression in interface ActionSource2
        Returns:
        the action expression.
      • setActionExpression

        public void setActionExpression​(MethodExpression actionExpression)
        Description copied from interface: ActionSource2

        Set the MethodExpression pointing at the appication action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property.

        Any method referenced by such an expression must be public, with a return type of String, and accept no parameters.

        Specified by:
        setActionExpression in interface ActionSource2
        Parameters:
        actionExpression - The new method expression
      • queueEvent

        public void queueEvent​(FacesEvent event)

        Intercept queueEvent and take the following action. If the event is an ActionEvent, obtain the UIComponent instance from the event. If the component is an ActionSource obtain the value of its "immediate" property. If it is true, mark the phaseId for the event to be PhaseId.APPLY_REQUEST_VALUES otherwise, mark the phaseId to be PhaseId.INVOKE_APPLICATION. The event must be passed on to super.queueEvent() before returning from this method.

        Overrides:
        queueEvent in class UIComponentBase
        Parameters:
        event - FacesEvent to be queued