AdfCustomEvent.queue does not deliver multiple events (11.1.1.3.0)
I have created a JSF page in which I am using ADFCustomEvent.queue to call a method in a backing bean from JavaScript code. It appears, though, that if multiple events are queued, the backing bean's method is only called once. Is this expected behavior?
For example, my JSF simply has a command button. When clicked, the "clientListener" calls a JavaScript function. That JS function queues events, and the "serverListener" sends those to the server. (Sample code is below.)
<af:document id="d1" binding="#{backing_eventtest.d1}">
<af:form id="f1" binding="#{backing_eventtest.f1}">
<af:commandButton text="Test Events"
binding="#{backing_eventtest.cb1}" id="cb1"
partialSubmit="true">
<af:clientListener method="OnButtonClick" type="click"/>
<af:serverListener type="eventServerListener"
method="#{backing_eventtest.handlePageMessage}"/>
</af:commandButton>
</af:form>
<af:resource type="javascript">
function OnButtonClick() {
var btn = AdfPage.PAGE.findComponent( "cb1" );
AdfCustomEvent.queue( btn, "eventServerListener", \{message:"Hello 1"\}, true );
AdfCustomEvent.queue( btn, "eventServerListener", \{message:"Hello 2"\}, true );
AdfCustomEvent.queue( btn, "eventServerListener", \{message:"Hello 3"\}, true );
AdfCustomEvent.queue( btn, "eventServerListener", \{message:"Hello 4"\}, true );
AdfCustomEvent.queue( btn, "eventServerListener", \{message:"Hello 5"\}, true );
}
</af:resource>
</af:document>
In my backing bean's handlePageMessage method, the "Hello 5" message only ever comes through. I sort of expected all 5 events to come through.
Are my expectations wrong, or is this an "issue"?
Edited by: user614824 on May 28, 2010 9:42 AM