OK, Drew Davidson released version 2.3.0, and as promised, it included huge
speed improvements as well as way to convert values _back_ when getting
them. This is exactly what we need in WebWork in the future, so I think we
should plan on using Ognl for setting/getting bean attributes:

Total time (OGNL): 2464
Total time (OGNL compiled): 100
Total time (WebWork BeanUtil): 180
Total time (Commons-BeanUtils): 121
-------------------------------------------
Demonstrating type conversion the other way
-------------------------------------------
Since this was input as MM/dd/yyyy, we expect it back that way too
02/12/1982
If the property value is an int[], let's print it out sensibly (using
OSCore)
10, 20

The code that converts the types "the other way" is below:
Ognl.getValue("blah", context, o, String.class);
Ognl.getValue("baz", context, o, String.class);

So as you can see, our view layer would just grab values using the correct
class as the type to convert to. So for JSP and Velocity this is always
String.class, but other view technologies could begin to use other types of
data conversion.


-Pat



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to