• 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

Ajax implementation

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
Have this JSF page (index.xhtml) :



the bean file :



and the faces-config.xml file :



After I'm selecting the category of the oneMenu component and hitting the button, in the listBox are displayed the respective content. How can I do that with Ajax, using <f:ajax> tag, and if it's possible without either hitting that button, just selecting category. Any help will be appreciated. Thanks in advance.
 
Greenhorn
Posts: 1
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there

Try this modified code below.
You can remove the navigation rule from your faces-config.xml, unless you still require the commandButton redirect.
The key is the Ajax tag and some changes to the bean ...

New index.xhtml :


The new Test.bean :


Hope this helps

Tested on NetBeans, GlassFish 3.1, Chrome, FireFox
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic