You need to sign in to do that
Don't have an account?
Deepikareddy
Visualforcepage:
how to add the selected values of onepicklist to other picklist of multislect, please provide usefull links
note: Duplicates cannot be added further.
thank you.. !
Deepika chowdary
how to pass the values form one selectlist to other Selectilst
public class notes2 { public 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 addtolist(){ system.debug('the selected values are::'+ selectedvalue); } }
Visualforcepage:
<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> <apex:commandButton value="Addtolist" /> <apex:selectList id="Hydlist" multiselect="true" size="5" style="width:100px;" > <apex:selectOptions value="{!Selectedoptions}"/> </apex:selectList> <br/><br/> </apex:outputPanel> </apex:form> </apex:page>
how to add the selected values of onepicklist to other picklist of multislect, please provide usefull links
note: Duplicates cannot be added further.
thank you.. !
Deepika chowdary
Use Below Code.
Change Option Values According to your requirment.
VFP
Class:
Hope this helps you.
Mark as best Answer If you resolve the Issue.
Thanks,
Foram Rana
hi Foram Rana, i am thanks for ur reply, but i have tried in a other way, jst got stucked in the Remove functionality of selectoption
visualforc page:
Apex class:
iam geting an error of Getvalue is not available, in the remove functionality, can u please help me out.... !
Thanks
Deepika
Please use the below code:
Hope this helps you.
If this helps kindly mark it as solved so that it may help others in the future.
Thanks & Regards,
Foram Rana.