Sunday, June 15, 2014

How To Use APEX:PAGEBLOCK In Visualforce Page?

How To Use APEX:PAGEBLOCK In Visualforce Page?


<apex:pageblock> :  
A tag that creates an area within the page where multiple sections can be created and fields,buttons, tables or links can be displayed. It by default inherits the standard salesforce page style.

This tag supports following attributes:

Attribute
Description
dir
The direction in which the generated HTML component should be read. Possible values include "RTL" (right to left) or "LTR" (left to right).
helpTitle
The text that displays when a user hovers the mouse over the help link for the page block. If specified, you must also provide a value for helpURL. Note that if a value for a header facet is included in the pageBlock, this attribute is ignored.
helpUrl
The URL of a webpage that provides help for the page block. When this value is specified, a help link appears in the upper right corner of the page block. If specified, you must also provide a value for helpTitle. Note that if a value for a header facet is included in the pageBlock, this attribute is ignored.
id
An identifier that allows the pageBlock component to be referenced by other components in the page.
lang
The base language for the generated HTML output, for example, "en" or "en-US".
mode
The default user mode for the pageBlock component's child elements. This value determines whether lines are drawn separating field values. Possible values are: "detail", in which data is displayed to the user with colored lines; "maindetail", in which data is displayed to the user with colored lines and a white background, just like the main detail page for records; and "edit", in which data is displayed to the user without field lines. If not specified, this value defaults to "detail". These lines have nothing to do with requiredness, they are merely visual separators, that make it easier to scan a detail page.
onclick
The JavaScript invoked if the onclick event occurs that is, if the user clicks the page block.
ondblclick
The JavaScript invoked if the ondblclick event occurs that is, if the user clicks the page block twice.
onkeydown
The JavaScript invoked if the onkeydown event occurs that is, if the user presses a keyboard key.
onkeypress
The JavaScript invoked if the onkeypress event occurs that is, if the user presses or holds down a keyboard key.
onkeyup
The JavaScript invoked if the onkeyup event occurs that is, if the user releases a keyboard key.
onmousedown
The JavaScript invoked if the onmousedown event occurs that is, if the user clicks a mouse button.
onmousemove
The JavaScript invoked if the onmousemove event occurs that is, if the user moves the mouse pointer.
onmouseout
The JavaScript invoked if the onmouseout event occurs that is, if the user moves the mouse pointer away from the page block.
onmouseover
The JavaScript invoked if the onmouseover event occurs that is, if the user moves the mouse pointer over the page block.
onmouseup
The JavaScript invoked if the onmouseup event occurs that is, if the user releases the mouse button.
rendered
A Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true.
tabStyle
The Salesforce object or custom Visualforce tab that controls the color scheme of the page block. If not specified, this value defaults to the style of the page. If using a Salesforce object, the attribute must be specified with the developer name for the object. For example, to use the styling associated with MyCustomObject, use tabStyle="MyCustomObject__c". To use a custom Visualforce tab, set the attribute to the name (not label) of the tab followed by a double-underscore and the word tab. For example, to use the styling of a Visualforce tab with the name Source, use tabStyle="Source__tab".
title
The text displayed as the title of the page block. Note that if a header facet is included in the body of the pageBlock component, its value overrides this attribute.


Visualforce Example:-

<apex:page standardController="Account">
    <apex:form >
        <apex:pageBlock title="Account Detail" >
        </apex:pageBlock>
    </apex:form>
</apex:page>


save image




0 comments:

Post a Comment

 
| ,