Guest User

Untitled

a guest
Dec 11th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 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.     Always output
  8.     add(new AjaxLink("counterLabelLink")
  9.     markup id with Ajax
  10.     @Override
  11.     public void onClick(AjaxRequestTarget target) {
  12.         counter++;
  13.         target.addComponent(counterLabel);
  14.         Re-render
  15.     }
  16.     label
  17. });
Add Comment
Please, Sign In to add comment