Tab builder inputsAdded by IBM on June 28, 2011 | Version 1 (Original)
|This topic describes the inputs for the Tab builder.
This topic describes the inputs for the Tab builder.
- General inputs
- Localization Options
Table 1. Tab builder General inputs
|Name||Enter a name for this builder call. The WebSphere® Portlet Factory Designer displays this name in the builder call list.|
|Page Location||Use the Page Location input to specify the page or pages on which this builder call will act.|
Table 2. Tab builder Content inputs
|Source Data||Use the reference chooser to select a variable or method that returns the XML structure that represents the source data that defines the set of tabs.|
The structure of this data should be suitable for use as source data in a Repeated Region. The data is typically structured as a root node with multiple repeating children. Use the reference chooser to select a variable or method that returns the XML structure. Example:
|Table ID Element||Select the name of the element that specifies the ID to be used for each tab|
If the source data is available at design time, this input will be populated with the tag names from the data. Optionally, you can type in a tag name.
Note: The ID and the Label element (below) can be the same element, or they can be different elements. Using the source data above as an example, the "id" element might be used as the Tab ID Element.
|Selected Tab variable||Select or enter the name of a variable in the model that the Tab builder uses to store the ID of the currently selected tab.|
If you provide a variable name, the Tab builder can apply different styles or images for selected and unselected tabs.
If this variable does not already exist in the model, the builder adds it and assigns it the name you enter here.
If you do not enter a name here, no variable is created; and selected and unselected tabs have the same appearance.
Note: It is the responsibility of the application to set the value of this variable. The Tab builder merely reads this variable. The contents of the variable should be the ID of the selected tab. It should match whatever values for the tab IDs result from the tag you pick in the Table ID element builder input. The IDs of the tabs are taken from the text value of that element in your Source Data.
Table 3. Tab builder Appearance inputs
|Control Type||Select the radio button that represents the type of tab style you require. You can choose:|
Entire tab cell is active and clickable. Tab label is a simple Text label.Link
Tab label is a link. Only link text is active and clickable.Image
Tab is an image button. The entire image is active and clickable.Each of these control types has additional inputs for specifying the appearance.
|Orientation||Select the tab orientation you require.|
Tabs may be arranged in either a horizontal or a vertical orientation.
Horizontal locates tabs across the top of a page. Vertical locates tabs on the side of a page.
|Label Element||Select the name of the element that specifies the label for each tab. This may be the same as the ID element specified in the Table ID Element input.|
If the source data is available at design time, this input is populated with the tag names from the data. Optionally, you can type in a tag name.
|Style for background of tabs||This input applies to text and link style tabs.|
Select a style to be used for the background of individual tabs in the tab control.
Note: If you specified a Selected Tab variable input, this style is not applied to the selected tab.
|Style for background of selected tabs||This input applies to text and link style tabs.|
If you specified a Selected Tab variable input, select a style that is applied to the selected tab.
|Style for text of tabs||This input applies to text and link style tabs.|
Select a style that is used for the label of individual cells in the tab control.
Note: If you specified a Selected Tab variable input, this style is not applied to the selected tab.
|Style for text of selected tabs||This input applies to text and link style tabs.|
If you specified a Selected Tab variable input, select a style that is applied to the selected tab text label.
|Alt text element||This input applies to image-style tabs.|
Select the name of the element that specifies the alternative text for each tab. This may be the same as the ID element specified in the Label Element input.
|Prefix for image name||This input applies to image style tabs.|
Select a prefix used to construct the image name for each tab in the tab control.
Image filenames are constructed by concatenating the prefix, the tab ID, and the image suffix to build a unique image name for each tab. For example, for this set of images used with the example shown in the Source Data input:
MyTabImage1.gifThe image prefix is MyTabImage. The IDs, as specified by the <id> element in the sample data, are 1, 2, and 3; and the suffix is .gif.
|Suffix for image name||This input applies to image style tabs.|
Select a suffix used to construct the image name for each tab in the tab control.
If you specified a Selected Tab variable input, this suffix is used to construct the image name for unselected tabs.
|Suffix for selected image name||This input applies to image-style tabs.|
Select a suffix for selected image name.
If you specified a Selected Tab variable input, this suffix is used to construct a selected image name.
Building on the example shown in the Prefix for image name input, if the selected images are:
MyTabImage1_Selected.gifThe suffix for selected images is _Selected.gif.
|Suffix for hover image name||This input applies to image-style tabs.|
Select a suffix for the hover image name.
The suffix is used to construct a hover image for each tab in the tab control. This image is displayed when the user places the cursor over a tab. For example, if the set of hover images is:
MyTabImage1_Hover.gifThe suffix for selected images is _Hover.gif.
Table 4. Tab builder Behavior inputs
|Action Type||Defines the behavior of the of the action. Select an action type based on the action that processes the specified event and whether you want to process any form inputs as part of that action.|
Submit form and invoke action
Select this option if the specified action is a method in the model or LJO and that method processes the inputs to the form on which the tabs reside.Submit form and invoke URL
Select this option if the specified action is a URL outside of IBM® WebSphere Portlet Factory that processes the inputs to a form. The specified URL receives the form input values as name and value pairs appended to the URL.Link to a model action
Select this option if the specified action is a method in the model or LJO (including service calls). This acts as a simple link, transferring control directly to the specified URL. The specified action cannot process any form inputs.Link to an external URL
Select this option to navigate to a URL outside of WebSphere Portlet Factory. The URL cannot process any form inputs.Run a script
|Action||Specify the model action or external URL to execute when the user clicks a tab. |
|URL||This input is available if you select Link to a URL as the Action Type input.|
Enter the URL to link to as a result of the action.
|Script||This input is available only if you selected Run a script as the value for Action Type.|
Note: Do not use comments in the script you specify. The script you specify is added as one line, so any code following comments is ignored
|Form||If the builder is in one form or frame and the form to be submitted is in another, enter the name of the form whose inputs you want to submit.|
Table 5. Tab builder Arguments inputs
|Input Mappings||You can pass arguments to the specified action by adding an argument name and the value to be passed to it.|
Use the reference chooser to specify input names and values returned by methods or service calls as the value to be passed to an argument for the specified action.
|Evaluate Argument||This input is displayed when the action you specify takes an argument. |
You can choose to evaluate the argument.
Table 6. Tab builder Localization inputs
|Treat Labels as Keys||Enable to use text specified in the XML variable for the tab label as a resource key. This text key can then be used for look up in the XML created by the specified localized resource builder.|
For example, an XML label such as customer_current_orders can be used as a key to a resource bundle text string such as orders.
|Locale Data Variable||Select a localized resource variable name, which can be used to supply locale-based text. |
Note: The name of the variable should be variable created in the WebApp by a Localized Resource builder acting on a properties file.
|Property Prefix||This prefix is placed on the front of column names and HTML tags when looking up locale-sensitive text in the Locale variable. This prefix ensures that column headings with the same name (for example, EMPNO) in different portlets or widgets can have different display text (for example, Employee or Employee #). |
Table 7. Tab builder Advanced inputs
|Target||The window or frame which displays the results of the action. If you do not set this value, the current window or frame is the target. Valid entries for the target value include the following:|
Displays results the topmost frameset._self
Displays results in the frame containing the form. If the target setting is not specified, _self is the default._parent
Displays results in the frameset above the frame that contains the form._blank
Displays results in a new browser window._search
Causes the link to load in the browser Search pane.You can also specify the name of a frame in the current frameset.
Note: All of these targets are relative to the form being processed, not the builder itself.
|Rendering Mode||If you know that the specified action returns a specific page, set Rendering Mode to Normal.|
If you do not know the specific page that gets returned, set Rendering Mode to Return Outermost page after running action. For example, use this setting when creating a builder.
|Break Containment||Enable this to replace the contents of the target window with the contents of the URL returned by the action. |
|Custom HTML Base Page||Specify the URL of a custom base page to use as the base HTML of the tab control. The HTML should contain control suitable for repeating with a Repeated Region builder.|
This builder relies on three specific tag names that must be in your HTML:
Defines the region that is repeated.TabItemCell
Defines the region that is the background for text and link style tabs. For text style builders, an onclick HTML Event Action is placed on this tag.TabItemText
Defines the tab label. A text, link, or image button control is placed on this tag.See the default base pages at the location below for examples of appropriate HTML:
Parent topic: Tab builder