I have Primefaces DataTable with in-cell editing:
<p:dataTable id="docsTable" editable="true" value="#{customer.docs}" var="doc" style="border-width:0px;" >
<p:growl id="docsMessages" showDetail="true"></p:growl>
<p:ajax event="rowEdit" update="docsMessages,docsTable" listener="#{customerController.onEditDocument}"></p:ajax>
<p:ajax event="rowEditCancel" update="docsMessages,docsTable" listener="#{customerController.onEditDocumentCancel}"></p:ajax>
<p:column headerText="Document Type">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{doc.docType}"></h:outputText>
</f:facet>
<f:facet name="input">
<p:inputText value="#{doc.docType}"></p:inputText>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Document Number">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{doc.docNum}"></h:outputText>
</f:facet>
<f:facet name="input">
<p:inputText value="#{doc.docNum}"></p:inputText>
</f:facet>
</p:cellEditor>
</p:column>
<p:column>
<p:rowEditor></p:rowEditor>
</p:column>
</p:dataTable>
Here is corresponding SWF view state definition:
<view-state id="enterDetails" view="/WEB-INF/views/tiles/customer/s3-custDetails.xhtml" model="customer"> <!-- tiles/customer/s3-custDetail -->
<secured attributes="ROLE_WEB" />
<var name="customerController" class="com.my.CustomerController"/>
<transition on="addNewDocument">
<evaluate expression="customer.docs.add(new com.my.CustomersDocs())"></evaluate>
<render fragments="custDetails"></render>
</transition>
</view-state>
The view renders fine, values are saved in backing bean, and rowEdit listener is called in my controller as well. However it never exits the editor mode no matter what user does. I did some network sniffing and it appears SWF is only sending back the viewstate, whereas Primefaces showcase also sends back rendered fragment.
How do I fix this?