com.sun.webui.jsf.component
Class Wizard

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by com.sun.webui.jsf.component.Wizard
All Implemented Interfaces:
javax.faces.component.NamingContainer, javax.faces.component.StateHolder

public class Wizard
extends javax.faces.component.UIComponentBase
implements javax.faces.component.NamingContainer


Field Summary
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
Wizard()
          Construct a Wizard instance.
 
Method Summary
 void broadcast(javax.faces.event.FacesEvent facesEvent)
          This method broadcasts a WizardEvent event that is queued as a result of an immediate ActionEvent from one of the wizard's navigation components.
 void broadcastEvent(javax.faces.component.UIComponent source, int event)
          Called from WizardActionListener to establish the event state of the wizard.
 void decode(javax.faces.context.FacesContext context)
          Called by processDecodes during APPLY_REQUEST_VALUES phase.
 void encodeBegin(javax.faces.context.FacesContext context)
          Begin the rendering of the wizard.
 void encodeChildren(javax.faces.context.FacesContext context)
          Begin the rendering of the wizard child components.
 void encodeEnd(javax.faces.context.FacesContext context)
          Complete the rendering of the wizard.
 javax.faces.component.UIComponent getCancelComponent()
          Return the UIComponent that will be used for the Cancel button.
 javax.faces.component.UIComponent getCloseComponent()
          Return the UIComponent that will be used for the Close button.
 javax.faces.component.UIComponent getControlBarComponent()
          Return a component that represents the control bar or navigation controls, rendered after the step's components.
 WizardStep getCurrentStep()
          Return the step currently being performed.
 java.lang.String getCurrentStepNumberString()
          Return the number of the current Step, to be used in a steps list.
 WizardEventListener getEventListener()
          The eventListener attribute is used to specify an object to handle an event that is triggered when a user activates a component in the wizard.
 java.lang.String getFamily()
          Return the family for this component, com.sun.webui.jsf.Wizard.
 javax.faces.component.UIComponent getFinishComponent()
          Return the UIComponent that will be used for the Finish button.
 javax.faces.component.UIComponent getLeftControlBarComponent()
          Return a component that is rendered for the controls justified to the left below the step's components.
 WizardModel getModel()
          Overrides super.getModel() to provide a default WizardModel instance.
 javax.faces.component.UIComponent getNextComponent()
          Return the UIComponent that will be used for the Next button.
 java.lang.String getOnCancel()
          Scripting code executed when the Cancel button is clicked.
 java.lang.String getOnClose()
          Scripting code executed when the Close button is clicked.
 java.lang.String getOnFinish()
          Scripting code executed when the Finish button is clicked.
 java.lang.String getOnHelpTab()
          Scripting code executed when the Help tab is clicked.
 java.lang.String getOnNext()
          Scripting code executed when the Next button is clicked.
 java.lang.String getOnPopupDismiss()
          Scripting code that is invoked when the wizard popup is dismissed.
 java.lang.String getOnPrevious()
          Scripting code executed when the Previous button is clicked.
 java.lang.String getOnStepLink()
          Scripting code executed when a Step link is clicked.
 java.lang.String getOnStepsTab()
          Scripting code executed when the Steps tab is clicked.
 javax.faces.component.UIComponent getPreviousComponent()
          Return the UIComponent that will be used for the Previous button.
 javax.faces.component.UIComponent getRightControlBarComponent()
          Return a component that is rendered for the controls justified to the right, below the step's components.
 javax.faces.component.UIComponent getStepDetailComponent()
          Return a component that represents the step detail or step instruction, rendered below the step title.
 javax.faces.component.UIComponent getStepDetailTextComponent()
          Return the component to render the step detail text.
 javax.faces.component.UIComponent getStepHelpComponent()
          Return a component that represents the step help for the current step, rendered in the Help tab.
 javax.faces.component.UIComponent getStepHelpTextComponent()
          Return the component to render for the step help text for the current step in the steps pane help tab.
 javax.faces.component.UIComponent getStepIndicatorComponent()
          Return a component that implements the current step indicator icon.
 javax.faces.component.UIComponent getSteplinkComponent(java.lang.String id, java.lang.String text, int wizardEvent, boolean immediate, java.lang.String javascript)
          Return an existing or create a Hyperlink component to be used as a step link in the steps list.
 javax.faces.component.UIComponent getStepListComponent()
          Return a that represents the steps list, rendered in the Steps tab.
 java.util.Iterator getStepListIterator()
          Returns an iterator of WizardStepListItem instances that represent the steps for this wizard.
 javax.faces.component.UIComponent getStepNumberComponent(WizardStep step, java.lang.String numberString)
          Return the component to render for the step number that appears in the step list.
 javax.faces.component.UIComponent getStepPlaceholderTextComponent(WizardStep step)
          Return the component to render for a branch step's placeholder text that appears in the step list.
 java.lang.Object getSteps()
          Use the steps attribute to specify the wizard steps programmatically, instead of using the webuijsf:wizardStep tags in the JSP.
 javax.faces.component.UIComponent getStepsBarComponent()
          Return a component to represent the wizards's top bar that typically contains the Steps and Help tabs.
 javax.faces.component.UIComponent getStepsPaneComponent()
          Return a component to represent the left pane in the wizard that typically contains the steps list.
 javax.faces.component.UIComponent getStepsPaneTitleComponent()
          Return the component to render for the steps pane title text when there is no step help and therefore no tabs.
 javax.faces.component.UIComponent getStepSummaryComponent(WizardStep step)
          Return the component to render for the step summary text that appears in the step list.
 javax.faces.component.UIComponent getStepTitleComponent()
          Return a component that represents the step title.
 javax.faces.component.UIComponent getStepTitleLabelTextComponent()
          Return the component to render the step title label.
 javax.faces.component.UIComponent getStepTitleTextComponent()
          Return the component to render the step title text.
 java.lang.String getStyle()
          CSS style(s) to be applied to the outermost HTML element when this component is rendered.
 java.lang.String getStyleClass()
          CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
 javax.faces.component.UIComponent getTabsComponent()
          Return a component that is rendered in the Steps pane.
 javax.faces.component.UIComponent getTaskComponent()
          Return a component that represents the entire right pane including the step title, detail and components.
 javax.faces.component.UIComponent getTaskHeaderComponent()
          Return a component that represents the step title and detail for the current step.
