• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
reply
    Bookmark Topic Watch Topic
  • New Topic