PDA

View Full Version : I am going crazy with AbstractWizrdFormController problem please help me!!


nismi
Jul 12th, 2006, 12:39 PM
Hi Friends,

We are using AbstractWizardFormController after entering data to search and do successful submit which is _finish it populates results in the bottom of the same page, and all the fields have the data you typed. And now i might want to continue with another search, in some cases most of the data will be same only one or 2 fields probably changed, if i do that its first clearing whole form and resets to fresh page and all the data typed before is gone, in other words, after successfull search (_finish) if you click search button again its doing reset, how can i avoid doing that. i want to be able to search again and again.

please help me

example:

lets say i have text boxes called Name, From, To, submit button called Search

Name: N From: 11-jul-2006 To: 12-jul-2006 Search

if i click search now lets say if it gives me all the records with name starts with n and date falling in the range 11-jul-2006 to 12-jul-2006

so now i want to change name textbox to R and keep same dates and click search again but its clearing all fields if i click search second time


please pelase help me.................

your friend,

nismi

tatvamasi
Jul 12th, 2006, 04:53 PM
Hi Friends,

We are using AbstractWizardFormController after entering data to search and do successful submit which is _finish it populates results in the bottom of the same page, and all the fields have the data you typed. And now i might want to continue with another search, in some cases most of the data will be same only one or 2 fields probably changed, if i do that its first clearing whole form and resets to fresh page and all the data typed before is gone, in other words, after successfull search (_finish) if you click search button again its doing reset, how can i avoid doing that. i want to be able to search again and again.

please help me

example:

lets say i have text boxes called Name, From, To, submit button called Search

Name: N From: 11-jul-2006 To: 12-jul-2006 Search

if i click search now lets say if it gives me all the records with name starts with n and date falling in the range 11-jul-2006 to 12-jul-2006

so now i want to change name textbox to R and keep same dates and click search again but its clearing all fields if i click search second time


please pelase help me.................

your friend,

nismi

Make sure you have set sessionform property in your bean defination.

nismi
Jul 12th, 2006, 05:08 PM
tatvamasi,

Thank you sooooooooooo much for reply, i'll try that

nismi
Jul 12th, 2006, 05:11 PM
tatvamasi,

i just checked it and i already have property for that under my controller bean tag

<property name="sessionForm"><value>true</value></property>

so, what to do now?

gmazza
Jul 12th, 2006, 05:37 PM
I don't think sessionForm is going to help you here--it is probably just a distraction.

sessionForm=true does not keep the commandBean for the entire session of the user's interaction with the application. What it does do is keep the same commandBean between the initial display of the form, and the same form's submission. (Otherwise two commandBeans will be created, one for each part.) After submission is completed, the commandBean is always removed from the session object regardless.

For example, in formBackingObject(), you can preset a property value that the JSP can use when initially showing the form (with bindOnNewForm=true), say for a hidden field in the HTML. With sessionForm=false, a new command bean is created on submission so the value of that property will *not* be retained. With sessionForm = true, the same command bean, with that preset value, would still be available at submission time.

Glen

andrews
Jul 13th, 2006, 07:52 AM
I don't think sessionForm is going to help you here--it is probably just a distraction.
As I told him in this other thread he started about the same issue:

http://forum.springframework.org/showthread.php?t=26827 :)