7

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?

6

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.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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