You need to sign in to do that
Don't have an account?

how to achive selected Remove functionality in Selectoption
public class notes2 { public list<string> SelectedValue{get;set;} public list<selectoption> Alloptions{get;set;} public list<selectoption> Selectedoptions{get;set;} public notes2(){ getnames(); } public void getnames(){ Alloptions= new list<selectoption>(); selectoption s1 = new selectoption('Ban' ,'Banglore'); selectoption s2 = new selectoption('Hyd' ,'Hyderbad'); selectoption s3 = new selectoption('Che' ,'Chennai'); selectoption s4 = new selectoption('Ap' ,'Andhrapradesh'); Alloptions.add(s1); Alloptions.add(s2); Alloptions.add(s3); Alloptions.add(s4); } public void Removelist(){ system.debug('the selected values are::'+ selectedvalue); for(integer i=0;i<selectedvalue.Size();i++){ system.debug(selectedvalue[i]); /* if(RightSelectedValues[i].getValue() == RightSelectedValues){ //Selectedfileds.remove(i); } */ } } }
Visualforce page:
<apex:page controller="notes2" > <apex:form id="fm"> <apex:outputPanel id="test1" > <apex:selectList value="{!SelectedValue}" id="slctedval" multiselect="true" size="5"> <apex:selectOptions value="{!Alloptions}"/> </apex:selectList> <br/> <apex:commandButton value="Removielist" action="{!Removelist}"/> <br/><br/> </apex:outputPanel> </apex:form> </apex:page>
getting an error: unable to find the Getvalue methods.
Please provide a solution for this.
Thanks
Deepika Reddy