incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <mat...@apache.org>
Subject Re: Re: Saving model state between requests
Date Fri, 15 Dec 2006 13:51:10 GMT
Stefan,

the management of that scope is done by the PageFowScopProvider
(its impl)

  static void __setPageFlowScope(FacesContext context,
                                 PageFlowScopeMap pageFlowScope)
  {
    context.getExternalContext().getRequestMap().put(_PAGE_FLOW_SCOPE_KEY,
                                                     pageFlowScope);
  }


the cache is stored in session

-M

On 12/15/06, Meyer, Stefan <S.Meyer@s2neueinformatik.de> wrote:
> I am using pageFlowScope now. I wonder if there is a timeout to data in that scope and
what the scope is attached to exactly - when is a new pageFlowScope instance created.
>
> -----Urspr√ľngliche Nachricht-----
> Von: Adam Winer [mailto:awiner@gmail.com]
> Gesendet: Donnerstag, 14. Dezember 2006 17:49
> An: adffaces-user@incubator.apache.org
> Betreff: Re: Re: Saving model state between requests
>
> Well, the discussion linked to there points out that preserveDataModel causes problems
- and is unnecessary to boot - if it's already conversation-scoped.  Don't see anything there
that suggests there are problems with preserveDataModel and Facelets.  But I would certainly
agree that using a scope like Seam conversations is a cleaner approach than pushing the onus
on one particular component.
>
> If just sticking with Trinidad, you could use pageFlowScope, which is an improvement
over session for most scenarios.
>
> -- Adam
>
>
>
> On 12/14/06, Chris Lowe <chris.lowe.uk@gmail.com> wrote:
> > I don't know of any ADF/Trinidad alternative to preserveDataModel, but
> > then again I am quite new to this component set.
> >
> > I've been using Trinidad along with Facelets and JBoss Seam. There
> > have been some discussions around Tomahawk and in particular the "preserveDataModel"
> > flag not playing well with either of these technologies:
> >
> > http://www.jboss.com/index.html?module=bb&op=viewtopic&t=70250
> >
> > Long story short - best not to use it!
> >
> > A general JSF solution to this would be to store your data model (or
> > whatever collection that drives the datamodel) in a session bean which
> > will serve as a data cache between requests. In the restore view phase
> > - use the cached version; in prerender phase refresh the cached list.
> > It ain't pretty
> > - but it worked for me.
> >
> > BTW Seam offers some neat solutions to this problem ranging from a
> > version of the above JSF method but needing only a couple of
> > annotations through to the caching of already rendered page fragments.
> >
> > Regards,
> >
> > Chris.
> >
> >
> >
> >
> >
> >
> > On 13/12/06, Meyer, Stefan <S.Meyer@s2neueinformatik.de> wrote:
> > >
> > > I have a pretty common problem with tables. I put a button in a
> > > table column. A "setActionListener" makes sure that the called
> > > action can access the id of the entity the column represents and the
> > > action can operate on that entity. The CollectionModel needs to be
> > > present before "model update" so that the actionListener can retrieve the data
from it.
> > > In tomahawk there is the attribute "preserveDataModel" in order to
> > > persist the datamodel from request to request. Another option is the
> > > use of "saveState" component. I understand that loading the data
> > > freshly has advantages but in my case  it might be pretty slow
> > > (Lucene query). Is there a way to do preserve the datamodel in trinidad?
> > >
> > >
> > >
> > >
> > >
> >
> >
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Mime
View raw message