I need some hints from primeface ajax specialist...
I have a datatable with p:commandButton ajax=true in each row.
When I click on this button, I call backen bean via ajax, I change data in model and I do update on panel with my datatable the whole datatable is updated. so far so gut.
But what I would like to do is on button click only update the row in p:datatable and not the whole datatable.
With lot of data in table the whole things becomes pretty slow.....
I would like to do, just get ajax event to update single row in table...
Any hints what can I set as update value?
Do you know any kind jquery which I could use oncomplete to do partial update on a row in datatable?
Any kind of parameters via RequestContext to force datatable row refresh?
Code: Select all
<p:panel id="changePanel">
<p:dataTable id="eaptable" var="eapAction" value="#{deploy4all.currentActions}"
paginator="true" rows="25" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="25,50,100" >
<p:column >
<p:commandButton process="@this" actionListener="#{deploy4all.deleteEapAction(eapAction)}" update="changePanel growl"
image="ui-icon ui-icon-close" title="Delete" ajax="true" immediate="true"/>
</p:column>
..
Code: Select all
<p:column >
<p:rowEditor />
</p:column>
<p:column >
<h:graphicImage url="#{deploy4all.actionsValidator.validateIcon[eapAction.id]}" onmouseover="box.showTooltip(event,escape('#{deploy4all.actionsValidator.validationErrorStack[eapAction.id]}'),0,400)" rendered="#{deploy4all.actionsValidator.validateIcon[eapAction.id] != null}"></h:graphicImage>
</p:column>
<p:column headerText="Order" >
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{eapAction.ordernrY}" />
</f:facet>
<f:facet name="input">
<h:inputText value="#{eapAction.ordernrY}" required="false" />
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Action" >
<h:outputText value="#{eapAction.actionType}" />
</p:column>