function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
devindiaadevindiaa 

Problem with rendering outputpanel

Hi,

 

I am a newbie in VF. The requirement is to select category, then render subcategory, based on subcategory selected render Zip codes. We are using different objeccts and getting the data as query. Read in VF guide that we cant render the pageblocksectionitem, so put it under output pannel. Data should be shown as links. Pls help me identfying the problem:

 

 

<apex:pageblocksection >

<apex:pageblocksectionItem >            

<b>Select categories::</b>               

<apex:repeat value="{!categories}" var="cat" id="theRepeat1">             

  <apex:commandLink id="catlist"  value="{!cat.name}" rerender="subcat1">                         

<apex:param name="selectedcat" value="{!cat.name}" assignTo="{!selectedcat}"/>             

  </apex:commandLink>             

  <apex:outputText >&nbsp;||&nbsp;</apex:outputText>               

</apex:repeat> </apex:pageblocksectionItem></apex:pageblocksection>

<br></br>
<apex:pageblocksection ><apex:pageBlockSectionItem >

<apex:outputPanel id="subcat1">     

  <b>Sub-categories:</b>               

<apex:repeat value="{!subcategories}" var="subcat" id="theRepeat2">               

<apex:commandLink id="subcatlist" value="{!subcat.name}" rerender="zip1" >                  

  <apex:param name="selectedsubcat" value="{!subcat.name}" assignTo="{!selectedsubcat}"/>                </apex:commandlink>               

<apex:outputText >&nbsp;||&nbsp;</apex:outputText>             

  </apex:repeat>               

</apex:outputPanel></apex:pageBlockSectionItem>                </apex:pageblocksection>

.

.

.

and similar for Zip codes...

 

Thanks in advance for your help

devindiaadevindiaa

Hi, Any answers?

eswarieswari

Try by adding the rendered option in <apex:outputPanel> tag similar to as shown below:

 

<apex:outputPanel id="softwareDevCategory" rendered="{!(selectedCat == 'Software Development')}">

.......

</apex:outputPanel>