h:commandLink doesn�t work inside a h:dataTable
843842Mar 26 2004 — edited Mar 30 2004I have a table created with a <h:dataTable> tag. In that table I want to display some properties of a List and a link that would be specific to the row were it appears. An example would be a web mail application that presents a list of e-mail messages and a �delete� link next to every message. Here is a snippet of my jsp page:
<h:dataTable id="table" value="#{requestScope.employees}" var="employee" rowClasses="listRowEven, listRowOdd" >
<h:column>
<f:facet name="header">
<h:outputText value="Employee Name"/>
</f:facet>
<h:outputText id="employeeName" value="#{employee.employeeName}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Edit"/>
</f:facet>
<h:commandLink action="#{userBean.doAction}" immediate="false" >
<!--f:param name="employee_id" value="aaaa" /-->
<h:outputText value="Edit"/>
</h:commandLink>
</h:column>
</h:dataTable>
It renders link, but the link does not trigger navigation. If I remove the <h:commandLink> from the table and place it in a different form, it works fine.
Thanks for your help.