I just thought of a feature I have often needed in Facelets that perhaps we can weave into the VDL. It would be nice to know if a named template has been defined inside the master template. Consider the following example:<br>
<br>page.xhtml<br>&lt;ui:composition template=&quot;/WEB-INF/template.xhtml&quot; ...&gt;<br>    &lt;ui:param name=&quot;title&quot; value=&quot;VDL Template Page&quot;/&gt;<br>    &lt;ui:define name=&quot;content&quot;&gt;<br>
         &lt;h:outputText value=&quot;Hello World&quot; /&gt;<br>    &lt;/ui:define&gt;<br>&lt;/ui:composition&gt;<br><br>template.xhtml<br>&lt;html ...&gt;<br>    &lt;h:head&gt;<br>        &lt;title&gt;#{not empty title ? title : &#39;My Site&#39;}&lt;/title&gt;<br>
    &lt;/h:head&gt;<br>    &lt;body&gt;<br>        &lt;div id=&quot;container&quot;&gt;<br>            &lt;ui:insert name=&quot;content&quot;/&gt; &lt;- how do I know if it has been defined?<br>        &lt;/div&gt;<br>    &lt;/body&gt;<br>
&lt;/html&gt;<br><br>Since the &lt;ui:param&gt; creates a regular variable, I can check whether it is empty or not. But I do not have a way to check if the named template &quot;content&quot; has been defined. Of course, I can nest default content within the &lt;ui:insert&gt;, which is used when the named template is not defined, but there are cases when I simply need to know whether or not it is defined. Could we come up with some way to check if it is defined?<br>
<br>-Dan<br><br>-- <br>Dan Allen<br>Senior Software Engineer, Red Hat | Author of Seam in Action<br><br><a href="http://mojavelinux.com">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction">http://mojavelinux.com/seaminaction</a><br>
<a href="http://in.relation.to/Bloggers/Dan">http://in.relation.to/Bloggers/Dan</a><br><br>NOTE: While I make a strong effort to keep up with my email on a daily<br>basis, personal or other work matters can sometimes keep me away<br>
from my email. If you contact me, but don&#39;t hear back for more than a week,<br>it is very likely that I am excessively backlogged or the message was<br>caught in the spam filters.  Please don&#39;t hesitate to resend a message if<br>
you feel that it did not reach my attention.<br>