-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate live validation in a JSF Application
PostPosted: Thu Apr 02, 2009 4:11 am 
Newbie

Joined: Thu Apr 02, 2009 3:57 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.