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
carramrodcarramrod 

Parameter - passing current value of field for actionSupport

 

 I'm trying to pass the current value of the inputfield id TechCenter to my apex controller, but my code below passes in null (which i assume because the field hasn't been assigned yet. I want to pass the value in this field, not the previous value to my apex class. This is an actionsupport rerender on a panel, so it's a partial page update.

 

<apex:pageblockSectionItem >
<apex:outputLabel value="Tech Center" for="TechCenter"></apex:outputLabel>
<apex:actionRegion >
<apex:inputField id="TechCenter" value="{!bc.Technical_Center__c}" required="true">
<apex:actionSupport event="onchange" rerender="AddressPanel" status="status1">
<apex:param id="tc" value="{!bc.Technical_Center__c}"/>
</apex:actionSupport>
</apex:inputField>
</apex:actionRegion>
</apex:pageblockSectionItem>

 

 

 

TehNrdTehNrd

You shouldn't need to use params if you are binding directly to an inputField. This should work fine:

 

 

<apex:inputField id="TechCenter" value="{!bc.Technical_Center__c}" required="true">
<apex:actionSupport event="onchange" rerender="AddressPanel" status="status1"/>
</apex:inputField>

 

 

 

Message Edited by TehNrd on 07-23-2009 01:47 PM
carramrodcarramrod

The inputfield "TechCenter" is not part of the re-render outputPanel.

I tried using a parameter because passing !bc.Technical_Center__c through the parameter gives a null value, or the value initially stored in the controller, not the one that just raised this onchange event.

 

hope this makes sense.

TehNrdTehNrd

What happens if you add this:

 

 

<apex:actionSupport event="onchange" action="{!doSomething}" rerender="AddressPanel" status="status1"/> public void doSomething(){}

This should make all of the set methods execute and then the rerender will perform.

 

anu_karthianu_karthi

Hi iam also having a similar issue iam facing difficulty in passing the lookupfield value to controller actually i have a lookupfield value in my vpge i wantto pass this input field value     to the controller for filtering the query result ....

so plz tell me how could i do this witha  example ....

 

                                                                                                                             Thanks&regards,

                                                                                                                                        Anu.....