Adding event to a cell in datatable

UI Components for JSF
Post Reply
shikhasdhawan
Posts: 27
Joined: 16 Feb 2012, 11:22
Location: Gurgaon, India

17 Feb 2012, 07:28

Hi,

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>
Regards,
Shikha

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 67 guests