Hi,
is the following possible:
1) Having one ClickHandler for several Buttons.
2) Associating a Command object to each Button.
3) Knowing which Command object belongs to the clicked Button?
I want something like this:
Button btn_1 = new Button ("B1");
Button btn_2 = new Button ("B2");
Button btn_3 = new Button ("B3");
Command cmd_1 = new Command(1);
Command cmd_2 = new Command(2);
Command cmd_3 = new Command(3);
...
// in ClickHandler:
public void onClick (ClickEvent e)
{
Command c = getCommandForButtonFromClickEvent(e);
}
Thanks
Magnus
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.