It stays loaded until detach() is called, which is at the end of the
request, unless you explicitly call it sooner.  So, you're safe through the
entire request.

On Tue, Mar 3, 2009 at 9:43 AM, walnutmon <justin.m.boy...@gmail.com> wrote:

>
> That means any time someone tries to access one of the objects, the entire
> list has to be retrieved from the database again, correct?  It seems that
> would be a drawback; is that a fair assessment?
> - Show quoted text -
>
>
> Jeremy Thomerson-5 wrote:
> >
> > Like this?
> >
> > new LoadableDetachableModel<List<Foo>>() {
> >   public List<Foo> load() {
> >     return yourApp.howeverYouCreateYourList();
> >   }
> > }
> >
> > On Tue, Mar 3, 2009 at 9:30 AM, walnutmon <justin.m.boy...@gmail.com>
> > wrote:
> >
> >>
> >> All,
> >>
> >> I have a list that I pass to various components, a pageable view, and
> >> dropdowns for example...
> >>
> >> After moving models to be detachable, there is a problem where the
> >> pageable
> >> view is only creating a detachable model on "populateItem()", therefore,
> >> the
> >> models are detachable only for the page (page being a page in a pageable
> >> view) that was last rendered.  I want to actually pass in a list of
> >> detachable models so that all items are detachable, instead of a regular
> >> list of objects that is converted into detachable models on render.
> >>
> >> There is an IteratorModelAdaptor, but that's for iterators, how would
> you
> >> best create a list of detachable models?  Or would I be better off with
> a
> >> DetachableModel<List>() instead?  If so, how could you implement that?
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Creating-Detachable-Lists-tp22310878p22310878.html
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Creating-Detachable-Lists-tp22310878p22311144.html
> - Show quoted text -
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Jeremy Thomerson
http://www.wickettraining.com

Reply via email to