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.

Example

<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.

Complete syntax

In the syntax presentations below:

  • Square bracket characters [ and ] define optional parts of the tag. Do not type the brackets.
  • JSP tag delimiters <pega and / > mark the start and end of the tag.
  • A vertical stroke character | separates alternatives.
  • Replace any text in italics with your choice of value of that type.
<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 Activity if the system is to execute an activity to construct a page containing the list of values, or ClipboardPage if the values are already present in a page with the appropriate structure. If omitted, the default is Activity.
sourceName Clipboard page name, if type is ClipboardPage, or the second key part of the activity name, if type is Activity.
activityClassName First key part of the activity identified in the sourceName field, if the type is Activity. If omitted, the system uses the class of the primary page to locate the activity.
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 Page List property that contains pages that contain a matched text value. If omitted, the property name pxResults is assumed.
displayField Reference to a scalar property embedded on each page of the Page List property identified in the searchPropertyName attribute.
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 searchPropertyName attribute. If false, only those properties specified in the dsFields attribute.
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.

JavaServer Pages tags