| |||||||
FRAMES NO FRAMES |
Use the webuijsf:wizardStep
tag to define
a single step of a wizard.
In a simple wizard, the webuijsf:wizardStep
tag is a child of the
webuijsf:wizard
tag. In a branching wizard,
the webuijsf:wizardStep
tag can be used as a child of the
webuijsf:wizardBranchSteps
tag or webuijsf:wizardSubstepBranch
tag.
The only HTML element that is rendered specifically for the WizardStep
component is <webuijsf:markup tag="div" styleClass="#{themeStyles.WIZARD_TASK}">
.
The WizTsk
class selector is not defined by the suntheme or the defaulttheme, so
the <div>
uses default
rendering. The <div>
contains the HTML that is rendered for the child tags that are
contained in the webuijsf:wizardStep
tag.
The values that are specified in the summary
and help
attributes are displayed in the Steps tab and Help tab. The title
value is displayed in the Step Title area, and the detail
value is displayed in the Step Instructions area in the Step Content
pane. The input components, labels, and so on that you specify as child
components in the webuijsf:wizardStep
are displayed
in the Step Input Controls area in the Step Content pane. See the
webuijsf:wizard
documentation for a detailed
description of all the wizard areas.
The following diagram shows the relative location of the
wizardStep areas. The areas that are controlled with the webuijsf:wizardStep
tag are highlighted in light blue. The grayed out areas
are controlled with the webuijsf:wizard
tag, but are shown here
for context.
Wizard Title | ||||||
Steps
Pane
|
Step Content Pane
|
|||||
Navigation Controls |
webuijsf:wizardStep
Tag
Use the webuijsf:wizardStep
tag attributes to
provide information about the step, such as the title
,
summary
, detail
, and help
.
These attributes are used in the wizard
layout as described in the previous section.
The finish
attribute is used to
indicate that the Navigation Controls area of the step should contain a Finish button
that will execute the wizard task when clicked.
The results
attribute is used to
indicate that the step is a View Results page, which should contain a Close button in the
Navigation Controls area. A View Results page comes after the Finish
page, and is used to summarize the work that the wizard has performed,
and lists any actions users should take after closing the wizard.
The webuijsf:wizardStep
tag also provides
attributes (onCancel
, onClose
, etc.) for
specifying client-side JavaScript to be executed when the user clicks
on the various buttons and tabs. These attributes take precedence
over similar attributes in the webuijsf:wizard
tag. For
example, if the onNext
attribute is specified in both the
webuijsf:wizard
and webuijsf:wizardStep
tags, only the JavaScript
assigned to the webuijsf:wizardStep
tag's onNext
attribute is applied to the rendered Next button. However, for any steps in the
wizard that do not specify the onNext
attribute, the webuijsf:wizard
tag's onNext
attribute would be used.
The eventListener
attribute is used to specify an event listener
for the step, which is executed as the user leaves the step
and the form is submitted. See the
Event Listeners section in the wizard tag documentation for more information.
Within the webuijsf:wizardStep
tag, specify the tags for
child components such as webuijsf:staticText
, webuijsf:textField
,
webuijsf:checkbox
, webuijsf:radioButton
,
and webuijsf:dropDown
to create the content of the step.
You can specify the content tags in a step in either of the following ways:
webuijsf:wizardStep
tag, as shown in the following example.
<webuijsf:wizard ...>
<webuijsf:wizardStep ...>
...
<webuijsf:textField id="name"
... />
<webuijsf:textField
id="address" ... />
...
</webuijsf:wizardStep>
</webuijsf:wizard>
<f:subview>
tag in a separate JSP file. Use the <jsp:include>
standard action in the webuijsf:wizardStep
tag to
include the
JSP that contains the step content. In the example below, the
subview tags are defined in the step1.jsp
page.
<webuijsf:wizard ...>
<webuijsf:wizardStep ...>
<jsp:include
page="steps/step1.jsp" />
</webuijsf:wizardStep>
</webuijsf:wizard>
<f:subview>
tag
in step1.jsp
contains: <f:subview id=sv_step1>
...
<webuijsf:textField
id="name" ... />
<webuijsf:textField
id="address" ... />
...
/f:subview>
A wizard uses a branch when the sequence of steps is determined by the user's input. For example, the wizard can allow a user to choose one of two options, and that choice causes the wizard to proceed through one sequence of steps. If the user chooses the other option, the wizard proceeds through a different sequence.
Note that you might be able to avoid branching, and simplify the
wizard, if you can structure your application so that the user's choice
is made before launching the wizard. You can use the user's
choice to launch a different wizard to present each sequence of steps,
which would require only the webuijsf:wizard
and webuijsf:wizardStep
tags.
See the webuijsf:wizardBranchSteps
documentation and webuijsf:wizardSubstepBranch
documentation for more information about how to implement
branching. The webuijsf:wizardStep
tag
can be used a child of these branching tags, to create the steps in the branching
sequence.
None.
See the webuijsf:wizard
tag example for a simple wizard. See the webuijsf:wizardBranch tag example
for a more complex wizard that uses branching.
Tag Information | |
Tag Class | com.sun.webui.jsf.component.WizardStepTag |
TagExtraInfo Class | None |
Body Content | JSP |
Display Name | None |
Attributes | ||||
Name | Required | Request-time | Type | Description |
binding | false | false | java.lang.String | A ValueExpression that resolves to the UIComponent that corresponds to this tag. This attribute allows the Java bean that contains the UIComponent to manipulate the UIComponent, its properties, and its children. |
summary | false | false | java.lang.String | A brief description of this step, to be used in the numbered list of steps in the Steps pane. |
onCancel | false | false | java.lang.String | Scripting code executed when the Cancel button is clicked. |
title | false | false | java.lang.String | A descriptive title to be displayed as the Step Title in the Step Content pane. The Step Title consists of the step number followed by the value of the title attribute. The value of the title attribute could be the same as the value of the summary attribute, or could provide a more detailed description. |
detail | false | false | java.lang.String | The detail attribute supplies the text that is to be displayed in the Step Instructions area, before the input components of the Step Content pane. Typically you would provide one or two sentences that describe what the step does, or tell the user how to interact with the step. |
onFinish | false | false | java.lang.String | Scripting code executed when the Finish button is clicked. |
onNext | false | false | java.lang.String | Scripting code executed when the Next button is clicked. |
onStepLink | false | false | java.lang.String | Scripting code executed when a Step link is clicked. |
id | false | true | java.lang.String | No Description |
onClose | false | false | java.lang.String | Scripting code executed when the Close button is clicked. |
results | false | false | java.lang.String | Set the results attribute to true when the wizard step represents the View Results page. This page should be used after the wizard task is completed, to display information related to the task, including failure information if appropriate. This attribute causes the Close button to be displayed on the View Results page. |
help | false | false | java.lang.String | Descriptive text that provides detailed help to the user
for this step. The amount of text specified is unlimited but is typically
only a few short paragraphs. The content can contain HTML markup for
formatting. Note that you must use the character entity
references < and >
to create the < and > characters for HTML elements
in the help text.
|
onHelpTab | false | false | java.lang.String | Scripting code executed when the Help tab is clicked. |
finish | false | false | java.lang.String | Set the finish attribute to true when the wizard step represents the Finish step. For wizards with three or more steps, the Finish step should be the Review Selections page. The finish attribute causes the Finish button to be displayed. The Finish step performs the wizard task when the user clicks the Finish button. |
eventListener | false | false | java.lang.String | The eventListener attribute is used to specify an
object to handle an event that is triggered when a user activates a
component in the step.
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 See the Event
Listeners section in the |
onStepsTab | false | false | java.lang.String | Scripting code executed when the Steps tab is clicked. |
onPrevious | false | false | java.lang.String | Scripting code executed when the Next button is clicked. |
Variables | No Variables Defined. |
| |||||||
FRAMES NO FRAMES |