Pregunta

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.

¿Fue útil?

Solución 2

Finally got the solution

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

Otros consejos

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top