On 8 February 2011 10:20, NAARAYANA REDDY NANDIGAMA <nandigam...@gmail.com> wrote: > I am talking about two buttons having the same text message in java. > private Button validateButtonOne = new Button(); > private Button validateButtonTwo = new Button(); > validateButtonOne.setText("Validate"); > validateButtonTwo.setText("validate"); > buttonlisteners(validateButtonOne); > buttonListeners(validateButtonTwo);; > private buttonListeners(Button button) { > button.addHandler(new ...) { > >>>>>>>>>>I need to add a separate logic based on button click... > For example, if validateButtonOne click then do logic related to button one > Elese add logic related to validateButtonTwo. > } > } > > So how to identify which button is clicked within common handler method?
Add a separate handler to each button. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.