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 22:38:03 GMT
Could you defer the initialization until PageRenderListener.pageBeginRender()?

--
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 5:41 PM
> To: Tapestry development
> Subject: finishLoad() gets called in the wrong order (IMHO)
> 
> 
> 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
> 


Mime
View raw message