Created
July 9, 2020 06:40
-
-
Save j-schreiber/fce8380e5368173fea876626ff21f5e7 to your computer and use it in GitHub Desktop.
Dynamic component property on the pdf controller class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Component.Apex.PageBlock DynamicAddress { | |
public get { | |
if (DynamicAddress == null && Template != null && String.isNotBlank(Template.AddressFormatting__c)) { | |
DynamicAddress dynAddr = new DynamicAddress(Template.AddressFormatting__c); | |
dynAddr.RecordVariableName = 'QuoteRecord'; | |
DynamicAddress = dynAddr.getAddressAsPageBlock(); | |
} | |
return DynamicAddress; | |
} | |
private set; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:dynamicComponent componentValue="{! DynamicAddress }" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment