The below code is used to display Rating picklist of standard object Account.
<apex:page standardController="Account">
<apex:form >
<apex:pageMessages />
<apex:pageBlock >
<apex:pageBlockSection columns="2">
<apex:pageblockSectionItem >
<apex:outputLabel value="Rating"/>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem >
<apex:inputField value="{!Account.Rating}"/>
</apex:pageblockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Output:
<apex:page standardController="Account">
<apex:form >
<apex:pageMessages />
<apex:pageBlock >
<apex:pageBlockSection columns="2">
<apex:pageblockSectionItem >
<apex:outputLabel value="Rating"/>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem >
<apex:inputField value="{!Account.Rating}"/>
</apex:pageblockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Output:
how to get the selected picklist value to controller
ReplyDeleteCheck this out - http://www.infallibletechie.com/2012/12/rerender-based-on-selectlist-option.html
DeleteCheers!!!