I want to set something like this in the LazyLoading Datatable , I am not able to use the below code.
<p:dataTable var="studyPlanList" value="#{editBean.lazyModel}"
paginator="true" rows="10"
paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
rowsPerPageTemplate="5,10,15" selectionMode="single"
selection="#{editBean.selectedStudyPlan}"
id="studyPlanTable">
<p:ajax event="rowSelect" listener="#{editBean.onRowSelect}" update=":studyPlanEditForm:display" >
</p:ajax>
<p:column headerText="StudyPlan" sortBy="#{studyPlanList.name}" filterBy="#{studyPlanList.name}">
<h:outputText value="#{studyPlanList.name}"/>
</p:column>
</p:dataTable>
Instead of p:column , if it is h:link it is working, I want to achieve similar results;Please Help.
This is from the facelet tag documentation on
f:setPropertyActionListener:So you need a triggering action to make it work. This could be a
h:commandButtonorh:commandLink. Here is a quick example:Since you are using Primefaces, you could take a look at the row selection feature of
p:dataTable. Here is an example from the showcase.UPDATE:
The type of the selection should be the same as the type of your row element. I see from your code that
selection="#{editBean.selectedStudyPlan.name}"but it should be