I have a primefaces datatable listing all the files in a directory. In the datatable, there is a column which has the contents as a primefaces graphic image. I want it in a way so that when the user clicks on the image, it does the action I want it to. But right now, when I click on it, there is no action triggered. I have simplified the code and posted it below. What could be the optimal solution to this?
<p:dataTable
id="example"
widgetVar="example"
>
<p:ajax event="rowSelect"
listener="#{processController.action}"
onstart="PF('blockUIWidget').block()"
oncomplete="PF('blockUIWidget').unblock()"
/>
<f:facet name="header">
// some data
</f:facet>
<p:column headerText="Date" >
// some data
</p:column>
<p:column headerText="FileName" >
// some data
</p:column>
<p:column headerText="Select" >
<p:commandLink actionListener="#{processController.action}" >
<p:graphicImage value="resources/images/yes.png" />
</p:commandLink />
</p:column>
</p:dataTable>
I get the following error when I try to wrap graphic image around commandlink:
javax.el.MethodNotFoundException: Method not found: com.app.trial.controller.processController@7dd150cb.action()