How can i set row level rendering in datatable JSF.
<h:dataTable styleClass="tablesub" border="0" value="#{historyQuestBean.answerMasterList[row].inputTextKeySet}" var="option">
<h:column>
<h:outputText value="#{option.sectionShortName}:"/>
</h:column>
<h:column>
<h:outputText value="#{option.type}:"/>
</h:column>
</h:dataTable>
I want to render only those rows who have status true.
How can I do this?
Easier and Simplest thing is to pass the list of values with
status = trueIn
<h:datatable>you can give a style class withinrowClassessayrendererand in that class specify a condition likedisplay:#{option.status==true}?'block':'none'. This will evaluate the EL and accordingly place the style of that<tr\>to display or not.Another option is to use
<ui:repeat>instead of<h:datatable>, Here you can place rendered condition for the<tr>.