Visualforce Flashcards
A developer needs to formulate a page that requires uploading an attachment for a specific record with all the fields for the record and the fields required in uploading the document. How can the developer satisfy this requirement?
Choose 1
A. Standard List Controller
B. Custom List Controller
C. Standard Controller
D. Custom Controller
D. Custom Controller
What is a custom controller?
A custom controller is an Apex class that implements all of the logic for a page without leveraging a standard controller.
What is a controller extension?
A controller extension is an Apex class that extends the functionality of a standard or custom controller.
When would you use a custom 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.
Use controller extensions when:
You want to leverage the built-in functionality of a standard controller but override one or more actions, such as edit, view, save, or delete. You want to add new actions. You want to build a Visualforce page that respects user permissions. Although a controller extension class executes in system mode, if a controller extension extends a standard controller, the logic from the standard controller does not execute in system mode. Instead, it executes in user mode, in which permissions, field-level security, and sharing rules of the current user apply.
Visualforce markup can use what types of controller extension and controller methods?
Action
Getter
Setter
What are Visualforce Action methods?
perform logic or navigation when a page event occurs, such as when a user clicks a button, or hovers over an area of the page. Action methods can be called from page markup by using {! } notation in the action parameter of certain Visualforce tags
What are Visualforce Getter methods?
Getter methods return values from a controller
What are Visualforce Setter methods?
Setter methods pass user-specified values from page markup to a controller
A custom controller is an Apex class that implements all of the logic for a page without leveraging a standard controller. For which situation would a standard list controller be sufficient?
A. Using object record pagination
B. Run the Visualforce page entirely in system mode
C. Overriding existing standard functionality
D. Make a callout to an external web service
A. Using object record pagination
Where can a developer use Visualforce in Lightning Experience?
A. Standard Page Layout B. Navigation Bar C. Chatter Feed D. Setup Home Page E. Custom App
A. Standard Page Layout
B. Navigation Bar
E. Custom App
Which are true regarding how to display data in a Visualforce page?
Choose 2
A. Expression syntax is used to bind components to the data set available in the page controller
B. Object data can be inserted but not global data
C. Data context is provided to controllers by the id parameter of the page
D. The component component can be used to display individual fields from a record
A. Expression syntax is used to bind components to the data set available in the page controller
C. Data context is provided to controllers by the id parameter of the page
What should a Salesforce Administrator consider before overriding the View standard button?
Choose 2
A. Buttons on the edit page of a record can be overriden
B. Overriding the View standard button will reroute all links in Salesforce that display the detail page for a record.
C. Different override behavior for Salesforce Classic, Lightning Experience, and Mobile can be set
D. Standard buttons on a record detail page can be relabeled.
B. Overriding the View standard button will reroute all links in Salesforce that display the detail page for a record.
C. Different override behavior for Salesforce Classic, Lightning Experience, and Mobile can be set