Open javaserverfaces opened 8 years ago
Reported by mwalliczek
mwalliczek said: Environment: Apache Deltaspike 1.5.4, Primefaces 5.3.5, Omnifaces 2.2
zhangxinyuan said: Hi, Can you provide a test war application for this bug?
Was assigned to ZhangXinyuan
This issue was imported from java.net JIRA JAVASERVERFACES-4122
Please see this important message regarding community contributions to Mojarra.
https://javaee.groups.io/g/jsf-spec/message/30
Also, please consider joining that group, as that group has taken the place of the old dev@javaserverfaces.java.net mailing list.
Thanks,
Ed Burns
I have the same issue. f:ajax even is not necessary to reproduce it. Affected version 2.3.3.
@Getter @Setter private transient HtmlInputText myField;
public void validate(final FacesContext context, final UIComponent component, Object value) {...}
When validate is called, myField has 2 validators attached, instead of only 1. After each submit another additional vaildator is appended - using javax.faces.view.ViewScoped.
Only MethodExpression validators seem to be affected!
This usually happens when the binding
attribute incorrectly references a bean which is not in the request scope. In other words, this usually only happens when the whole physical component tree is incorrectly saved in the HTTP session and shared across multiple HTTP requests. This is against the recommendations in JSF specification. See also https://stackoverflow.com/q/14911158/157882
When using Bean validation, component binding and ajax together, the validation is added at every ajax call to the validator list of the component. This results in multiple calls and displaying the validation message multiple times.
Example:
Affected Versions
[2.2.12]