I have a rich:extendedDataTable
. I have a a4j:commandLink
for each row, on click of this the row should get deleted. The problem what I am facing is, if I go on deleting the first rows the (firstRow+1)second row's value is set in the backing bean and always the second row is getting deleted.
xhtml code is
<a4j:commandLink id="acceptbtn"
action="# {archiveOrder开发者_如何学JAVABean.acceptOrder}"
styleClass="beforeSelect" title="#{mnOrdrMsgs.startitle}"
onclick="animateRow(this);" reRender="auftragListNew">
<f:setPropertyActionListener value="#{archive}"
target="#{archiveOrderBean.currentOrder}" />
<f:setPropertyActionListener value="#{row}"
target="#{archiveOrderBean.currentRow}" />
<h:graphicImage value="/images/tick.png"
style="border:0;vertical-align: top;" />
<a4j:support event="onclick" reRender="newclassification"
onsubmit="javascript:blockFullScreen('Loading...Please wait');"
oncomplete="javascript:myJQuery.unblockUI();" />
</a4j:commandLink>
I also tried rerendering the table but still the value in the UI is not in sync with the backing bean data. Does anybody have a solution to this. I do not know if this is problem with richfaces 3.3.3 version. In addition to the action I also have the jquery code which flickers the row and removes the complete <tr>
.
Any help on this will be really helpful.
The JQuery slide toggle removes the <tr>
from the rich:extendedDataTable and when the deleteObject is done on the backing of rich:extendedDataTable
it removes always the second row since the first tr is already removed by JQuery which is not rendered. I could manage to do this in 3 steps w.r.t a4j:commandLink
- onClick attribute: RowFlicker JQuery
- action attribute: Remove the object from the backingbean List and reRender Table
- oncomplete attribute: RowRemove using JQuery
精彩评论