• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Queues in RichFaces

 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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




 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic