You need to sign in to do that
Don't have an account?
RJ12
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?
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
It didn't work. The box is still visible even if there are no records.
Try like this..
<apex:outputPanel rendered="{! IF(OppDetails<0, false, true) }">
--- your code to hide and visible ----
</apex:outputpanel>
Hope its helps!
Thanks