You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Michael Gerzabek <mi...@gmx.net> on 2008/03/03 10:45:37 UTC

T5 acquire block from separate page [was: Re: Antwort: [T5] Dynamic Layouts]]

Hi Robert,

You clearly outlined the simple case. I'm interested in the 2nd case: The
name of my block/ component is read from the database and I have to acquire
the block/ component from another page (where the name could also be in the
database).

I found Howards repy to an earlier thread [1]. This was back in May 07. The
result then was mainly what's written in the docs [2] about the delegate
component. 

Is there a way to dynamically load a page/ component/ block today?

Thanks!
Michael

[1] T5: Best practice for rendering a dynamic component
http://www.nabble.com/T5%3A-Best-practice-for-rendering-a-dynamic-component-to10765577.html#a10775220
[2] org.apache.tapestry.corelib.components.Delegate
http://tapestry.formos.com/nightly/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/Delegate.html


Robert Zeigler wrote:
> 
> <t:block id="layout1">
> ...
> </t:block>
> 
> <t:block id="layout2">
> ...
> </t:block>
> 
> And your getLayoutComponent() method would look something like:
> public Object getLayoutComponent() {
>    return _componentResources.getBlock(_layout);
> } 
> That's the simple case.  For the more complicated case of pluggable  
> layouts, you can play the same game, except that you would acquire the  
> blocks not from the current component template, but from some other  
> page (which is, in fact, legal. :)
> 
> 

-- 
View this message in context: http://www.nabble.com/-T5--Dynamic-Layouts--tp13707415p15799919.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 acquire block from separate page [was: Re: Antwort: [T5] Dynamic Layouts]]

Posted by Lance White <la...@logicscope.com>.

Did you get a resolution for this?

Cheers

Lance



Michael Gerzabek wrote:
> 
> Hi Robert,
> 
> You clearly outlined the simple case. I'm interested in the 2nd case: The
> name of my block/ component is read from the database and I have to
> acquire the block/ component from another page (where the name could also
> be in the database).
> 
> I found Howards repy to an earlier thread [1]. This was back in May 07.
> The result then was mainly what's written in the docs [2] about the
> delegate component. 
> 
> Is there a way to dynamically load a page/ component/ block today?
> 
> Thanks!
> Michael
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-T5--Dynamic-Layouts--tp13707415p17335198.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org