August 29, 2012

Component in Salesforce

In Salesforce component is a reusable piece of code developed using Visual force and Apex controller.


<!-- Page -->


    <c:myComponent myValue="My component's value" borderColor="red" />


<!-- Component:myComponent -->    


    <apex:attribute name="myValue" description="This is the value for the component."  type="String" required="true"/>

    <apex:attribute name="borderColor" description="This is color for the border."  type="String" required="true"/>

    <h1 style="border:{!borderColor}">

        <apex:outputText value="{!myValue}"/>




No comments:

Post a Comment