Skip to content
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

Support JSR-303 Bean Validation with faces:flow-builder-services [SWF-1494] #682

Closed
spring-operator opened this issue Sep 27, 2011 · 5 comments

Comments

@spring-operator
Copy link
Contributor

Nicolas Romanetti opened SWF-1494 and commented

It would be nice to be able to use bean validation from webflow when using JSF2.
See http://static.springsource.org/spring-webflow/docs/2.3.x/reference/html/ch05s10.html

But faces:flow-builder-services does not support the 'validator' attribute.

Note that from my view I often turn it off:
<f:validateBean disabled="true">
...
</f:validateBean>


Affects: 2.3.0

1 votes, 1 watchers

@spring-operator
Copy link
Contributor Author

Rossen Stoyanchev commented

Nicolas, why not use the JSR-303 support built into the JSF 2 lifecycle?

@spring-operator
Copy link
Contributor Author

Nicolas Romanetti commented

The built-in support is nice but when it is activated some part of my navigation, specially to subflow, is not as smooth as I'd like.

I end up with this choice:
choice 1) if the user enter some invalid data, he cannot do the transition to the subflow
choice 2) whatever data is entered, the user can do the transition to the subflow, but when he returns from the subflow all the entered data (valid and invalid) is lost.

What i'd like is instead:

  • transition can be done and when the user returns from the subflow, the entered data (valid or not) is still there.

I agree that my requirement may seem clumsy, but this is a real life scenario.

@spring-operator
Copy link
Contributor Author

Rossen Stoyanchev commented

So you want a way to suppress validation then? I.e. <transition ... validate="false" />

@spring-operator
Copy link
Contributor Author

Nicolas Romanetti commented

I disable it in the view using <f:validateBean disabled="true">.

At the flow level I enable/disable it depending on my need using <transition ... validate="false" />

But I realize, that for user that do not disable it in the view, the validation jsr303 validation would be run twice (assuming it passes).
It would be redundant.

I think you can close this issue. My workaround works for me (I do bean validation inside my XxxValidator.validate )

@spring-operator
Copy link
Contributor Author

David J. M. Karlsen commented

Any chance of getting this implemented? Would be especially useful for people still tied to JSF1.2 where there is no native JSR303 support.

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

No branches or pull requests

2 participants