ADF table seems to remember old inputText value of removed List item..
592955May 7 2012 — edited May 10 2012Hi,
I'm working with JDev 11.1.1.4 (11.1.1.5 showed same behavior though).
I have a subform (default=true) with a groupLayout.
Within the grouplayout I have a forEach on a declarative component.
As an attribute of that component I pass in a custom object with, among others, a java.util.List.
The declarative component has a panelHeader with a table based on that list with var="row".
In the table I have one inputText for a volume field, which can be updated. The rest are outputTexts.
And the last column is as follows:
<af:column headerText=" " sortable="false" id="c_icon" width="20">
<af:commandImageLink id="dc_remove" icon="/skins/ce/images/deleteRow.png"
actionListener="#{backingBeanScope.componentBean.removeActionListener}"
partialSubmit="true"
immediate="true">
<af:setPropertyListener from="#{row}"
to="#{backingBeanScope.componentBean.deletedRow}"
type="action"/>
</af:commandImageLink>
<f:facet name="header">
<af:commandImageLink id="dc_add" icon="/skins/ce/images/insertRow.png"
actionListener="#{backingBeanScope.componentBean.addActionListener}"
partialSubmit="true"/>
</f:facet>
</af:column>
In my bean I have the removeActionListener and addActionListener which do a remove() / add() on the list.
With a partialTarget on the panelHeader surrounding the table (or on the table itself) rows are nicely added or removed with the logic I use.
The one problem:
say I have 2 rows and the second row has a volume of 200.
I remove that second row and the row disappears as expected.
I now add a row with an empty or 0 volume and still on the screen that new row get a volume of 200.
Adding a third row (before or after that example) will act normally and give the third row an nice empty or 0 volume.
If I debug I definitly see that the list contains the right volumes but my ADF table still shows that old value.
I also have a couple of derived fields like total volume and they do calculate with the right values for those new rows (=0);
And when I press F5 on the page the input ís set to the value I set in the addActionListener
If anybody has an idea I'd greatly appreciate it!
Thanks in advance,
Diana
p.s. if this is usefull information too: the subform is in a taskflow which in his turn is in a main taskflow. Both have activation=deferred and the subtaskflow also has a Refresh="ifNeeded".