org.apache.myfaces.trinidad.component

## Class UIXSingleStep

- java.lang.Object
- - javax.faces.component.UIComponent
  - - org.apache.myfaces.trinidad.component.UIXComponent
    - - org.apache.myfaces.trinidad.component.UIXComponentBase
      - - org.apache.myfaces.trinidad.component.UIXSingleStep

- All Implemented Interfaces:
    javax.faces.component.ActionSource, javax.faces.component.StateHolder
  Direct Known Subclasses:
    CoreSingleStepButtonBar

      public class UIXSingleStep
      extends UIXComponentBase
      implements javax.faces.component.ActionSource

  UIXSingleStep is a base abstraction for components that implement ActionSource and navigate back and forth through a sequence of known steps.
  UIXSingleStep implements javax.faces.component.ActionSource, which means it is a source of javax.faces.event.ActionEvents.

  The ActionEvent is delivered during the Apply Request Values phase when navigating back, and during the Invoke Application phase when navigating forward.

  The nextAction/previousAction attributes are of type MethodBinding and must (if non-null) point to an action method. The nextAction method will be called when navigating forward, and the previousAction method will be called when navigating back with a singleStep component.

  JSF has a default javax.faces.event.ActionListener that passes the nextAction or previousAction outcome to the NavigationHandler.

  The nextActionListener/previousActionListener attributes are of type MethodBinding and must (in non-null) point to a method accepting an ActionEvent, with a return type of void. When navigating to the previous step, then the previousActionListener method is called. When navigating to the next step, the nextActionListener method is called.

  #### Events:

  Type | Phases | Description
  --- | --- | ---
  `javax.faces.event.ActionEvent` | Invoke Application Apply Request Values | Event delivered when the "action" of the component has been invoked; for example, by clicking on a button. The action may result in page navigation.
  `org.apache.myfaces.trinidad.event.AttributeChangeEvent` | Invoke Application Apply Request Values | Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `COMPONENT_FAMILY`
    `static String` | `COMPONENT_TYPE`
    `static PropertyKey` | `MAX_STEP_KEY`
    `static PropertyKey` | `NEXT_ACTION_KEY`
    `static PropertyKey` | `NEXT_ACTION_LISTENER_KEY`
    `static Object` | `NEXT_ACTION_TYPE`
    `static PropertyKey` | `PREVIOUS_ACTION_KEY`
    `static PropertyKey` | `PREVIOUS_ACTION_LISTENER_KEY`
    `static Object` | `PREVIOUS_ACTION_TYPE`
    `static PropertyKey` | `SELECTED_STEP_KEY`
    `static FacesBean.Type` | `TYPE`

    - ### Fields inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase

      `BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY`

    - ### Fields inherited from class javax.faces.component.UIComponent

      `bindings`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `UIXSingleStep()` Construct an instance of the UIXSingleStep.
    `protected` | `UIXSingleStep(String rendererType)` Construct an instance of the UIXSingleStep.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addActionListener(javax.faces.event.ActionListener listener)` Adds a action listener.
    `void` | `broadcast(javax.faces.event.FacesEvent event)`
    `javax.faces.el.MethodBinding` | `getAction()`
    `javax.faces.el.MethodBinding` | `getActionListener()`
    `javax.faces.event.ActionListener[]` | `getActionListeners()` Returns an array of attached action listeners.
    `Object` | `getActionType()`
    `protected FacesBean.Type` | `getBeanType()`
    `String` | `getFamily()`
    `int` | `getMaxStep()` Gets the last possible step.
    `javax.faces.el.MethodBinding` | `getNextAction()` Gets a reference to an action method that will be called when the singleStep component navigates to the next step, or the static outcome of the action.
    `javax.faces.el.MethodBinding` | `getNextActionListener()` Gets a method reference to an action listener that will be called when the singleStep component navigates to the next step.
    `javax.faces.el.MethodBinding` | `getPreviousAction()` Gets a reference to an action method that will be called when the singleStep component navigates to the previous step, or the static outcome of the action.
    `javax.faces.el.MethodBinding` | `getPreviousActionListener()` Gets a method reference to an action listener that will be called when the singleStep component navigates to the previous step.
    `int` | `getSelectedStep()` Gets the current step.
    `boolean` | `isImmediate()` returns true if the actionType is PREVIOUS_ACTION_TYPE
    `void` | `queueEvent(javax.faces.event.FacesEvent e)`
    `void` | `removeActionListener(javax.faces.event.ActionListener listener)` Removes a action listener.
    `Object` | `saveState(javax.faces.context.FacesContext context)`
    `void` | `setAction(javax.faces.el.MethodBinding action)`
    `void` | `setActionListener(javax.faces.el.MethodBinding listener)`
    `void` | `setActionType(Object actionType)`
    `void` | `setImmediate(boolean immediate)` no-op.
    `void` | `setMaxStep(int maxStep)` Sets the last possible step.
    `void` | `setMaxStep(long maxStep)` Sets the last possible step.
    `void` | `setNextAction(javax.faces.el.MethodBinding nextAction)` Sets a reference to an action method that will be called when the singleStep component navigates to the next step, or the static outcome of the action.
    `void` | `setNextActionListener(javax.faces.el.MethodBinding nextActionListener)` Sets a method reference to an action listener that will be called when the singleStep component navigates to the next step.
    `void` | `setPreviousAction(javax.faces.el.MethodBinding previousAction)` Sets a reference to an action method that will be called when the singleStep component navigates to the previous step, or the static outcome of the action.
    `void` | `setPreviousActionListener(javax.faces.el.MethodBinding previousActionListener)` Sets a method reference to an action listener that will be called when the singleStep component navigates to the previous step.
    `void` | `setSelectedStep(int selectedStep)` Sets the current step.
    `void` | `setSelectedStep(long selectedStep)` Sets the current step.

    - ### Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase

      `adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, createFacesBean, decode, decodeChildren, decodeChildrenImpl, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientId, getContainerClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getId, getIntProperty, getLifecycleRenderer, getParent, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, invokeOnChildrenComponents, invokeOnComponent, invokeOnNamingContainerComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeAttributeChangeListener, removeFacesListener, restoreState, satisfiesPartialTrigger, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setValueBinding, setValueExpression, toString, updateChildren, updateChildrenImpl, validateChildren, validateChildrenImpl`

    - ### Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponent

      `addPartialTarget, clearCachedClientIds, clearCachedClientIds, encodeFlattenedChild, encodeFlattenedChildren, getLogicalParent, getLogicalParent, isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setPartialTarget, setupChildrenVisitingContext, setupEncodingContext, setUpEncodingContext, setupVisitingContext, tearDownChildrenVisitingContext, tearDownEncodingContext, tearDownVisitingContext, visitChildren, visitTree, visitTree`

    - ### Methods inherited from class javax.faces.component.UIComponent

      `encodeAll, getContainerClientId`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### TYPE

          public static final FacesBean.Type TYPE

    - #### SELECTED_STEP_KEY

          public static final PropertyKey SELECTED_STEP_KEY

    - #### MAX_STEP_KEY

          public static final PropertyKey MAX_STEP_KEY

    - #### PREVIOUS_ACTION_LISTENER_KEY

          public static final PropertyKey PREVIOUS_ACTION_LISTENER_KEY

    - #### NEXT_ACTION_LISTENER_KEY

          public static final PropertyKey NEXT_ACTION_LISTENER_KEY

    - #### NEXT_ACTION_KEY

          public static final PropertyKey NEXT_ACTION_KEY

    - #### PREVIOUS_ACTION_KEY

          public static final PropertyKey PREVIOUS_ACTION_KEY

    - #### COMPONENT_FAMILY

          public static final String COMPONENT_FAMILY

      See Also:
        Constant Field Values

    - #### COMPONENT_TYPE

          public static final String COMPONENT_TYPE

      See Also:
        Constant Field Values

    - #### NEXT_ACTION_TYPE

          public static final Object NEXT_ACTION_TYPE

    - #### PREVIOUS_ACTION_TYPE

          public static final Object PREVIOUS_ACTION_TYPE

  - ### Constructor Detail

    - #### UIXSingleStep

          public UIXSingleStep()

      Construct an instance of the UIXSingleStep.

    - #### UIXSingleStep

          protected UIXSingleStep(String rendererType)

      Construct an instance of the UIXSingleStep.

  - ### Method Detail

    - #### queueEvent

          public void queueEvent(javax.faces.event.FacesEvent e)

      Overrides:
        `queueEvent` in class `UIXComponentBase`

    - #### getActionType

          public Object getActionType()

    - #### setActionType

          public void setActionType(Object actionType)

    - #### saveState

          public Object saveState(javax.faces.context.FacesContext context)

      Specified by:
        `saveState` in interface `javax.faces.component.StateHolder`
      Overrides:
        `saveState` in class `UIXComponentBase`

    - #### broadcast

          public void broadcast(javax.faces.event.FacesEvent event)
                         throws javax.faces.event.AbortProcessingException

      Overrides:
        `broadcast` in class `UIXComponentBase`
      Throws:
        `javax.faces.event.AbortProcessingException`

    - #### getAction

          public javax.faces.el.MethodBinding getAction()

      Specified by:
        `getAction` in interface `javax.faces.component.ActionSource`

    - #### setAction

          public void setAction(javax.faces.el.MethodBinding action)

      Specified by:
        `setAction` in interface `javax.faces.component.ActionSource`

    - #### getActionListener

          public javax.faces.el.MethodBinding getActionListener()

      Specified by:
        `getActionListener` in interface `javax.faces.component.ActionSource`

    - #### setActionListener

          public void setActionListener(javax.faces.el.MethodBinding listener)

      Specified by:
        `setActionListener` in interface `javax.faces.component.ActionSource`

    - #### isImmediate

          public boolean isImmediate()

      returns true if the actionType is PREVIOUS_ACTION_TYPE
      Specified by:
        `isImmediate` in interface `javax.faces.component.ActionSource`

    - #### setImmediate

          public void setImmediate(boolean immediate)

      no-op. For UIXSingleStep components, even though it implements ActionSource, we do no have an immediate attribute. By default, if actionType is PREVIOUS_ACTION_TYPE, we set the phase to PhaseId.APPLY_REQUEST_VALUES, else we set the phase to PhaseId.INVOKE_APPLICATION.
      Specified by:
        `setImmediate` in interface `javax.faces.component.ActionSource`

    - #### getSelectedStep

          public final int getSelectedStep()

      Gets the current step. The valid range is 1 to maxStep. It defaults to 1.
      Returns:
        the new selectedStep value

    - #### setSelectedStep

          public final void setSelectedStep(int selectedStep)

      Sets the current step. The valid range is 1 to maxStep. It defaults to 1.
      Parameters:
        `selectedStep` - the new selectedStep value

    - #### setSelectedStep

          public final void setSelectedStep(long selectedStep)

      Sets the current step. The valid range is 1 to maxStep. It defaults to 1.
      Parameters:
        `selectedStep` - the new selectedStep value

    - #### getMaxStep

          public final int getMaxStep()

      Gets the last possible step. If this value is not known, it should be set to MAX_VALUE_UNKNOWN (-1), which is also the default value. If maxStep is MAX_VALUE_UNKNOWN, then no text is rendered between the Back/Next buttons. When maxStep is 2 and selectedStep is 1, then only a Continue button is rendered.
      Returns:
        the new maxStep value

    - #### setMaxStep

          public final void setMaxStep(int maxStep)

      Sets the last possible step. If this value is not known, it should be set to MAX_VALUE_UNKNOWN (-1), which is also the default value. If maxStep is MAX_VALUE_UNKNOWN, then no text is rendered between the Back/Next buttons. When maxStep is 2 and selectedStep is 1, then only a Continue button is rendered.
      Parameters:
        `maxStep` - the new maxStep value

    - #### setMaxStep

          public final void setMaxStep(long maxStep)

      Sets the last possible step. If this value is not known, it should be set to MAX_VALUE_UNKNOWN (-1), which is also the default value. If maxStep is MAX_VALUE_UNKNOWN, then no text is rendered between the Back/Next buttons. When maxStep is 2 and selectedStep is 1, then only a Continue button is rendered.
      Parameters:
        `maxStep` - the new maxStep value

    - #### getPreviousActionListener

          public final javax.faces.el.MethodBinding getPreviousActionListener()

      Gets a method reference to an action listener that will be called when the singleStep component navigates to the previous step.
      Returns:
        the new previousActionListener value

    - #### setPreviousActionListener

          public final void setPreviousActionListener(javax.faces.el.MethodBinding previousActionListener)

      Sets a method reference to an action listener that will be called when the singleStep component navigates to the previous step.
      Parameters:
        `previousActionListener` - the new previousActionListener value

    - #### getNextActionListener

          public final javax.faces.el.MethodBinding getNextActionListener()

      Gets a method reference to an action listener that will be called when the singleStep component navigates to the next step.
      Returns:
        the new nextActionListener value

    - #### setNextActionListener

          public final void setNextActionListener(javax.faces.el.MethodBinding nextActionListener)

      Sets a method reference to an action listener that will be called when the singleStep component navigates to the next step.
      Parameters:
        `nextActionListener` - the new nextActionListener value

    - #### getNextAction

          public final javax.faces.el.MethodBinding getNextAction()

      Gets a reference to an action method that will be called when the singleStep component navigates to the next step, or the static outcome of the action.
      Returns:
        the new nextAction value

    - #### setNextAction

          public final void setNextAction(javax.faces.el.MethodBinding nextAction)

      Sets a reference to an action method that will be called when the singleStep component navigates to the next step, or the static outcome of the action.
      Parameters:
        `nextAction` - the new nextAction value

    - #### getPreviousAction

          public final javax.faces.el.MethodBinding getPreviousAction()

      Gets a reference to an action method that will be called when the singleStep component navigates to the previous step, or the static outcome of the action.
      Returns:
        the new previousAction value

    - #### setPreviousAction

          public final void setPreviousAction(javax.faces.el.MethodBinding previousAction)

      Sets a reference to an action method that will be called when the singleStep component navigates to the previous step, or the static outcome of the action.
      Parameters:
        `previousAction` - the new previousAction value

    - #### addActionListener

          public final void addActionListener(javax.faces.event.ActionListener listener)

      Adds a action listener.
      Specified by:
        `addActionListener` in interface `javax.faces.component.ActionSource`
      Parameters:
        `listener` - the action listener to add

    - #### removeActionListener

          public final void removeActionListener(javax.faces.event.ActionListener listener)

      Removes a action listener.
      Specified by:
        `removeActionListener` in interface `javax.faces.component.ActionSource`
      Parameters:
        `listener` - the action listener to remove

    - #### getActionListeners

          public final javax.faces.event.ActionListener[] getActionListeners()

      Returns an array of attached action listeners.
      Specified by:
        `getActionListeners` in interface `javax.faces.component.ActionSource`
      Returns:
        an array of attached action listeners.

    - #### getFamily

          public String getFamily()

      Specified by:
        `getFamily` in class `UIXComponentBase`

    - #### getBeanType

          protected FacesBean.Type getBeanType()

      Overrides:
        `getBeanType` in class `UIXComponentBase`

Copyright © 2001-2016 The Apache Software Foundation. All Rights Reserved.