Primefaces JSF update after validation failed doesn't work

前端 未结 3 1207
小蘑菇
小蘑菇 2021-02-12 20:42

I have a problem with the validation of a and updating its content.

Basically when the inputText validation fails, it never gets updated

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-12 21:06

    This is the notorious case of 'input elements' (EditableValueHolders actually) that once validation has failed for them can never be updated again via AJAX re-rendering.

    See:

    1. JSF AJAX validation: execute="@this" render="@form" inconsistent depending on prior requests
    2. How can I populate a text field using PrimeFaces AJAX after validation errors occur?
    3. http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1060

    A work-around is to create an action listener that resets the components that are to be re-rendered. See the last page of this: http://community.jboss.org/message/620000

    If this behavior bothers you (I guess it does), then please don't hesitate to vote for JAVASERVERFACES_SPEC_PUBLIC-1060 and if possible leave a comment telling what you expected and why.

提交回复
热议问题