...
- EventContext
- Object[]
- List<Object>
The latter two should be avoided, they may be removed in a future release. In all of these cases, the context parameter acts as a freebie; it doesn't match against a context value as it represents all context values.
Code Block |
---|
Object onActionFromEdit(EventContext context) { if (context.getCount() > 0) { this.selectedId = context.get(0); // do something with the document here } else { alertManager.warn("Please select a document."); return null; } } |
...
Accessing Request Query Parameters
A parameter may be annotated with the @RequestParameter annotation; this allows query parameters (?name1=value1&name2=value2, etc) to be extracted from the request, converted to the correct type, and passed to the method. Again, this doesn't count against the event context values.
See the example in the Link Components FAQ.
Method Matching
An event handler method will only be invoked if the context contains at least as many values as the method has parameters. Methods with too many parameters will be silently skipped.
...