Develop > Presentation layer > Customize WebSphere Commerce Accelerator, Organization Administration Console, or Administration Console > Tools framework > Wizards


Wizard definition

<wizard> </wizard>

The primary element defining a wizard. The following attributes are supported:

resourceBundle

A required attribute that specifies which resource bundle is used. For example,

resourceBundle="common.userNLS"

windowTitle

An optional attribute that defines the window title, this name is a key in the resource bundle file. For example,

windowTitle="WizardTitle"

finishConfirmation

An optional attribute that names the finish confirmation, this name is a key in the resource bundle file. If null, a default message is used. For example,

finishConfirmation ="finishConfirmation"

cancelConfirmation

An optional attribute that names the cancel confirmation, this name is a key in the resource bundle file. For example,

cancelConfirmation="cancelConfirmation"

finishButtonName

An optional attribute that names the finish button text label. This name is a key in the resource bundle file. If null, a default message is used. For example,

finishButtonName ="myFinishButtonText"

finishURL

An optional attribute that specifies which command executes to finish the wizard. If finishURL is not present, nothing happens when the user clicks the OK or Finish buttons. You can use other JavaScript functions to exit the wizard, such as TOP.goBack() or set this value at runtime if it is not known which controller command should be called. For example,

finishURL="WizardTestCmd"

tocBackgroundImage

An optional attribute that specifies the URL for the background image of the table of contents frame. For example,

tocBackgroundImage="/wcs/images/tools/uiproperties/back.jpg"

<panel />

Defines a panel to appear in the wizard's content frame. The following attributes are supported:

name

A required attribute that specifies a name for the panel. This attribute is also a key in the resource bundle file, its value is used as the panel display name in the table of contents frame. For example,

name="Profile3"

url

A required attribute that sets the contents of the panel to this URL. This can link to a viewCommand or to a direct link. For example,

url="/webapp/wcs/tools/servlet/myPanelView"

helpKey

An optional attribute that defines the corresponding help key in the Tools User Interface Center Help Map file. For example,

helpKey="MC.auction.auctionWizardPricePanel.Help"

parameters

An optional attribute that specifies parameters to be passed into the contents panel from the parent frame (also known as outer frame, or WizardView), delimited by commas. For example,

parameters="param1,param2"

passAllParameters

An optional attribute that, when true, indicates that all of the parameters should be passed to this panel from the parent frame (also known as outer frame, or WizardView). If the parameters attribute is specified, then this attribute is ignored. For example,

passAllParameters="true"

hasFinish

An optional attribute that specifies whether the panel provides a finish button. This value can be either YES or NO. The default is NO. For example,

hasFinish="YES"

hasCancel

An optional attribute that specifies whether the panel provides a cancel button. This value can be either YES or NO. The default is YES. For example,

hasCancel="NO"

hasNext

An optional attribute that specifies whether the panel provides a next button. This value can be either YES or NO. The default is YES. For example,

hasNext="NO"

hasTab

An optional attribute that specifies whether the panel's name displays in the table of contents frame. This value can be either YES or NO. The default is YES. For example,

hasTab="NO"

hasBranch

An optional attribute that specifies whether the panel has branches. This value can be either YES or NO. The default is NO. For example,

hasBranch="YES"

<databean></databean>

An optional element that specifies a data bean to hold user data and populate the fields with existing data. If defined, this bean is instantiated. If the bean is a smartDataBean, it is activated when the wizard loads. Its properties are converted into a JavaScript object with the name defined here. The following attributes are supported:

name

A required attribute that defines a name for the JavaScript object which is populated from the data bean. For example,

name="campaign"

class

A required attribute that specifies the class of the data bean. For example,

class="com.ibm.commerce.tools.campaigns.CampaignDataBean"

stoplevel

An optional attribute that specifies how many levels up the class hierarchy tree should the bean properties be populated. By default, its value is 1. For example,

stoplevel="2"

<jsFile/>

Specifies a JavaScript file to be included in the wizard. Files defined here are included in the parent frame. Thus, access to these functions require parent. prefixed to function calls to scope them to the parent frame. Multiple instances of this tag are allowed. The following attribute is supported:

src

A required attribute that specifies the location of the JavaScript file. For example,

src="/wcs/javascript/tools/common/DateUtil.js"

<button> </button>

This element defines buttons on the navigation bar. The following attributes are supported:

name

A required attribute that names the button. The value specified here does not appear on the button, but is a key to the resource bundle. The corresponding value in the resource bundle displays on the button. For example,

name="sampleButtonName1"

component

An optional attribute that sets the component, which is defined in the WebSphere Commerce configuration file. For example,

component="sampleComponent1"

action

A required attribute that specifies the JavaScript that runs when this button is clicked. For example,

action="sampleButtonAction1()"

In this <button> example, a button is added with the name specified in a resource bundle which is also the key sampleButtonName. When clicked, it calls the sampleButtonAction1() JavaScript function which is located in the included JavaScript file (The jsFile attribute in the notebook definition XML file). The component attribute determines whether the button will be displayed or not.


Example

The following example defines a wizard:

<!DOCTYPE wizard SYSTEM "WizardPanels.dtd">
<?xml version="1.0" encoding="UTF-8"?>  
<wizard resourceBundle="common.userNLS" 
   windowTitle="WizardTitle" 
   finishConfirmation="finishConfirmation" 
   cancelConfirmation="cancelConfirmation" 
   finishURL="WizardTestCmd" 
   tocBackgroundImage="/wcs/images/tools/uiproperties/wiz_back.jpg">  
  
<panel name="Profile1"
      url="/webapp/wcs/tools/servlet/WizardTestPanel1"
      helpKey="" />   
<panel name="Profile2"
      url="/webapp/wcs/tools/servlet/WizardTestPanel2"
      helpKey="" />   
<panel name="Profile3"
      url="/webapp/wcs/tools/servlet/WizardTestPanel3"
      helpKey="" />   
<panel name="Address"
      url="/webapp/wcs/tools/servlet/WizardTestPanel4"
      hasFinish="YES"
      helpKey="" />      
  
<jsFile src="/wcs/javascript/tools/sample/wizardTest.js" />      
  
<databean name="ItemDataBean" class="com.ibm.commerce.tools.test.PropertyDataBean" />      
  
<button name="sampleButtonName1"
      action="sampleButtonAction1()" />   
<button name="sampleButtonName2"
      action="sampleButtonAction2()" />   
<button name="sampleButtonName3"
      component="sampleComponent3"
      action="sampleButtonAction3()" />  
</wizard>


Related concepts

Wizards


Related tasks

Add a wizard

Create branching wizards

Related reference

Wizard JavaScript functions


+

Search Tips   |   Advanced Search