Develop > Presentation layer > Customize WebSphere Commerce Accelerator, Organization Administration Console, or Administration Console > Tools framework > Dynamic lists
Dynamic list definition
- <action> </action>
- The primary element defining a dynamic list. The following attributes are supported:
- resourceBundle
- A required attribute that specifies which resource bundle is used. For example,
resourceBundle="catalog.ItemNLS"
- formName
- A required attribute that specifies the form name. A dynamic list is rendered as an HTML form. For example,
formName="ItemFindResultsFORM"
- beanClass
- An optional attribute that specifies a custom bean for a simple dynamic list. For example,
beanClass="com.ibm.commerce.tools.catalog.beans.simpleCataListBean"
- 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"
- <parameter> </parameter>
- This element defines parameters passed to the dynamic list. The following attributes are supported:
- listsize
- A required attribute that sets the maximum number of list items that display on each page. For example,
listsize="15"
- startindex
- A required attribute that sets the index value of the first item in the list. For example, if the first list item has index 0, type:
startindex="0"
- resultsize
- A required attribute that defines the length of the entire list. This value is not known until runtime, and is dynamically calculated. However, this property must be defined as a placeholder. It does not matter what the initial value is, as it is recalculated. For example,
resultsize="0"
- orderby
- An optional attribute that identifies the column by which the table is sorted. For example,
orderby="name"
- itemName
- An optional attribute available as a user defined parameter.
- <scrollcontrol> </scrollcontrol>
- This element defines the scroll control frame. The following attributes are supported:
- title
- An optional attribute that defines the page title. For example,
- display
- A required element that determines whether the scroll control frame is displayed. For example,
display="true"
- <controlpanel> </controlpanel>
- This element defines the control panel. The following attributes are supported:
- display
- A required element that determines whether the control panel is displayed. For example,
display="true"
- <button> </button>
- This element defines the button frame. The button element contains <menu> elements.
- <menu> </menu>
- This element defines a button. The following attributes are supported:
- name
- A required attribute that specifies a name for the button. For example,
name="New"
- action
- A required attribute that defines the action performed when the button is clicked. For example,
action="Action()"
- users
- A required attribute that defines the access control for the button. The value must be a space delimited list of the roles that are permitted to perform the action associated with the button. For WebSphere Commerce Accelerator, these names are defined in WC_PROFILE/xml/tools/common/roles.xml, and match the ID column in the MBRGRP table. For example,
users="makMgr merMgr merchant siteAdmin"
- selection
- An optional attribute that defines how selected items in the dynamic list affect the button. Permitted values include "single", "multiple", or "none". These values specify that the button is enabled when only one item is selected, when one or more items are selected, or when no items are selected. In the case of "single" and "multiple", the action associated with the button is performed on the selected items. For example,
selection="multiple"
- component
- An optional attribute that sets the component of this button. For example,
component="CSRComponent"
- <view> </view>
- This element defines an optional view filter contained in a drop down list in the control panel. The following attributes are supported:
- name
- A required attribute that specifies a name for the list item. For example,
name="newList"
- action
- An optional attribute that specifies the action performed when this view filter is selected. For example,
action="Action()"
- <jsFile> </jsFile>
- Specifies a JavaScript file to be included in the dynamic list. 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. 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"
Example
The following example defines a dynamic list, which contains these components:
- buttons.
- view filters available for selection in the scroll control frame.
- a resource bundle for the national language text.
- a title displayed in the title area (the title is a key which maps to the resource bundle).
- a help key for the base, buttons, and scroll control frames.
Each view tag added is put into the view filter drop down list for filtering different types of contents.
<?xml version="1.0" encoding="UTF-8" ?> <action resourceBundle="campaigns.campaignsRB" formName="initiativeForm" helpKey="MC.campaigns.InitiativeList.Help"> <parameter listsize="22" startindex="0" endindex="0" orderby="name" state="AllList" /> <scrollcontrol display="true" /> <controlpanel display="true" /> <button> <menu name="new" action="basefrm.newInitiative()" /> <menu name="copy" action="basefrm.copyInitiative()" selection="single" /> <menu name="delete" action="basefrm.deleteInitiative()" selection="multiple" /> <menu name="properties" action="basefrm.initiativeProperties()" selection="single" /> <menu name="resume" action="basefrm.resumeInitiative()" selection="multiple" /> <menu name="suspend" action="basefrm.suspendInitiative()" selection="multiple" /> <menu name="statistics" action="basefrm.initiativeStatistics()" selection="single" /> <menu name="reports" component="CommerceAnalyzer" action="basefrm.initiativeReports()" /> </button> <view name="AllList" action="top.setContent(basefrm.getListTitle(), '/webapp/WCS/tools/servlet/NewDynamicListView?state=AllList&ActionXMLFile=campaigns.InitiativeList &cmd=CampaignInitiativeListView', false)" /> <view name="ActiveList" action="top.setContent(basefrm.getListTitle(), '/webapp/WCS/tools/servlet/NewDynamicListView?state=ActiveList&ActionXMLFile=campaigns.InitiativeList &cmd=CampaignInitiativeListView', false)" /> <view name="SuspendList" action="top.setContent(basefrm.getListTitle(), '/webapp/WCS/tools/servlet/NewDynamicListView?state=SuspendList&ActionXMLFile=campaigns.InitiativeList& &cmd=CampaignInitiativeListView', false)" /> </action>
Related concepts
Related tasks
Related reference
Dynamic list JavaScript functions