After running around and crawling the web, I have my main issue back again on my desk.
Please, help me to undertand if there is a solution to my ancient problem.
The scenario in quite simple:
- jsf 1.2
Two required input text, rollo and job1.
An a4j:commandButton that updates the value oh the backing bean property linked to rollo input text.
It works fine: the button updates the backing bean and the input text on the page shows the updated value.
BUT when I submit the form and I trigger a validation error of a component JOB1 on the, the a4j:commandButton updates only the backing bean and not the field on the page. Indeed, if the component with validation problem is the one designed to be updated by the ajax call, IT WORKS. But if ANY other component is invalid, the ajax button can update only the backing bean and not the component. Maybe after the submit something happens that block the update. Losing my head, sorry.
is there a logic reason for that behaviour? Is there a workaround?
JSF does not permit partial updating of a bean where only valid items update. If any item selected for update is invalid, the backing bean will not be updated.
Normally, that means all property references on the submitted form. When using AJAX (a4j), you can limit the properties that are submitted/validated if you desire. However, you have not done this, so all properties will be submitted and subjected to validation.
When a backing bean property is updated using a4j, its value will only update on the View if the id of the control that displays its value has been included in a reRender request.
Customer surveys are for companies who didn't pay proper attention to begin with.