aspose file tools*
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
JavaRanch » Java Forums » Java » JSF
Bookmark "valuechangelistener with a4j rerendering" Watch "valuechangelistener with a4j rerendering" New topic
Author

valuechangelistener with a4j rerendering

Peter Luci
Greenhorn

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

---jsf--

<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"/>
</h:selectOneRadio>

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

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

--backingbean-
public void checkSettingSelection(ValueChangeEvent vce){
String check = (String)vce.getNewValue();
if(check.equalsIgnoreCase("1")){
this.setAutoCheck(true);
this.setManualCheck(false);
}
if(check.equalsIgnoreCase("2")){
this.setManualCheck(true);
this.setAutoCheck(false);
}
}

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é
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

"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
Greenhorn

Joined: Nov 05, 2008
Posts: 2
sorry abt that..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: valuechangelistener with a4j rerendering