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
Ian Lin 439Ian 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;
    }
AnudeepAnudeep (Salesforce Developers) 
This usually happens when you rerender incorrectly 

Please see this post where a similar issue is discussed