You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Adam Kruszewski <sp...@kruszewski.name> on 2005/05/23 10:24:40 UTC

How to prevent myfaces from serializing view tree.

Is there a way to prevent myfaces from serializing whole view tree on
request?
When I edit a jsf page changeing something then those changes are not
reflected when tomcat is already running -- view tree is already
serialized in session and attribute changes in shown jsf components are
not reflected. (it seems that myfaces is not reading them again, but
uses those serialized values)


Cheers,
   a.

Re: How to prevent myfaces from serializing view tree.

Posted by Martin Marinschek <ma...@gmail.com>.
well, this works ;)

regards,

Martin

On 5/23/05, Adam Kruszewski <sp...@kruszewski.name> wrote:
> Martin Marinschek wrote:
> > Tilo is right, this is just how the JSF standard behaves - the
> > components are built up once, and subsequent requests are made
> > against the component tree in memory...
> >
> > You will need to change the view to another page, and come back to
> > the one where you did the changes, then those changes should be
> > reflected.
> 
> Actually I quickly hacked servlet filter which tracks changes of
> underlying jsp pages and invalidates my session when approperate.
> Ugly but works ;-)
> 
> 
> Cheers,
>    a.
>

Re: How to prevent myfaces from serializing view tree.

Posted by Adam Kruszewski <sp...@kruszewski.name>.
Martin Marinschek wrote:
> Tilo is right, this is just how the JSF standard behaves - the 
> components are built up once, and subsequent requests are made
> against the component tree in memory...
> 
> You will need to change the view to another page, and come back to
> the one where you did the changes, then those changes should be
> reflected.

Actually I quickly hacked servlet filter which tracks changes of
underlying jsp pages and invalidates my session when approperate.
Ugly but works ;-)


Cheers,
   a.

Re: How to prevent myfaces from serializing view tree.

Posted by Martin Marinschek <ma...@gmail.com>.
Tilo is right, this is just how the JSF standard behaves - the
components are built up once, and subsequent requests are made against
the component tree in memory...

You will need to change the view to another page, and come back to the
one where you did the changes, then those changes should be reflected.

regards,

Martin

On 5/23/05, Sean Schofield <se...@gmail.com> wrote:
> I believe this is a problem with Tomcat having *compiled* your JSP and
> those changes not being recompiled.  I have the same problem with
> MyFaces and RI.  My workaround is to shutdown Tomcat, delete the
> "work" directory and restart.  Yes - its a pain.
> 
> sean
> 
> ps. please post these types of messages to the "users" list
> 
> On 5/23/05, Tilo Thiele <ti...@emessages.de> wrote:
> > IMHO This has nothing to do with serialization. The view tree is stored in the
> > session and will not be changed. You simply need to start a new Session.
> > /Tilo
> >
> > Am Montag, 23. Mai 2005 10:24 schrieb Adam Kruszewski:
> > > Is there a way to prevent myfaces from serializing whole view tree on
> > > request?
> > > When I edit a jsf page changeing something then those changes are not
> > > reflected when tomcat is already running -- view tree is already
> > > serialized in session and attribute changes in shown jsf components are
> > > not reflected. (it seems that myfaces is not reading them again, but
> > > uses those serialized values)
> > >
> > >
> > > Cheers,
> > >    a.
> >
> >
>

Re: How to prevent myfaces from serializing view tree.

Posted by Sean Schofield <se...@gmail.com>.
I believe this is a problem with Tomcat having *compiled* your JSP and
those changes not being recompiled.  I have the same problem with
MyFaces and RI.  My workaround is to shutdown Tomcat, delete the
"work" directory and restart.  Yes - its a pain.

sean

ps. please post these types of messages to the "users" list

On 5/23/05, Tilo Thiele <ti...@emessages.de> wrote:
> IMHO This has nothing to do with serialization. The view tree is stored in the
> session and will not be changed. You simply need to start a new Session.
> /Tilo
> 
> Am Montag, 23. Mai 2005 10:24 schrieb Adam Kruszewski:
> > Is there a way to prevent myfaces from serializing whole view tree on
> > request?
> > When I edit a jsf page changeing something then those changes are not
> > reflected when tomcat is already running -- view tree is already
> > serialized in session and attribute changes in shown jsf components are
> > not reflected. (it seems that myfaces is not reading them again, but
> > uses those serialized values)
> >
> >
> > Cheers,
> >    a.
> 
>

Re: How to prevent myfaces from serializing view tree.

Posted by Tilo Thiele <ti...@emessages.de>.
IMHO This has nothing to do with serialization. The view tree is stored in the 
session and will not be changed. You simply need to start a new Session.
/Tilo

Am Montag, 23. Mai 2005 10:24 schrieb Adam Kruszewski:
> Is there a way to prevent myfaces from serializing whole view tree on
> request?
> When I edit a jsf page changeing something then those changes are not
> reflected when tomcat is already running -- view tree is already
> serialized in session and attribute changes in shown jsf components are
> not reflected. (it seems that myfaces is not reading them again, but
> uses those serialized values)
>
>
> Cheers,
>    a.