[SalesForce] Visualforce: Displaying more than 20 records from a Custom Setting

I'm having issues with displaying more than 20 records from a Custom Setting on my visualforce page. I've tried using apex:repeat, apex:pageblocktable, apex:datatable with no luck.

Best,
Eric

<apex:page standardController="UserQueueSettings__c" sidebar="false" recordSetVar="UserQueueSettings__c" >
    <apex:form >
        <apex:pageBlock >
            <apex:pageMessages />
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
            <apex:repeat value="{!UserQueueSettings__c}" var="block" rows="1000">
                <apex:datatable value="{!block}" var="ES" id="memberTable" rows="1000">


                    <apex:column headerValue="Name">
                        <apex:inputField value="{!ES.SetupOwnerId}"/>

    <!--                    <apex:facet name="header">TEST</apex:facet>
                    <apex:inputField value="{!ES.Priority_1__c}" 
                                     required="false"/>

                        <apex:outputField value="{!ES.Priority_1__c}" />
    -->                 

                    </apex:column>
                    <apex:column headerValue="Priority 1">
                        <apex:inputField value="{!ES.Priority_1__c}"/>
                    </apex:column>
                    <apex:column headerValue="Priority 2">
                        <apex:inputField value="{!ES.Priority_2__c}"/>
                    </apex:column>
                    <apex:column headerValue="Priority 3">
                        <apex:inputField value="{!ES.Priority_3__c}"/>
                    </apex:column>

                </apex:datatable>
            </apex:repeat>  

Best Answer

I suspect using the standard controller on a custom setting, or perhaps even the recordSetVar is causing the issue.

My suggestion would be to create a simple visualforce controller and either query for the custom setting record or use the getAll() method, and then iterate over that list in your Visualforce page.

Controller:

public class MySettingsCtrl {
    public List<MySettings__c> settings {get; private set;}

    public MySettingsCtrl(){
        //You're probably going to have to query for the Custom Setting records if you want 
        //all hierarchy instances.  Otherwise, you could use the cached records with getAll() or get Instance
        //More info on custom setting methods here: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_custom_settings.htm
        settings = [Select SetupOwnerId,Priority_1__c,Priority_2__c,Priority_3__c From UserQueueSettings__c];
    }
}

And your visualforce would be updated to look like:

<apex:page controller="MySettingsCtrl" sidebar="false">
<apex:form >
    <apex:pageBlock >
        <apex:pageMessages />
        <apex:pageBlockButtons >
            <apex:commandButton value="Save" action="{!save}"/>
        </apex:pageBlockButtons>
        <!--<apex:repeat value="{!settings}" var="block" rows="1000">-->
            <apex:datatable value="{!settings}" var="ES" id="memberTable" rows="1000">


                <apex:column headerValue="Name">
                    <apex:inputField value="{!ES.SetupOwnerId}"/>

<!--                    <apex:facet name="header">TEST</apex:facet>
                <apex:inputField value="{!ES.Priority_1__c}" 
                                 required="false"/>

                    <apex:outputField value="{!ES.Priority_1__c}" />
-->                 

                </apex:column>
                <apex:column headerValue="Priority 1">
                    <apex:inputField value="{!ES.Priority_1__c}"/>
                </apex:column>
                <apex:column headerValue="Priority 2">
                    <apex:inputField value="{!ES.Priority_2__c}"/>
                </apex:column>
                <apex:column headerValue="Priority 3">
                    <apex:inputField value="{!ES.Priority_3__c}"/>
                </apex:column>

            </apex:datatable>
        <!--</apex:repeat>-->
    </apex:pageblock>  
    </apex:form>
</apex:page>