You need to sign in to do that
Don't have an account?
Ajay Kumar 261
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.
Can any one help me to find the solution please?
Regards,
Ajay
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.
Can any one help me to find the solution please?
Regards,
Ajay
Regards,
Ajay