It's not a secret anymore!*
The moose likes JSF and the fly likes h:selectOneRadio is rerendering panels inconsistently Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "h:selectOneRadio is rerendering panels inconsistently" Watch "h:selectOneRadio is rerendering panels inconsistently" New topic
Author

h:selectOneRadio is rerendering panels inconsistently

Ricardo Preston
Greenhorn

Joined: Jan 11, 2010
Posts: 7
Hi y'all.

I'm using seam/JSF (Rich Faces), latest versions. I have a h:selectOneRadio tag with 2 values, and I want to use Ajax to display one of 2 different forms, depending on the selection in the radio button. The problems are:

1. The first time I change the value, nothing is triggered in the backing bean;
2. Subsequent changes do trigger, but are the opposite of what they should be! e.g. If I select Key, the backing bean shows that it is being changed from key to advanced, not the other way around.

Can anyone help? Thanks.

Here's the facelet code:


And 'ere's the backing method:

Ricardo Preston
Greenhorn

Joined: Jan 11, 2010
Posts: 7
Fixed the prob myself. I should have been using onclick event, not onchange.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: h:selectOneRadio is rerendering panels inconsistently