You need to sign in to do that
Don't have an account?
Ian Lin 439
My method autopop is not getting called.Can somebody help me with the code
vf page:
<apex:pageBlockTable value="{!OrderLi}" var="orders" id="pbt">
<!--apex:column headerValue="Product Name">
<apex:inputField value="{!orders.Product2Id}">
</apex:inputField>
</apex:column-->
<apex:column headerValue="Product Name">
<apex:inputField value="{!orders.Product2Id}" >
<apex:actionSupport event="onclick" action="{!autopop}" reRender="orderAdd" immediate="true">
<apex:param name="selectedR" value="{!orders.Product2Id}" assignTo="{!ordId}"/>
</apex:actionSupport>
</apex:inputField>
</apex:column>
extension:
public void 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:pageBlockTable value="{!OrderLi}" var="orders" id="pbt">
<!--apex:column headerValue="Product Name">
<apex:inputField value="{!orders.Product2Id}">
</apex:inputField>
</apex:column-->
<apex:column headerValue="Product Name">
<apex:inputField value="{!orders.Product2Id}" >
<apex:actionSupport event="onclick" action="{!autopop}" reRender="orderAdd" immediate="true">
<apex:param name="selectedR" value="{!orders.Product2Id}" assignTo="{!ordId}"/>
</apex:actionSupport>
</apex:inputField>
</apex:column>
extension:
public void 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;
}
Please see this post where a similar issue is discussed