I have a requirement where I want a section to render depending on a value of a controller variable. If the section is not rendered I want an error message to be displayed. I have the following piece of code
<apex:pageblock rendered="{!AModel.enableSection}">
I want something like this
if enablesection is true render page block else display String message 'Section cannot be rendered'