Solved

Get ClickHandler for different Buttons

Posted on 2013-05-21
1
237 Views
Last Modified: 2013-05-21
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
Comment
Question by:zolf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 35

Accepted Solution

by:
mccarl earned 500 total points
ID: 39186448
Just add the same ClickHandler to the other buttons, ie.

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Weekend adv creator 3 64
Need Help! Getting a syntax error and don't understand why 3 41
Java Eclipse Loop 3 31
What browser will run Java? 7 128
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This video teaches viewers about errors in exception handling.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question