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
Ajay Kumar 261Ajay Kumar 261 

Apex Reapt and Wrapper Class issue

<tbody>
                                                               <apex:repeat value="{!wrapList}" var="e">
                                                                  <tr>                                                                                                                          
                                                                      <td>{!e.eng.name}</td>                                                            
                                                                      <td><apex:outputText value="{!e.eng.Learning_Community__r.Name}" id="lc"/></td> 
                                                                      <td> 
                                                                          <apex:selectList value="{!e.selectedLC}" size="1">
                                                                              <apex:actionSupport event="onchange" action="{!refreshPage}" rerender="lc"  />   
                                                                              <apex:selectOptions value="{!e.selectedCLC}"/>                                                                                                                                       
                                                                          </apex:selectList>                                                                
                                                                      </td>  
                                                                      <td><apex:outputText value="{!e.eng.Learning_Community__r.Track__c}" id="track" /></td>  
                                                                      <td> 
                                                                          <apex:selectList id="trackv" value="{!e.selectedNTrack}" size="1">
                                                                           <apex:actionSupport event="onchange" action="{!refreshPage}" rerender="track" />
                                                                              <apex:selectOptions value="{!e.selectedTrack}"/>
                                                                          </apex:selectList>
                                                                      </td>                         
                                                                  </tr>
                                                               </apex:repeat>                                             
                                                        </tbody>

Controller metod:
public void refreshPage(){
     
     for(WrapperClass wr: wrapList){ 
            wr.eng.Learning_Community__r.Track__c = wr.selectedNTrack;              
            wr.eng.Learning_Community__r.Name = lcOptionsMap.get(wr.selectedLC);                         
         }
 }

The problem is:

As you can see in the screenshot, the last record's value is assigned to the first record for some reason. I hink I am doing some silly mistake. 

User-added image
Can any one help me to find the solution please?

Regards,
Ajay
Best Answer chosen by Ajay Kumar 261
Ajay Kumar 261Ajay Kumar 261
Got it resolved by using apex:param 

Regards,
Ajay