how to restrict a Data to display in a row in datatable in JSF
===

There is any possible to restrict the data display in the datable based on c:if .


   Let say

   Output shown now:

    Startdate     end date   status    Edit

    2012-02-02    2012-03-02 Waiting   edit
    
    2012-02-03    2012-03-04 Approved   edit


   Output Expected:

    Startdate     end date   status    Edit

    2012-02-02    2012-03-02 Waiting   edit
    
    2012-02-03    2012-03-04 Approved  

  When the status is Waiting then the edit link should be shown.when it is rejected or approved then the edit link should not be shown


This is my Xhtml file.



               <h:form>
          <h:dataTable value="#{employeeleave}" var="e"
    			styleClass="order-table"
    			headerClass="order-table-header"
    			rowClasses="order-table-odd-row,order-table-even-row"
    			columnClasses="order-table-odd-column,order-table-even-column"
    		>
 
    		<h:column>
    			<f:facet name="header">
    				Start Date
    			</f:facet>
    				#{e.startDate}
    		</h:column>
 
    		<h:column>
    			<f:facet name="header">
    				End Date
				</f:facet>
    				#{e.endDate}
    		</h:column>
 
 			<h:column>
    			<f:facet name="header">
    				Reason
				</f:facet>
    				#{e.reason}
    		</h:column>
    		
    		<h:column>
    			<f:facet name="header">
    				Status
				</f:facet>
    				#{e.status}
    		</h:column>
    			<h:column>
			<f:facet name="header">
				Edit
			</f:facet>
			<c:if test="${e.status == 'Waiting'}">
			<p:commandLink value="Edit" action="editLeave" id="editleave" >
			<f:setPropertyActionListener value="#{e}" target="#{employeeDetails.employeeLeaveSelected}" />
			</p:commandLink>
			</c:if>
			</h:column>
    	</h:dataTable>  
    	</h:form>