New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<o:validateBean> should use locale of current request #466

Closed
hwellmann opened this Issue May 31, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@hwellmann

hwellmann commented May 31, 2018

Scenario

I have a form which combines field-level validations (using javax.validation annotations on a CDI managed bean) with cross-field validation via <o:validateBean>.

Expected Behaviour

All constraint violation message use the locale of the current request (ultimately derived from browser language settings).

Actual Behaviour

The field-level violation messages use the request locale (German in my case), whereas the cross-field violation messages use the server default locale (English in my case).

Notes

Tested on WildFly 12.0.0.Final with Omnifaces 2.6.8 and 3.1, using Oracle JDK 1.8.0_162.

It seems that Omnifaces does not use the javax.faces.validator.BeanValidator which adds a JsfAwareMessageInterpolator to the validation context.

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Jun 6, 2018

Member

Fixed in 2.7-SNAPSHOT.

Thank you for reporting and improving OmniFaces!

Member

BalusC commented Jun 6, 2018

Fixed in 2.7-SNAPSHOT.

Thank you for reporting and improving OmniFaces!

@BalusC BalusC closed this Jun 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment