Re: Form over multiple pages
I can think of a couple of options - 1) Use the browser back button :-) 2) Could you perhaps make your back button an button. This way validation won't be performed. Your action class should check for cancel. - isCancelled(request) - and "somehow" forward to the previous page. Cheers, Paul C Gregory F. March wrote: On May 29, 2003, Paul Curren <[EMAIL PROTECTED]> wrote: |You then have a few options - |1) Associate the form bean with multiple actions, where each action is a |separate page in your wizard (be sure to set the form bean to session scope) |2) Have all pages of the form submit to the same action, with the action |class able to discover what page it's processing e.g. a hidden input |populate a "page" attribute in your form bean. Paul, But how do you implement a "back" button? I'm trying to do exactly this with a DynaActionForm. I set up an action that generates a forward to the previous form jsp and when I try to go back to that form where the user has already entered data, the values get reset. I have even tried overriding reset in my subclassed DynaActionForm. Do I have to do something in the jsp or somewhere else? Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Form over multiple pages
On May 29, 2003, Paul Curren <[EMAIL PROTECTED]> wrote: |You then have a few options - |1) Associate the form bean with multiple actions, where each action is a |separate page in your wizard (be sure to set the form bean to session scope) |2) Have all pages of the form submit to the same action, with the action |class able to discover what page it's processing e.g. a hidden input |populate a "page" attribute in your form bean. Paul, But how do you implement a "back" button? I'm trying to do exactly this with a DynaActionForm. I set up an action that generates a forward to the previous form jsp and when I try to go back to that form where the user has already entered data, the values get reset. I have even tried overriding reset in my subclassed DynaActionForm. Do I have to do something in the jsp or somewhere else? Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Form over multiple pages
Is there a way or a reason why I might want to do this with the DynaActionForm and subclass DynaAction Form Class so that I can overiride the reset method?? What do you think? Natalie Paul Curren wrote: Hi there, Just create your form bean with all the properties you are concerned with. You then have a few options - 1) Associate the form bean with multiple actions, where each action is a separate page in your wizard (be sure to set the form bean to session scope) 2) Have all pages of the form submit to the same action, with the action class able to discover what page it's processing e.g. a hidden input populate a "page" attribute in your form bean. If you're wanting to perform validation then additional complexity is involved, but it's not too tricky. Cheers, Paul C Natalie D Rassmann wrote: >I have a form which will be populated over several pages. I want to use >one big form bean to store the data. How do I do this? Any >suggestions? > >Thanks in advance, > >Natalie > > > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Form over multiple pages
On additional note, since not all properties are visible on all pages , you will want to implement conditional logic in your forms reset() method (and validate as mentioned by Paul) to only reset those properties that were on the page just submitted otherwise you will lose values for the earlier pages! (Resetting is only really required for checkboxes, multiple select fields, and textareas though) since these are the types for which nothing is submitted if nothing is selected/entered. -Original Message- From: Paul Curren [mailto:[EMAIL PROTECTED] Sent: Thursday, 29 May 2003 20:02 To: Struts Users Mailing List Subject: Re: Form over multiple pages Hi there, Just create your form bean with all the properties you are concerned with. You then have a few options - 1) Associate the form bean with multiple actions, where each action is a separate page in your wizard (be sure to set the form bean to session scope) 2) Have all pages of the form submit to the same action, with the action class able to discover what page it's processing e.g. a hidden input populate a "page" attribute in your form bean. If you're wanting to perform validation then additional complexity is involved, but it's not too tricky. Cheers, Paul C Natalie D Rassmann wrote: >I have a form which will be populated over several pages. I want to use >one big form bean to store the data. How do I do this? Any >suggestions? > >Thanks in advance, > >Natalie > > > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Form over multiple pages
Hi there, Just create your form bean with all the properties you are concerned with. You then have a few options - 1) Associate the form bean with multiple actions, where each action is a separate page in your wizard (be sure to set the form bean to session scope) 2) Have all pages of the form submit to the same action, with the action class able to discover what page it's processing e.g. a hidden input populate a "page" attribute in your form bean. If you're wanting to perform validation then additional complexity is involved, but it's not too tricky. Cheers, Paul C Natalie D Rassmann wrote: I have a form which will be populated over several pages. I want to use one big form bean to store the data. How do I do this? Any suggestions? Thanks in advance, Natalie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Form over multiple pages
I have a form which will be populated over several pages. I want to use one big form bean to store the data. How do I do this? Any suggestions? Thanks in advance, Natalie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]