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