<apex:page>
<head>
<apex:includeScript value="{!URLFOR($Resource.JqueryA, 'js/jquery-1.6.2.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.JqueryA, 'js/jquery-ui-1.8.16.custom.min.js')}"/>
<apex:stylesheet value="{!URLFOR($Resource.JqueryA, 'css/ui-lightness/jquery-ui-1.8.16.custom.css')}"/>
</head>
<apex:form id="myForm">
<apex:pageblock id="pb" mode="maindetail">
<apex:variable value="{!1}" var="rowNum"/>
<apex:repeat value="{!qouteLineItemMap}" var="qliRow" id="theQliRepeat">
<apex:repeat value="{!qouteLineItemMap[qliRow]}" var="qli" id="therepeat1">
<apex:variable value="{!1}" var="batchrowNum"/>
<table border="1" width="98%" style="border-collapse:collapse;" bordercolor = "Black" id="tble{!rowNum}"><tr><td>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="tbleqli{!rowNum}"><tr><td style="padding-right:4px;padding-left:6px"> </td>
<td><b>No Of Batches</b></td>
</tr>
<tr>
<td style="padding-right:4px;padding-left:6px"><apex:outputText value="{!FLOOR(rowNum)}"/></td>
<td>
<apex:inputField value="{!qli.Number_of_B__c}" >
<apex:actionSupport event="onchange" rerender="pb" oncomplete="this.disabled=true;" action="{!addBatch}">
<apex:param assignTo="{!qliRowNum}" value="{!rowNum}" name="qliRowNum" />
<apex:param assignto="{!Batchesnumber}" value="{!qli.Number_of_B__c}" name="Batchesnumber"/>
</apex:actionsupport>
</apex:inputField>
</td>
</tr>
</table>
<br/>
<apex:repeat value="{!batchMap[qliRow]}" var="child" id="therepeat2">
<table border="0" cellpadding="0" cellspacing="0" width="85%" id="inTble{!batchrowNum}">
<tr>
<td ></td>
<td><b>Asked Quantity</b></td>
</tr>
<tr>
<td style="padding-left:55px;"><apex:outputText value="{!FLOOR(batchrowNum)}" /></td>
<td><apex:inputField value="{!child.batchObj.Asked_Qty__c}" style="width:110px"/></td>
</tr>
<apex:variable var="batchrowNum" value="{!batchrowNum+ 1}"/>
</table>
</apex:repeat>
</td>
</tr>
</table>
<apex:variable var="rowNum" value="{!rowNum + 1}"/>
</apex:repeat>
</apex:repeat>
<apex:pageBlockButtons >
<apex:commandbutton value="save" id="saveid" onclick="click1();" action="{!save1}"/>
<apex:commandbutton value="cancel" action="{!cancel1}" id="cancelId" immediate="True"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
I am doing action support on inputfield :
<apex:inputField value="{!qli.Number_of_B__c}" >
<apex:actionSupport event="onchange" rerender="pb" oncomplete="this.disabled=true;" action="{!addBatch}">
<apex:param assignTo="{!qliRowNum}" value="{!rowNum}" name="qliRowNum" />
<apex:param assignto="{!Batchesnumber}" value="{!qli.Number_of_B__c}" name="Batchesnumber"/>
</apex:actionsupport>
</apex:inputField>
When i gave value first time it is not doing any action . When i gave value for second time. it is executing the value of first time .when i gave value for third it is executing value of second time .Controller code was perfect no mistake on that . If i gave direct values on controller it was working fine . Any ideas from you would be great