user1383163
user1383163

Reputation: 597

Setting visibility of button in wicket to false on submit

so I have a wicket ajax submit link and I want to be able to set it to be not visible or disable it once it has been clicked. What can I do to achieve this behaviour.

Thanks in advance

Upvotes: 0

Views: 1325

Answers (1)

Thorsten Wendelmuth
Thorsten Wendelmuth

Reputation: 780

AjaxLink link = new AjaxLink("link") {
    @Override
    public void onClick(AjaxRequestTarget target) {
        setVisible(false);
        target.add(this);
    }
};
link.setOutputMarkupId(true);
add(link);

Upvotes: 3

Related Questions