I have a multiselect picklist and pageblock table in a visualforce page i want to send the selected multiselect picklist value and modified page block table value to the next visualforce page
This is my vf page code
<apex:pageBlockSection title="Filter based on profiles" collapsible="true" >
<apex:selectList style="margin-left: 60%;width:150%" value="{!multival}" size="10" multiselect="true" >
<apex:selectOptions value="{!Name}"></apex:selectOptions>
</apex:selectList>
</apex:pageBlockSection>
<apex:commandButton style="margin-left: 30%;width:5%" value="Next" action="{!redirect}"/>
This is my first controller code
public String multival {get;set;}
public pagereference redirect(){
PageReference redirect = new PageReference('/apex/nextPage?att='+multival);
redirect.setRedirect(true);
return redirect;
}
This is my second controller code
public class selectedList {
public String multival {get;set;}
public selectedList (){
multival = ApexPages.currentPage().getParameters().get('att');
}
}
How do i pass the selected multiselect picklist value to my nextpage?