Portlet Factory, Version 6.1.2


 

Tree Builder inputs

This topic describes the inputs for the Tree builder.

 

General Inputs

Table 1. Tree Builder General inputs
Input Name Description
Name Name for this builder call. The WebSphere Portlet Factory Designer displays this name in the builder call list.
Page Location Page or pages on which this builder call acts.
Tree Data Specify data returned from a Method, Service Call, or Variable. This data is in XML format.
Visible Root Node Select this input to force the tree to start by displaying the root node (in whatever display format you select). If not selected, the tree does not show the root, but starts by displaying the first set of children.
Allow Multi-Select Enable this input if you want the user to be able to select multiple items listed in the tree.
Display Style There are several Display Style choices. Following each is a sample of what would be displayed for the node <SS2>Sub Section 2</SS2>.

Show the text from the XML Node

"Sub Section 2"

Show just the XML tag

"SS2"

Show <tag> and text

"<SS2> Sub Section 2"
Selection Rule Indicate the selection options available for this tree.

All nodes can be selected

Enables a user to select any element in the tree.

Select this if you want the tree to return a value.

Sometimes a tree is just for display purposes, so that the end user can browse through some hierarchical information. When this is the case, there is no concept of the user selecting one of the nodes. If you do not want a user to be able to select a node, clear this input.

Only leaf nodes can be selected

Prevents a user from selecting Parent Nodes in the tree.If this choice is checked, only leaf nodes (those that have no children) are selectable.

Note: This setting is ignored if the All nodes can be selected choice is unchecked.

No Selection – Tree does not return a value

Presents a user with a read-only tree. Such a tree is often used for display purposes to indicate hierarchical relationships among items.
(optional) Selected Value Node in the Tree Data that you want to be initially selected when the tree displays.

You can configure the tree to open at the last selected node by setting the value of a string variable to the selected value of the tree when you process the page Submit event.

Note: In the structure, set the <Data /> value for any selectable elements to: default^nodeNamePath

Return Data Style You can determine the format of the data for the selected node by selecting one Return Data Style value. The descriptions for the Return Data Style options use the following XML structure as an example and assumes the user clicked on Joe.
<customers>
  <customer>Joe
    <id>1111</id>
    <region>North</region>
  </customer>
  <customer>Jane
    <id>2222</id>
    <region>South</region>
  </customer>
</customers>

Just the Text in the XML Node

Returns Joe.

Using node text - build full path name

Returns Root:/Joe

Just the XML Tag

Returns customer

Using XML Tags

Returns customers/customer[0]

XML Tags - full pathname - skip top node

Returns customer[0]

XML from node

Returns
<customer>Joe
  <id>1111</id>
  <region>North</region>
</customer>

 

Look and Feel

Table 2. Tree Builder Look and Feel inputs
Input Name Description
Node Indent This is the number of pixels each level is indented from the previous level. The default is 40.

Note: On Netscape Navigator only the first level is indented using this setting.

Closed Node Icon Name and path of graphic file to represent a closed "branch" node in the tree.

Default value: factory/images/tree/

Open Node Icon Name and path of graphic file to represent an open "branch" node in the tree.

Default value: factory/images/tree/

Leaf Node Icon Name and path of graphic file to represent a single "leaf" in the tree.

Default value: factory/images/tree/

Expand Node Icon Use an indirect reference to specify an image to be used for the icon representing an expanded node.

If no value is specified, then the tree will resort to the default image.

Unexpand Node Icon Use an indirect reference to specify an image to be used for the icon representing an un-expand node.

If no value is specified, then the tree will resort to the default image.

Selected Icon Name and path of graphic file to designate an item as "selected."

Default value: factory/images/tree/

Tree Width Enter the width, in pixels, of the tree control.
Tree Height Enter the height, in pixels, of the tree control.
Disable Border Enable to remove the dark grey border from around the tree.
Alternate Text

Enter a descriptive string for the HTML alt attribute. Use this to make the end user aware of the elements purpose.

UI Type

Controls the manner in which the tree is rendered.

Choose automatically

Lets the builder decide at run time between the applet and the select list.

Applet

Use an applet to display the tree. This may not work in all browsers.

Select list

Use a Tree builder to display a list from which the user selects a file.

 

Advanced

Table 3. Tree Builder Advanced inputs
Input Name Description
(optional) Custom Tree Style Specify the XML data that defines the display characteristics for each node in the tree data. For example, if a variable called "TreeStyle" contains the display information, the Custom Tree Style value would be: ${Variables/TreeStyle/Styles}, where Styles is the top node of the XML structure contained in the TreeStyle variable.

Note: If you specify a value for this input, the Display Style and Data Style input values are ignored.

(optional) Return Value Prefix Enter a prefix that is added to the selected items value. You can use this feature to send extra information or to further identify the selected value.

For example, you could enter ${Variables/prefixVar} as a value for the prefix. The resulting value for the selected item has the value of prefixVar prepended to its own value.

(optional) Return Value Suffix Enter a suffix that is added to the selected items value. You can use this feature to send extra information or to further identify the selected value.

For example, you could enter ${Variables/suffixVar} as a value for the prefix. The resulting value for the selected item would have the value of prefixVar appended to its own value.

Parent topic: Tree builder


Library | Support |