@Property(...
renderStyle=@RenderStyleDef(autoComplete=false, minQueryLength=1, forceSelection=false))
By default, autoComplete is not enabled except for PersistenceEntity type.
minQueryLength specifies how many characters will triger drop down
of suggestions, and forceSelection specifies whether the selection from suggestions
is required.
For PersistenceEntity type, the query criteria of suggestions for an EntityProperty is built from the following
@Property(...
dynamicSelectQuery=false, selectQuery={PropertyCriterion})
public CriteriaElement[] getDynamicSelectPropertyQueryElements(PersistenceDataBackingBean<T> backingBean,
T entity, EntityProperty<T> property) throws SystemException {
// return an array of CriteriaElements that is used to build query criteria
}
By default, entity property id and name are used to match the user input.
Its EntityBackingBean can override the following method to provide
the CriteriaElement (boolean) for retrieving entities as suggestions.
The CriteriaExpression will be combined with the selectQuery (AND relation).
@Override
public <E extends PersistenceEntity> CriteriaExpression<Boolean> getAutoCompleteQueryElement(
PersistenceDataBackingBean<E> backingBean, E entity,
EntityProperty<E> property, String userInput) throws SystemException {
}
For non-PersistenceEntity type, its EntityBackingBean needs to override
the following method to provide a list of suggestion for the user input.
@Override
public List<String> getAutoCompleteSuggestions(PersistenceDataBackingBean<T> backingBean, T entity,
EntityProperty<T> property, String userInput) throws SystemException {
// return a list of string as suggestions
}