acDataSource JavaServer Page tag |
Use the acDataSource tag within an autoComplete
tag to compute the list of values presented to the user.
The standard control rule 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.
<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="20" allFields="true" />
</pega:autoComplete>
This acDataSource tag (within an autoComplete tag) identifies a clipboard page named ACDataSource as the source of values. That page contains a Page List
property named Employee; each embedded page of the Employee contains a Single Value
property named EmpName.
If the user types the two characters "AL", this tag instructs the system to search the EmpName values for names that start with "AL", such as Alan, Allen, or Alto. The search is not case sensitive, and halts after 20 matches are found. When the user selects a match from the drop-down display, all fields from that page of the Employee list are selected.
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:acDataSource
name = "widgetname"
sourceName ="sourcename"
[type = "Activity|ClipboardPage" ]
[activityClassName ="class" ]
[clientCache ="true|false"]
[searchPropertyName ="pagelistprop"]
displayField = "propertyname"
[partialSearch = "true|false" ]
[ignoreCase = "true|false"]
[maxResults = "nnn"]
[dsFields = "tag" ]
</pega:ACDataSource>
The name
, SourceName
, and displayField
attributes are required.
Attribute |
Value |
name
|
Name of this acDataSource. |
type
|
|
sourceName
|
Clipboard page name, if type is |
activityClassName |
First key part of the activity identified in the |
clientCache
|
If true, HTML code causes the first-use results of this control to be cached in the client browser. Default is false. |
searchPropertyName
|
Name of a |
displayField
|
Reference to a scalar property embedded on each page of the |
partialSearch
|
If true, text string matches are based on comparisons of user input with the initial portion of text values, so user input of "AL" matches ALPHA and ALABAMA but not PALINDROME. If false, text string matches can occur anywhere, so user input of "AL" matches ALPHA, PALINDROME, and PRINCIPAL. If omitted, the default is false. |
ignoreCase
|
If true, matching of user input with text values to display is not case sensitive, so "ABC" matches "aBC" and "Abc". If false, matching is case sensitive. If omitted, the default is true. |
maxResults
|
A positive integer setting a maximum limit on the number of matches to be displayed. If omitted, the default is 10. |
allFields
|
If true, all fields are selected from the property identified in the |
dsFields
|
This optional JSP tag identifies a list of dsField attributes. |
dsField
|
This optional JSP tag, with the scope of the dsField tag, identifies the property to be displayed as a drop-down list element. |
autoComplete JSP tag
How stream processing works Harness and Section forms — Adding an Autocomplete field |