I´ve found a small gotcha with this approach, it works fine for my page and
components
However it does not work for render injected blocks.

In this template

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
      xmlns:p="tapestry:parameter">

EXTERNAL PAGE TEMPLATE      

<t:block t:id="video">
 <t:playBlock></t:playBlock>
</t:block>

<t:textBlock></t:textBlock>

<t:genericContentBlock block="block"></t:genericContentBlock>

 </html>

the page and textBlock work fine getting the tml file from the filesystem.

However genericContentBlock java class has a method to render a block from
the page


    @Inject
    private RequestPageCache pageCache;

    Block getBlock(String blockName) {
          Page page = pageCache.get(pageName);
          return page.getRootElement().getBlock(blockName);
    }

    Block beginRender() {
       return getBlockBy("video");
    }

It seems the rendering of that Block  is not affected by this decorator :(
I´ve added traces and I can not see anything related to video, but I can see
traces for the other components...

Thanks!  

-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/How-to-load-tml-files-from-the-filesystem-instead-of-classpath-tp5009386p5011689.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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

Reply via email to