So here is what I'm trying to do, and how I'm trying to do it. Feel free to suggest an easier alternative. I am trying to create a field stored on the user object called dialect__c. This will store the Id of a related object (since you can't create relationship fields on the user object, otherwise I'd just do that). I was to present the user a dropdown list that has all of the possible options listed (an entry for each dialect object that exists).
I want this field which exists on my inline visualforce page to look and behave as if it were just a part of the regular page layout. I don't want a separate save button for this field, and ideally it would just blend right in, nobody would even be the wiser that it is an inline vf page.
So my question becomes, how can I style a visualforce page to blend as seamlessly as possible, and is it possible to avoid having to have a separate save button for my field so the normal save button on the user record would work? If it helps visualize what I've got going on at all, here is the code that creates the field.
public class chatter_dialect_controller {
public chatter_dialect_controller(ApexPages.StandardController controller) {
}
public List<SelectOption> getDialects() {
List<SelectOption> options = new List<SelectOption>();
for(list<Chatter_Dialects_Dialect__c> dls : [select name, id from Chatter_Dialects_Dialect__c])
{
for(Chatter_Dialects_Dialect__c dialect : dls)
{
options.add(new SelectOption(dialect.id,dialect.name));
}
}
return options;
}
}
and here is the visualforce page
<apex:page standardcontroller="user" extensions="chatter_dialect_controller" showHeader="false" sidebar="false">
<apex:form >
<label for="dialect__c">Select Dialect</label>
<apex:selectList value="{!user.Dialect__c}" multiselect="false" size="1" id="dialect__c">
<apex:selectOptions value="{!Dialects}"/>
</apex:selectList><p/>
</apex:form>