I'm trying to change an JSF 1.1 page to conditionally hide parts of the page. The page is built using intermixed raw HTML and tags. Specifically I have the following:
<table>
<tr>
<td>Foo</td>
<td><h:inputText ... /></td>
</tr>
<tr>
<td>Bar</td>
<td><h:inputText ... /></td>
</tr>
<!-- more stuff, including <h:dataTable>
</table>
I would like to wrap this in a tag that conditionally hides this entire table, but I cannot seem to figure it out. Here's what I've tried:
- Wrap the markup in a
<h:panelGroup rendered="...">
. While this correct shows/hides the markup, all raw the HTML is stripped from the generated HTML. - Wrap the markup in a
<f:verbatim>
. This does not work as the verbatim tag does not have a rendered attribute in JSF 1.1 - Wrap the whole thing in a
<h:panelGroup rendered="..."><f:verbatim>
combo. This has the same effect as the first attempt. - I've also tried
<f:view>
and<f:subview>
to no avail.
I know that it is possible to include JSTL tags in a JSF page and use <c:if>
but I would like to avoid this situation. Any ideas?
NOTE: I realize that it is (by some at least) considered bad practice to mix HTML and JSF, however this page was created by someone else, I just have to modify it (its a somewhat large page and the HTML above is just a small snippet from it)..