function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
InspiredInspired 

Visualforce Application Configuration Screens

Anyone coding application configuration screens in visualforce for their visualforce applications? Looking for an example like the "Customize My Tabs" screen. I cannot find any examples in the documentation or wiki.

Message Edited by Inspired on 08-04-2009 11:22 AM
sfdcfoxsfdcfox
You can do this by one of two means:

1) Create a custom object that contains the parameters you'd like to have the user be able to modify.

2) Create custom User fields and have your code use those parameters.

As far as an actual configuration wizard goes, it's basically the same as any other Visualforce page. You might do one of the following:

<apex:page standardController="User"> <apex:form> <h1>Customize your settings</h1> <apex:panelGrid columns="2"> <apex:outputLabel for="Setting1" value="Setting 1" /> <apex:inputField id="Setting1" value="{!Setting1__c}" /> <apex:outputLabel for="Setting2" value="Setting 2" /> <apex:inputField id="Setting2" value="{!Setting2__c}" /> <apex:outputLabel for="Setting3" value="Setting 1" /> <apex:inputField id="Setting3" value="{!Setting3__c}" /> <apex:commandButton value="Save" action="{!save}" /> </apex:form> </apex:page>

You could do complex tab-based configurations, a multi-step wizard, or any other UI you could conceive. Your triggers, other controllers, etc. can all access this information for the cost of one query. I myself am building a few configuration screens, but I don't have them functional at the moment, so there'd be no point in posting any "real-life" code.