You are previewing Visualforce Development Cookbook.
O'Reilly logo
Visualforce Development Cookbook

Book Description

OFor developers who already know the basics of Visualforce, this book enables you to advance to the next level. With over 75 real-world examples accompanied by stacks of illustrations, it clarifies even the most complex concepts.

  • Provide an enhanced user experience with dynamically generated, reactive pages

  • Access data over additional channels via public web sites and mobile pages

  • Packed with easy to follow recipes, including step-by-step instructions and Apex/Visualforce code downloads

  • In Detail

    Visualforce, in conjunction with Apex, makes it easy to develop sophisticated, custom UIs for Force.com desktop and mobile apps without having to write thousands of lines of code and markup. The "Dynamic Binding" feature of Visualforce lets you develop generic Visualforce pages to display information related to the records without necessarily knowing which data fields to show. This is accomplished through a formula-like syntax, which makes it simple to manage even a complex hierarchy of records.

    "Visualforce Development Cookbook" provides solutions for a variety of challenges faced by Salesforce developers and demonstrates how easy it is to build rich, interactive pages using Visualforce. Whether you are looking to make a minor addition to the standard page functionality or override it completely, this book will provide you with the required help throughout.

    "Visualforce Development Cookbook" starts with explaining the simple utilities and builds up to advanced techniques for data visualization and reuse of functionality. This book contains recipes that cover various topics like creating multiple records from a single page, visualizing data as charts, using JavaScript to enhance client-side functionality, building a public website and making data available to a mobile device.

    "Visualforce Development Cookbook" provides lots of practical examples to enhance and extend the Salesforce user interface.

    Table of Contents

    1. Visualforce Development Cookbook
      1. Table of Contents
      2. Visualforce Development Cookbook
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
          3. Instant Updates on New Packt Books
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. General Utilities
        1. Introduction
        2. Overriding standard buttons
          1. Getting ready
          2. How to do it…
          3. How it works…
        3. Data-driven styling
          1. How to do it…
          2. How it works…
          3. See also
        4. Turning off an action poller
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Visualforce in the sidebar
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        6. Passing parameters to action methods
          1. Getting ready
          2. How to do it…
          3. How it works…
        7. Reacting to URL parameters
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Passing parameters between Visualforce pages
          1. How to do it…
          2. How it works…
          3. See also
        9. Opening a pop-up window
          1. How to do it…
          2. How it works…
          3. See also
        10. Adding a launch page
          1. How to do it…
          2. How it works…
        11. Testing a custom controller
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        12. Testing a controller extension
          1. How to do it…
          2. How it works…
          3. See also
      9. 2. Custom Components
        1. Introduction
        2. Passing attributes to components
          1. How to do it…
          2. How it works…
          3. See also
        3. Updating attributes in component controllers
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. Passing action methods to components
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        5. Data-driven decimal places
          1. How to do it…
          2. How it works…
          3. See also
        6. The custom iterator component
          1. Getting ready
          2. How to do it…
          3. How it works…
        7. Setting a value into a controller property
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Multiselecting related objects
          1. Getting ready
          2. How to do it…
          3. How it works…
        9. Notifying the containing page controller
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      10. 3. Capturing Data Using Forms
        1. Introduction
        2. Editing a record in Visualforce
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Adding error messages to field inputs
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. Adding error messages to nonfield inputs
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Using field sets
          1. Getting ready
          2. How to do it…
          3. How it works…
        6. Adding a custom lookup to a form
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        7. Adding a custom datepicker to a form
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Retrieving fields when a lookup is populated
          1. Getting ready
          2. How to do it…
          3. How it works…
        9. Breaking up forms with action regions
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        10. The "Please wait" spinner
          1. How to do it…
          2. How it works…
        11. Avoiding validation errors with action regions
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        12. Action chaining
          1. Getting ready
          2. How to do it…
          3. How it works…
        13. Errors – harmful if swallowed
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      11. 4. Managing Records
        1. Introduction
        2. Styling fields as required
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Styling table columns as required
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. Attaching an image to a record
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Managing attachments
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Maintaining custom settings
          1. Getting ready
          2. How to do it…
          3. How it works…
        7. Refreshing record details from embedded Visualforce
          1. Getting ready
          2. How to do it…
          3. How it works…
        8. Using wrapper classes
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        9. Changing options based on the user input
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        10. Changing page layout based on the user input
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        11. Form-based searching
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      12. 5. Managing Multiple Records
        1. Introduction
        2. Preventing duplicates by searching before creating
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Editing a record and its parent
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. Managing a list of records
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Converting a lead
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        6. Managing a hierarchy of records
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        7. Inline-editing a record from a list
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Creating a Visualforce report
          1. Getting ready
          2. How to do it…
          3. How it works…
        9. Loading records asynchronously
          1. Getting ready
          2. How to do it…
          3. How it works…
      13. 6. Visualforce Charts
        1. Introduction
        2. Creating a bar chart
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Creating a line chart
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. Customizing a chart
          1. Getting ready
          2. How to do it…
          3. How it works…
        5. Adding multiple series
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Creating a stacked bar chart
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        7. Adding a third axis
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Embedding a chart in a record view page
          1. Getting ready
          2. How to do it…
          3. How it works…
        9. Multiple charts per page
          1. Getting ready
          2. How to do it…
          3. How it works…
      14. 7. JavaScript
        1. Introduction
        2. Using action functions
          1. Getting ready
          2. How to do it…
          3. How it works…
        3. Avoiding race conditions
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. The confirmation dialog
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Pressing Enter to submit
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Tooltips
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        7. The character counter
          1. Getting ready
          2. How to do it…
          3. How it works…
        8. The onload handler
          1. How to do it…
          2. How it works…
          3. See also
        9. Collapsible list elements
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        10. The scrolling news ticker
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more...
          5. See also
        11. Carousel messages
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        12. Hiding buttons on submit
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        13. Client-side validation
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        14. Trapping navigation away
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      15. 8. Force.com Sites
        1. Introduction
        2. Creating a site
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Record and field access
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. Retrieving content from Salesforce
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Web to lead form
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Creating a website template
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        7. Adding a header menu to a template
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Adding a sidebar to a template
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        9. Conditional rendering in templates
          1. Getting ready...
          2. How to do it…
          3. How it works…
          4. See also
      16. 9. jQuery Mobile
        1. Introduction
        2. Mobilizing a Visualforce page
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Navigation and transitions
          1. How to do it…
          2. How it works…
          3. See also
        4. Adding a navigation bar
          1. How to do it…
          2. How it works…
          3. See also
        5. Working with dialogs
          1. How to do it…
          2. How it works…
          3. See also
        6. Listing records
          1. How to do it…
          2. How it works…
          3. See also
        7. Mobile Visualforce forms
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Redirecting to the mobile page based on the browser
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        9. Storing the user's location
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        10. Scanning the QR code to access the page
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      17. Index