User Interface - PD1
25 September 2024
Given a scenario, display content or modify Salesforce data using a
Visualforce page and the appropriate controllers or extensions as
needed.
● Override Buttons, Links, and Tabs with Visualforce
○ When overriding buttons with a Visualforce page, the standard controller for
the object on which the button appears must be used.
■ For example, if one wants to use a page to override the View button
on Opportunity, the page markup must include the
standardController = “Opportunity” attribute on the <apex:page> tag.
A controller extension can also be used when one needs to add extra
functionality to the Visualforce page that they are using as an
override.
● Standard Component Reference
○ This section provides a full list of standard Visualforce components.
○ The <apex:dataTable>, <apex:dataList>, and <apex:repeat> Visualforce
components can be used to create tables with custom styles.
○ <apex:detail>
■ The <apex:detail> Visualfoce component is used to display the
standard detail page of a particular object, as defined by the
associated page layout for the object in Setup.
1
■ This component includes attributes for including or excluding the
associated related lists, related list hover links, and title bar that
appear in the standard Salesforce application interface.
○ <apex:dataTable>
■ iterating over a set of data, displaying information about one item of
data per row.
■ If custom styling is required
○ <apex:pageBlockTable>
■ Iteration component that can be used to generate a table of data
■ Complete with platform styling.
○ <apex:dataList>
■ Component is used for iterating over a list of values
○ <apex:stylesheet>
■ A CSS stylesheet can be referenced in Visualforce pages by using the
component <apex:stylesheet/>.
■ The attribute ‘value’ of this component uses the URL to the CSS file or
a reference to a static resource via the function URLFOR.
■ <apex:includeScript/> is used in referencing JavaScript file.
■ <apex:include/> allows another Visualforce page to be referenced in
the current one.
○ <apex:iframe>
■ Is used to create an inline frame within a Visualforce page.
2
■ It can be used to load external websites and/or allow viewing certain
information on the page while other information is scrolled or
replaced
■ <apex:include/> component is used to load another Visualforce page
in a current Visualforce page.
○ <apex:map>
■ Salesforce provides the <apex:map> component to support and
display interactive maps on Visualforce pages.
■ The map is capable of displaying multiple markers and comes with
viewing controls for zooming and panning.
● However, that Visualforce mapping components are not
available in Developer Edition orgs.
3