Remove immediate="true"
from your eventHandler
.
Every event supports two options for bypassing validation (see this answer more more details). Note that in Per's answer, the eventHandler
includes the attribute assignment disableValidators="true"
. This maps to the "Process data without validation" option, whereas immediate="true"
maps to the "Do not validate or update data" option.
When this latter option is used, the event runs without pushing any updates to the data model (i.e. document), which is why the value of your edit box is null
even if the user has populated a value. If you replace immediate="true"
with disableValidators="true"
, your event will still run without triggering any validation failures, but the data model will contain any value the user populated in the edit box.