• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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: 25477
180
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.
 
This tiny ad will self destruct in five seconds.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic