1
<apex:commandlink Value="Add Batch" action="{!addBatch}" reRender="pb,errormsg" >
<apex:param assignTo="{!qliRowNum}" value="{!rowNum}" name="qliRowNum" />
<apex:param assignto="{!Batchesnumber}" value="{!qli.No_Of_Batches__c}" name="Batchesnumber"/>
</apex:commandlink>

The above code is working only on double click

If i directly kept for

value="{!qli.No_Of_Batches__c}"

to

Manually keep the value for this

value="3"

then it is working fine on single click .what could be the issue

I want to pass user value it is taking the value but working only if double click

How to make work with single click ?

code :

    <apex:repeat value="{!batchMap[qliRow]}" var="child" id="therepeat2">
                                                <table border="0" cellpadding="0" cellspacing="0" width="100%" id="inTble{!batchrowNum}">
<tr>
<td ></td>                 
<td><b>Asked Quantity</b></td>
<td>No of batches</td>
</tr>
<tr>
<td style="padding-left:135px;"><apex:outputText value="{!FLOOR(batchrowNum)}"/></td>                   
<td><apex:inputfield value="{!child.batchObj.Asked_Qty__c}" required="true" style="width:110px"/></td>
<td><apex:inputfield value="{!child.batchObj.No_Of_Batches__c}" required="true" style="width:110px"/></td>
 <td>
  <apex:commandlink Value="Add Batch" action="{!addBatch}" reRender="pb" styleclass="btn">
 <apex:param assignTo="{!qliRowNum}" value="{!qliRow}" name="qliRowNum" /><apex:param assignto="{!Batchesnumber}" value="{!child.batchObj.No_Of_Batches__c}" name="Batchesnumber"/>
</apex:commandlink>
</td>   

 </tr>
 <apex:variable var="batchrowNum" value="{!batchrowNum+ 1}"/>  
 </table>
</apex:repeat>
1
  • This part seems ok. Maybe there is some issue in some other part of the code. Are you iterating through a list? You could post that as well..
    – AslamK
    Aug 12, 2015 at 7:01

1 Answer 1

1

The value attribute and name attribute of <apex:param> should refer to the same if value attribute reference a bind variable. This is not documented anywhere to my knowledge.

So change this

<apex:param assignTo="{!qliRowNum}" value="{!rowNum}" name="qliRowNum" />
<apex:param assignto="{!Batchesnumber}" value="{!qli.No_Of_Batches__c}" name="Batchesnumber"/>

to

<apex:param assignTo="{!qliRowNum}" value="{!rowNum}" name="{!rowNum}" />
<apex:param assignto="{!Batchesnumber}" value="{!qli.No_Of_Batches__c}" name="{!qli.No_Of_Batches__c}"/>

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.