i have to refresh page when i click on save button using rerender attribute all component tags refreshing but select list tag not refreshing.. How to refresh selectlist tag..

  <apex:commandButton value="Save" action="{!save}" rerender="out,list" status="actStatusId"/>
 <apex:pageBlockSection title="Custom Picklist Using selectList and selectOption" collapsible="false">
            <apex:selectList value="{!selectedCountry1}" multiselect="false" size="1" id="list">
               <apex:selectOption itemValue="NONE" itemLabel="--NONE--"/>
                <apex:selectOption itemValue="INDIA" itemLabel="India"/>
                <apex:selectOption itemValue="USA" itemLabel="USA"/>
                <apex:selectOption itemValue="United Kingdom" itemLabel="UK"/>

Thanks in Advance....

  • can you share your code here? Dec 27 '16 at 9:20
  • can you share your code btw you can use rerender for this. Dec 27 '16 at 9:20
  • What do you mean by notrefreshing. do you want to set it to none? Dec 27 '16 at 9:33
  • What is your requirement? The options are hard coded in VF page, it can't change even if you refresh the page.
    – Saroj Bera
    Dec 27 '16 at 9:38
  • @Tushar Sharma Thank you for reply..yes yes when i click on save button select list value should be --none-- how it is possible?
    – user28833
    Dec 27 '16 at 9:59

As you want to clear selected value so with using rerender from your save method clear the selected value.

//Save method code
selectedCountry1 = 'NONE';

Add this line in your Save method and it will clear the value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy