You need to sign in to do that
Don't have an account?
Ian Lin 439
my action support function is not getting called ?can somebody help
vf page:
<apex:actionRegion >
<apex:pageBlockTable value="{!OrderLi}" var="orders" id="pbt">
<apex:column headerValue="Product Name">
<apex:inputField value="{!orders.Product2Id}" >
<apex:actionSupport event="onchange" action="{!autopop}" reRender="pbt">
<apex:param name="selectedR" value="{!orders.Product2Id}" assignTo="{!ordId}"/>
</apex:actionSupport>
</apex:inputField>
</apex:column>
Extension method:
public PageReference autopop(){
system.debug('rohit');
// order cont=(order) sc.getRecord();
//system.debug(cont);
//cont.order=[select product2.family from orderitem where id=:cont.Product2Id];
//ordId = apexpages.currentPage().getParameters().get('selectedR');
system.debug(ordId);
system.debug('rohit');
//OrderItem ord = [select product2.family from orderItem where id =: ordId limit 1];
//system.debug(ordId);
return null;
}
<apex:actionRegion >
<apex:pageBlockTable value="{!OrderLi}" var="orders" id="pbt">
<apex:column headerValue="Product Name">
<apex:inputField value="{!orders.Product2Id}" >
<apex:actionSupport event="onchange" action="{!autopop}" reRender="pbt">
<apex:param name="selectedR" value="{!orders.Product2Id}" assignTo="{!ordId}"/>
</apex:actionSupport>
</apex:inputField>
</apex:column>
Extension method:
public PageReference autopop(){
system.debug('rohit');
// order cont=(order) sc.getRecord();
//system.debug(cont);
//cont.order=[select product2.family from orderitem where id=:cont.Product2Id];
//ordId = apexpages.currentPage().getParameters().get('selectedR');
system.debug(ordId);
system.debug('rohit');
//OrderItem ord = [select product2.family from orderItem where id =: ordId limit 1];
//system.debug(ordId);
return null;
}
Can you try changing the reRender and let me know if it works?
I recommend taking a look at this post where a similar issue is discussed