Activity Forums Salesforce® Discussions why do we not use set or map as a value attribute in pageBlockTable tag in Salesforce?

  • Piyush

    Member
    August 29, 2019 at 11:31 am

    Hi Yogesh,

    You should really keep this type of logic out of a Visualforce page. A Visualforce page should be used simply for View logic.

    Apex:-

    public Boolean getRenderPageBlockTable(){
        return mapToCheck.containsKey('keyToCheck');
    }

    Visualforce:-

    <apex:pageBlockSection rendered="{!renderPageBlockTable}">
        ...
    </apex:pageBlockSection>

     

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos