Removing the content with <ui:remove>
The <ui:remove>
tag is used for removing the content. This tag is rarely used, but a perfect example of this is removing comments of type <!-- -->
. You probably thought of something like the following line:
<!-- <h:outputText value="I am a comment!"/> -->
It doesn't have any side effects on the HTML rendered code. Well, that isn't true, because in the HTML source code, you will see something similar to the following screenshot:
But if we encapsulate this in <ui:remove>
, then the preceding client side effect will not be produced anymore, which has the following code.
<ui:remove> <!-- <h:outputText value="I am a comment!"/> --> </ui:remove>
The same effect will have the following code:
<ui:remove> <h:outputText value="I am a comment!"/> </ui:remove>
In order to remove comments from the generated HTML code, you add the context
parameter in...