Autosuggest (attribute of property)

From JRapid

Jump to: navigation, search

autosuggest is an attribute of property.

Its possible values are:

  • autosuggest


Contents

Description

The autosuggest attribute is used to indicate that possible values for a property should be suggested based on already entered values for that same property.

autosuggest is a special case of suggest and the only value it can take is "autosuggest".

Suggestions are shown inside a combo below the property with the autosuggest attribute. This combo is automatically displayed as user types in the field. Note that the user is allowed to enter a new value that is not suggested.

autosuggest only works for properties of type string or text and is not supported by collections.

Usage

<property
   ...
   autosuggest="autosuggest"
   ... 
/>


Examples

The values for the city property are suggested based on previously entered values for the same property.

 <entity label="Address" name="Address">
        ...
        <property label="City" autosuggest="autosuggest" name="city"/>
        ... 
 </entity>
Autosuggest example

When the user starts to write a value for the property, a list of existing values that start with the entered value are suggested.

Generates

 RESTful API: /(entityname)/suggest(propertyname)/(.*)  
maps to
 Java Class: (basepackage).(entityname)Services.java suggest(propertyname)()

For example, registers the /Address/suggestcity/(.*) service in the MainControllerAbstract REST Controller that maps to the suggestCity() method in the AddressServicesAbstract class.

Generates the suggestCity() method in the AddressServicesAbstract class.


See also

Personal tools