You need to sign in to do that
Don't have an account?
Adan Santos
Anyone, can help me?
<apex:inputField> not sending updated value to controller
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?
Could you please share full code of VFP which has Save Button action.
Thanks
Shashikant
Thank you, Shashikant, but I already solved this issue.
The problem was due to a duplicated inputField that was hidden with css, it wasn't visible on the page, but it was there... Therefore this second hidden input was the one controller was getting the old value.
Happy that you resolved your issue. It would be good if you could still post the full code and mentioned the cuase and resolution of problem. And then marked this post as resolved so others could be benefitted from it.
Thanks
Shashikant