Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

For some reason i cant seem to set the value of a apex:inputText into a controller.

<apex:inputText value="{!selectedAccounta}" id="selectedItemHidden"/>

The get/set is

public String selectedAccounta{get;set;}

debug statement in the controller returns null/the value is set in controller and not the value i changed. Interestingly, the value i set in the controller for selectedAccounta is displayed correctly. But any changes i make in the VF page is not reflected in the controller

I have done this hundred times before and everytime its worked..

Does anyone else have this issue?

share|improve this question
1  
You aren't swallowing any error messages, wrapping parts of the form in an action region or using immediate=true? –  Bob Buzzard May 30 '13 at 7:32
    
Would be helpful if you could post your entire code. –  swatkat May 30 '13 at 7:36
    
@BobBuzzard you were right... it was immediate = true which was causing the issue –  Prady May 30 '13 at 7:41
    
I'll add an answer to that effect then. –  Bob Buzzard May 30 '13 at 7:42

1 Answer 1

up vote 4 down vote accepted

This is usually one of three things I find:

  1. Areas of the page are being rerendered, but not a page messages component, and an required field is missing or a validation rule is failing. In this scenario the error will be swallowed and the page will remain unchanged.
  2. The form submission is using an action region, which excludes the input from the server side processing.
  3. The form submission component (e.g. commandbutton, actionfunction) has the immediate attribute set to true. This will bypass validation rules but also discard any input from the user.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.