You need to sign in to do that
Don't have an account?
Custom settings value in visualforce page without controller
Hi,
can any body help me on the custom settings
I am having a List Custom Settings, in that i am using the name field for storing some values like A, B, C
I need to display these values using visualforce pages, But I am able to do that with the help of controller as shown below
public class HierarchyController {
public List<samplelist__c> getSampleList(){
List<samplelist__c> allSampleList = samplelist__c.getall().values();
return allSampleList;
}
}
But without using controller, is it possible to get that custom setting list, of all values directly in the Visualforce page?
Thanks,
Arunraj
u can do like this
<apex:page standardController="CSO__c" recordSetVar="CSObj"> <apex:pageBlock> <apex:pageBlockTable value="{!CSObj}" var="a"> <apex:column value="{!a.yes__c}"/> </apex:pageBlockTable> </apex:pageBlock>
CSO__c is my customsetting object with list type and yes__c is my check box field.. try this...
All Answers
Hi,
According to my knowledge it cannot be used without controller
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
Try this
{!$Setup.CustomSettingName__c.FieldName__c}
This will work for setting type : Hierarchy
u can do like this
<apex:page standardController="CSO__c" recordSetVar="CSObj"> <apex:pageBlock> <apex:pageBlockTable value="{!CSObj}" var="a"> <apex:column value="{!a.yes__c}"/> </apex:pageBlockTable> </apex:pageBlock>
CSO__c is my customsetting object with list type and yes__c is my check box field.. try this...
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_variables_global_setup.htm