Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

AdfCustomEvent.queue does not deliver multiple events (11.1.1.3.0)

User614824-OracleMay 28 2010 — edited May 28 2010
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
This post has been answered by Timo Hahn on May 28 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 25 2010
Added on May 28 2010
1 comment
1,282 views