Visualforce page
<apex:page standardController="Account" extensions="myextension">
<p>{!title}</p>
<apex:form >
<apex:inputField value="{!account.name}"/>
<apex:commandButton value="Save" action="{!save}"/>
</apex:form>
</apex:page>
extensions
public class myextension {
private final account ac;
public myextension(Apexpages.standardcontroller controller){
this.ac =(Account)controller.getRecord();
}
public String getTitle(){
return 'Account:' + ac.name + '(' + ac.id + ')';
}
}
No comments:
Post a Comment