Posts

Showing posts with the label Custom Controllers

What are Custom Controllers , Custom List Controller and Controller Extensions?

A custom controller is an Apex class that implements all of the logic for a page without leveraging a standard controller. Use custom controllers when you want your Visualforce page to run entirely in system mode, which does not enforce the permissions and field-level security of the current user. Example <apex:page controller="myController" tabStyle="Account">     <apex:form>         <apex:pageBlock title="Congratulations {!$User.FirstName}">             You belong to Account Name: <apex:inputField value="{!account.name}"/>             <apex:commandButton action="{!save}" value="save"/>         </apex:pageBlock>     </apex:form> </apex:page> public class MyController {     private final Account account;     public MyController() {         account = [SELECT Id, Name, Site FROM Acco...