Skip to content

Instantly share code, notes, and snippets.

@gitmatheus
Created June 27, 2017 13:31
Show Gist options
  • Save gitmatheus/17d1f8ba99262c6dc73344686185b449 to your computer and use it in GitHub Desktop.
Save gitmatheus/17d1f8ba99262c6dc73344686185b449 to your computer and use it in GitHub Desktop.
<apex:component controller="ParentComponentController">
<apex:attribute name="componentValue" description="Attribute on the component."
type="String" required="required" assignTo="{!controllerValue}"/>
<apex:pageBlock title="My Parent Custom Component">
<p>
<code>componentValue</code> is "{!componentValue}"
<br/>
<code>controllerValue</code> is "{!controllerValue}"
</p>
</apex:pageBlock>
<p>
Notice that the controllerValue has been upper cased using an Apex method.
</p>
<p>
Calling Child Component:
</p>
<c:ChildComponent componentValue="Hi there, {!$User.FirstName}"/>
</apex:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment