Hi,
I hope this is the right place to ask this question, since it is a combined hibernate validation and JSF issue!
I'm using the hibernate validation mechanism in my SEAM-based Webapplication to validate the entered text in a JSF textarea and to asynch. rerender any messages based on the validation result.
No Problems here, everything works!
Furthermore, I want to use the validation result to render other components on the page (e.g. the submit-button of the form). And here is the problem, it does not work!
I tried to use the attribute of my entity which is bount to the textarea and only render (or enable) the submit-button, when the text is not null or empty (rendered="not empty ...").
But it does not work since the datamodel is not updated, when the hibernate validation fails!
So, for example: When I enter some text and then leave the textarea, then delete the text and leave the textarea again, the hibernate validation fails (as expected) but my "button-render-validation" remains in true-state.
My question is: what can I do to force the update of the datamodel, even if the validation fails (the "bypassupdate" attribute does not work)? I also tried to use a flag in my Controller-Bean! However, this seems to be no solution, since I also have to check against the entity-attribute (whether it is null or not).
I'm using Hibernate 3.0.0 GA with Richfaces 3.2.2 GA in a Seam 2.1.0 environmet.
I really need to solve this problem!
Best regards
|