Professional Documents
Culture Documents
APPLICATIONS WITH
FORCE.COM - PART 2
(ADDITIONAL USES FOR
VISUALFORCE)
Exercise Guide
EXERCISE GUIDE
Additional Uses for Visualforce
Table of Contents
18-1: Add Web Content to a Visualforce Page............................................................................ 1
18-2: Create a Mass Edit List Page (Optional) ............................................................................. 2
18-3: Deploy a Flow using Visualforce ......................................................................................... 4
18-4: Display the Job Site.............................................................................................................. 6
18-5: Create a Partial Page Update for Conditional Fields (Optional) ...................................... 8
EXERCISE GUIDE
Additional Uses for Visualforce
Instructions:
1. Create a Visualforce page that displays the recent candidates.
A. Create a page with the name CandidateListViewWebpage.
B. Add the Candidate standard controller to the page.
C. Use the <apex:enhancedList> component and its attributes to display a list of
ten candidates 400 px high and click save.
<apex:enhancedList height="400" type="Candidate__c"
rowsPerPage="10"/>
2. Add the Employee Referral website to the page.
A. Add the website to the page using the <apex:iframe> component.
<apex:iframe frameborder="true" height="400px"
src="https://www.salesforce.com" scrolling="true"
id="EmployeeRefer"/>
B. Save the page.
Instructions:
1. Create a Visualforce page that displays a list of positions.
A. Create a Visualforce page with PositionMassEdit as the name.
B. Copy the entire contents of the file 18-2--CreatingaMassEditListPage.txt
found in the M18_AdditionalVisualforcePagesExerciseFiles folder of the
DEV401.zip file into the editor.
C. Complete the first TODO task by adding the needed recordSetVar attribute to the
<apex:page> component.
D. Save the file.
2. Add the Save and Cancel buttons.
A. Complete the second TODO task using the <apex:pageBlockButtons> and
<apex:commandButton> components.
B. Save the file.
3. Add the needed columns.
A. Complete the third TODO task using the <apex:column> component.
B. Save the file.
Instructions:
1. Create a Visualforce page that displays the Candidate flow.
A. Create a page with the name CandidateFlow.
B. Add the Candidate standard controller to the page.
C. Hide the side bar on the page using the sidebar attribute of the <apex:page>
component.
D. Use the <flow:interview> component to display the Candidate flow.
<flow:interview name="Candidate_Wizard"
finishLocation="{!URLFOR('/home/home.jsp')}"/>
E. Save the file.
2. Override the standard New view on the Candidate object.
A. From Setup, enter Objects in the Quick Find box, then select Objects under
Create.
B. Click Candidate in the Custom Objects list.
C. In the Buttons, Links, and Actions related list, click the Edit link next to New.
D. Select the Visualforce Page radio button and select CandidateFlow
[CandidateFlow] from the picklist, then click Save.
3. Modify the Recruiter profile to give them access to the page.
A. From Setup, enter Profiles in the Quick Find box, then select Profiles under
Manage Users.
B. Click Custom – Recruiter in the Profiles list.
C. Select Visualforce Page Access and click Edit.
D. Select CandidateFlow and move it to Enabled Visualforce Pages, and click Save.
Instructions:
1. Create a Visualforce page that displays the website based on the information in the
record.
A. Create a page with the name JobSite.
B. Add the Job Posting Site standard controller to the page.
C. Add an iFrame to the page with the following attributes:
i. Src: {!Job_Posting_Site__c.Job_Site_Name__c}
ii. Frameborder: true
iii. Height: 200px
iv. Scrolling: true
v. ID: JobSite
D. Save the page.
2. Insert the page into the Job Posting Site page layout.
A. From Setup, enter Objects in the Quick Find box, then select Objects under
Create.
B. Click Job Posting Site in the Custom Objects list.
C. In the Page Layouts related list, click Edit on the Job Posting Site layout.
D. Drag a new section from the palette to below the System Information section.
i. Name: Job Site
ii. Layout: 1-Column
E. Click OK.
F. Click Visualforce Pages from the palette.
Instructions:
1. Create a Visualforce page based on the Position page.
A. Create a page with the name PositionPartialPageUpdate.
B. In the Page Editor, delete all of the default text and paste in the contents of the
18-5--PositionPartialPageUpdate.txt file found in the
M18_AdditionalVisualforcePagesExerciseFiles folder of the DEV401.zip
file.
2. Add the partial page update to the page by completing the sections of the code marked
TODO.