This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Queues in RichFaces" Watch "Queues in RichFaces" New topic
Author

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.

Thanks


SCJP6
Seckin Pulatkan
Greenhorn

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:
http://www.ibm.com/developerworks/web/library/j-richfaces/index.html#listing11

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: http://aspose.com/file-tools
 
subject: Queues in RichFaces
 
Similar Threads
Retreiving the selected value of the suggestion box
Question on Filter
Multiple submits and performance?
rich:suggestionbox suggestionAction is not fired
jsf page that does not update values according to the model