3 Replies Latest reply on Oct 11, 2012 9:09 AM by neikius

    event after validation failure

    lucas84

      hi guys,


      I am trying to use event / observer model to implement some logic. I'd like to raise event immediately when validation fails for specific ui component, and pass this component to consumer of event. (it prevents from looking for that component in ui tree, or binding that component to seam component). I found that seam raises org.jboss.seam.validationFailed, but it takes place after validation phase has finished, so the consumer has to retreive that component and check whether it is valid or not. Is there any way to get notified immediately when validation fails for specific ui component.


      I will be greatefull for any help and advices

        • 1. Re: event after validation failure
          lvdberg

          You could do your validation within an action bean and raise the event within the code. for instance in a value change listener.


          Leo

          • 2. Re: event after validation failure
            lucas84

            it could work, but when the validation fails, value change listener isn't fired

            • 3. Re: event after validation failure
              neikius

              I am interested in having such an event too.

               

              I want to do some custom styling after validation, maybe some red borders or stars next to fields that failed validation.

               

              OnError event for example is triggered on ajax error. We need events for validation errors. Cannot find any mention of such thing existing. Is there a way of manually going over controls to see which failed validation?