This Wizard implementation returns null.
 javax.faces.component.UIComponent getTaskStepComponent()
          Return a component that represents the components that comprise the current wizard step.
 java.lang.String getTitle()
          The text to be displayed as the title for the wizard.
 javax.faces.component.UIComponent getTitleComponent()
          Return the component to render for the wizard title.
static Wizard getWizard(javax.faces.component.UIComponent child, java.lang.String wizardId)
          Return the Wizard instance ancestor of child identified by wizardId.
 boolean hasCancel()
          Return true if the cancel button should be rendered for the current step, else false.
 boolean hasClose()
          Return true if the close button should be rendered for the current step, else false.
 boolean hasFinish()
          Return true if the finish button should be rendered for the current step, else false.
 boolean hasNext()
          Return true if the next button should be rendered for the current step, else false.
 boolean hasPrevious()
          Return true if the previous button should be rendered for the current step, else false.
 boolean hasStepHelp()
          Return true if the wizard has help for steps.
 boolean isCancelDisabled()
          Return true if the cancel button should be disabled for the current step, else false.
 boolean isCloseDisabled()
          Return true if the close button should be disabled for the current step, else false.
 boolean isComplete()
          Return true if the wizard has completed all its steps.
 boolean isCurrentStep(WizardStep step)
          Return true if step is the current step, else false.
 boolean isFinishDisabled()
          Return true if the finish button should be disabled for the current step, else false.
 boolean isIsPopup()
          The wizard is being targeted to a popup window.
 boolean isNextDisabled()
          Return true if the next button should be disabled for the current step, else false.
 boolean isPreviousDisabled()
          Return true if the previous button should be disabled for the current step, else false.
 boolean isStepsTabActive()
          Returns true if the steps pane has Steps and Help tabs and the Steps tab is selected.
 boolean isVisible()
          Indicates whether the component is viewable by the user in the rendered HTML page.
 void processDecodes(javax.faces.context.FacesContext context)
          The wizard controls the decoding of the current wizard step.
 void processRestoreState(javax.faces.context.FacesContext context, java.lang.Object state)
          This implementation calls super.processRestortState and then calls getModel().initialize().
 void processUpdates(javax.faces.context.FacesContext context)
          The wizard controls the updating of the current wizard step.
 void processValidators(javax.faces.context.FacesContext context)
          The wizard controls the validating of the current wizard step.
 void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
          Restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext _context)
          Save the state of this component.
 void setEventListener(WizardEventListener eventListener)
          The eventListener attribute is used to specify an object to handle an event that is triggered when a user activates a component in the wizard.
 void setId(java.lang.String id)
          The component identifier for this component.
 void setIsPopup(boolean isPopup)
          The wizard is being targeted to a popup window.
 void setModel(WizardModel model)
          The model property is a value binding that resolves to an instance of WizardModel.
 void setOnCancel(java.lang.String onCancel)
          Scripting code executed when the Cancel button is clicked.
 void setOnClose(java.lang.String onClose)
          Scripting code executed when the Close button is clicked.
 void setOnFinish(java.lang.String onFinish)
          Scripting code executed when the Finish button is clicked.
 void setOnHelpTab(java.lang.String onHelpTab)
          Scripting code executed when the Help tab is clicked.
 void setOnNext(java.lang.String onNext)
          Scripting code executed when the Next button is clicked.
 void setOnPopupDismiss(java.lang.String onPopupDismiss)
          Scripting code that is invoked when the wizard popup is dismissed.
 void setOnPrevious(java.lang.String onPrevious)
          Scripting code executed when the Previous button is clicked.
 void setOnStepLink(java.lang.String onStepLink)
          Scripting code executed when a Step link is clicked.
 void setOnStepsTab(java.lang.String onStepsTab)
          Scripting code executed when the Steps tab is clicked.
 void setRendered(boolean rendered)
          Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page.
 void setSteps(java.lang.Object steps)
          Use the steps attribute to specify the wizard steps programmatically, instead of using the webuijsf:wizardStep tags in the JSP.
 void setStyle(java.lang.String style)
          CSS style(s) to be applied to the outermost HTML element when this component is rendered.
 void setStyleClass(java.lang.String styleClass)
          CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
 void setTitle(java.lang.String title)
          The text to be displayed as the title for the wizard.
 void setVisible(boolean visible)
          Indicate whether the component should be viewable by the user in the rendered HTML page.
 
