I have a page that iterates a list object to display the records. Once clicked on save, I updated the same list with new values and debug logs shows the update list but output panel is not rerender'ed and I dont see updated list on VF page.
<apex:outputLabel >A </apex:outputLabel>
<apex:inputfield id="idAText" value="{!ttlookup.A}" />
<apex:inputCheckbox id="checkBoxTMId" value="{!Acheckbox}"/>
<apex:outputLabel > Check if you want to clear all values
</apex:outputLabel>
<apex:commandButton id="btnSave" value=" Save " action="{!Save}" reRender="idPanel" />
<apex:outputPanel ID = "idPanel">
<div class="container">
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<apex:repeat value="{!ryList}" var="tt">
<tr>
<td>{!tt.name}</td>
<td>{!tt.Type__c}</td>
</tr>
</apex:repeat>
</tbody>
</table>
Controller code:
public void save(){
Boolean noUpdateFlag = false;
for(MyObjec ttry: ryList){
if(ttlookup.A !=null){
noUpdateFlag = true;
ttry.name = ttlookup.A;
}
if(Acheckbox){
noUpdateFlag = true;
ttry.name = null;
}
}
system.debug(ryList[0].B + ' noUpdateFlag '+noUpdateFlag);
try{
if(noUpdateFlag){
update ryList;
ApexPages.addmessage(new Apexpages.message(apexpages.severity.CONFIRM, 'records are saved.'));
}
else
ApexPages.addmessage(new Apexpages.message(apexpages.severity.Info, 'no value entered '));
}catch(Exception ex){
System.debug(ex);
ApexPages.addmessage(new Apexpages.message(apexpages.severity.Error, 'Something went wrong'));
}
}
and moreover when I add reRender = "id.." my apex messages are not displayed. I have no clue why :( any inputs please?
name , Type__c
in save method?