+ Start a Discussion
RJ12RJ12 

Rendering the VF page

<apex:page showHeader="false" sidebar="false" controller="OppDetailsCntlr" standardStylesheets="false" >
<apex:stylesheet value="{!URLFOR($Resource.file, 'file/css/box.css')}"/>
  
  <!--This content is displayed in abox -->
  
  <div class="Header">{!$Label.Standard_Header}</div>
  <div class="scrollClass">
  <apex:repeat value="{!OppDetails}" var="details" >      
      <table class="contentTable">
        <tbody>
            <tr>
                <td >{!if(details.typeTitle!='',details.typeTitle,'Classification')}:</td>
                <td>{!details.reqType}</td>
            </tr>
            <tr>
                <td >{!if(details.cornersTitle!='',details.cornersTitle,'Open Corners')}:</td>
                <td>{!details.Corners}</td><br/>
            </tr>
        </tbody>
       </table>
  </apex:repeat> 
  </div>
  
  <!-- Until this part, content is displayed in a box -->
  
</apex:page>


I wrote the above code. I created a box using CSS, in which content will be displayed in the box with a header '{!$Label.Standard_Header}'.  

I'm trying to hide the entire box including header label if there is no content available (Content is dynamic, it will be populated based on opportunity records). Can anyone help me on this?

Patcs_1Patcs_1
Hi

You can use <apex:outputpanel> above the div and then you can use rendered attribute to make it visible based on the list values. below is the example,

<apex:outputPanel rendered="{! IF(ISBLANK(OppDetails), false, true) }">
--- your code to hide and visible ----
</apex:outputpanel>

Thanks

 
RJ12RJ12
@Patcs_1
It didn't work. The box is still visible even if there are no records.
Patcs_1Patcs_1
Hi

Try like this..

<apex:outputPanel rendered="{! IF(OppDetails<0, false, true) }">
--- your code to hide and visible ----
</apex:outputpanel>

Hope its helps!

Thanks