-
2. Intercept form validation and display using JGrowl
sainfy Feb 15, 2011 2:27 AM (in response to blabno)Wow looks good to me. I will integrate and give it a try tonight.
Thanks a lot Bernard
-
3. Intercept form validation and display using JGrowl
sainfy Feb 16, 2011 7:03 AM (in response to blabno)I can see the growling happening (its shows error image and no text) when my forms have validation error [straight out of the box]. But I can't seem to understand how I will pass some sort of warning message in the growl aka Notification to make it more meaningful.
I had a look at your code Greeter.java it adds the messages explicitly but my requirement is to show the validation errors in the notifications. Do you have suggestions on how I could achieve that.
Once again I really appreciate your help with this.
-
4. Re: Intercept form validation and display using JGrowl
blabno Feb 16, 2011 7:08 AM (in response to sainfy)Have you seen the demo?
http://bernard.labno.pl/notify-sample/
All the code is there.
All you need to do is to put this:
{code:xml}<notify:notifyMessages globalOnly="false" ajaxRendered="true"/> {code:xml}
-
5. Intercept form validation and display using JGrowl
sainfy Feb 16, 2011 8:21 AM (in response to blabno)ya doing exactly that. Just see the blank (just error image) in the growl. I am using corejsf validator (v1.0) commonsValidator tag to do the validation.
Tested it on another page with multiple fields the notification boxes show up for each validation error but without any message in them.
I have included the 3.3.3Final jar from your post in my web-inf/lib
I have updated the xhtml with
xmlns:notify="http://richfaces.org/sandbox/notify"
and included
<notify:notifyMessages globalOnly="false" ajaxRendered="true"/>
inside the <h:form id=".."> tag
-
6. Intercept form validation and display using JGrowl
blabno Feb 16, 2011 8:27 AM (in response to sainfy)Isn't it a matter of CSS? If this happens on ajax request then please post here ajax response (use FireBug), if not post page source (the lines with RichFaces.Notify(...) are interesting to me).
-
7. Intercept form validation and display using JGrowl
sainfy Feb 16, 2011 10:06 AM (in response to blabno)<div id="searchPage:j_id14"><div id="j_id1518">
<script type="text/javascript">//<![CDATA[
RichFaces.Notify({'styleClass':' rf\x2Dny\x2Derror'} );
//
//]]>
</script></div></div>
-
8. Intercept form validation and display using JGrowl
sainfy Feb 25, 2011 11:50 PM (in response to sainfy)<div class="rf-ny-co" style="min-height: 16px; ">
<div class="rf-ny-cl" style="cursor: pointer; visibility: hidden; ">
<span class="rf-ny-cl-ic"></span>
</div>
<div class="rf-ny-ic">
<span class=""></span>
</div>
<div class="rf-ny-tl" style="display: none; "></div>
<div class="rf-ny-te" style="display: none; "></div>
<div class="rf-ny-fcl"></div>
</div>
There is no error message content in the notification. What am I missing?
-
9. Intercept form validation and display using JGrowl
sainfy Feb 27, 2011 10:55 PM (in response to blabno)Worked out why it wasn't working.
If you are using required="true" in your validation without any specific validation rule for example:
<f:validateLongRange minimum="5" maximum="10"/> then your notify box will be empty.
I do not use specific rules when my form fields need required only validation. What can we do in that scenario?
-
10. Intercept form validation and display using JGrowl
blabno Feb 28, 2011 3:00 AM (in response to sainfy)Can you provide mavenized test case? I use required="true" only and it works.