0 Replies Latest reply on Jul 11, 2007 8:27 AM by tynor

    Client side validation: how to update input-widget error mes

    tynor

      I have a facelets-based form with some client side javascript validation for which, on error, I'd like to cause the associated input widgets to display with "error" style and show a field-specific error message -- as would happen for server-side validation.

      For this particular validation, it's more convenient for me to do the validation on the client side, rather than invoking a server side validator, but I can't find a way to get the client-side javascript to update the "error state" so that the form field can be rerendered and display the error.

      I've looked at the seam-gen generated Edit.xhtml, and see the use of "#{invalid ? ...}", but I can't find an example of JavaScript being used for client-side validation and how to set appropriate input widget level error messages. Can it be done? How?

      SEAM 1.2.1-GA
      RichFaces 3.0.1
      Ajax4jsf 1.1.1

      Thanks!