You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Chris Gibbons <cg...@solutionstream.com> on 2007/04/05 19:41:47 UTC

RE: PPR and request scoping

You can put any values that you want to maintain in the pageFlowScope
and in your getter for that value, check to see if it exists in
pageFlowScope first, and if it does, return that value rather than the
initialized value when the bean is created.

Chris

-----Original Message-----
From: Daniel Hannum [mailto:dhannum@quovadx.com] 
Sent: Thursday, April 05, 2007 1:43 PM
To: adffaces-user@incubator.apache.org
Subject: PPR and request scoping

Hi,

 

It would appear that if an autoSubmit/PPR happens on a page, any
request-scoped backing beans are recreated. I guess that makes sense...
the extra submit is an extra request.

 

First, am I correct? Second, does that mean that every bean backing a
page that uses autoSubmit (I use it a lot) needs to be session scope?
That brings its own problems. Perhaps there is another option? I even
saw Oracle documentation saying that "page backing beans are usually
request scope", but alas, they cannot be!

 

Any help is appreciated.

 

Dan


RE: PPR and request scoping

Posted by Chris Gibbons <cg...@solutionstream.com>.
I don't have to do that will all values, usually just with a form
submission, I noticed an autosubmit triggers a new bean being created,
but the values tend to be persisted into the new bean. I may be way off
though I'm still a struggling newbie in the world of Trinidad.  It's
frustrating, but has some really nice features that don't exist
elsewhere.

Chris

-----Original Message-----
From: Daniel Hannum [mailto:dhannum@quovadx.com] 
Sent: Thursday, April 05, 2007 2:00 PM
To: adffaces-user@incubator.apache.org
Subject: RE: PPR and request scoping

Good idea. Does seem like a lot of work though. I want the whole page to
hang around across auto-submits. If that's the only way, I think I'll
have to deal with session, and wish upon a star that someday we may be
able to declare a bean scope of "page" in faces-config.xml! (Or I guess
have a look at Seam or Spring 2.0.)

Are there other options within JSF? 

-----Original Message-----
From: Chris Gibbons [mailto:cgibbons@solutionstream.com] 
Sent: Thursday, April 05, 2007 3:42 PM
To: adffaces-user@incubator.apache.org
Subject: RE: PPR and request scoping

You can put any values that you want to maintain in the pageFlowScope
and in your getter for that value, check to see if it exists in
pageFlowScope first, and if it does, return that value rather than the
initialized value when the bean is created.

Chris

-----Original Message-----
From: Daniel Hannum [mailto:dhannum@quovadx.com] 
Sent: Thursday, April 05, 2007 1:43 PM
To: adffaces-user@incubator.apache.org
Subject: PPR and request scoping

Hi,

 

It would appear that if an autoSubmit/PPR happens on a page, any
request-scoped backing beans are recreated. I guess that makes sense...
the extra submit is an extra request.

 

First, am I correct? Second, does that mean that every bean backing a
page that uses autoSubmit (I use it a lot) needs to be session scope?
That brings its own problems. Perhaps there is another option? I even
saw Oracle documentation saying that "page backing beans are usually
request scope", but alas, they cannot be!

 

Any help is appreciated.

 

Dan


RE: PPR and request scoping

Posted by Daniel Hannum <dh...@quovadx.com>.
Good idea. Does seem like a lot of work though. I want the whole page to
hang around across auto-submits. If that's the only way, I think I'll
have to deal with session, and wish upon a star that someday we may be
able to declare a bean scope of "page" in faces-config.xml! (Or I guess
have a look at Seam or Spring 2.0.)

Are there other options within JSF? 

-----Original Message-----
From: Chris Gibbons [mailto:cgibbons@solutionstream.com] 
Sent: Thursday, April 05, 2007 3:42 PM
To: adffaces-user@incubator.apache.org
Subject: RE: PPR and request scoping

You can put any values that you want to maintain in the pageFlowScope
and in your getter for that value, check to see if it exists in
pageFlowScope first, and if it does, return that value rather than the
initialized value when the bean is created.

Chris

-----Original Message-----
From: Daniel Hannum [mailto:dhannum@quovadx.com] 
Sent: Thursday, April 05, 2007 1:43 PM
To: adffaces-user@incubator.apache.org
Subject: PPR and request scoping

Hi,

 

It would appear that if an autoSubmit/PPR happens on a page, any
request-scoped backing beans are recreated. I guess that makes sense...
the extra submit is an extra request.

 

First, am I correct? Second, does that mean that every bean backing a
page that uses autoSubmit (I use it a lot) needs to be session scope?
That brings its own problems. Perhaps there is another option? I even
saw Oracle documentation saying that "page backing beans are usually
request scope", but alas, they cannot be!

 

Any help is appreciated.

 

Dan