This annotation is defined on the Presentation Layer.
Target: Method of a POJO annotated with @StageDefinition.
Description: Marks a method to be executed when a given document generation event is fired.
The supported return types are:
JavaDoc: Click here
Attributes:
Name | Description | Data type | Required | Default value |
value | The id of the AJAX event to link to the method. | String | Yes | - |
Example:
public class SomeStage { // Ties the method to the OnAJAX event with the id "getRows". @OnAJAX("getRows") public Map<String, String> aMethod() { Map<String, String> rows = new HashMap<String, String>(); rows.put("id1", "first row"); rows.put("id2", "second row"); rows.put("id3", "third row"); return rows; } }
See also: