I think there is room for a tag that uses OGNL. OGNL gets used by tapestry
and WebWork2. Perhaps yet another validator rule could use the BSF
(BeanScriptingFramework) this would allow the validate expression to be
written in Rhino (JavaScript for Java), Jython (Python for Java), BeanShell,
Perl and more. I think using BSF would be nice. You could have the client
and server side validation using the same JavaScript code. I am willing to
contribute the above as well as write a rule that uses BSF and OGNL.
Having equalivent client side and servide side validtaion would be very nice ! One of the
changes in the 1.1.X series of commons-validator is moving the Javascript part of validations
from struts to commons-validator. However, now those validations need to be unit tested,
and I have just started looking at jsunit for this. Originally the Validation code for Java and Javascript
were almost line for line identical. Now there are many differences between them so maintance
is complicated. I would be open to using a common set of validation routines. I believe the Mozilla
license and the Apache License is fairly compatable so creating a dependancy on Rhino shouldn't
impact users of Struts.
I just took a very quick look at OGNL it looks interesting, though I am confused, probably becasue I
haven't taken the time to look at all the docs or examples. It says
*
A binding language between GUI elements (textfield, combobox, etc.) to model objects. Transformations are made easier by OGNL's TypeConverter mechanism to convert values from one type to another (String to numeric types, for example).
Does this mean BeanUtils would not be used to introspect loading/unloading values to/from
ActionForm elements. I am not against this, or for it just want to assess the impact.
Also there are alot of new terms here I am not familar with seems to require
BeanScriptingFramework requires JRuby which I am also not familar with...
This is a General suggestion you have probably given many times yourself
First off then if this is something you would find useful for your work then do create the tag
and develop the code. That way you would have a personal investment in it and continue to improve
and maintain it. Then maybe I would be able to see the entire impact on Struts/commons-validator.
Sorry for such a shorty answer, I am interested.
-Rob
Thoughts?
--Rick Hightower