Methods inherited from class javax.faces.component.UIComponentBase
findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, getValueExpression, invokeOnComponent, isRendered, isTransient, processSaveState, queueEvent, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding, setValueExpression
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Wizard

public Wizard()
Construct a Wizard instance. Sets renderer type to com.sun.webui.jsf.Wizard.

Method Detail

getFamily

public java.lang.String getFamily()
Return the family for this component, com.sun.webui.jsf.Wizard.

Specified by:
getFamily in class javax.faces.component.UIComponent

getModel

public WizardModel getModel()
Overrides super.getModel() to provide a default WizardModel instance. If super.getModel() returns null, create an instance of WizardModelBase and call super.setModel() with the instance.


decode

public void decode(javax.faces.context.FacesContext context)
Called by processDecodes during APPLY_REQUEST_VALUES phase. Unlike many components, this method does not defer to the renderer since there is nothing in the response to decode by the Wizard component directly.

Overrides:
decode in class javax.faces.component.UIComponentBase

processDecodes

public void processDecodes(javax.faces.context.FacesContext context)
The wizard controls the decoding of the current wizard step. The wizard must call processDecodes() for its controls before the current step, to ensure that any control events are issued before processing the step.

Overrides:
processDecodes in class javax.faces.component.UIComponentBase
Parameters:
context - This FacesContext for this request.
Throws:
java.lang.NullPointerException

processValidators

public void processValidators(javax.faces.context.FacesContext context)
The wizard controls the validating of the current wizard step. The wizard must call processValidators() for its controls before the current step, to ensure that any control events are issued before processing the step. Call the validateControls method, and then validateStep.

Overrides:
processValidators in class javax.faces.component.UIComponentBase
Parameters:
context - This FacesContext for this request.
Throws:
java.lang.NullPointerException

processUpdates

