This content has been marked as final.
Show 1 reply
-
1. Re: Skipping row in h:panelGrid
niox.nikospara.yahoo.com May 12, 2009 5:10 PM (in response to jkleiser)Hi,
Unfortunately JSF doesnt cannot disable the rendering of an entire row either in a dataTable or an UIPanel. My thoughts (how would I do it):
1) If the number of rows is dynamic, i.e. they come from a collection, then expose (bean getter, @Out) a filtered view of that collection. The filtered view should contain only the data that should be displayed.
In that case, you would also preferably use an <h:dataTable> instead of a <h:panelGrid>.
2) Use Seam's own <s:div> component and specify the rendered attribute. Place your original label/value controls inside the <s:div>. You also get a modern, tableless design for bonus, if you can manage the CSS stuff :) I.e.:
<s:div id="row1" rendered="#{your.condition1}"> <h:outputLabel for="c1">C1:</h:outputLabel> <h:inputText id="c1" value="#{binding.for.c1}" /> ... </s:div> <s:div id="row2" rendered="#{your.condition2}"> ...etc...