• Adan Santos
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hello guys, I'm having a weird behavior with <apex:inputField>...

When the page loads, it receives the value from a Map variable on from it's controller, but when i change the value and click the SAVE button, it's value doesn't get updated. When debug the Map variable still has its original values.

VF:
 

<apex:pageBlockSection id="pbsModalidade" columns="1" title="{!segmento.Codigo__c} {!segmento.Nome_Segmento__c}" collapsible="true">
            <apex:inputField value="{!objetivosMP[grupo.id].Meta__c}" rendered="{!NOT chancelar}"></apex:inputField>
</apex:pageBlockSection>
 


Controller: 
 

public Map<Id, Objetivo__c> objetivosMP {get; set;}

public void save() {
      for (Id idGrupo: objetivosMP.keyset()){
            System.debug('objectives ' + objetivosMP.get(idGrupo));
      }
}

Anyone, can help me?

Hello guys, I'm having a weird behavior with <apex:inputField>...

When the page loads, it receives the value from a Map variable on from it's controller, but when i change the value and click the SAVE button, it's value doesn't get updated. When debug the Map variable still has its original values.

VF:
 

<apex:pageBlockSection id="pbsModalidade" columns="1" title="{!segmento.Codigo__c} {!segmento.Nome_Segmento__c}" collapsible="true">
            <apex:inputField value="{!objetivosMP[grupo.id].Meta__c}" rendered="{!NOT chancelar}"></apex:inputField>
</apex:pageBlockSection>
 


Controller: 
 

public Map<Id, Objetivo__c> objetivosMP {get; set;}

public void save() {
      for (Id idGrupo: objetivosMP.keyset()){
            System.debug('objectives ' + objetivosMP.get(idGrupo));
      }
}

Anyone, can help me?