aspose file tools*
The moose likes Spring and the fly likes Spring Controller receive correct data from button when Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Controller receive correct data from button when "apply" button is clicked" Watch "Spring Controller receive correct data from button when "apply" button is clicked" New topic
Author

Spring Controller receive correct data from button when "apply" button is clicked

albert kao
Ranch Hand

Joined: Feb 04, 2010
Posts: 245
The group button in my form is set to "unack".
The HwController receive the correct group "unack" when the "apply" button is clicked.
However, the HwController receive the null group when the cursor is moved to the text box and press the <Enter> key.
Only the data from the button is received incorrectly, the other form data are received correctly.
Please help so that the HwController will receive the correct group when the <Enter> key is pressed.
I use Spring 2.5.x to implement JSP.
Eclipse console output:
12:56:52,187 INFO com.mycomp.hw.monitoring.war.HwController:57 - groupStr unack
12:56:52,187 INFO com.mycomp.hw.monitoring.war.HwController:60 - group unack
12:56:52,187 INFO com.mycomp.hw.monitoring.war.HwController:71 - rowsPerPageStr 40
12:56:52,187 INFO com.mycomp.hw.monitoring.war.HwController:80 - rowsPerPage 40
12:57:14,156 INFO com.mycomp.hw.monitoring.war.HwController:57 - groupStr null
12:57:14,156 INFO com.mycomp.hw.monitoring.war.HwController:60 - group all
12:57:14,156 INFO com.mycomp.hw.monitoring.war.HwController:69 - acked null
12:57:14,156 INFO com.mycomp.hw.monitoring.war.HwController:71 - rowsPerPageStr 60
12:57:14,156 INFO com.mycomp.hw.monitoring.war.HwController:80 - rowsPerPage 60

Hw.jsp file:


HwController.java:

albert kao
Ranch Hand

Joined: Feb 04, 2010
Posts: 245
The form is changed to the following.
Now pressing the <Enter> key and clicking the "Apply" button has the same result - the button value is changed from "ack" to "all".
However, I expect that the button value should not change.
albert kao
Ranch Hand

Joined: Feb 04, 2010
Posts: 245
I took out the submit button and the group button is still present.
The group button in my form is set to "unack".
After typing in a number at the text box, then I press the "Enter" key. The group button in my form is set to "all", which is unexpected. I expect the group button still set in the "unack" state.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring Controller receive correct data from button when "apply" button is clicked