Visualforce Workbook

  • View
    1.450

  • Download
    1

Embed Size (px)

DESCRIPTION

Mon guide pratique pour les premiers pas sur Visualforce

Text of Visualforce Workbook

  • 1. Table of Contents About the Visualforce Workbook..........................................................................................................3 Tutorial #1: Creating and Listing Visualforce Pages...............................................................................5 Step 1: Enable Visualforce Development Mode........................................................................................................................5 Step 2: Create a Visualforce Page..............................................................................................................................................5 Step 3: Edit the Visualforce Page..............................................................................................................................................6 Step 4: Find all Visualforce Pages.............................................................................................................................................7 Step 5: Alternative Page Creation.............................................................................................................................................7 Summary...................................................................................................................................................................................7 Tutorial #2: Adding Attributes and Using Auto-Suggest........................................................................8 Step 1: Add Attributes Using Auto-Suggest.............................................................................................................................8 Step 2: Add Additional Components......................................................................................................................................10 Step 3: Add Nested Components............................................................................................................................................11 Summary.................................................................................................................................................................................11 Tutorial #3: Understanding Simple Variables and Formulas.................................................................12 Step 1: Global Variables..........................................................................................................................................................12 Step 2: Basic Formulas............................................................................................................................................................12 Step 3: Conditionals................................................................................................................................................................13 Summary.................................................................................................................................................................................14 Tutorial #4: Using Standard Controllers..............................................................................................15 Step 1: Find Identifiers of Records..........................................................................................................................................15 Step 2: Display Data from a Record........................................................................................................................................16 Step 3: Display Other Fields...................................................................................................................................................17 Step 4: Display Fields from Related Records..........................................................................................................................17 Summary.................................................................................................................................................................................18 Tutorial #5: Using Standard User Interface Components......................................................................19 Step 1: Display a Record or Related Lists...............................................................................................................................19 Step 2: Display Fields..............................................................................................................................................................19 Step 3: Display a Table............................................................................................................................................................20 Summary.................................................................................................................................................................................21 Tutorial #6: Overriding and Pointing to Pages.....................................................................................22 Step 1: Override the Standard Display for a Page...................................................................................................................22 Step 2: Embed a Page on a Standard Layout..........................................................................................................................23 Step 3: Create a Button that Links to a Visualforce Page.......................................................................................................23 Step 4: Create Hyperlinks to URLs or Other Visualforce Pages.............................................................................................24 Summary.................................................................................................................................................................................25 Tutorial #7: Customizing User Interface Components.........................................................................26 i Table of Contents
  • 2. Step 1: Remove the Header and Sidebar.................................................................................................................................26 Step 2: Style the HTML with CSS.........................................................................................................................................26 Step 3: Iterate Using Unstyled Lists and Tables......................................................................................................................27 Summary.................................................................................................................................................................................28 Tutorial #8: Inputting Data with Forms..............................................................................................29 Step 1: Create a Basic Form....................................................................................................................................................29 Step 2: Show Field Labels.......................................................................................................................................................30 Step 3: Display Warning and Error Messages.........................................................................................................................30 Summary.................................................................................................................................................................................31 Tutorial #9: Reusing Pages with Templates.........................................................................................32 Step 1: Create a Template.......................................................................................................................................................32 Step 2: Use a Template with Another Page............................................................................................................................32 Step 3: Include One Visualforce Page within Another............................................................................................................33 Summary.................................................................................................................................................................................33 Tutorial #10: Creating and Using Custom Components.......................................................................34 Step 1: Create a Simple Custom Component.........................................................................................................................34 Step 2: Add a Custom Component to a Visualforce Page.......................................................................................................34 Summary.................................................................................................................................................................................35 Tutorial #11: Updating Visualforce Pages with Ajax.............................................................................36 Step 1: Identify a Region for Dynamic Updates......................................................................................................................36 Step 2: Add Dynamic Re-Rendering......................................................................................................................................36 Summary.................................................................................................................................................................................37 Tutorial #12: Using Extensions to Add Functionality..........................................................................