File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Queues in RichFaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Queues in RichFaces" Watch "Queues in RichFaces" New topic

Queues in RichFaces

Jason Irwin
Ranch Hand

Joined: Jun 09, 2009
Posts: 327
I think I have managed to totally fail to understand queuing in RichFaces. I am seeing duplicate calls to the server, a good example is when displaying a suggestion box. I assumed that this was caused by two AJAX requests being sent, so I added a no-name queue to my form.
If I understand things correctly, the default timeout on a suggestionbox is 400ms. So any request should go into the no-name queue (default similarityGroupingId being "sugStuff") and wait 400ms before being sent. Thus any duplicate requests should be combined, so long as they are closer than 400ms and no other requests arrive in the queue. By changing the "requestDelay" value I can see the browser wait before sending the request, so I think this shows the request going into the no-name queue.

When I type one letter into my textbox, I see the "myBean.autocomplete" being called twice, the first time with the letter and the second time with the word "null". Even when I remove everything else from the page, I still see these two requests going to the server. What is wrong with my queue understanding and how to I stop these double requests? The fact the word "null" is being sent to the server is of particular concern.


Seckin Pulatkan

Joined: Oct 05, 2009
Posts: 1
hi, maybe you found the problem already. but for other people, it is better to put a reference also here.
I had the same problem and was searching an answer, I found this link very useful:

I used a4j:region as suggested, also used eventQueue but that didn't solve the problem until I remove usingSuggestObjects="true"

following worked for me, no null value is submitted

I agree. Here's the link:
subject: Queues in RichFaces
It's not a secret anymore!