Wednesday, 5 September 2012

Adding Attributes and Using Auto-Suggest - Visualforce

The page you created in Tutorial #1 shares a characteristic of every Visualforce page—it starts and ends with the <apex:page> tag. <apex:page> is actually a Visualforcecomponent—and one that must always be present. So all Visualforce pages will look similar to this:
<apex:page>
    Your Stuff Here
</apex:page>
Note the use of angle brackets, as well as how you indicate where a component starts and ends. The start is simply the component name in angle brackets: <apex:page>. The end is the component name prepended with a ‘/’ character in angle brackets: </apex:page>. All Visualforce pages follow this same convention—requiring that the pages you create be “well-formed XML” (with a few exceptions). A few components are self-closing—they have this form: <apex:detail /> (note the position of the /). Think of that as a start and end tag wrapped up in one!
You can generally modify the behavior and/or appearance of a component by adding attributes. These are name/value pairs that sit within the start tag. For example, here’s an attribute: sidebar="false".

No comments:

Post a Comment