This content has been marked as final. Show 3 replies
Frank Nimphius wrote:Hi Frank,
this seems to be a matter of the JSF lifecycle that causes this. Most developers handle this in setting a flag that recognizes if a method has been executed before to suppress the second call
What do you mean by "a matter of the JSF lifecycle" ?
If I look at the Figure 20-2 of the BC Guide, it says the invokeApplication JSF Lifecycle phase will call the invokeApplication on the ADF PageLifecyclePhase...
Does the duplication come from there ?
If not, what is the exact origin then ?
There are several similar misbehaviors, as far as I learned:
1. The af:table is automatically making the postback on initial page load. Thus if you have some sort of cascade PPR (from table to something else inside table or around table) it may produce some error and the lifecycle is executed twice! I had similar problems with subforms and some other naming container elements which wrongly decoded the partial trigger references etc.
2. The ADFm is exhibiting strange behavior when you have methodIterators and your method is returning null instead of empty list. Then the iterator is invoking the method twice (this is bug for me, but I can understand that devs could consider it "by design").
I have not seen exactly the same problem you have. But from my experience try finding some errors that are happening in the background. Sorry for suggesting such and trivial issue, but do you have both actionListener and action of the button binded to same listener?
Regarding the JSF/ADF LifeCycle, the specs specify that the getters/setters may be invoked multiple times during the lifecycle but the listeners are invoked only once. Otherwise it would be impossible from backing bean to determine the phase thus to provide any logic.