SHOW:
|
|
- or go back to the newest paste.
| 1 | container.visitChildren(FormComponent.class, new IVisitor<FormComponent, Void>() {
| |
| 2 | ||
| 3 | - | @Override |
| 3 | + | @Override |
| 4 | - | public void component(final FormComponent component, IVisit<Void> visit) {
|
| 4 | + | public void component(final FormComponent component, IVisit<Void> visit) {
|
| 5 | - | AjaxFormComponentUpdatingBehavior behavior = new AjaxFormComponentUpdatingBehavior("onchange") {
|
| 5 | + | AjaxFormComponentUpdatingBehavior behavior = new AjaxFormComponentUpdatingBehavior("onchange") {
|
| 6 | @Override | |
| 7 | - | @Override |
| 7 | + | protected void onUpdate(AjaxRequestTarget target) {
|
| 8 | - | protected void onUpdate(AjaxRequestTarget target) {
|
| 8 | + | System.out.println("updated " + component.getPageRelativePath());
|
| 9 | - | System.out.println("updated " + component.getPageRelativePath());
|
| 9 | + | target.add(component); |
| 10 | - | target.add(component); |
| 10 | + | } |
| 11 | - | } |
| 11 | + | }; |
| 12 | - | }; |
| 12 | + | System.out.println("behavior to " + component.getPath() + " " + component.getClass());
|
| 13 | - | System.out.println("behavior to " + component.getPath() + " " + component.getClass());
|
| 13 | + | component.add(behavior); |
| 14 | - | component.add(behavior); |
| 14 | + | } |
| 15 | - | } |
| 15 | + | }); |
| 16 | - | }); |
| 16 | + | |
| 17 |