0

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.

Ankur Raiyani
  • 1,509
  • 5
  • 21
  • 49

2 Answers2

0

If you can edit the html code on your page you can simply use an if/else condition and statement. Even with pages that use basic html you still do this by using javaScript to write in the button code.

RogerB
  • 21
  • 1
  • Yes i can do it using script. But that is not the way it should be. As i mentioned i have used GWT to avoid writing external script as much as possible. I think there should be some way in GWT to handle this scenario. – Ankur Raiyani May 29 '12 at 06:53
0

Finally got the solution

DOM.setElementAttribute(buttonElement,"name","register");
Ankur Raiyani
  • 1,509
  • 5
  • 21
  • 49