On 7 February 2011 17:41, NAARAYANA REDDY NANDIGAMA
<[email protected]> wrote:
> I have another requirement.. I have two buttons with same name "validate". I
> need to identify which button is clicked when I user click on any one of
> validate buttton. I thought i can use button.getText but both buttons has
> the same name so not sure what to do. Could you please advise me on this?
I'm not sure what you mean by "the same name". You can't have the same
id twice and I don't see why you would want that either.
Just do something like
<g:Button ui:field="validateOne">Validate</g:Button>
<g:Button ui:field="validateTwo">Validate</g:Button>
and in Java
(if you want to do something with the buttons themselves)
@UiField
Button validateOne;
@UiField
Button validateTwo;
(if you want to respond to clicks)
@UiHandler("validateOne")
void onClickValidateOne(ClickEvent event) {...}
@UiHandler("validateTwo")
void onClickValidateTwo(ClickEvent event) {...}
--
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.