User Interface Flashcards
What action methods are supported by standard controllers?
Save, Quicksave, Edit, Delete, Cancel, List
When are setter methods executed?
Setter methods are executed prior to action methods
What is the ‘set’ method used for in regards to Visualforce?
The ‘set’ method is used to pass values from the Visualforce page to the controller
How are setter methods named?
Setter methods must always be named setVariable where ‘variable’ is the property name
How do we associate a standard controller with a Visualforce page?
Use the standardController attribute on the tag and assign it the name of any salesforce object that can be queried using the Force.com API
What does every standard controller include?
Every standard controller includes a getter method that returns the record specified by the id query string parameter in the page URL
What is the correct syntax for a custom controller named ‘CustomController1’?
public CustomController1(){/code here/}
What is true about using the ‘transient’ keyword in a custom controller?
- Transient keywords can be used in Apex classes that define types of fields declared in the serializable classes
- Transient keywords can be used to declare instance variables that cannot be saved
- Transient keywords can be used for a field in a Visualforce page that is needed only for the page request duration
When declaring variables using the ‘transient’ keyword, how does that affect the view size?
declaring variables as transient reduces the view state size because they are not transmitted as part of the view state
To use a standard list controller, what two attributes must be defined within the tag?
the standardController and recordSetVar attributes
What is the view state used for?
The view state is used to store state across multiple pages such as a wizard. The view state is automatically created and holds the state of the page such as data that includes the components, field values, and controller state.
A view state only exists within what?
A view state only exists within the current user’s session and its size limit
What is the tag used for?
The Visualforce component is used to display the standard detail page of a particular object.
What is the tag used for?
the component is used for iterating over a list of values.
What method is used to determine whether there are more records than the maximum record limit?
the getCompleteResult() method, which returns FALSE if the controller won’t be able to process all of the returned records