0

I am having some issues with my <h:dataTable> where I cannot get it to update/refresh upon submitting an <f:ajax> request which, resides within this table component. The <f:ajax> listener attribute triggers a specific row to be removed from the <h:dataTable>. Could someone please assist me in getting this to work.

Code fragment from my JSF page:

<h:dataTable id="table1">
    <h:column>
       <f:facet name="header">Object Name:</f:facet>
       <h:outputText value="#{object.name}"/>
    </h:column>
    <h:column>
       <f:facet name="header">Action:</f:facet>
       <h:form>
          <h:commandButton value="Delete">
             <f:ajax listener="#{objectBean.delete(object.id)}" render=":table1"/>
          </h:commandButton>
       </h:form>
    </h:column>
</h:dataTable>

I have also tried to wrap this <h:dataTable> component within a <h:panelGroup> component and it still did not work unfortunately. Any tips on getting this to work?

Maff
  • 1,032
  • 4
  • 25
  • 42
  • Have you seen this? http://stackoverflow.com/questions/13797269/jsf2-fajax-render-issue-in-datatable – Multisync Oct 28 '14 at 10:16
  • Yes, although still does not help. Render attribute is correctly referenced, however not working as expected. – Maff Oct 28 '14 at 10:34

1 Answers1

0

Refer to : Datatable not rendering with ajax call in jsf

Move your to wrap the whole datatable, check your network traffic in chrome F12 to see what the sent/returned response is and see if its giving you back the right table to update.

Community
  • 1
  • 1
VeenarM
  • 1,263
  • 1
  • 10
  • 14