File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
Similar Threads
Simple question on SelectOneRadio
Need correct syntax for dynamic form, list of elements
Display value of 'checked' radio button
Nested panels not rendering, using a4j:support
Dynamic Radio Button