Dialog definition

<dialog> </dialog>
The primary element defining a dialog. 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="DialogTitle"
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 is to be executed to finish the dialog. If it is not present then nothing happens when the user clicks the OK or Finish buttons. You can use other JavaScript functions to exit the dialog, such as TOP.goBack() or set this value at runtime if it is not known which controller command should be called. For example,

finishURL="DialogTestCmd"
<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="Profile"
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="/wcs/tools/sample/DialogTestPanel.html"
helpKey
An optional attribute that defines the corresponding help key in the Tools UI Center Help Map file. For example,

helpKey="MC.auction.auctionDialogPricePanel.Help"
parameters
An optional attribute that specifies parameters to be passed into the contents panel from the parent frame (also called DialogView), 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 DialogView). 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"
<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 dialog loads. It's 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 databean. 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 data bean properties be populated. By default, its value is 1. For example,
stoplevel="2"
<jsFile/>
Specifies a JavaScript file to be included in the dialog. 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 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 instance configuration XML file. For example,

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

action="sampleButtonAction1()"

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

Example

The following is a example XML file that defines a dialog:


<?xml version="1.0"?>
<dialog resourceBundle="catalog.ItemNLS"
   windowTitle="itemFindCriteria_Title"
   finishConfirmation=""
   cancelConfirmation="itemFindCriteria_cancelConfirmation"
   finishURL="" >
<panel name="itemFindCriteria"
   url="ItemFindCriteria"
   helpKey="MC.catalogTool.productSearch.Help" 
   passAllParameters="true" 
   hasFinish="NO" 
   hasCancel="NO" />
<jsFile src="/WCS/javascript/tools/catalog/itemFindCriteria.js" />
<button name="itemFindCriteria_button_find"
   action="button_Find();" />
<button name="itemFindCriteria_button_cancel"
   action="button_Cancel();" />
</dialog>