+ Start a Discussion

Custom Controllers

Hi All,

This is with a basic doubt that i have:

// e.g. of custom controller as available on salesforce //

<apex:page controller="NewAndExistingController" tabstyle="Account">
        <apex:pageBlock mode="edit">
                <apex:inputField value="{!Account.name}"/>
                <apex:inputField value="{!Account.phone}"/>
                <apex:inputField value="{!Account.industry}"/>
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Save" action="{!save}"/>

Now how do i get a page with above on say "opportunity" or "account" object as a "detail" page.

Kindly advice.

Many thanks in advance.

If you're asking how to show the standard page layout for an object on your page, you can use the <apex:detail> element to display this information.  You just need to pass it an ID to render.
Hi Techman,

Sincerest apologies for the inordinate, inexcessive, inexcusable delay in acknowledging your answer.
Kindly pardon.
Many Many thanks for your immediate response.
However, my question was, how do we get the above page, say under a "button" created in "Account" or "Opportunity" object.
Hope this gives a better understanding of my quandry.

As always, thanks again in advance