LoopOptions
You can review the details of the LoopOptions JSP tag.
Description
The loopOptions JSP tag builds the options belonging to the HTML select tag.
Attributes
binding - Required. Binding string that points to the repeating element in the API output. The repeating element must be one fixed with the at character (" @ ").
name - Optional. Attribute
name within the binding element to be used for the description visible
to the user in the option tag. If not passed, defaults to name,
which means that searches
for an attribute called name.
value - Optional. Attribute
name within the binding element to be used for the value attribute
of the option tag. If not passed, it defaults to value,
which means that the application searches for an attribute called
value.
selected - Optional. Binding string that must be evaluated and set as the default selected value. This is matched with the value attribute, not the description attribute. Defaults to blanks, for example, space (" ").
isLocalized -
Optional. If passed as "Y" it obtains the localized
description to be displayed based on the user's locale from the
YFS_LOCALIZED_STRINGS table.
targetBinding - Optional. If the target binding of the select is different than the source binding, you must specify the target binding as input when using loopOptions. This ensures that data entered by the end user is not be lost even when an exception is generated in the API.
Body
None.
Examples
<td nowrap="true" class="searchcriteriacell" >
<select name="xml:/Item/@ItemIDQryType" class="combobox" >
<yfc:loopOptions
binding="xml:/QueryTypeList/StringQueryTypes/@QueryType"
name="QueryTypeDesc" value="QueryType" selected="xml:/Item/@ItemIDQryType"/>
</select>
<input type="text" class="unprotectedinput"
<%=getTextOptions("xml:/Item/@ItemID") %> />
</td>- An underscore character (" _ ") and a counter must be appended to the name attribute of the select element.
- The name of the counter is the value of the ID attribute specified in the loopXML tag. The ID attribute should always be set to the same as the child node name on which you are looping.
<select name="xml:/Order/Instructions/Instruction_
<%=InstructionCounter%>/@InstructionType" class="combobox">
<yfc:loopOptions binding="xml:InstructionTypeList:/CommonCodeList/
@CommonCode" name="CodeShortDescription" value="CodeValue"
selected="xml:/Instruction/@InstructionType"/>
</select>