I'm having trouble with OGNL outputting date values from a database
read. Date fields in my object get populated with Timestamp objects (a
sql specific subclass of Date). If I try to output field "dateLogged" on
object "myObject" using the following call,
$!{ognl.findValue("dateLogged", $myObject)}
I don't get any type conversion. Note that this expression is in
velocity, meaning that "$ognl" refers to the webwork OgnlTool class
(under util). It makes the following call:

return Ognl.getValue(OgnlUtil.compile(expr), context);

(OgnlUtil is an xwork specific class).

It doesn't appear that this uses the xwork conversion properties at all,
even though those properties specifically contain conversion information
for Date fields. The xwork framework doesn't appear to get called at all
for output conversion, although it does get called by OgnlUtil when
setting properties. 

Is this an oversight, or am I missing something? As it is, I'm
completely stuck because Ognl is ALWAYS converting the value to a
string, which for date display is pretty useless.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to