Guest User

Untitled

a guest
Dec 11th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. private int counter = 0;
  2. public MyPage() {
  3. super(new CompoundPropertyModel(this));
  4. final Label counterLabel = new Label("counter");
  5. add(counterLabel);
  6. counterLabel.setOutputMarkupId(true);
  7. add(new AjaxLink("counterLabelLink")
  8. @Override
  9. public void onClick(AjaxRequestTarget target) {
  10. counter++;
  11. target.addComponent(counterLabel);
  12. Re-render
  13. }
  14. label
  15. });
  16. }
Add Comment
Please, Sign In to add comment