0

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"/>
            </apex:selectList>
        </apex:pageBlockSection>

Thanks in Advance....

5
  • can you share your code here? Commented Dec 27, 2016 at 9:20
  • can you share your code btw you can use rerender for this. Commented Dec 27, 2016 at 9:20
  • What do you mean by notrefreshing. do you want to set it to none? Commented Dec 27, 2016 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
    Commented Dec 27, 2016 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
    Commented Dec 27, 2016 at 9:59

1 Answer 1

0

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.

You must log in to answer this question.