[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

Get ClickHandler for different Buttons

Hello there,

I have 1 button and my code looks like this.

createUser.addClickHandler(onClickHandler);

private ClickHandler onClickHandler = new ClickHandler() {
            public void onClick(ClickEvent event) {
}
};

now I want to add 2 more buttons to this clickhandler. how can I do it

cheers
Zolf
0
zolf
Asked:
zolf
1 Solution
 
mccarlIT Business Systems Analyst / Software DeveloperCommented:
Just add the same ClickHandler to the other buttons, ie.

otherButton1.addClickHandler(onClickHandler);
otherButton2.addClickHandler(onClickHandler);
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now