public void processUpdates(javax.faces.context.FacesContext context)
The wizard controls the updating of the current wizard step. The wizard must call processUpdates() for its controls before the current step, to ensure that any control events are issued before processing the step. Call the updateControls method, and then updateStep.

Overrides:
processUpdates in class javax.faces.component.UIComponentBase
Parameters:
context - This FacesContext for this request.
Throws:
java.lang.NullPointerException

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context)
                 throws java.io.IOException
Begin the rendering of the wizard. If the wizard is rendering for the first time, the event member is WizardEvent.START, call broadcastStartEvent and then set event to WizardEvent.NOEVENT to indicate that the wizard has rendered at least once.
Then call the renderer's encodeBegin method.

Overrides:
encodeBegin in class javax.faces.component.UIComponentBase
Parameters:
context - This FacesContext for this requset.
Throws:
java.io.IOException

encodeChildren

public void encodeChildren(javax.faces.context.FacesContext context)
                    throws java.io.IOException
Begin the rendering of the wizard child components. This really means that the WizardStep children are available. Call the initialize) method.
Then call the renderer's encodeChildren method.

Overrides:
encodeChildren in class javax.faces.component.UIComponentBase
Parameters:
context - This FacesContext for this requset.
Throws:
java.io.IOException

encodeEnd

public void encodeEnd(javax.faces.context.FacesContext context)
               throws java.io.IOException
Complete the rendering of the wizard. Call the renderer's encodeChildren method. If the wizard model's isComplete method returns true, call the model's complete method to inform the model this wizard instance will no longer invoke methods on that model instance during this wizard session.

Overrides:
encodeEnd in class javax.faces.component.UIComponentBase
Parameters:
context - This FacesContext for this requset.
Throws:
java.io.IOException

getStepListIterator

public java.util.Iterator getStepListIterator()
Returns an iterator of WizardStepListItem instances that represent the steps for this wizard. WizardStepListItem instances encapsulate information about a step that is useful for rendering a list of steps.


isComplete

public boolean isComplete()
Return true if the wizard has completed all its steps.


isCurrentStep

public boolean isCurrentStep(WizardStep step)
Return true if step is the current step, else false.

Parameters:
step - The step to check.

getCurrentStep

public WizardStep getCurrentStep()
Return the step currently being performed.


hasStepHelp

public boolean hasStepHelp()
Return true if the wizard has help for steps. Typically, if false is returned the wizard steps pane does not display Steps and Help tabs, just the step list.


hasClose

public boolean hasClose()
Return true if the close button should be rendered for the current step, else false. Typically this method returns true only for the results step.


hasNext

public boolean hasNext()
Return true if the next button should be rendered for the current step, else false. Typically this method returns true for all steps except for the finish or results steps.


hasPrevious

public boolean hasPrevious()
Return true if the previous button should be rendered for the current step, else false. Typically this method returns true for all steps except for the results steps.


hasFinish

public boolean hasFinish()
Return true if the finish button should be rendered for the current step, else false. Typically this method returns true only for the finish step.


hasCancel

public boolean hasCancel()
Return true if the cancel button should be rendered for the current step, else false. Typically this method returns true for all steps except for the results step.


isCloseDisabled

public boolean isCloseDisabled()
Return true if the close button should be disabled for the current step, else false.


isNextDisabled

public boolean isNextDisabled()
Return true if the next button should be disabled for the current step, else false.


isPreviousDisabled

public boolean isPreviousDisabled()
Return true if the previous button should be disabled for the current step, else false. Typically the first step of a sequence should return true, since there usually isn't a step before the first step.


isFinishDisabled

public boolean isFinishDisabled()
Return true if the finish button should be disabled for the current step, else false.


isCancelDisabled

public boolean isCancelDisabled()
Return true if the cancel button should be disabled for the current step, else false.


isStepsTabActive

public boolean isStepsTabActive()
Returns true if the steps pane has Steps and Help tabs and the Steps tab is selected. If the wizard has no step help return true.


getCurrentStepNumberString

public java.lang.String getCurrentStepNumberString()
Return the number of the current Step, to be used in a steps list.


getCancelComponent

public javax.faces.component.UIComponent getCancelComponent()
Return the UIComponent that will be used for the Cancel button.


getCloseComponent

