You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by JS Portal support team <su...@jsportal.com> on 2007/01/13 09:32:56 UTC

state tracking for jsp:include's

Sorry if I'm asking a lot of newbie questions here, but some things are
not quite clear to me.

When I have a /entities/file.jsp backed by my file class. and access it
directly all works fine. But when I include the /entities/file.jsp
(<jsp:include page="/entities/file.jsp") in another jsp, shale/myfaces
seems to loose the discussion of the included pages. Upon each request
the backing bean for the included pages gets reinitiated. How can I have
my includes remember their state as well as the containing page?

Thanks,
Joost

RE: state tracking for jsp:include's

Posted by JS Portal Support <su...@jsportal.com>.
Dear Kito,

That did the trick, Great! Through your comments I stumbled across the
<t:saveState> tag. If I add this just after my include calling my
s:subview'ed /entities/file.jsp, all works exactly like it does when
accessed directly

Thanks,
Joost

-----Original Message-----
From: Kito D. Mann [mailto:kmann@virtua.com] 
Sent: Sunday, January 14, 2007 11:30 AM
To: user@shale.apache.org
Subject: RE: state tracking for jsp:include's

Joost,

Looking at the issues you're having, it looks like you need one or more
other objects in a different scope (such as session). For example, if you
had a session-scoped "visit" object that was injected into your backing
beans, it could store state inbetween requests, and your backing beans could
just updated it whenever there was some information that needed stick around
longer. 

Another aproach would be to use scopes in the dialog manager; someone else
on this list can tell you more about that.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kito D. Mann - Author, JavaServer Faces in Action
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info

* Sign up for the JSF Central newsletter!
http://oi.vresp.com/?fid=ac048d0e17 *



 

> -----Original Message-----
> From: JS Portal support team [mailto:support@jsportal.com] 
> Sent: Saturday, January 13, 2007 3:33 AM
> To: user@shale.apache.org
> Subject: state tracking for jsp:include's
> 
> Sorry if I'm asking a lot of newbie questions here, but some 
> things are not quite clear to me.
> 
> When I have a /entities/file.jsp backed by my file class. and 
> access it directly all works fine. But when I include the 
> /entities/file.jsp (<jsp:include page="/entities/file.jsp") 
> in another jsp, shale/myfaces seems to loose the discussion 
> of the included pages. Upon each request the backing bean for 
> the included pages gets reinitiated. How can I have my 
> includes remember their state as well as the containing page?
> 
> Thanks,
> Joost
> 




RE: state tracking for jsp:include's

Posted by "Kito D. Mann" <km...@virtua.com>.
Joost,

Looking at the issues you're having, it looks like you need one or more
other objects in a different scope (such as session). For example, if you
had a session-scoped "visit" object that was injected into your backing
beans, it could store state inbetween requests, and your backing beans could
just updated it whenever there was some information that needed stick around
longer. 

Another aproach would be to use scopes in the dialog manager; someone else
on this list can tell you more about that.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kito D. Mann - Author, JavaServer Faces in Action
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info

* Sign up for the JSF Central newsletter!
http://oi.vresp.com/?fid=ac048d0e17 *



 

> -----Original Message-----
> From: JS Portal support team [mailto:support@jsportal.com] 
> Sent: Saturday, January 13, 2007 3:33 AM
> To: user@shale.apache.org
> Subject: state tracking for jsp:include's
> 
> Sorry if I'm asking a lot of newbie questions here, but some 
> things are not quite clear to me.
> 
> When I have a /entities/file.jsp backed by my file class. and 
> access it directly all works fine. But when I include the 
> /entities/file.jsp (<jsp:include page="/entities/file.jsp") 
> in another jsp, shale/myfaces seems to loose the discussion 
> of the included pages. Upon each request the backing bean for 
> the included pages gets reinitiated. How can I have my 
> includes remember their state as well as the containing page?
> 
> Thanks,
> Joost
>