I need to make a column editable by default in a datatable.
I do not want to use rowEditor. As I do not want a coloumn to become editable on click of any button.
I am able to make a cell editable by default. But, as per my understanding, cell editor does not have any event associated with it.
How can I add an event to the cell.
The code through which I made the cell editable is:
Code: Select all
<p:column>
<f:facet name="header">
<h:outputLabel value="Field 1" />
</f:facet>
<p:cellEditor>
<f:facet name="input">
<h:outputLabel value="#{emp.empCode}" />
</f:facet>
<f:facet name="output">
<p:inputText value="#{emp.empCode}" />
</f:facet>
</p:cellEditor>
</p:column>