struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: expression validator
Date Fri, 29 Feb 2008 15:06:01 GMT
--- mojoRising <> wrote:
> Thanks. But I still don't understand...According to the link you mentioned
> it is not possible to do what I was trying to. So, what is the point of
> validator if it doesn't do client side validation? 

Because there are other places to do validation, like the server.

> And, are you saying that it is not possible to do a simple
> 'equals' test in client side validation? 
>  <validator type="expression">password.equals(password2)
>     <message>Passwords do not match</message> 
>    </validator> 

The expressions used by the expression validator [1] are OGNL-based
expressions, not JavaScript. It would be *possible*, but JavaScript !=OGNL,
and it's my assumption that nobody wanted to write a JavaScript library that
implements everything available in OGNL.

That said, I suppose one could take a DWR-like Java => JavaScript mapping
layer then write OGNL in JavaScript and hook the two up. I don't know what
the current status of the XWork validation framework re-thinking is, but I'm
sure if something like that was contributed we'd look at it.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message