function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Aravind RAravind R 

apex param is returning 0 everytime

I have a Map called        Map<Integer,Wizard_Result__c> wizresults;

and my VF page is:

<apex:pageBlockTable value="{!wizresults}" var="wiz">
         <apex:column headerValue="Question">
           <apex:commandLink value="{!wizresults[wiz].Question__c}" action="{!submitQuesLink}" reRender="hiddenBlock">
           <apex:param assignTo="{!coun}" value="{!wiz}"/>
           </apex:commandLink>
</apex:column>
</apex:pageBlockTable>
       
But each time value of coun is returning 0.
James LoghryJames Loghry
Is there a question here?  If you're asking about why your map is empty, then please post your apex controller where you are populating the map, and perhaps we can help then.
pconpcon
I attempted to get write a VF page / controller to reproduce what you are seeing, but could not.  Can you please include your controller and more information about how you are seeing the value of coun?

* Please use the "add code sample" button when adding your code to increase readability.
Virendra ChouhanVirendra Chouhan
Hi Aravind R,

I think you forget the Name attribute in Param Tag.
Use this 
<apex:param assignTo="{!coun}" value="{!wiz}" name="count"/>

I hope it'll be helpful for you!

Regards 
Viru

James LoghryJames Loghry
Is it possible that your merge field {!coun} is spelled wrong and should be {!count}?