-
1. Re: Are there javascript event hooks for client side validation?
sivaprasad9394 Jun 20, 2012 1:23 AM (in response to sparrowhawk)You can use h:message
OR
h:outputtext text diaplay with the "rendered" attribute set some value in Backend and display the text and change the color to red using style tag.
OR
You can use Jquery for validation for javascript.So for that you have to integrate it with Richfaces.
-
2. Re: Are there javascript event hooks for client side validation?
sparrowhawk Jun 20, 2012 9:10 AM (in response to sivaprasad9394)I'm not following you. I'm not having an issue getting text to display that turns red. That is easily accomplished by using rich:message:
<h:inputText value="#{bean.property}" id="textField">
<rich:validator oncomplete="myCustomFunction()" />
</h:inputText>
<rich:message for="textField" />
Server side doesn't help me because I'm looking to achieve everything client side (thus rich:validator). I also don't want to write custom jquery validations -- the whole beauty of rich:validator is that you can define bean validations once and enjoy them at all levels -- all the way to the client's browser. But what I do need is a way to hook into the event model in the CSV classes to expand the presentation of errors to include a div that wraps multiple fields. This can be accomplished if there is a way to define "myCustomFunction()" to be executed after the CSV routine.
Thanks for any help.