Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hi,
can u give me any one example of extension to the customcontroller ?
<apex:page standardController="yourstandardcontroller" extensions="<yourcustomcontroller>">/***********your page code ************/</apex:page>
*************************controller***************************************************
public class cls_CarDetails{public cls_CarDetails(ApexPages.StandardController controller){}}
if this is your solution please marked it as solved
thanku for your reply.
i want an example on customcontroller extension..
You can find here what you are looking for
http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_extension.htm
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
/****************************Page code*************************/
<apex:page standardController="Account" extensions="cls_cutomcontroller" ><apex:form ><apex:pageBlock ><apex:pageBlockSection ><apex:pageBlockSectionItem ><apex:outputPanel >Account Name:</apex:outputPanel><apex:inputField value="{!acc.name}"/></apex:pageBlockSectionItem><apex:pageBlockSectionItem ><apex:commandButton value="Save" action="{!save}"/></apex:pageBlockSectionItem></apex:pageBlockSection></apex:pageBlock></apex:form></apex:page>
/****************************controller code*************************/
public class cls_cutomcontroller {
public Account acc{get;set;}
public cls_cutomcontroller(ApexPages.StandardController controller){acc=new Account();}public pagereference save(){insert acc;return null;}
}
if this is your solution please mark it as solved.
Hi,
<apex:page standardController="yourstandardcontroller" extensions="<yourcustomcontroller>">
/***********your page code ************/
</apex:page>
*************************controller***************************************************
public class cls_CarDetails
{
public cls_CarDetails(ApexPages.StandardController controller)
{
}
}
if this is your solution please marked it as solved
thanku for your reply.
i want an example on customcontroller extension..
You can find here what you are looking for
http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_extension.htm
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
/****************************Page code*************************/
<apex:page standardController="Account" extensions="cls_cutomcontroller" >
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputPanel >Account Name:</apex:outputPanel>
<apex:inputField value="{!acc.name}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
/****************************controller code*************************/
public class cls_cutomcontroller {
public Account acc{get;set;}
public cls_cutomcontroller(ApexPages.StandardController controller)
{
acc=new Account();
}
public pagereference save()
{
insert acc;
return null;
}
}
if this is your solution please mark it as solved.