Is there any way to reference a Enum in a Visualforce page? Either for comparison or display?
Something like
<div>
{!MyEnum.Status1}
</div>
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityNot without Apex
, I believe. You'd need to add it as a property to your controller/extension:
public MyEnum enumInstance { get { return MyEnum.Status1; } }
Then you can reference it normally:
<apex:outputText value="{!enumInstance}" />