Activity › Forums › Salesforce® Discussions › What is the use of apex:facet in Salesforce Visualforce?
Tagged: apex:facet, Salesforce Apex, Salesforce Apex Code, Salesforce Visualforce Page, Visualforce Component
-
What is the use of apex:facet in Salesforce Visualforce?
Posted by Shubham on July 28, 2017 at 8:59 AMUse of <apex:facet/>
-
This discussion was modified 8 years, 10 months ago by
Shubham.
-
This discussion was modified 8 years, 10 months ago by
Forcetalks.
-
This discussion was modified 8 years, 10 months ago by
Forcetalks.
Prachi replied 7 years, 8 months ago 5 Members · 5 Replies -
This discussion was modified 8 years, 10 months ago by
-
5 Replies
- [adinserter block='9']
-
The name of the facet component must match one of the pre-defined facet names on the parent component. This name determines where the content of the facet component is rendered. Consequently, the order in which a facet component is defined within the body of a parent component does not affect the appearence of the parent component. for more detail click this link
-
<apex:facet>:
A placeholder for content that is rendered in a specific part of the parent component, such as the header or footer of an < apex:dataTable >.An < apex:facet > component can only exist in the body of a parent component if the parent supports facets. The name of the facet component must match one of the pre-defined facet names on the parent component. This name determines where the content of the facet component is rendered. Consequently, the order in which a facet component is defined within the body of a parent component does not affect the appearence of the parent component.
-
Hi,
Note: Although you can’t represent an <apex:facet> directly in Apex, you can specify it on a dynamic component that has the facet. For example:
Component.apex.dataTable dt = new Component.apex.dataTable(); dt.facets.header = ‘Header Facet’;
<apex:page standardController=”Account”>
<apex:pageBlock title=”Contacts”>
<apex:dataTable value=”{!account.Contacts}” var=”contact” cellPadding=”4″ border=”1″>
<apex:column >
<apex:facet name=”header”>Name</apex:facet>
{!contact.Name}
</apex:column>
<apex:column >
<apex:facet name=”header”>Phone</apex:facet>
{!contact.Phone}
</apex:column>
</apex:dataTable>
</apex:pageBlock>
</apex:page> -
hi,
<apex:facet>:
A placeholder for content that is rendered in a specific part of the parent component, such as the header or footer of an < apex:dataTable >.thanks
Log In to reply.