tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Howard Lewis Ship <hls...@gmail.com>
Subject Re: Tapestry4: access PageLoader.createImplicitComponent - DynamicBlock
Date Mon, 05 Sep 2005 20:59:00 GMT
I looked at some DynaBlock stuff while I was at a client and, from
what I could see, it would not work in a cluster or under heavy load. 
The fact that the Tapestry APIs erroneously make components look
read/write when they are, in fact, read only is a problem to be
corrected.

The problem is that you may affect one page within the page pool and
change its state, and some future request will arrive and use some
OTHER page in the page pool with a different structure. 
StaleLinkException if you are lucky!

In Tapestry 4, there are lots more hooks, related to class
enhancements, for you to change the specification of the component
after its read from the XML (and/or annotations) and before the class
is instantiated, etc.  Use those!

You can easily add your own  code to look at meta data or class or
method annotations to get all kinds of interesting things
accomplished.

On 9/5/05, Oliver Lieven <oliver.lieven@provantis.de> wrote:
> Hi, I'm trying to migrate out Tapestry 3 application to Tapestry 4.
> It makes intensive use of M. Henderson's DynamicBlock component (see
> http://www.behindthesite.com), which allows loading of components which
> are dynamically specified by their name (in our case, the component's name
> is specified in a database).
> 
> The DynamicBlock component makes use of the
> PageLoader.createImplicitComponent() method, which IMHO cannot be accessed
> in Tapestry4 any more (since I cannot access the PageLoader)...
> 
> What would be the best way to access the
> PageLoader.createImplicitComponent() method, i.e. how can I get an
> initialized PageLoader instance?
> 
> Should I
> - create own class and inject PageLoader via hivemind?
> - add a getPageLoader() method to PageSource class?
> - make _loader member variable protected and subclass pageLoader?
> - ???
> 
> Or is there another & better way which I haven't encountered yet?
> 
> Any help is very welcome!
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
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