2.4.1.13 List Box Control
The list box control enables the user to select a single value from a list of options that can be specified manually by the form template designer, or is populated from a data source. A LIST_BOX MUST have one of the symbols in the following table.
Symbol |
Description |
---|---|
LIST_BOX_WITH_MANUAL_ENTRIES |
The list box displays selection options that have been manually specified by the form template designer. |
LIST_BOX_WITH_LOOKUP_ENTRIES |
The list box displays selection options that are populated from a data source (2). |
LIST_BOX_WITH_UNIQUE_LOOKUP_ENTRIES |
The list box displays only unique selection options that are populated from a data source (2). |
LIST_BOX_CONDITIONAL_FORMATTING:
-
(<xsl:attribute name="style">LIST_BOX_STYLE<xsl:choose> (<xsl:when test="BOOLEAN_XPATH_EXPRESSION">STYLE_DISPLAY_NONE</xsl:when>| <xsl:when test="BOOLEAN_XPATH_EXPRESSION"/>| <xsl:when test="BOOLEAN_XPATH_EXPRESSION">LIST_BOX_CONDITIONAL_FORMATTING_STYLE</xsl:when>)+ </xsl:choose> </xsl:attribute>)? (<xsl:choose> (<xsl:when test="BOOLEAN_XPATH_EXPRESSION"/>| <xsl:when test="BOOLEAN_XPATH_EXPRESSION"> <xsl:attribute name="disabled">true</xsl:attribute> </xsl:when>)+ </xsl:choose>)?
LIST_BOX_WITH_MANUAL_ENTRIES:
-
<select class="xdListBox xdBehavior_Select" title="ANY_STRING" size="3" (tabindex="TAB_INDEX")? xd:CtrlId="CONTROL_ID" xd:xctname="ListBox" xd:binding="LEAF_XPATH1" xd:boundProp="value" (style="LIST_BOX_STYLE")? (xd:postbackModel="POSTBACKMODEL")? (accessKey="SINGLE_CHARACTER")?> CHECK_FOR_GETDOM_BEGIN1 LIST_BOX_CONDITIONAL_FORMATTING? <xsl:attribute name="value"> <xsl:value-of select="LEAF_XPATH1"/> </xsl:attribute> ((<option> <xsl:if test="LEAF_XPATH1="""> <xsl:attribute name="selected">selected</xsl:attribute> </xsl:if>OPTION_DISPLAY_VALUE?</option>)| (<option value="OPTION_VALUE1"> <xsl:if test="LEAF_XPATH1="OPTION_VALUE1""> <xsl:attribute name="selected">selected</xsl:attribute> </xsl:if>OPTION_DISPLAY_VALUE?</option>))+ CHECK_FOR_GETDOM_END1 </select>
LIST_BOX_WITH_LOOKUP_ENTRIES:
-
<select class="xdListBox xdBehavior_Select" title="ANY_STRING" size="3" (tabindex="TAB_INDEX")? xd:CtrlId="CONTROL_ID" xd:xctname="ListBox" xd:binding="LEAF_XPATH1" xd:boundProp="value" (value="ANY_STRING")? (style="LIST_BOX_STYLE")? (xd:postbackModel="POSTBACKMODEL")? (accessKey="SINGLE_CHARACTER")?> LIST_BOX_CONDITIONAL_FORMATTING? <xsl:attribute name="value"> <xsl:value-of select="LEAF_XPATH1"/> </xsl:attribute> <xsl:choose> <xsl:when test="function-available('xdXDocument:GetDOM')"> <option/> <xsl:variable name="val" select="LEAF_XPATH1"/> <xsl:if test="not(GROUP_XPATH1/RELATIVE_REPEATING_GROUP_XPATH1[RELATIVE_LEAF_XPATH1 =$val] or $val='')"> <option selected="selected"> <xsl:attribute name="value"> <xsl:value-of select="$val"/> </xsl:attribute> <xsl:value-of select="$val"/> </option> </xsl:if> <xsl:for-each select="GROUP_XPATH1/RELATIVE_REPEATING_GROUP_XPATH1"> <option> <xsl:attribute name="value"> <xsl:value-of select="RELATIVE_LEAF_XPATH1"/> </xsl:attribute> <xsl:if test="$val=RELATIVE_LEAF_XPATH1"> <xsl:attribute name="selected">selected</xsl:attribute> </xsl:if> <xsl:value-of select="RELATIVE_LEAF_XPATH2"/> </option> </xsl:for-each> </xsl:when> <xsl:otherwise> <option> <xsl:value-of select="LEAF_XPATH1"/> </option> </xsl:otherwise> </xsl:choose> </select>
LIST_BOX_WITH_UNIQUE_LOOKUP_ENTRIES:
-
<select class="xdListBox xdBehavior_Select" title="ANY_STRING" size="3" (tabindex="TAB_INDEX")? xd:CtrlId="CONTROL_ID" xd:xctname="ListBox" xd:binding="LEAF_XPATH1" xd:boundProp="value" (value="ANY_STRING")? (style="LIST_BOX_STYLE")? (xd:postbackModel="POSTBACKMODEL")? (accessKey="SINGLE_CHARACTER")?> LIST_BOX_CONDITIONAL_FORMATTING? <xsl:attribute name="value"> <xsl:value-of select="LEAF_XPATH1"/> </xsl:attribute> <xsl:choose> <xsl:when test="function-available('xdXDocument:GetDOM')"> <option/> <xsl:variable name="val" select="LEAF_XPATH1"/> <xsl:if test="not(GROUP_XPATH1/RELATIVE_REPEATING_GROUP_XPATH1[RELATIVE_LEAF_XPATH1=$val] or $val='')"> <option selected="selected"> <xsl:attribute name="value"> <xsl:value-of select="$val"/> </xsl:attribute> <xsl:value-of select="$val"/> </option> </xsl:if> <xsl:variable name="items"> <xsl:copy-of select="GROUP_XPATH1/RELATIVE_REPEATING_GROUP_XPATH1"/> </xsl:variable> <xsl:variable name="uniqueItems" select="msxsl:node-set($items)/*[not((RELATIVE_LEAF_XPATH2= preceding::RELATIVE_REPEATING_GROUP_XPATH1/RELATIVE_LEAF_XPATH2)|(.= preceding::RELATIVE_REPEATING_GROUP_XPATH1))]"/> <xsl:for-each select="$uniqueItems"> <option> <xsl:attribute name="value"> <xsl:value-of select="RELATIVE_LEAF_XPATH1"/> </xsl:attribute> <xsl:if test="$val=RELATIVE_LEAF_XPATH1"> <xsl:attribute name="selected">selected</xsl:attribute> </xsl:if> <xsl:value-of select="RELATIVE_LEAF_XPATH2"/> </option> </xsl:for-each> </xsl:when> <xsl:otherwise> <option> <xsl:value-of select="LEAF_XPATH1"/> </option> </xsl:otherwise> </xsl:choose> </select>
LIST_BOX_STYLE: Semicolon-delimited list of (STYLE_SIZE?, STYLE_MARGIN?, STYLE_DIRECTION?, STYLE_TEXT_DECORATION?, STYLE_BACKGROUND_COLOR?, STYLE_FONT?, STYLE_COLOR?, STYLE_VERTICAL_ALIGN?)
LIST_BOX_CONDITIONAL_FORMATTING_STYLE: Semicolon-delimited list of (STYLE_TEXT_DECORATION?, STYLE_BACKGROUND_COLOR?, STYLE_FONT?, STYLE_COLOR?)
Control-specific attributes used by the list box control are as follows:
xd:binding (section 2.4.2.6)
xd:boundProp (section 2.4.2.9)
xd:CrtlId (section 2.4.2.10)
xd:postbackModel (section 2.4.2.29)
xd:xctname (section 2.4.2.35)
The xdXDocument:GetDom XSL function, as specified in section 2.4.3.9.2, extension is used by the list box control.