+ Start a Discussion

get selected item value from selectlist when clicking on output link

On my VF page i have a Dropdownlist and a PageBlockTable section and I am building OutputLink in PageBlockTable. I need, that when ever user clicks on the link, whatever value is presently selected in dropdownlist should be added as a parameter to my URL for the new VF page.
My Dropdownlist is populating at runtime as below:

<apex:selectList id="type" value="{!ROIOptions}" size="1" >

           <apex:selectOptions value="{!ROIFieldValues}"/>


I tried using <apex:param> tag but no luck with that. Is this possible.

<apex:pageBlockTable value="{!Campaigns}" var="cmp">

      <apex:column width="10%">

           <apex:outputLink value="/apex/Marketing_Campaign?pcnt=0&id={!cmp.Id}">{!cmp.ExtnName}

                <apex:param value="{!ROIOptions}" name="mode" ></apex:param>



Using above stuff just adds parameter name but no value is assigned. Suggestion??
Hi Siddharth,

    If you want to pass that value as a parameter, you need to get that value to the controller and then you need to set that value as a parameter to the current page using pagereference.getparameters.put('value').

I hope this will solve your problem.