The following Action example (MyAction) has its init(HttpServletRequest) method annotated as the default event.
public class MyAction {
@DefaultEvent("{request}")
public void init(HttpServletRequest request) {
// ...
}
}
Notice the value "{request}" set on the DefaultEvent annotation. This provides a hint to Waffle to help it satisfy the method arguments. If you are familiar with Waffle you should realize that this is similar to how events are defined from Views. This in fact is not just similar it is identical. You can define the event arguments for the DefaultEvent annotation in the same way described in the Advanced Events section of the tutorial.
No comments:
Post a Comment