Click or drag to resize
Control

The Control tag is used to define controls to be completed automatically by an AutoComplete control.

Attributes and elements

The following sections describe attributes, child elements, and parent elements.

Attributes

None

Child elements

Attribute

Description

id

XPath attribute defining the id of the control to be automatically field

node

a XPath expression which will be executed by the client's browser - in the context of the XML element of the selected item - to determine the text used to fill the control (see example below)

if the XHTML element whose id is @id is an input or a select, the system will change its value to the calculated text; for any other element, the system will change its innerHTML to the calculated text

Parent elements

Element

Description

AutoFill

an AutoFill tag

Examples

AJAX XML
<BODY>
  <VEHICLE>
    <!-- if the user selects this vehicle, the XPath expression @node will be executed from here -->
    <ID>1</ID>
    <NAME>Simca 1000</NAME>
    <CATEGORYID>57</CATEGORYID>
    <DESCRIPTION>An old school family car</DESCRIPTION>
  </VEHICLE>
</BODY>
XSLT code
<acs:AutoComplete
  autoSelectIfOnlyOne="false"
  id="{$id}"
  initValue="{$initValue}"
  initText="{$initText}"
  items="BODY/VEHICLE"
  valueNode="ID"
  textNode="NAME">
  <acs:URL
    path="{$root}xslt.aspx"
    typerubrique="1"
    rubriqueid="20047"
    firstrec="1"
    nbrec="2"
    rec1="{$salesorg}"
    rec2="{$treeList}"
    rec3="{$availability}" />
  <acs:AutoFill>
    <acs:Control id="vehicle_category" node="CATEGORYID"/>
    <acs:Control id="vehicle_description" node="DESCRIPTION"/>
  </acs:AutoFill>
</acs:AutoComplete>
<acs:ListBox id="vehicle_category" items="BODY/CATEGORY" textNode="NAME" valueNode="ID" init="''"/>
<span id="vehicle_description">&#160;</span>