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
Harald KloseHarald Klose 

Weird issue with parameters in Actionsupport for SelectList

Hello,

I have a VF Page with a PageBlockTable and some fields. Two of them are SelectLists, all other are normal Input or Outputfields. Please see these three fields:

<apex:column headerValue="Lager" >
               <apex:actionregion immediate="True">
                  <apex:selectList size="1" required="true" value="{!LP.selectedLagerStr}">
                   <apex:selectoptions value="{!LP.LagerSelectList}"/>
                  <apex:actionsupport action="{!changedLager}" event="onchange">
                  <apex:param name="LAG" assignto="{!applyLiPoslfdNr}" value="{!LP.LieflfdNr}"/>
                  </apex:actionsupport>
                  </apex:selectList>
               </apex:actionregion>
              </apex:column>
              <apex:column headerValue="Versandpartner" >
                <apex:actionregion immediate="True">
                  <apex:selectList size="1" required="true" value="{!LP.selectedVSPartnerStr}">
                   <apex:selectoptions value="{!LP.VersandPArtnerSelectList}"/>
                  <apex:actionsupport action="{!changedVersandPartner}" event="onchange">
                  <apex:param name="VSP" assignto="{!applyLiPoslfdNr}" value="{!LP.LieflfdNr}"/>
                  </apex:actionsupport>
                  </apex:selectList>
               </apex:actionregion>
              </apex:column>
<apex:column headerValue="HKZ">
               <apex:actionregion immediate="True">
                  <apex:inputfield value="{!LP.LieferPos.HKZ__c}">
                  <apex:actionsupport action="{!changedHKZ}" event="onchange" rerender="tabpanel,geliefert,Bedarfe,BedarfBlock,Page-Messages">
                  <apex:param name="HKZ" assignto="{!applyLiPoslfdNr}" value="{!LP.LieflfdNr}"/>
                  </apex:actionsupport>
                  </apex:inputfield>
               </apex:actionregion>
              </apex:column>

If I first change one of the SelectList fields the parameter applyLiPoslfdNr is null. If I change then the last field, the parameter is set for this field and when changing now one of the other two fields the parameter is also set.
I checked the value field and that is not null. The method of the last field does nothing:

public PageReference changedHKZ() {
        if ( applyLiPoslfdNr != null ){
         system.debug ('########################### changed HKZ bei LiPos  ' + LiPosList_prop[applyLiPoslfdNr]);
        }
        return null;
    }.

Any ideas about this weird behaviour?

Thanks a lot
Harald
Ramu_SFDCRamu_SFDC
Use 'rerender' attribute in the action support and provide an id of the output panel that you want to rerender when this action support works.