0

I have created a visual force page and added that page on top of the standard layout using visual force pages section. My page is to only display a message to user once criteria matches. I am achieving that using standard rerender . below is my page code.

<apex:outputPanel rendered="{!(opp.Type__c = 'In') }" >

    <table class="messageTable" style="padding:0px;margin:0px;" border="0" cellpadding="0" cellspacing="0">           

        <h4>
            <apex:outputPanel rendered="{!opp.Authorization__c = null}"> Test  Message 1 </apex:outputPanel>
            <apex:outputPanel rendered="{!opp.Authorization__c != null}">Test Message 2</apex:outputPanel>
        </h4>
    </table>

</apex:outputPanel> 
<apex:outputPanel rendered="{!(opp.value__c = '100') }" >

    <table class="messageTable" style="padding:0px;margin:0px;" border="0" cellpadding="0" cellspacing="0">

        <h4>
            <apex:outputPanel rendered="{!opp.Authority__c = null}"> Test  Message 3 </apex:outputPanel>
            <apex:outputPanel rendered="{!opp.Authority__c != null}">Test Message 4</apex:outputPanel>
        </h4>

    </table>

</apex:outputPanel> 

Now problem is above code only displays message when this criteria matches. As there are 4 messages it occupies 100px on the top of the page. So when criteria does not match I get 100 px of empty space on standard layout.

Does anyone know any way of removing that? I have tried through CSS way salesforce doesn't allow that.

1

You can't. Thanks to Cross Origin Request Security, Visualforce pages are sandboxed from the main page, and there's no official API to resize these frames. You'll have to deal with the blank space, or consider more drastic measures, such as writing an entire Visualforce page to override the entire detail page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.