This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JSF and the fly likes valuechangelistener with a4j rerendering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "valuechangelistener with a4j rerendering" Watch "valuechangelistener with a4j rerendering" New topic

valuechangelistener with a4j rerendering

Peter Luci

Joined: Nov 05, 2008
Posts: 2
hi all,i have a problem with h:selectoneradio valuechangelistener and ajax.


<h:selectOneRadio valueChangeListener="#{gradeBean.checkSettingSelection}" value="#{gradeBean.settingSelection}">
<f:selectItem itemLabel="Automate" itemValue="1"/>
<f:selectItem itemLabel="Manual" itemValue="2" />
<a4j:support reRender="auto,manual" event="onclick"/>

<a4jutputPanel id="auto" rendered="#{gradeBean.autoCheck}">
<h:inputText value="gradeBean.value"/>

<a4jutputPanel id="manual" rendered="#{gradeBean.manualCheck}">
<h:inputText value="gradeBean.value1"/>

public void checkSettingSelection(ValueChangeEvent vce){
String check = (String)vce.getNewValue();

what im trying to do here is .. there is 2 radiobutton and when a user select option 1, option 1 with all the fields will appear while option 2 will not appear. vice versa.
my problem is im tryin to use a4j support so that only portion of the page is rerender and not the whole page to reload. however it is not working. anyone can help me?

thanks alot!
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

"bionicl bionicl",
Welcome to the ranch. You may not be aware of the ranch Naming Policy. Please read it carefully and change your name accordingly (obviously fake name are not allowed). Thank you.

[My Blog]
All roads lead to JavaRanch
Peter Luci

Joined: Nov 05, 2008
Posts: 2
sorry abt that..
I agree. Here's the link:
subject: valuechangelistener with a4j rerendering
It's not a secret anymore!