public javax.faces.component.UIComponent getCloseComponent()
Return the UIComponent that will be used for the Close button.


getFinishComponent

public javax.faces.component.UIComponent getFinishComponent()
Return the UIComponent that will be used for the Finish button.


getNextComponent

public javax.faces.component.UIComponent getNextComponent()
Return the UIComponent that will be used for the Next button.


getPreviousComponent

public javax.faces.component.UIComponent getPreviousComponent()
Return the UIComponent that will be used for the Previous button.


getTabsComponent

public javax.faces.component.UIComponent getTabsComponent()
Return a component that is rendered in the Steps pane. If the wizard steps do not provide help, null is returned.


getStepIndicatorComponent

public javax.faces.component.UIComponent getStepIndicatorComponent()
Return a component that implements the current step indicator icon. If a facet named stepIndicator is found that component is returned. Otherwise an Icon component is returned. It is assigned the id
getId() + "_stepIndicator"

If the facet is not defined then the returned Icon component is re-intialized every time this method is called.
The icon image is ThemeImages.WIZARD_ARROW

Returns:
a current step indicator icon

getSteplinkComponent

public javax.faces.component.UIComponent getSteplinkComponent(java.lang.String id,
                                                              java.lang.String text,
                                                              int wizardEvent,
                                                              boolean immediate,
                                                              java.lang.String javascript)
Return an existing or create a Hyperlink component to be used as a step link in the steps list. The id for the created component is:
step.getId() + "_stplnk" + "_" + stepId().
The appended step id is used to identify the step the wizard should navigate to.
An WizardActionListener is added to the component if it is created.

Parameters:
id - The component id as described above.
text - The Hylerlink text, typically WizardStep.getSummaryText.
wizardEvent - the WizardEvent for the listener to process.
immediate - the component's immediate value.
javascript - the onclick JavaScript routine name for this component

getStepsPaneComponent

public javax.faces.component.UIComponent getStepsPaneComponent()
Return a component to represent the left pane in the wizard that typically contains the steps list. This Wizard implementation returns null.


getStepsBarComponent

public javax.faces.component.UIComponent getStepsBarComponent()
Return a component to represent the wizards's top bar that typically contains the Steps and Help tabs. This Wizard implementation returns null.


getStepListComponent

public javax.faces.component.UIComponent getStepListComponent()
Return a that represents the steps list, rendered in the Steps tab. This Wizard implementation returns null.


getStepHelpComponent

public javax.faces.component.UIComponent getStepHelpComponent()
Return a component that represents the step help for the current step, rendered in the Help tab. This Wizard implementation returns null.


getStepTitleComponent

public javax.faces.component.UIComponent getStepTitleComponent()
Return a component that represents the step title. The component is rendered in the wizard above the step's components. This Wizard implementation returns null.


getStepDetailComponent

public javax.faces.component.UIComponent getStepDetailComponent()
Return a component that represents the step detail or step instruction, rendered below the step title. This Wizard implementation returns null.


getTaskStepComponent

public javax.faces.component.UIComponent getTaskStepComponent()
Return a component that represents the components that comprise the current wizard step. This Wizard implementation returns null.


getTaskComponent

public javax.faces.component.UIComponent getTaskComponent()
Return a component that represents the entire right pane including the step title, detail and components. This Wizard implementation returns null.


getTaskHeaderComponent

public javax.faces.component.UIComponent getTaskHeaderComponent()
Return a component that represents the step title and detail for the current step.
This Wizard implementation returns null.


getControlBarComponent

public javax.faces.component.UIComponent getControlBarComponent()
Return a component that represents the control bar or navigation controls, rendered after the step's components. This Wizard implementation returns null.


getLeftControlBarComponent

public javax.faces.component.UIComponent getLeftControlBarComponent()
Return a component that is rendered for the controls justified to the left below the step's components. Typically these controls are the previous and next or finish buttons. This Wizard implementation returns null.


getRightControlBarComponent

public javax.faces.component.UIComponent getRightControlBarComponent()
Return a component that is rendered for the controls justified to the right, below the step's components. Typically the control is the cancel or close buttons. This Wizard implementation returns null.


getStepTitleLabelTextComponent

