On Wed, Jun 16, 2010 at 6:47 PM, Magnus <[email protected]>wrote:

> Hi,
>
> is the following possible:
>
> 1) Having one ClickHandler for several Buttons.
>

@UiHandler({"deleteButton", "deleteButton2"})
void onDelete(ClickEvent e)
{
}

i don't know the rest :(

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]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
cheers
  JZ

-- 
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.

Reply via email to