+ Start a Discussion
NLakshmanNLakshman 

display selectradio with inputcheckbox is checking in visualforce as showing attachment

Can anyone help me with code to display radio buttons when checkbox is checked in Visualforce?
User-added image
 
Raj VakatiRaj Vakati
Sample code is here  

 
<apex:page controller="DemoCON">
    <apex:pageMessages></apex:pageMessages>
    <apex:form id="theForm">
        <apex:pageBlock>
            
            <apex:pageBlockSection columns="1" id="info" title=" Information">
                
                <apex:pageBlockSectionItem >
                    <apex:outputLabel for="generate" value="Generate random password" />
                    <apex:inputCheckbox id="generate" value="{!changeValue}">
                        <apex:actionsupport event="onclick" rerender="demo12" />
                    </apex:inputCheckbox>
                </apex:pageBlockSectionItem>
                
            </apex:pageBlockSection>
            
            <apex:outputPanel id="demo12">
                <apex:pageBlockSection rendered="{!changeValue}">
                    
                    <apex:selectRadio value="{!searchCategory}" >
                        <apex:selectOption itemValue="Member" itemlabel="Member" /><br/>
                        <apex:selectOption itemValue="Blog" itemlabel="Blog"/><br/>
                        <apex:selectOption itemValue="Photo" itemlabel="Photo"/><br/>
                    </apex:selectRadio>
                </apex:pageBlockSection>                
            </apex:outputPanel>
            
            
            
        </apex:pageBlock>
    </apex:form>
    
</apex:page>
 
public class DemoCON {
    
    
    public Boolean changeValue {
        get;
        set;
    }
    public String searchCategory{get;set;}
    
    
   
    public PageReference changeGenerate() {
        
        return null;
    }
}