public javax.faces.component.UIComponent getStepTitleLabelTextComponent()
Return the component to render the step title label. The id of this component is:
getCurrentStep().getId() + "_stpttllbl". This component also includes the step number. Typically renders "Step 1:".

This Wizard implementation returns a StaticText component that is created and initialized every time this method is called.


getStepTitleTextComponent

public javax.faces.component.UIComponent getStepTitleTextComponent()
Return the component to render the step title text. The id of this component is:
getCurrentStep().getId() + "_stpttl".
This component typically renders after the step title label.

This Wizard implementation returns a StaticText component that is created and initialized every time this method is called.


getStepDetailTextComponent

public javax.faces.component.UIComponent getStepDetailTextComponent()
Return the component to render the step detail text. The id of this component is:
getCurrentStep().getId() + "_stpdtl".
This component typically renders below the step title.

This Wizard implementation returns a StaticText component that is created and initialized every time this method is called.


getStepSummaryComponent

public javax.faces.component.UIComponent getStepSummaryComponent(WizardStep step)
Return the component to render for the step summary text that appears in the step list.

This Wizard implementation returns either:

Parameters:
step - The step being rendered.

getStepPlaceholderTextComponent

public javax.faces.component.UIComponent getStepPlaceholderTextComponent(WizardStep step)
Return the component to render for a branch step's placeholder text that appears in the step list. The component id is:
step.getId() + "_stpplhld".

This Wizard implementation returns a StaticText component that is created and initialized every time this method is called.

Parameters:
step - The step being rendered.

getStepNumberComponent

public javax.faces.component.UIComponent getStepNumberComponent(WizardStep step,
                                                                java.lang.String numberString)
Return the component to render for the step number that appears in the step list.

This Wizard implementation returns either:

Parameters:
step - The step being rendered.
numberString - The step number.

getStepHelpTextComponent

public javax.faces.component.UIComponent getStepHelpTextComponent()
Return the component to render for the step help text for the current step in the steps pane help tab. The id of this component is:
step.getId() + "_stphlp".

This Wizard implementation returns a StaticText component that is created and initialized every time this method is called.


getTitleComponent

public javax.faces.component.UIComponent getTitleComponent()
Return the component to render for the wizard title. The id of this component is:
this.getId() + "_title".

This Wizard implementation returns a StaticText component that is created and initialized every time this method is called.


getStepsPaneTitleComponent

public javax.faces.component.UIComponent getStepsPaneTitleComponent()
Return the component to render for the steps pane title text when there is no step help and therefore no tabs. The id of this component is:
step().getId() + "_stepsPaneTitle".

This Wizard implementation returns a StaticText component that is created and initialized every time this method is called.


getWizard

public static Wizard getWizard(javax.faces.component.UIComponent child,
                               java.lang.String wizardId)
Return the Wizard instance ancestor of child identified by wizardId.

Parameters:
child - A descendant of the desired Wizard.
wizardId - The id of a Wizard ancestor.

broadcastEvent

public void broadcastEvent(javax.faces.component.UIComponent source,
                           int event)
                    throws javax.faces.event.AbortProcessingException
Called from WizardActionListener to establish the event state of the wizard.

Parameters:
source - The UIComponent originating the even.
event - One of:
Throws:
javax.faces.event.AbortProcessingException

broadcast

public void broadcast(javax.faces.event.FacesEvent facesEvent)
               throws javax.faces.event.AbortProcessingException
This method broadcasts a WizardEvent event that is queued as a result of an immediate ActionEvent from one of the wizard's navigation components. If facesEvent is not an instance of WizardEvent the method just returns.

If facesEvent is an instance of WizardEvent a new WizardEvent is constructed with addtional information based on the navigation event and the wizard state, including:

The event is then broadcast to WizardEventListeners configured on the current step and the wizard, and then forwarded to the wizard model in the following manner:

  1. If the current step is not null and its getEventListener method does not return null, the handleEvent method is called on the returned instance.
  2. If the step listener's handleEvent method does not throw an exception the wizard's getEventListner is called and if it returns a non null instance, its handleEvent method is called.
  3. If no exception occurs and the last listener called returns true, the event is forwarded to the wizard model.
    Note that if both listeners exist both listeners are sent the event, even if the step's listener returns false. This means that if the wizard's listener returns true, since it is called last, the event is forwarded to the wizard model.
    If the last listener called returns false the event is not forwarded to the model and the current step will be redisplayed.
