• 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

display a profile of the car on the same page - with h:selectOneListbox

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

My select list is like below .... and on selection of any of option on it i want to display a profile of the car on the same page .....what can be possible options and the best option ?


<h:selectOneListbox id="pickCar"
value="#{carBean.currentCar}">
<f:selectItems
value="#{carBean.carList}" />
</h:selectOneListbox>

Please tell me , how do i change the values of existing components on the screen on some valueChangeEvent ?

Thanks in advance
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Several ways. Do you want to do it synchronously? Just submit the form to the server on change of the dropdown. Do you want to do it asynchronously? Consider using Ajax4jsf (part of RichFaces) to rerender the desired part of the page on change of the dropdown. Do you want to do it entirely clientside? Print all desired values to some Javascript array and use Javascript to display the desired part of the page on change of the dropdown.

The valueChangeEvent isn't of interest. You're not interested in the old value.
 
chetan padhye
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for reply

Ajax4jsf sounds best option here ....do you have any example ....

Thanks ...
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Documentation, tutorials and examples enough at their own homepage.
 
chetan padhye
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks




 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to do Ajax refresh after the onChange event of dropdown.

Below link is something similar.. but it uses IBM JSF Ajax component.
http://www.ibm.com/developerworks/rational/library/06/1205_kats_rad2/

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