tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship" <hls...@comcast.net>
Subject RE: finishLoad() gets called in the wrong order (IMHO)
Date Wed, 20 Aug 2003 23:05:31 GMT
Could you be a little more specific about what you are trying to accomplish?  Perhaps we need
yet
another kind of event notification for your case.

The PageDetachListener will not be called until the end of the request cycle, which I suspect
is too
late.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Colin Sampaleanu [mailto:colinml1@exis.com] 
> Sent: Wednesday, August 20, 2003 6:20 PM
> To: Tapestry development
> Subject: Re: finishLoad() gets called in the wrong order (IMHO)
> 
> 
> Hmm, after more investigation, I realize that things are not quite as 
> they seem. finishLoad only gests called on the initial page load, and 
> the createPropertyInitializers call is actually only setting 
> up the prop 
> initializers as a page detach listener.
> 
> So what I think I need to do is have this component register 
> itself as a 
> page detach listener, and do the initialization there, right?
> 
> 
> Colin Sampaleanu wrote:
> 
> > I have a big problem in that for a component, I am declaratively
> > setting some properties via 'property-specification' elements with 
> > initial values, then in finishLoad I need to set up some 
> other items 
> > based on the values that were set up by the property-specification. 
> > However, property-sepcification values are set up by 
> tapestry _after_ 
> > the call to finishLoad()
> >
> > from PageLoader:
> >            // Finish the load of the component; most 
> components (which
> >            // subclass BaseComponent) load their templates here.
> >            // That may cause yet more components to be 
> created, and more
> >            // bindings to be set, so we defer some checking until
> >            // later.
> >
> >            container.finishLoad(cycle, this, containerSpec);
> >
> >            // Finally, we create an initializer for each
> >            // specified property.
> >
> >            createPropertyInitializers(page, container, 
> containerSpec);
> >
> > Arguably, this should be reveresed, although there may be some
> > negative implications for some other use cases that I don't 
> know of. 
> > What might be the best solution, and I can't think of any real 
> > negatives, is to add another callback, let's call it 
> finishLoad2 for 
> > the purposes of this email, called after the call to 
> > createPropertyInitializers.
> >
> > What does everybody think?
> >
> > Regards,
> > Colin
> >
> >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: 
> tapestry-dev-help@jakarta.apache.org
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 


Mime
View raw message