Skip to content

Instantly share code, notes, and snippets.

@tarot
Created July 30, 2015 07:48
Show Gist options
  • Select an option

  • Save tarot/a6f24c6f44f549fe6312 to your computer and use it in GitHub Desktop.

Select an option

Save tarot/a6f24c6f44f549fe6312 to your computer and use it in GitHub Desktop.
何故かこれは通る。{!Account.CreatedDate}と{!record.CreatedDate}が逆でもOK
<apex:page standardController="Account" extensions="SampleExtension">
<apex:outputField value="{!Account.CreatedDate}"/>
<apex:outputText value="{0,date}">
<apex:param value="{!record.CreatedDate}"/>
</apex:outputText>
</apex:page>
public class SampleExtension {
public Account record { get; private set; }
public SampleExtension(ApexPages.StandardController controller) {
record = (Account) controller.getRecord();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment