Is it really that bad to have multiple detach calls that we need another flag? My detach code usually is object = null; or if (nestedModel != null) nestedModel.detach(), or something alike.

-Matej

Igor Vaynberg wrote:
im fine with having the detached flag, but where do we reset it? in touch()?

-igor


On 1/5/07, Johan Compagner <[EMAIL PROTECTED]> wrote:

we already do that
But the SecondLevelCache also calles detach! It has to do that..
Or we have to change that that the touch of the page (that pushes the page
into the session)
doesn't happen before the detach of the RequestCycle.
But that is ugly

Thats why we get double detach calls in normal page requests

And then we still have ajax i guess where also loads of detach problems
where happening i believe?

I don't mind double detach calls. we also can say that can happen. Then we
don't need the is attached flag
But there was a bug report for that...

johan


On 1/5/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>
> i think its simpler then that. we keep a stack of request targets used,
so
> at the end of the request cycle we just need to go through the stack and
> call detach on each request target.
>
> -igor
>
>
>
> On 1/5/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
> >
> > >
> > > this should be enough (IMHO):
> > >
> > > >> 1) resolve link component
> > > >> 2) invoke onclick (internal methods of the component)
> > > >> 3) invoke onbeforerender
> > > >> 4) invoke render
> > > >> 5) invoke onafterrender
> >
> >
> >
> > this doesn't work
> >
> > >> 1) resolve link component (page1)
> > >> 2) invoke onclick (page1) (internal methods of the component)
> > >setResponsePage(Page2)
> > >> 3) invoke onbeforerender (Pag2)
> > >> 4) invoke render (Page2)
> > >> 5) invoke onafterrender (Page2)
> >
> >
> > Aaarghh Page1 will still be in a attached state!!......
> >
> >
> > the complete picture can be this:
> >
> > > >> 1) resolve link component (page1)
> > > >> 2) invoke onattach (Page1)
> > > >> 3) invoke onclick (Page1)
> > > >> 2) invoke onattach (Page2)
> > > >> 4) invoke onbeforerender (Page2)
> > > >> 5) invoke render (Page2)
> > > >> 6) invoke onafterrender (Page2)
> > > >> 7) invoke ondetach (Page2)
> > > >> 7) invoke ondetach (Page1)
> >
> > thats the complete picture that has to be taken into account.
> >
> > But onAttach can be just an attach method that is public or maybe
> > protected
> > final
> > And is only used to set the IS_ATTACHED_FLAG to true on the complete
> > component hierarchy.
> >
> > johan
> >
> >
>
>




Reply via email to