• 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

when using rich:autocomplete component ajax call from autocomplete.js file renders the data

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Iam using the rich:autocomplete component in jsf but when adding jquery scripts to remove data from the input combobox component it removes the data but puts back the data from before pressing save button.
Any ideas of where the rich component stores the input data and places it back in the combobox, I guess it has to do with the autocomplete.js script file where it renders back before save is submitted.

 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The RichFaces autocomplete component polls the server each time you change the text in the textbox part of the combobox. It completely replaces the OPTION elements in the associated dropdown list each time it does so - the autocomplete method returns the updated option list values.

If you want a long and happy life, you won't attempt to run javascript of your own while this is going on, although you can add scripts that are fired before and/or after the autocomplete server method is invoked.

The autocomplete suggestion list is only sent to the client. It is not sent back to the server. There's no point therefore in modifying it yourself prior to submitting the form. And as far as filtering it, it's a lot easier - and more efficient - to put whatever filtering you need in the server-side autocomplete method than to mess around with stuff after it was sent to the client.
 
conny pemfors
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for input. the issue was solved on the server side instead.
 
reply
    Bookmark Topic Watch Topic
  • New Topic