|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Target(value=FIELD) @Retention(value=RUNTIME) public @interface Bindable
Provides a Page field auto binding annotation.
public class BindableDemo extends Page {
// ActionLink automatically added to Page control list
@Bindable public ActionLink link = new ActionLink();
// Message string is automatically added to Page model
@Bindable public String message;
public BindableDemo() {
// Listener method invoked when link clicked
link.setActionListener(new ActionListener() {
public boolean onAction(Control source) {
// message added to page mode and rendered in template
message = "I was clicked";
return true;
}
});
}
}
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||