On selecting Yes/No from the selectRadio options, outputPanel reRender is not working
Here's the code
I have 2 radio buttons.. yes/no. If user clicks Yes, it should display the outputPanel. If No, the outputpanel should hide. Its simple. But Im missing something. Here's my code.
<apex:selectRadio id="selectedAPTransport" value="{!selectedAPTransport}">
<apex:selectOptions value="{!ListAPTransport}"/>
<apex:actionSupport event="onchange" reRender="Travel_block" />
</apex:selectRadio>
<apex:outputPanel id="Travel_block" rendered="{!IF(selectedAPTransport == 'Yes',true,false)}" >
<apex:repeat id="TravelNeeded" value="{!map}" var="item" >
<!-- columns -->
</apex:repeat>
</apex:outputPanel>
Apex class
public String selectedAPTransport {get; set;}
public List<SelectOption> getListAPTransport() {
List<SelectOption> options = new List<SelectOption>();
options.add(new SelectOption('Yes','Yes'));
options.add(new SelectOption('No','No'));
return options;
}
public String getselectedAPTransport() {
return selectedAPTransport;
}
public void setselectedAPTransport(String selectedAPTransport) {
this.selectedAPTransport = selectedAPTransport;
}