Search code examples
gwt2submit-button

GWT How to specify name of Submit Button?


I have integrated my Spring application with GWT. My application has a Login page with 2 submit button (1) Login and (2) Sign Up / Register.

Now i have added these two buttons in login page successfully.

But how can i specify their name so that i can differentiate in controller which button is submitted and redirect my flow accordingly.

How to set name of submit buttons in GWT?

Please help.


Solution

  • Finally got the solution

    DOM.setElementAttribute(buttonElement,"name","register");