| |||||||
FRAMES NO FRAMES |
Use the webuijsf:wizardSubstepBranch
tag
to define a substep branch within a step sequence of a webuijsf:wizard
tag. A substep branch is a series of steps that are subordinate to a major
step, and always followed by the next major step in the step sequence.
A substep branch may or may not be taken.
A webuijsf:wizardSubstepBranch
tag should
be used when a step branches to related substeps before returning to the major step
sequence. If the branched steps diverge and never return to a
common step in the main step sequence, you should use the webuijsf:wizardBranch
tag instead. See the webuijsf:wizardBranch
documentation. Also see the Sun Web Application Guidelines
3.0 for more information about deciding which type of branching to use.
A webuijsf:wizardSubstepBranch
tag must be
used as a child of a webuijsf:wizard
tag or a webuijsf:wizardBranchSteps
tag. The steps within the substep branch sequence are defined by webuijsf:wizardStep
tags within the body of the webuijsf:wizardSubstepBranch
tag.
If the taken
attribute is false, the webuijsf:wizardStep
children are not presented to the user. Typically substep branches are
not shown in the step list unless it is determined that the substeps
are to be displayed.
No HTML elements are rendered for the wizardSubstepBranch
component. The content that is displayed for the substeps is specified in webuijsf:wizardStep
tags.
Substeps are initially hidden in the Steps pane of the wizard. The substeps are displayed in the Steps pane only when the application determines that the wizardSubstepBranch should be followed. Typically the user's response to the preceding step would be used to determine whether the branch should be followed. When the substeps are displayed in the Steps pane, they are indented under the associated major step, and numbered as subordinate to that step, such as 4.1, 4.2, 4.3 under a major step number 4. In the content pane, the wizardStep child components for both major steps and substeps are displayed.
webuijsf:wizardSubstepBranch
tagThe value of the webuijsf:wizardSubstepBranch
tag's taken
attribute determines whether the substep branch is followed.
When taken
is set to true, the branch is followed. If taken
is false, the branch is not followed. The value of the taken
attribute could be set to an expression that uses the user's response
in a preceding step, to determine whether the branch should be
followed.
The following pseudocode shows the relationship of the wizard
components when using the webuijsf:wizardSubstepBranch:
<webuijsf:wizard>
...
(initial
steps where no branching is needed)
<webuijsf:wizardStep>
The
user's choice in this wizardStep
should be used to
determine whether the substep branch is followed. Note that
the
wizardSubstepBranch is NOT a child of the wizardStep component.
</webuijsf:wizardStep>
<webuijsf:wizardSubstepBranch>
The wizard framework
uses the
wizardSubstepBranch's taken
attribute value
to decide whether to process the branch.
<webuijsf:wizardStep>
These steps are the
substeps that are
rendered only when the wizardSubstepBranch
is taken.
</webuijsf:wizardStep>
<webuijsf:wizardStep>
...
</webuijsf:wizardStep>
<webuijsf:wizardStep>
...
</webuijsf:wizardStep>
</webuijsf:wizardSubstepBranch>
<webuijsf:wizardStep>
This
step represents the major step that
is always followed after the
substep
branch.
</webuijsf:wizardStep>
</webuijsf:wizard>
None.
This emailaccount-substep.jsp
example shows a complete JSP page that uses webuijsf:wizardSubstepBranch.
The
wizard uses the emailAccount
backing bean shown in the webuijsf:wizard
tag documentation.
<jsp:root version="1.2"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
<jsp:directive.page contentType="text/html;charset=UTF-8"
pageEncoding="UTF-8"/>
<f:view>
<webuijsf:page>
<webuijsf:html>
<webuijsf:head title="Wizard Substeps Example" />
<webuijsf:body
onLoad="document.getElementById('form1:wizard1').wizOnLoad()">
<webuijsf:form id="form1">
<webuijsf:wizard id="wizard1" title="Create Account">
<webuijsf:wizardStep id="step1"
summary="Choose Account Type"
title="New Account Setup"
detail="Select the type of account you would like to set up:"
help="In order to receive messages, you first need to set up a Mail or
Newsgroup account. This Wizard will collect the information necessary
to set up a Mail or Newsgroup account. If you do not know the information
requested, please contact your System Administrator or Internet Service Provider.">
<webuijsf:markup tag="p" extraAttributes="style='margin-left:2%'">
<webuijsf:radioButton id="email" name="account"
label="Email account"
selectedValue="EmailAccount"
selected="#{emailAccount.acctType}"/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:radioButton id="movemail" name="account"
label="Movemail"
selectedValue="MoveMail"
selected="#{emailAccount.acctType}"/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:radioButton id="rss" name="account"
label="RSS News and Blogs"
selectedValue="RSSNewsAndBlogs"
selected="#{emailAccount.acctType}"/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:radioButton id="news" name="account"
label="Newsgroup account"
selectedValue="Newsgroup"
selected="#{emailAccount.acctType}"/>
</webuijsf:markup>
</webuijsf:wizardStep>
<webuijsf:wizardStep id="step2"
summary="Specify Email Identity"
title="Identity"
detail="Enter outgoing email name and email address."
help="Each account has an identity, which is the information that
identifies you to others when they receive your messages. Enter the
name you would like to appear in the From field of your outgoing messages,
for example, John Smith. Then enter your email address. This is the address
others will use to send email to you, for example john.smith@sun.com.">
<webuijsf:markup tag="p" extraAttributes="style='margin-left:2%'">
<webuijsf:label id="namelbl" text="Your Name"/>
<webuijsf:textField id="namefld"
required="true"
validator='#{emailAccount.validate}'
text='#{emailAccount.userName}'/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:label id="eaddrlbl" text="Email Address"/>
<webuijsf:textField id="eaddrfld"
required="true"
validator='#{emailAccount.validate}'
text='#{emailAccount.emailAddr}'/>
</webuijsf:markup>
</webuijsf:wizardStep>
<webuijsf:wizardStep id="step3"
summary="Specify Email Server"
title="Email Server Information"
detail="Select the type of incoming server and server name."
help="<p>Select the type of the incoming server you are using. Then enter the name
of your incoming server, for example, mail.sun.com.</p><p>Then enter the
outgoing (SMTP) server name, for example, smtp.sun.com</p>">
<webuijsf:markup tag="p" extraAttributes="style='margin-left:2%'">
<webuijsf:radioButton id="pop" name="mailservertype"
label="POP"
selectedValue="Pop"
selected="#{emailAccount.serverType}"/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:radioButton id="imap" name="mailservertype"
label="IMAP"
selectedValue="Imap"
selected="#{emailAccount.serverType}"/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:label id="inserverlbl" text="Incoming Server"/>
<webuijsf:textField id="inserverfld"
required="true"
validator='#{emailAccount.validate}'
text='#{emailAccount.inServer}'/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:label id="outserverlbl" text="Outgoing Server"/>
<webuijsf:textField id="outserverfld"
required="true"
validator='#{emailAccount.validate}'
text='#{emailAccount.outServer}'/>
</webuijsf:markup>
</webuijsf:wizardStep>
<webuijsf:wizardSubstepBranch id="POPsubstep"
taken='#{emailAccount.serverType == "Pop"}'>
<webuijsf:wizardStep id="step3_1"
summary="Choose Inbox Account Type"
title="Choose Inbox Account Type"
detail="Choose Between Top Level Account or Local Folders Inbox Account"
help="Uncheck this checkbox to store email for this account in its own directory.
That will make this account appear as a top-level account. Otherwise, it
will be part of the Local Folders Global Inbox account.">
<webuijsf:markup tag="p" extraAttributes="style='margin-left:2%'">
<webuijsf:checkbox id="inbox" name="inboxtype"
label="Use Global Inbox (store mail in Local Folders)"
selected="#{emailAccount.globalInbox}"/>
</webuijsf:markup>
</webuijsf:wizardStep>
</webuijsf:wizardSubstepBranch>
<webuijsf:wizardStep id="step4"
summary="Specify User Name"
title="User Names"
detail="Enter email provider assigned user name."
help="Enter your existing outgoing and incoming (SMTP) username,
for example jsmith. You can modify outgoing server settings by
choosing Account Settings from the Tools menu.">
<webuijsf:markup tag="p" extraAttributes="style='margin-left:2%'">
<webuijsf:label id="innamelbl" text="Incoming User Name"/>
<webuijsf:textField id="innamefld"
required="true"
validator='#{emailAccount.validate}'
text='#{emailAccount.inName}'/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:label id="outnamelbl" text="Outgoing User Name"/>
<webuijsf:textField id="outnamefld"
required="true"
validator='#{emailAccount.validate}'
text='#{emailAccount.outName}'/>
</webuijsf:markup>
</webuijsf:wizardStep>
<webuijsf:wizardStep id="step5"
summary="Specify Account Name"
title="Account Name"
detail="The name of the account."
help="Enter the name by which you would like to refer to this account,
for example Work Account, Home Account, or News Account, etc.">
<webuijsf:markup tag="p" extraAttributes="style='margin-left:2%'">
<webuijsf:label id="acctnamelbl" text="Account Name"/>
<webuijsf:textField id="acctnamefld"
required="true"
validator='#{emailAccount.validate}'
text='#{emailAccount.acctName}'/>
</webuijsf:markup>
</webuijsf:wizardStep>
<webuijsf:wizardStep id="step6"
finish="true"
summary="Verify Information"
title="Verify Account Information"
detail="Verify the information below is correct."
help="Click finish to create the account and previous if corrections are required."
onFinish="alert('WizardStep onFinish')">
<webuijsf:markup tag="p" extraAttributes="style='margin-left:2%'">
<webuijsf:label id="v_accttypelbl" text="Accout Type:"/>
<webuijsf:staticText id="v_accttypetxt"
text='#{emailAccount.acctType}'/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:label id="v_usernamelbl" text="User Name:"/>
<webuijsf:staticText id="v_usernametxt"
text='#{emailAccount.userName}'/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:label id="v_acctnamelbl" text="Account Name:"/>
<webuijsf:staticText id="v_acctnametxt"
text='#{emailAccount.acctName}'/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:label id="v_eaddrlbl" text="Email Address:"/>
<webuijsf:staticText id="v_eaddrtxt"
text='#{emailAccount.emailAddr}'/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:label id="v_innamelbl" text="Incoming User Name:"/>
<webuijsf:staticText id="v_innametxt"
text='#{emailAccount.inName}'/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:label id="v_insrvnamelbl" text="Incoming Server Name:"/>
<webuijsf:staticText id="v_insrvnametxt"
text='#{emailAccount.inServer}'/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:label id="v_insrvtypelbl" text="Incoming Server Type:"/>
<webuijsf:staticText id="v_insrvtypetxt"
text='#{emailAccount.serverType}'/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:label id="v_outnamelbl" text="Outgoing User Name:"/>
<webuijsf:staticText id="v_outnametxt"
text='#{emailAccount.outName}'/>
<webuijsf:markup tag="br" singleton="true"/>
<webuijsf:label id="v_outsrvnamelbl" text="Outgoing Server Name:"/>
<webuijsf:staticText id="v_outsrvnametxt"
text='#{emailAccount.outServer}'/>
</webuijsf:markup>
</webuijsf:wizardStep>
</webuijsf:wizard>
</webuijsf:form>
</webuijsf:body>
</webuijsf:html>
</webuijsf:page>
</f:view>
</jsp:root>
Tag Information | |
Tag Class | com.sun.webui.jsf.component.WizardSubstepBranchTag |
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. |
taken | false | false | java.lang.String | The taken attribute is used to evaluate whether the
steps of this branch sequence are displayed. If taken is true,
the child components included in the webuijsf:wizardStep
tags within this webuijsf:wizardSubstepBranch
tag are rendered. The taken attribute should be
a JavaServer Faces EL expression that uses the user's response in
a previous step to determine whether the branch sequence should be
rendered.
|
id | false | true | java.lang.String | No Description |
Variables | No Variables Defined. |
| |||||||
FRAMES NO FRAMES |