Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <apex:repeat value='{!fieldList}' var='field'>
- console.log('$ObjectType[object].Fields[field].Name} = {!$ObjectType[object].Fields[field].Type}');
- </apex:repeat>
- <apex:repeat value="{!$ObjectType[object].Fields.MyPicklistField__c.picklistValues}" var="val">
- </apex:repeat>
- <apex:page>
- {!$ObjectType.Account.Fields.Industry.PicklistValues}
- </apex:page>
- <apex:page controller="picklistentryController">
- <apex:repeat value="{!entries}" var="val">
- {!val.label}<br/>
- </apex:repeat>
- </apex:page>
- public with sharing class picklistentryController
- {
- //for dynamic vf simply build a map of fieldnames to lists of picklistentries,
- public list<Schema.Picklistentry> getEntries(){
- return Account.fields.Industry.getDescribe().getpicklistvalues();
- }
- }
- class MyController
- {
- public Map<String, Schema.SObjectType> schemaInfo
- {
- get { return Schema.getGlobalDescribe(); }
- }
- }
- <apex:page controller="MyController">
- <apex:repeat
- var="pv"
- value="{!schemaInfo['MyObject__c'].describe.fields.map['MyPicklistField__c'].describe.picklistValues}"
- >
- {!pv.label}<br/>
- </apex:repeat>
- </apex:page>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement