So how do YOU guys handle session data?

You create form-bean like classes, and use them in actions? or you
store the fields individually as attributes?

My code is getting unmanageable right now...because of so many form
fields...all represented as separate variables...and maintained in
hidden variables, or cookies...

I will soon need a cleaner, object oriented way...

On Mar 3, 6:54 pm, gestadieu <[EMAIL PROTECTED]> wrote:
> You can also take an approach following a little bit what is going to
> happen in sf 1.1:
> named all your form fields with a table structure such as <input
> name="myform[name]"...>
> you can then simply store the table myform in thesessionand get it
> back whenever you want.
>
> $myform = $this->getRequestParameter('myform');
> $this->getUser()->setAttribute($myform);
>
> On Mar 3, 9:13 pm, Sumedh <[EMAIL PROTECTED]> wrote:
>
> > Thanks Ian and Christian for such a quick response :)
>
> > The reason to store a form insessionis to maintain its state.
> > Simplest use of this is in repopulating after validation. Now,
> > validation is taken care by Symfony as a special case, as I saw in the
> > book.
>
> > But, there are several other instances where storing a form insession
> > is required. Let us say there are 3 tabs on the screen, each with a
> > form. User populates some data on first tab, and switches to second
> > tab. This action should submit the first form, but not update it in
> > the DB. User enters some data in the second tab, and wants to come
> > back to first tab to again edit some data. This is a very common
> > requirement...How would we typically do this is Symfony?
>
> > Actually, keeping theformsfor the fullsessioncreatessession
> > bloat. So, this facility should be used with care, and theforms
> > should be cleaned up once this workflow is done.
>
> > I hope you can help further on this...I've refered the book, but didnt
> > find immediate reference to this kind of requirement...
>
> > On Mar 3, 5:58 pm, "Lee Bolding" <[EMAIL PROTECTED]> wrote:
>
> > > Symfony handlesformsand validation very differently to Struts.
>
> > > You don't need to create a formbean and a formaction.
>
> > > Take a look at theformssection in the Symfony 
> > > manualhttp://www.symfony-project.org/book/1_0/10-Forms
>
> > >Formsand validation are much simpler in Symfony :)
>
> > > -----Original Message-----
> > > From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED]
>
> > > On Behalf Of Sumedh
> > > Sent: 03 March 2008 12:05
> > > To: symfony users
> > > Subject: [symfony-users] Puttingformsinsession
>
> > > Hi friends,
>
> > > This might be a little preliminary doubt...
>
> > > How do I createformsin symfony that stay insession? In struts, once
> > > needs to mention it in the struts-config.xml...
>
> > > I looked at the symfony book, but couldnt find it immediately...
>
> > > May be I need to look again, but if you could help, that'll be really
> > > quick...
>
> > > Thanks...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to