質問

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.

役に立ちましたか?

解決 2

Finally got the solution

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

他のヒント

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top