Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Queues in RichFaces

 
Jason Irwin
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Seckin Pulatkan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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




 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic