• #11432
    Salesforce | Ravi Ravi #459
    Forcetalks

    Is it possible to create a reusable inline Salesforce Visualforce page?

    Is it possible to create a reusable inline Visualforce page?

     

    #12382
    Salesforce | Abhinav Abhinav #442
    Forcetalks

    Hi Ravi,

    You don’t have to create a separate apex controller for each VF page, but you do need 1 VF page per standard controller you need to “extend”.

    What we generally do is that create 1 controller class that uses generic SObject methods to manipulate its data. That controller has a method, getCtl(), which returns itself. It generify the VF content into a custom component which takes the single controller class as an argument. Then I create multiple VF pages with just a one-liner to that component, for e.g

     

    <apex:page showHeader=”false” sidebar=”false” standardController=”Account” extensions=”MyGenericController”>

    <c:MyCommonVfComponent ctl=”{!ctl}” />

    </apex:page>

    #41427
    Forcetalks

    Hello,

    You can implement a VF page and as long as it shares the standard controller of the object whose page layout your trying to add it too, it’s available to be added to that page in the standard page-layout controller.
    Thanks.

Viewing 3 posts - 1 through 3 (of 3 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?