jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes Urgent...Need help on form submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Urgent...Need help on form submit" Watch "Urgent...Need help on form submit" New topic
Author

Urgent...Need help on form submit

neetu shri
Greenhorn

Joined: Aug 14, 2007
Posts: 17
Hi,
I have a form in a JSP. THe values are not being properly submitted to the server. THe Action class always gets PP for the selectedProcedureType.
ANy help please?
-----------------------------------------------------
THis is the related piece in View Source of the browser.




------------------HERE IS THE JSP SNIPPET--------------


SCJP 1.2<br />SCWCD
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Wow, you sure have some wacky looking code there (btw it would be helpful if you disabled smilies and took out all the left indentation). I am not sure why you need the "hack" or the JavaScript at the bottom. What is the underlying type is procedureType? I would think your JSP code would look more like this (assuming that procedureType has a method getProcedureTypeId):


- Brent
neetu shri
Greenhorn

Joined: Aug 14, 2007
Posts: 17
Brent,
Thanks for your reply. Actually we got that piece working finally. I have another question.

We have three radio buttons on a page.
When initially displayed, the radio buttons are selected/not selected based on the current user state.
After the form is submitted with a radio button selected the user state is updated. SO far we are fine.
But after navigating thru other pages and changing the user state if I go back to that page, the last submitted value of the radio button is still selected- which was changed in other page and is not represented by any of the radio buttons. How can I uncheck all the radio buttons.
I tried the following option.It didn't work. And it still displays the last selected value as checked.
I want to display the radio buttons with none of them selected.
THANK YOU
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Urgent...Need help on form submit