Portlet Factory, Version 6.1.2
Data Field Modifier builder inputs
This topic describes the inputs for the Data Field Modifier builder.
- General inputs
- Container Settings
- Field Settings
- Formatting
- Attribute Settings for Fields
- HTML Class Settings
- Advanced
General inputs
Table 1. General inputs Input name Description Name Name for this builder call. The WebSphere Portlet Factory Designer displays this name in the builder call list. Field Selector Tool You can determine how you want to search the available fields in the data page structure by specifying one of the following options:
- Select by Name
- Displays a List of Fields to be Modified table in the builder call editor. Each row in the table provides a chooser that displays each field name in the structure on which the data page operates as the nodes of a tree. You can specify the nodes on which the Data Field Modifier operates by selecting nodes in this tree.
- Select by Type
- Displays a List of Field Types table in the builder call editor. Each row in the table provides a picker that displays a list of field types in the structure on which the data page operates. You can choose a type representing the fields you want.
- Using both techniques
- Displays both tables. You can specify the fields on which this Data Field Modifier operates by both name and type or by type.
If the model contains Lookup Table builders, this input is not available. For more information, see the Lookup Table Used in Field Settings.
Fields This input appears if you select Select by Name or Using both techniques in the Field Selector Tool input. Use the chooser to select the element that you want to modify with this Data Field Modifier builder call. To specify more than one element, make multiple element selections. If your selection is not a container element, the inputs in the Formatting group are made available. For more information, see Formatting.
Field Types This input appears if you select Select by Type or Using both techniques in the Field Selector Tool input. Hide Element(s) Enable to remove the selected fields (and any children) from the form. Generate Labels Select one of the following options to treat labels for the elements:
- Do not change
- Leave current label if any unmodified. The Label input shows the label to be used.
- Yes
- Generate a label for the selected fields. The Data Field Modifier builder creates a label in addition to the HTML control for each element on which this Data Field Modifier builder operates.
- No
- Creates no labels.
Label If you select Yes in the Generate Labels input, enter the text for the label to be generated . This new label applies to all the elements on which this Data Field Modifier operates. If you select Do not change in the Generate Labels input, this field shows the label to be used. This field is not available if you select No in the Generate Labels input.
Element is Repeated Whether the Data Field Modifier alters the data page default behavior for repeated elements by specifying one of the following options:
- Do Not Change
- Do not alter the Data Page default behavior for the selected elements.
- Yes
- Treat the selected elements as a repeated element in the structure.
- No
- Do not treat the selected elements as a repeated element in the structure.
Container Settings
If the Data Field Modifier builder refers to a field that is a container, you see the following inputs.
Table 2. Container Settings inputs Input name Description Children Make UI If enabled, the Data Field Modifier adds HTML controls for each child element of the specified form field. Children Gen. Labels If enabled, the Data Field Modifier creates a label in addition to the HTML control for each child element of the of the specified form field. Container Display Dir. Layout for this element by selecting one of the following options:
- Do Not Change
- If you are using the Data Field Modifier to alter other aspects of the element, leave this option selected.
- Automatic
- Builder determines optimum layout
- Vertical
- Child elements are displayed vertically.
- Horizontal
- Child elements are displayed horizontally.
Promote Children Flatten complex structures that are returned by web services. If the model calls a web service that returns a complex result, for example, a nested structure, use this input to display that result as a simple structure on a page, for example, as a flat table. Enable Paging Enable this input to repeat over the contained elements and thereby display some number of child elements at a time. Adds a Paging Assistant builder to any repeated elements that are selected. Page Size Enter the number of child elements to fetch per page. This input is available if the Enable Paging input is set.
Check for New Data Before the builder fetches input from the data variable, check to see whether the underlying data has changed. If the data has changed, a reset is done. If this input is not set, the input is always fetched from the data variable. This input is available if the Enable Paging input is set.
Field Settings
Table 3. Field Settings inputs Input name Description Lookup Table Used This input replaces the Field Selector Tool input (see General inputs) if the model in which this Data Field Modifier builder is located also contains one or more Lookup Table builders. Use this input to do one of the following actions.
- Choose the name of the Lookup Table builder call whose results are to be displayed with this Data Field Modifier builder call.
The Data Field Modifier builder call displays the results of the Lookup Table builder GetLookupTable method. The displayed content is determined by the Lookup Table builder call Value Tag and Label Tag input settings.
- Select None to not display Lookup Table builder results.
Field Behavior You can determine how the form renders the selected elements by setting one of the following values:
- Do Not Change
- Let the field behavior be determined by the element container or by the default behavior for the Page Type specified in the Data Page builder call. You see the Is Required and Initial Value inputs.
- Data Entry
- Allow the user to set the value for this element. The Control Type input appears and displays the list of values available: Do Not Change, Text Input, Password Input, Text Area, or Select. See the descriptions below.
- View Only
- Display the value of the element as a read-only field in the form. The Control Type input appears and displays the list of values available: Do Not Change, Text, Image, and Manually Specified Output. See the descriptions below.
- Action Field
- Display an action control such as the value for this element. The specified action control can display the element value as the link text or button label, so choosing Action Field for an element does not preclude you from displaying its value.
The Control Type input appears and displays the list of values available: Link, Button, or Image Button. See the descriptions below.
Is Required This input appears if you select either Do Not Change or Data Entry in the Field Behavior input. If this field is an input type, select whether it must be supplied with a value at runtime.
- Do Not Change
- Let the field behavior be determined by the element container or by the default behavior for the Page Type input specified in the Data Page builder call.
- Yes
- The user is forced to enter values in input type fields.
- No
- The user need not enter values in input type fields.
Control Type This input appears based on the value you set for the Field Behavior input. The Control Type input displays different options based on the value. See the Data Entry, View Only, and Action Field input descriptions below. (Data Entry) Do Not Change The form uses the control type defined by the HTML or schema for the specified fields.
(Data Entry) Text Input Choosing Text Input for the Control Type offers no additional inputs. (Data Entry) Password Input The characters entered for the password are hidden and echoed with asterisk (*) characters.
- Initial Value
- Optional. Specify an initial value for the password input.
(Data Entry) Text Area Specify values for the following inputs if you select Data Entry in the Field Behavior input and Text Area in the Content Type input:
- Cols
- Specify the width of the text area in characters. For example, a value of 70 yields a text area 70 characters wide.
- Rows
- Specify the height of the text area in text rows. For example, a value of 10 yields a text area that accommodates 10 lines of text.
- Wraps
- Flow of the lines in the text area as one of the following options.
- no wrapping
- The lines can extend beyond the bounds of the text area.
- virtual
- The lines are filled to fit in the text area.
- physical
- The overflow of a line at the boundary of the text area extends to a new text line.
(Data Entry) Select Specify a value for the Enumeration Options input if you choose Select as the Content Type. If you select Specify Below for the Enumeration Options input, specify values for the following inputs that are available: Select Data, Value Element, and Label Element.
Enumeration Options Specify how the options displayed in the Select box or Radio Button Group are determined:
- Do Not Change
- Use what the Data Page builder defines.
- Schema only
- Use the XML schema alone.
- HTML only
- Use the HTML definition alone.
- Merge Schema and HTML Choices
- Use both the XML schema and HTML definition.
- Specify Below
- Displays the following additional inputs: Select Data, Value Element, and Label Element.
Select Data If you select Select or Radio Button Group in the Control Type input, this input appears. Specify an indirect reference to a variable or method that contains or returns an XML structure or a Java Collection. You can also use a comma-delimited list.
Value Element If you select Select or Radio Button Group in the Control Type input, this input appears. If you use an XML structure, enter the name of the element whose value is passed as the Select control value. For example: option/value. Label Element If you select Select or Radio Button Group in the Control Type input, this input appears. If you use an XML structure, enter the name of the element whose value is displayed as an option for the Select control. For example: option/name. (Data Entry) Radio Button Group Specify a value for the following inputs if you select Radio Button Group as the Content Type: Enumeration Options and Orientation. If you select Specify Below for the Enumeration Options input, specify values for the following inputs that are available: Select Data, Value Element, and Label Element.
(Data Entry) Orientation If you select Radio Button Group as the Content Type, specify the arrangement of the buttons and options:
- vertical
- From the top of the page to the bottom.
- horizontal
- From the left side of the page to the right side.
(Data Entry) Check Box If you select Check Box as the Content Type, specify values for the following inputs that are available: Label After Check Box, Checked Value, and Unchecked Value. Label After Check Box Specify the text to display to the right of the checkbox. Checked Value Specify the value to be passed when the user enables the check box. For example: true or yes. Unchecked Value Specify the value to be passed when the user leaves the check box unchecked. For example: false or no. (Data Entry) Hidden Input Specify that the input is hidden for the selected form field. (Optional) Specify in the Initial Value input a starting value to use in the display.
(Data Entry) Hidden Input With Text Specify an initial value for the hidden input. If the selected form elements have values when the page is rendered, those values are used. If the form elements do not have values, the initial value is passed as a hidden form input. (Optional) Specify in the Initial Value input a starting value to use in the display.
(Data Entry) Manually Specified Input You can create your own builder to display a control to allow the user to specify a value for the selected elements. If you have done so, select Manually Specified Input for the Control Type input and specify values for the following inputs: Rendering Builder and Initial Value. (Optional) Specify in the Initial Value input a starting value to be passed to the rendering builder.
(Data Entry) Rendering Builder If you select Manually Specified Input for the Control Type input, you see this input. Enter the builder ID of the builder that you create to render the form elements on which this Data Field Modifier builder operates. This rendering builder must define three inputs: Name, Page Location, and Value, where Value is the value for the element in the structure passed to the Data Page builder. (View Only) Do Not Change The form uses the control type defined by the HTML or schema for the specified fields. (View Only) Text No other inputs to set for Text controls. Choosing this Control Type prompts the Data Page builder to display the value for the selected elements as read-only text.
(View Only) Image Specify values for the following inputs if you choose Check Box as the Content Type:
- Image Name Prefix
- Specify text that will be prepended to the element value. You can use this value to specify the common path to all the form images, allowing the element value to determine the specific image to display. For example, if the images for the form are stored in the servable_content_root /acme/images directory, specify /acme/images as the value for the Image Name Prefix.
- Image Name Suffix
- If the element value does not specifically refer to an image file, you can use the Image Name Suffix to define an image format file extension (for example, .gif) that gets appended to the element value. For example, if the element value is an employee ID, you can use the Image Name Prefix and Image Name Suffix to specify the path to an image of each employee: /acme/images/ plus 1111 plus .gif
(View Only) Manually Specified Output You can create your own builder to render the value of the selected element(s). If you have done so, choose the Manually Specified Output Control Type and specify values for the following inputs:
- Rendering Builder
- Enter the Builder ID of the builder you created to render the form elements on which this Data Field Modifier operates. The rendering builder must define three inputs: Name, Page Location, and Value, where Value is the value for the element in the structure passed to the Data Page builder call.
- Initial Value
- (Optional) Specify an initial value to be passed to the rendering builder.
(Action Field) Link Specify values for the following inputs if you select Link as the Control Type input:
- Link Text Source
- Whether to use the element's label or value as the text to be displayed as a link. You can also manually enter the text you want displayed as the link.
- Action Type
See input description in the help for the Link builder.
- Action
- See input description in the help for the Link builder.
- URL
Specify the URL of the form to submit. Only valid if Submit form to URL or Link to a URL is selected in the Action Type input.
- Form name
Name of the form to submit. Only valid if Submit form and invoke action or Submit form to URL is selected in Action Type input.
- Target
- See input description in the help for the Link builder.
- Argument Name for Data
- Name of the argument to which to assign this value. (This argument name should match the name of the argument in a specific method that you are calling.)
(Action Field) Button Specify values for the following inputs if you choose Button as the Content Type:
- Button Label Source
- Whether to use the element label or value as the text for the button label. You can also manually enter the text you want displayed as the button label.
- Action Type
See the input descriptions in the help for the Button builder.
- Action
- See the input descriptions in the help for the Button builder.
- URL
- Specify the URL of the form to submit. Only valid if Submit form to URL or Link to a URL is selected in the Action Type input.
- Form name
- Name of the form to submit. Only valid if Submit form and invoke action or Submit form to URL is selected in Action Type input.
- Target
- See the input descriptions in the help for the Button builder.
- Argument Name for Data
- Name of the argument to which to assign this value. (This argument name should match the name of the argument in a specific method that you are calling.)
(Action Field) Image Button Specify values for the following inputs if you select Action Field in the Field Behavior input and Image Button in the Content Type input:
- Image Name Prefix
- Specify text that will be prepended to the element value. You can use this value to specify the common path to all the form images, allowing the element value to determine the specific image to display. For example, if the images for the form are stored in the servable_content_root /acme/images directory, specify /acme/images as the value for the Image Name Prefix.
- Image Name Suffix
- If the element value does not specifically refer to an image file, you can use the Image Name Suffix to define an image format file extension (for example, .gif) that gets appended to the element value. For example, if the element value is an employee ID, you can use the Image Name Prefix and Image Name Suffix to specify the path to an image of each employee: /acme/images/ plus 1111 plus .gif
- Action Type
See the input descriptions in the help for the Image Button builder.
- Action
- Appears only if you select Submit form and invoke action or Link to an action in the Action Type input. See the input descriptions in the help for the Image Button builder.
- URL
- Specify the URL of the form to submit. Only valid if Submit form to URL or Link to a URL is selected in the Action Type input.
- Form name
- Name of the form to submit. Only valid if Submit form and invoke action or Submit form to URL is selected in Action Type input.
- Target
- See the input descriptions in the help for the Image Button builder.
- Argument Name for Data
- Name of the argument to which to assign this value. (This argument name should match the name of the argument in a specific method that you are calling.)
Script to Execute Available if you select Run a script in the Action Type input. Either enter the JavaScript code to run or use the reference chooser to select a method. Initial Value Enter a value which will be saved into the Variable when the model is first loaded for each user. If you specify an initial value, the Data Page builder adds a pageName_Initialize method to the Web application. You can use this method to reset the form to its initial state.
Formatting
If the field that you are formatting is not a container (see the Fields input in General inputs), you see the following inputs to use a standard or custom formatting class to format, translate, or validate data.
Table 4. Formatting inputs Input name Description Formatter Class Enter or select the fully-qualified name of the Java class that contains the methods to format, translate, and validate the data displayed and entered into a form. The specified Java class must implement the IInputFieldFormatter interface. A standard formatter class is available as a selection.
Format Expression Select one of the following format expressions to apply to the field data being displayed.
- DateTimeFormat(FormatString)
- Date Only
- Boolean
- Format(Data$Display)
- NumberFormat(FormatString)
- Time Only
- Credit Card, ####-####-####-####
- DateTime
If you select an expression that contains parentheses (), the Format Exp Argument input is made available.
Formatting refers to modifying data for display. For example, Social Security numbers might be stored in the data as strings without spaces, hyphens, or other formatting. A format method could insert hyphens in the appropriate places to make the Social Security number easier to read. Similarly, the Credit Card (####-####-####-####) formatter places dashes every 4 digits and ignores errors.
Format Exp Argument This input is available when you select an expression that includes parentheses () in the Format Expression input.
Provide an indirect reference to specify the format of the arguments. The arguments are evaluated at runtime and passed to the method as part of the operation name. For example, if you choose the format expression DateTimeFormat(FormatString), the string FormatString is replaced with the evaluated version of your selection.
Note: If you write your own Formatter class, you can make use of this input by putting parentheses in the name of any operations. The contents of the parentheses are replaced.
Translate Expression Select one of the available translate expressions to apply to the field data being submitted. Translating refers to modifying user input for storage as data. For example, a user may insert dashes when entering a Social Security number in a form. A translate method could remove the hyphens from the user input, creating a value that can now be stored as data.
- Floating Point - blank becomes zero
- Uses floating point primitive data type.
- Translate (Data$Display)
- Uses this method on the field data. See the Translate Exp Argument input.
- Strict integer - blank becomes zero
- Date Only
- Removes the time and stores only the day, month, and year.
- Boolean
- Stores only True or False.
- Credit Card, 16 digits
- Removes - (dash) and space characters from a string and ignores errors.
- Time Only
- Time of day with no calendar date.
- Strict Floating Point - blank becomes zero
- integer - blank becomes zero
- DateTime
- Calendar date and time of day.
If you select an expression that contains parentheses (), the Translate Exp Argument input is made available.
Translate Exp Argument This input is available when you select an expression that includes parentheses () in the Translate Expression input. Provide an indirect reference to specify the format of the arguments. The arguments are evaluated at runtime and passed to the method as part of the operation name. For example, if you select the expression Translate (Data$Display), the string Data$Display is replaced with the evaluated version of your selection.
Note: If you write your own Formatter class, you can make use of this input by putting parentheses in the name of any operations. The contents of the parentheses are replaced.
Validate Expression Select one of the validate expressions to apply to the field data being submitted. The validate method implements server-side validation and operates on the value returned by the translate method (if translate is used). The following date comparison methods are available to support date validation.
- Required long
- Compare Date > today
- Required Floating Point Number
- RegularExpression(RegExString)
- Compare Date = today
- Required Date Only
- Required byte
- Compare Date >= today
- Required Time Only
- Required integer
- Optional Boolean
- Optional Floating Point Number
- Optional DateTime
- Required String
- Required Boolean
- Optional integer
- Required DateTime
- Optional Date Only
- Required Date(FormatString)
- Compare Date < today
- Optional Date(FormatString)
- Optional Time Only
- Compare Date <= today
If you select an expression that contains parentheses (), the Validate Exp Argument input is made available.
Validate Exp Argument This input is available when you select an expression that includes parentheses () in the Validation Expression input. Provide an indirect reference to specify the format of the arguments. The arguments are evaluated at runtime and passed to the method as part of the operation name. For example, if you choose the validation expression RegularExpression(RegExpString), the string RegExpString is replaced with the evaluated version of your selection.
Note: If you write your own Formatter class, you can make use of this input by putting parentheses in the name of any operations. The contents of the parentheses are replaced.
Attribute Settings for Fields
Table 5. Attribute Settings for Fields inputs Input name Description Attribute List Select the name of the HTML attribute to add or modify for the HTML elements pointed to by the Page Location syntax and enter a value for the selected attribute. For more information about the attributes listed in the Name column, refer to HTML documentation.
Overwrite Rule If the elements on which this attribute setter operates already have the specified attribute set, select one of the following:
- Overwrite HTML value
- Replaces existing attribute value with the specified attribute value.
- Prepend new value
- Adds specified value to precede the existing attribute value. Typically used for building JavaScript expressions. For example:
onClick="newJavaScriptExpression";"oldJavaScriptExpression"- Append new value
- Adds specified value to follow the existing attribute value. Typically used for building JavaScript expressions. For example,
border="oldJavaScriptExpression";"newJavaScriptExpression"- Don't overwrite HTML value
- To not set the attribute value.
Append/Prepend Separator Enter the separator to use when an attribute value is prepended or appended or specify a method that returns a separator to use. The default separator is the semicolon character (;).
HTML Class Settings
Table 6. HTML Class Settings inputs Input name Description Template File Select an HTML Page Automation template file to be used to generate all pages in the application. See the page automation HTML templates topic for information about working with HTML Page Automation templates.
Label Class Used for the label text for leaf nodes (elements that do not contain other elements). The corresponding CSS class name is .label. Section Label Class Used as the label for branch nodes (elements that have child elements). The corresponding CSS class name is .sectionLabel. Output Data Class Used for the data contained in leaf nodes. The corresponding CSS class name is .outputData. Entire Table Class Used for all rows in a table of repeated elements. The corresponding CSS class name is .entireTable. Table Head Used for the first row in a table of repeated elements. The corresponding CSS class name is .tableHead. Table Row Enter the HTML Class attribute to be used on the Table Rows. Note that this is ignored if TableRowOdd and TableRowEven have values. The corresponding CSS class name is .tableRow. Odd Table Row Used for odd-numbered rows in a table of repeated elements if you use a Data Field Modifier builder call to set this style for the associated element in the data. The corresponding CSS class name is .tableRowOdd. Even Table Row Used for evenly numbered rows in a table of repeated elements if you use a Data Field Modifier builder call to set this style for the associated element in the data. The corresponding CSS class name is .tableRowEven.
Advanced
Table 7. Advanced input Input name Description Additional Properties These inputs are for the advanced user to define properties on page automation elements. These properties can be defined through inputs in the Data Column Modifier builder and the Data Field Modifier builder. You can generally leave the default values. Parent topic: Data Field Modifier builder
Library | Support |