anusha(salesforce developer)

Monday 1 August 2016

How to Use Apex:listViews tag in Visualforce Page?


The list view picklist for an object, including its associated list of records for the currently selected view. In standard Salesforce applications this component is displayed on the main tab for a particular object.


This tag supports following attributes.

Attribute Name
Description
id
An identifier that allows the listViews component to be referenced by other components in the page.
rendered
A Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true.

type
The Salesforce object for which list views are displayed, for example, type="Account" or type="My_Custom_Object__c".



Facet Name
Description
body
The components that should appear in the body of the displayed list of records. Note that the order in which a body facet appears in a listViews component does not matter, because any facet with name="body" will control the appearance of the body of the displayed list. Also note that if you define a body facet, it replaces the list of records that would normally display as part of the list view.
footer
The components that should appear in the footer of the displayed list of records. Note that the order in which a footer facet appears in the body of a listViews component does not matter, because any facet with name="footer" will control the appearance of the bottom of the displayed list.
header
The components that should appear in the header of the displayed list of records. Note that the order in which a header facet appears in the body of a listViews component does not matter, because any facet with name="header" will control the appearance of the top of the displayed list.



 Example:

<apex:page showHeader="true" tabstyle="Case">
    <apex:ListViews type="Case" />
    <apex:ListViews type="Member__c" />
</apex:page>




No comments:

Post a Comment