Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Apex Programming

You're reading from   Learning Apex Programming Create business applications using Apex to extend and improve the usefulness of the Salesforce1 Platform

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher
ISBN-13 9781782173977
Length 302 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (11) Chapters Close

Preface 1. Apex Assumptions and Comparisons 2. Apex Limits FREE CHAPTER 3. More and Later 4. Triggers and Classes 5. Visualforce Development with Apex 6. Exposing Force.com to the World 7. Use Case – Integration with Google Calendar 8. Creating a Property Management Application 9. Test Coverage Index

Visualforce components


Once you have mastered the use of Visualforce pages, you will have probably written many useful snippets of markup that you use over and over. While it's easy to just copy and paste these snippets, you can be more efficient and take advantage of Visualforce components. Components are stored snippets of Visualforce markup that you can reference multiple times in a single page or across multiple pages.

You can create a Visualforce component in the Force.com IDE as follows:

  1. Right-click on your project and navigate to New | Visualforce Component. The Create New Visualforce Component window appears, as shown in the following screenshot:

  2. Enter the label and name for your new component. For this example, use myComponent.

  3. Select the API version for the page. For this example, keep it at the default value.

  4. Click on Finish. A progress bar will appear followed by your new Visualforce component.

Just like pages, components can include HTML, CSS, JavaScript, and Visualforce tags. They...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image