hi martin,

T5 uses a simplified DOM tree to render the template. therefore
you can access the root element and check via a simplified XPath
query whether a certain part of the HTML template was rendered

i'd to this check during the cleanupRender event of my page. The
MarkupWriter will return the Document object with the necessary
methods to find other nodes.

hope this helps,

g,
kris





Martin Papy <[EMAIL PROTECTED]> 
16.07.2008 13:44
Bitte antworten an
"Tapestry users" <users@tapestry.apache.org>


An
users@tapestry.apache.org
Kopie

Thema
Re: [T5] Testing body's value








Nobody has an ideas about this ?

Martin


Martin Papy wrote:
> 
> Hello everyone,
> 
> I was wondering if there is a way to test if the <t:body> will render
> something or not.
> 
> In my case, I use the Layout pattern for rendering my pages, but 
depending
> on the situation, sometimes the body of the layout is empty. In that 
case
> I would like to display a generic content. So I imagine something like
> this :
> 
> <t:if test="myBodyEmpty">
> Blah blah blah
> <t:parameter name="else">
> <t:body />
> </t:parameter>
> </t:if>
> 
> But I don't know how to write the test "isMyBodyEmpty" ... Maybe it is 
not
> possible ?
> 
> Regards,
> 
> Martin
> 

-- 
View this message in context: 
http://www.nabble.com/-T5--Testing-body%27s-value-tp18459705p18485584.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to