If either listener's handleEvent method throws an exception the event is changed to WizardEvent.CANCEL and forwarded to the wizard model, effectively ending the wizard session, as if the user had clicked the cancel button.

Overrides:
broadcast in class javax.faces.component.UIComponentBase
Parameters:
facesEvent - must be an instance of WizardEvent
Throws:
javax.faces.event.AbortProcessingException

setId

public void setId(java.lang.String id)
The component identifier for this component. This value must be unique within the closest parent component that is a naming container.

Overrides:
setId in class javax.faces.component.UIComponentBase

setRendered

public void setRendered(boolean rendered)
Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page. If set to false, the rendered HTML page does not include the HTML for the component. If the component is not rendered, it is also not processed on any subsequent form submission.

Overrides:
setRendered in class javax.faces.component.UIComponentBase

getEventListener

public WizardEventListener getEventListener()
The eventListener attribute is used to specify an object to handle an event that is triggered when a user activates a component in the wizard. The eventListener attribute value must be a JavaServer Faces EL expression that resolves to an instance of com.sun.webui.jsf.event.WizardEventListener.

The return value of the wizard component's call to the event listener's handleEvent() method controls the processing of the current step that is being performed, and determines whether the next step or a previous step, etc. can be navigated to.

See the Event Listeners section also.


setEventListener

public void setEventListener(WizardEventListener eventListener)
The eventListener attribute is used to specify an object to handle an event that is triggered when a user activates a component in the wizard. The eventListener attribute value must be a JavaServer Faces EL expression that resolves to an instance of com.sun.webui.jsf.event.WizardEventListener.

The return value of the wizard component's call to the event listener's handleEvent() method controls the processing of the current step that is being performed, and determines whether the next step or a previous step, etc. can be navigated to.

See the Event Listeners section also.

See Also:
getEventListener()

isIsPopup

public boolean isIsPopup()
The wizard is being targeted to a popup window. Default is true. Set this property to false if the wizard is to appear within a main browser window.


setIsPopup

public void setIsPopup(boolean isPopup)
The wizard is being targeted to a popup window. Default is true. Set this property to false if the wizard is to appear within a main browser window.

See Also:
isIsPopup()

setModel

public void setModel(WizardModel model)
The model property is a value binding that resolves to an instance of WizardModel. This instance is an alternative to the default WizardModelBase instance that controls the flow of steps in the wizard.

See Also:
getModel()

getOnCancel

public java.lang.String getOnCancel()
Scripting code executed when the Cancel button is clicked.


setOnCancel

public void setOnCancel(java.lang.String onCancel)
Scripting code executed when the Cancel button is clicked.

See Also:
getOnCancel()

getOnClose

public java.lang.String getOnClose()
Scripting code executed when the Close button is clicked.


setOnClose

public void setOnClose(java.lang.String onClose)
Scripting code executed when the Close button is clicked.

See Also:
getOnClose()

getOnFinish

public java.lang.String getOnFinish()
Scripting code executed when the Finish button is clicked.


setOnFinish

public void setOnFinish(java.lang.String onFinish)
Scripting code executed when the Finish button is clicked.

See Also:
getOnFinish()

getOnHelpTab

public java.lang.String getOnHelpTab()
Scripting code executed when the Help tab is clicked.


setOnHelpTab

public void setOnHelpTab(java.lang.String onHelpTab)
Scripting code executed when the Help tab is clicked.

See Also:
getOnHelpTab()

getOnNext

public java.lang.String getOnNext()
Scripting code executed when the Next button is clicked.


setOnNext

public void setOnNext(java.lang.String onNext)
Scripting code executed when the Next button is clicked.

See Also:
getOnNext()

getOnPopupDismiss

public java.lang.String getOnPopupDismiss()
Scripting code that is invoked when the wizard popup is dismissed. If the wizard is not in a popup, the onPopupDismiss attribute is ignored. The scripting code must specify what happens in the browser when the window is closed. For example, the form of the parent window that opened the popup should be submitted, and the browser might be redirected, or the display refreshed to reflect the task completed by the user. These activities provide feedback to the user.


setOnPopupDismiss

