org.loom.addons.autocompleter
Annotation Type Autocompleted


@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD})
@Documented
public @interface Autocompleted

Retrieve the annotated object from the database, according to an autocompleted property (usually, its name). For example, if you prepare an autocompleter like this:

 
 
 \@Autocompleted(query="select Customer from Customer c where c.name=?", property="name")
 private Customer customer;
 
The customer.name request parameter will be intercepted and used to populate the customer property. If no customer.name request param is found, the interceptor will do nothing.

Author:
Ignacio Coloma

Optional Element Summary
 java.lang.String[] except
          the list of events in which this validation does NOT place, empty for none.
 java.lang.String[] on
          the list of events in which this validation takes place, empty for all.
 java.lang.String propertyName
          the name of the autocompleted property, default "name"
 java.lang.String propertyPath
          if provided, applies to the property path instead of the annotated property
 java.lang.String query
          the query that will be launched to the database to retrieve the autocompleted entity.
 java.lang.String separatorTokens
          the list of tokens that separate each value,empty for single value.
 

propertyPath

public abstract java.lang.String propertyPath
if provided, applies to the property path instead of the annotated property

Default:
""

on

public abstract java.lang.String[] on
the list of events in which this validation takes place, empty for all. Accepts wildcards.

Default:
{}

except

public abstract java.lang.String[] except
the list of events in which this validation does NOT place, empty for none. Accepts wildcards.

Default:
{}

propertyName

public abstract java.lang.String propertyName
the name of the autocompleted property, default "name"

Default:
"name"

query

public abstract java.lang.String query
the query that will be launched to the database to retrieve the autocompleted entity. If empty, a reasonable default will be assembled: "select c from {object-class} c where c.{property-name}={property-value}

Default:
""

separatorTokens

public abstract java.lang.String separatorTokens
the list of tokens that separate each value,empty for single value. See Ajax.Autocompleter.tokens

Default:
""


The Loom Framework 1.6-SNAPSHOT.
Licensed under the Apache License, Version 2.0 by Extrema Sistemas de Informacion S.L.