>Hi,
>
>I'm have a little trouble with the clay void component which is
>supposed to remove the markup from the template at runtime.
>
>It works perfectly with this template
>
><html jsfid="void">
>
><head jsfid="void" allowBody="false">
> <title>Mock Title</title>
></head>
>
><body jsfid="void">
> 
> <span jsfid="outputText" value="show me" />
> 
> <span jsfid="void" value="hide me" />
> 
></body>
>
></html>
>
>
>but not with this one
>
><html>
><head>
><title>Tutorial: PCS Counter</title>
></head>
><body>
><h1>PCS Counter Tutorial</h1>
>
><p jsfid="void">Remove Me</p>
>
><p>The current value is: <span style="font-size:xx-large"><span
> jsfid="outputText" allowBody="false"
>value="#{counter.value}">37</span></span></p>
>
><p>
> <a jsfid="incrementLink" linkName="by1" increment="1">increment by 1</a>
></p>
>
><p>
> <a jsfid="incrementLink" linkName="by5" increment="5">increment by 5</a>
></p>
>
><p>
> <a jsfid="incrementLink" linkName="by10" increment="10">increment by 10</a>
></p>
>
><p>
> <form jsfid="pcs:validateForm">
> 
>  <span jsfid="pcs:label" for="increment">increment by</span>
>  
>  <input
>   type="text"
>   jsfid="pcs:requiredInputPanel"
>   pid="increment"
>   value="#{counter.increment}" />
>
>  <input
>   type="submit"
>   jsfid="commandButton"
>   value="Submit"
>   action="#{counter.incrementByX}"/>
>  
> </form>
></p>
>
><p><a href="#" jsfid="commandLink" action="#{counter.refresh}">refresh</a>
></p>
>
></body>
></html>
>
>
>In the second case Remove Me is displayed.
>
>If this is a bug just let me know and I will open a ticket.
>

If you want to remove nested content with the void "directive", you need to use 
the allowBody attribute; otherwise, it is just applied to the single node.


Try the following:
<p jsfid="void" allowBody="false">Remove Me</p>

>Thanks,
>Ryan

Gary

Reply via email to