• 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

Can't get Ajax to work

 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

There must be an easy solution to this problem, but I'm unable to get Ajax to work.

In my XHTML file I have something like:

Then in my bean I have this:

What is supposed to happen is when I check the checkbox, the contents of the <h:panelGrid> tagged with the id="objectirradiated" are supposed to be rendered, and when I uncheck the checkbox , they are not rendered. Instead nothing happens, but the page is displayed correctly if I refresh the browser. The whole idea of using Ajax is to refresh part of a page without having to reload it, so something is obviously wrong.

I put in a printout to the server in the action method at the end of the Java code, and indeed the status of the booloean is updated when status of the checkbox is changed.

This must be a simple problem to solve, but obviously something is going wrong, so some help would be very much appreciated.
 
Saloon Keeper
Posts: 27752
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 chronology of processing on checkboxes is extremely bizarre, even when not using JSF. Try keying on the "change" event instead of "click".
reply
    Bookmark Topic Watch Topic
  • New Topic