Use the autoComplete
tag to present a drop-down list of candidate text values that a user can select from for an input text box. The text values can be produced by an activity or can be on a clipboard page.
At run time, the Autocomplete icon indicates that the field is supported by an autocomplete tag.
The standard control AutoComplete incorporates an autoComplete
JSP tag, and allows you to set most attributes of the autoComplete
and acDataSource
JSP tags as parameters. Enter an autoComplete JSP tag into hand-crafted HTML code only in special situations where the standard control does not meet your needs.
This JSP tag begins operation after the user types two input characters. It presents a drop-down list for a text box that is 50 characters wide, highlighting the characters that match user input typed in each list element. The data is retrieved by the acDataSource
JSP tag.
<pega:autoComplete name="AC" highlight="true" size="50" minChars="2"> <pega:acDataSource name="ACDS" type="ClipboardPage" sourceName="ACDatasource" clientCache="false" searchPropertyName="Employee" displayField="EmpName" partialSearch="true" ignoreCase="true" maxResults="true" allFields="true" /> </pega:autoComplete>
In the syntax presentations below:
[
and ]
define optional parts of the tag. Do not type the brackets./
> mark the start and end of the tag.<pega:autoComplete name="name" [highlight="true|false" ] [size = "nn" ] [sendingTimeout = "nn" ] [delimiter = "zzz"] [minChars ="nn" ] [listingWidth = "nn"] [value = "value"] > <pega:acDataSource .... /> </pega:autocomplete>
The name
attribute is required.
Attribute |
Value |
name
|
Name of this autocomplete control. You can use the keywords $THIS-NAME or $SAVE (saved variable name) as the value of this attribute. |
delimiter
|
Optional. Character or characters to use as a separator, for optional fields. If omitted, three hyphens "---" are the delimiter. |
highlight
|
Optional. "true" if the text that matches user input is to be highlighted, "false" otherwise. Defaults to "false" if omitted. |
sendingTimeout
|
Optional. An integer specifying the number of milliseconds delay before the drop-down list appears. If omitted, the default is 10 milliseconds. |
size
|
Optional. An integer specifying the width in characters of the input text box. Defaults to "50" if omitted. |
typingTimeout
|
Optional. An integer specifying the number of milliseconds delay after the user types the minimum number of characters before the autocomplete processing starts. Defaults to 10 milliseconds if omitted. |
listingWidth
|
Optional. Width of the <div > element in pixels. If omitted, zero. |
minChars
|
Optional. Number of characters the user must type or paste into the field before autocomplete processing starts. If omitted, the default is 1 character. |
value
|
Optional. Initial value that appears in the text box. You can use the keywords $THIS-VALUE , $SAVE (saved variable name) or reference a parameter with param.name syntax in this field. |