• 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

valuechangelistener with a4j rerendering

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>

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

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

--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!
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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.
 
Peter Luci
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry abt that..
 
You will always be treated with dignity. Now, strip naked, get on the probulator and hold this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic