Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private int counter = 0;
- public MyPage() {
- final Label counterLabel = new Label("counter", counter);
- add(counterLabel);
- counterLabel.setOutputMarkupId(true);
- add(new AjaxLink("counterLabelLink")
- @Override
- public void onClick(AjaxRequestTarget target) {
- counter++;
- target.addComponent(counterLabel);
- }
- });
Add Comment
Please, Sign In to add comment