From: Alex <ale...@ya...> - 2004-04-02 10:18:40
|
Hi Andrew, Hmm, I can't remember what it says in the docs, but you can't combine information from three forms *automatically* into one big form object. There is a possibility of mapping *one* form object to the session scope, which means you get to use that information later in the session. It does not however, merge information from three forms into one big form object. (wizard-like: next, next, next, finish) Jason wrote a Wizard example a while back, perhaps you could check that out. Might be easy to reuse his code. What I usually do, is create a new session object (statefull session bean if you use Java lingo) at the beginning of the wizard (when user submits his first form) and everytime the user submits another form, add the information from the from object to the session stored object. Once the user has completed the wizard, you can act on the information in the session stored object - like store it in a DB orso. It isn't all that hard, but it isn't done automatically either. If you want to change phrame to do that automatically, don't forget users tend to want to press that back button instead of that next button every now and again, and it would be nice if it were to result in a form filled out with the information previously entered there. You can't make that work by changing Phrame's processForm method. If you would want to do it, you can indeed, as you write, check if a form object of the correct name and class exists in the session-scope, and add the new fields to it. Depending on the situation, that might suffice. Good luck! Kind regards, Alex --- Andrew Macgregor <an...@cb...> wrote: > Hi, > > The phrame docs suggest that I can use the same form > object across > several pages. Can I associate MyFormObject with > three html forms and > have them all feed into it, then on a fourth page > display the contents > of MyFormObject? > > I've taken a look at the code in ActionController > and the _processForm > method seems to create a new form object for each > action. For this to > work should this method check the session to see if > such a form object > exists and if so simply add to it? > > Thanks, Andrew. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux > Tutorials > Free Linux tutorial presented by Daniel Robbins, > President and CEO of > GenToo technologies. Learn everything from > fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ |