Notebook definition

<notebook> </notebook>
The primary element defining a notebook. The following attributes are supported:
resourceBundle
A required attribute which specifies the resource bundle to use. For example,

resourceBundle="common.userNLS"
windowTitle
An optional attribute that defines the window title. For example,

windowTitle="NotebookTitle"
finishConfirmation
An optional attribute that names the finish confirmation, this name is a key in the resource bundle file. If null, a default message will be used. For example,

finishConfirmation="finishConfirmation"
cancelConfirmation
An optional attribute that names the cancel confirmation button text label, this name is a key in the resource bundle file. For example,

cancelConfirmation="cancelConfirmation"
finishButtonName
An optional attribute that defines the finish button text label, this name is a key in the resource bundle file. If null, a default message will be used. For example,

finishButtonName="myFinishButtonText"
finishURL
An optional attribute that specifies which command is to be executed to finish the notebook. If it is not present then nothing will happen when the user clicks OK or Finish. You can use other JavaScript functions to exit the notebook, such as TOP.goBack() or set this value at runtime if it is not known which controller command should be called.

For example,


finishURL="NotebookFinishCmd"
<panel />
Defines a panel to appear in the content frame. The following attributes are supported:
name
A required attribute that specifies a name for the panel. 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 be 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.InitiativeGeneral.Help"
parameters
An optional parameter that specifies parameters to be passed into the content panel from the parent frame (also called the outer frame or NotebookView), 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 called the outer frame or NotebookView). If the parameters attribute is specified, then this attribute is ignored.

passAllParameters="true"
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"
group
An optional attribute which specifies a group for this panel. Groups act to organize the table of contents frame. All panels assigned to the same group display under a subheading with the group's name. This is useful if the number of total panels is large and they do not fit in the Table of contents frame without scrolling. For example,

group="group1"
<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 also a smartDataBean, it is activated when the notebook 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 hierachy 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 notebook. 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 custom buttons for the navigation bar. The following attributes are supported:
name
A required attribute that names the button. For example,

name="sampleButtonName1"
component
An optional attribute which sets the component, which is defined in the WebSphere Commerce configuration file. For example,

component="sampleComponent1"
action
A required attribute which specifies the action to be taken when this button is clicked. For example,

action="sampleButtonAction1()"

In this example, a button is added with the name specified in a resource bundle and a key sampleButtonName1, and when clicked, it calls the sampleButtonAction1() JavaScript function which is located in the included JavaScript file (the jsFile attribute in the notebook XML). The component attribute determines whether the button is displayed or not.

Example

The following example is an of a XML file which defines a notebook:


<?xml version="1.0" encoding="UTF-8" ?>
<notebook resourceBundle="campaigns.campaignsRB"
      windowTitle="initiativeNotebookTitle"
      finishConfirmation=""
      cancelConfirmation="initiativeNotebookCancelConfirmation"
      finishURL="CampaignInitiativeSave" >
   <panel name="initiativeGeneralPanel"
      url="CampaignInitiativeGeneralPanelView"
      helpKey="MC.campaigns.InitiativeGeneral.Help" />
   <panel name="initiativeLocationPanel"
      url="CampaignInitiativeLocationPanelView"
      helpKey="MC.campaigns.InitiativeLocation.Help" />
   <panel name="initiativeConditionsPanel"
      url="CampaignInitiativeConditionsPanelView?ActionXMLFile=campaigns.ConditionList
      &amp;cmd=CampaignInitiativeConditionListView&amp;selected=SELECTED&amp;listsize=20
      &amp;startindex=0&amp;refnum=0" helpKey="MC.campaigns.InitiativeConditions.Help" />
   <databean name="initiative"
      class="com.ibm.commerce.tools.campaigns.CampaignInitiativeDetailsDataBean" />
   <jsFile src="/wcs/javascript/tools/common/Util.js" />
   <jsFile src="/wcs/javascript/tools/common/DateUtil.js" />
   <jsFile src="/wcs/javascript/tools/campaigns/Initiative.js" />
</notebook>