You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kirby Vandivort <kv...@ks.uiuc.edu> on 2003/04/08 17:31:13 UTC
printing object through bean:message
I have a 'Date' object that I'm wanting to print via the JSP page.
In Husted's book, on page 419 he mentions that you can say something like:
detected.ufo = At {2,time,short} on {2,date,long} etc
where a date is passed to the template via:
new ActionMessage("detected.ufo", blah, new Date()).. etc..
What sort of syntax do I need to use to do localization on a Date (or
any other java object, for that matter) if I'm not using an ActionMessage.
I'm iterating over a list, where each item in the list is a bean that
has a date accessible via getDate().
So, the ideal thing would be able to say, in the jsp page..
<bean:message key="detected.ufo" arg2= << something here >> />
But I haven't been able to figure out what the 'something here' needs to
be to actually get it to work. The only thing I've found that works
so far is:
<bean:write name="iteraterow" property="date">
which gives me no control over how the object gets printed and doesn't
use the resource string at all.
Any clues on what I'm doing wrong and how I can do it right?
Thanks!
--
Kirby Vandivort Theoretical and Computational Biophysics
Email: kvandivo@ks.uiuc.edu 3051 Beckman Institute
http://www.ks.uiuc.edu/~kvandivo/ University of Illinois
Phone: (217) 244-5711 405 N. Mathews Ave
Fax : (217) 244-6078 Urbana, IL 61801, USA
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org