Hi Kasper
You probably want to use flash instead:
http://www.symfony-project.org/book/1_0/06-Inside-the-Controller-Layer#Flash%20Attributes

-Mohammad

On Mon, Mar 31, 2008 at 2:04 PM, Kasper G <[EMAIL PROTECTED]> wrote:

>
> Thank you for your response, Olivier. Storing the value in the session
> (through getUser()) is indeed an option. However I do not consider it
> a very "clean" one.
>
> The information need only be accessible during the current request
> after the forward but not during subsequent requests. Storing it in
> the session should be unnecessary and leaves problems such as session
> cleanup and expired values which I'd like to avoid.
>
> Are there any other options?
>
> Kasper
>
> On Mar 31, 6:16 pm, "Olivier LOYNET" <[EMAIL PROTECTED]> wrote:
> > To retain values, you can do like the filters in Admin generator
> >
> > To set
> >
> >
> $this->getUser()->getAttributeHolder()->removeNamespace('frontend/test/filte
> > rs');
> >
> >       $this->getUser()->getAttributeHolder()->add($filters,
> > 'frontend/test/filters');
> >
> > To get
> >
> > filters =
> > $this->getUser()->getAttributeHolder()->getAll('frontend/test/filters');
> >
> > Olivier
> >
> > > -----Original Message-----
> > > From: symfony-users@googlegroups.com [mailto:symfony-
> > > [EMAIL PROTECTED] On Behalf Of Kasper G
> > > Sent: Monday, March 31, 2008 5:50 PM
> > > To: symfony users
> > > Subject: [symfony-users] Retain internal value after forward()
> >
> > > Hi all,
> >
> > > I'm trying to integrate the Observer pattern into my symfony 1.0 app.
> > > When an event occurs observers should be notified and react on it.
> >
> > > One observer class should react by sending a mail and thus I'd like to
> > > forward the event to an action by calling
> >
> > > sfContext::getInstance()->getController()->sendEmail('mail',
> > > 'sendMail');
> >
> > > However I can't figure out how do make the event object accessible
> > > from within the mailActions->executeSendMail method in a clean way.
> > > How would you do it?
> >
> > > Thanks in advance,
> > > Kasper
> >
>

--~--~---------~--~----~------------~-------~--~----~
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