This JSP function XML binds text input fields when modification rules do not need to be considered.
String getTextOptions(String name)
String getTextOptions(String name, String value)
String getTextOptions(String name, String value, String defaultValue)
Inserting this function enables setting the value of a text input when it is displayed and setting the path and attribute in an XML to where the value should go when the form is posted.
If the value and default value are not given, the default value is blanks and value defaults to name.
name - Required. Path in the target XML to which the value in the input text is sent when the form is posted. The target XML is then passed to the appropriate API through the Service Definition Framework.
value - Required. Specifies what to display as the input text. Can be a binding or a literal. Default is name.
defaultValue - Required. This can be a binding or a literal that is defaulted to in the case that the value binding returns nothing. Default is blanks.
<Order>
<addlInfo Country="US"></addlInfo>
</Order>
<input type="text" <%=getTextOptions("xml:Order:/OrderAddlinfo/@Country",
"xml:Order:/OrderAddlinfo/@Country", "USA")%> />
When the value binding is found:
<input type="text" name=" xml:Order:/OrderAddlinfo/@Country " value="US"
Datatype='' size="10" Decimal='' OldValue="United States"/>
When the name binding is not found:
<input type="text" name="US" value="USA" Datatype='' size="10" Decimal=''
OldValue="United States"/>
Using getTextOptions within an editable list:
Inserting a text box.
<input type="text" class="unprotectedinput"
<%=getTextOptions("xml:/Order/OrderLines/OrderLine_" + OrderLineCounter +
"/@ShipNode", "xml:/OrderLine/@ShipNode")%>/>