public void setOnPopupDismiss(java.lang.String onPopupDismiss)
Scripting code that is invoked when the wizard popup is dismissed. If the wizard is not in a popup, the onPopupDismiss attribute is ignored. The scripting code must specify what happens in the browser when the window is closed. For example, the form of the parent window that opened the popup should be submitted, and the browser might be redirected, or the display refreshed to reflect the task completed by the user. These activities provide feedback to the user.

See Also:
getOnPopupDismiss()

getOnPrevious

public java.lang.String getOnPrevious()
Scripting code executed when the Previous button is clicked.


setOnPrevious

public void setOnPrevious(java.lang.String onPrevious)
Scripting code executed when the Previous button is clicked.

See Also:
getOnPrevious()

getOnStepLink

public java.lang.String getOnStepLink()
Scripting code executed when a Step link is clicked.


setOnStepLink

public void setOnStepLink(java.lang.String onStepLink)
Scripting code executed when a Step link is clicked.

See Also:
getOnStepLink()

getOnStepsTab

public java.lang.String getOnStepsTab()
Scripting code executed when the Steps tab is clicked.


setOnStepsTab

public void setOnStepsTab(java.lang.String onStepsTab)
Scripting code executed when the Steps tab is clicked.

See Also:
getOnStepsTab()

getSteps

public java.lang.Object getSteps()
Use the steps attribute to specify the wizard steps programmatically, instead of using the webuijsf:wizardStep tags in the JSP. The steps attribute must be specified as an ArrayList or List of WizardStep, WizardBranch, WizardBranchSteps, or WizardSubstepBranch components.


setSteps

public void setSteps(java.lang.Object steps)
Use the steps attribute to specify the wizard steps programmatically, instead of using the webuijsf:wizardStep tags in the JSP. The steps attribute must be specified as an ArrayList or List of WizardStep, WizardBranch, WizardBranchSteps, or WizardSubstepBranch components.

See Also:
getSteps()

getStyle

public java.lang.String getStyle()
CSS style(s) to be applied to the outermost HTML element when this component is rendered.


setStyle

public void setStyle(java.lang.String style)
CSS style(s) to be applied to the outermost HTML element when this component is rendered.

See Also:
getStyle()

getStyleClass

public java.lang.String getStyleClass()
CSS style class(es) to be applied to the outermost HTML element when this component is rendered.


setStyleClass

public void setStyleClass(java.lang.String styleClass)
CSS style class(es) to be applied to the outermost HTML element when this component is rendered.

See Also:
getStyleClass()

getTitle

public java.lang.String getTitle()
The text to be displayed as the title for the wizard. The title is displayed in the top line, and extends the full width of the wizard window.


setTitle

public void setTitle(java.lang.String title)
The text to be displayed as the title for the wizard. The title is displayed in the top line, and extends the full width of the wizard window.

See Also:
getTitle()

isVisible

public boolean isVisible()
Indicates whether the component is viewable by the user in the rendered HTML page. Returns true by default and the HTML markup for the component HTML is rendered in the page and the component is visible to the user. If false is returned the the HTML markup for the component is present in the rendered page, but the component is not visible to the user.

See Also:
setVisible(boolean)

setVisible

public void setVisible(boolean visible)
Indicate whether the component should be viewable by the user in the rendered HTML page. If set to false , the HTML markup for the component is present in the rendered page, but the component is viewable to the user. By default, the HTML markup for the component is included in the rendered page and is visible to the user. If visible is false, the component is not viewable to the user, but the HTML markup is included in the rendered page and can still be processed on subsequent form submissions because the HTML is present.

See Also:
isVisible()

processRestoreState

public void processRestoreState(javax.faces.context.FacesContext context,
                                java.lang.Object state)
This implementation calls super.processRestortState and then calls getModel().initialize(). This is needed because the order of state restoration does not restore Wizard children until after the model is restored. The model must rebuild the step children when they are actual children of the Wizard, since they are new instances.

Overrides:
processRestoreState in class javax.faces.component.UIComponentBase

restoreState

public void restoreState(javax.faces.context.FacesContext _context,
                         java.lang.Object _state)
Restore the state of this component.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIComponentBase

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext _context)
Save the state of this component.

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


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.