Worked like a charm! And as a side effect I am half way to localizing my app :)
Thanks for the superfast reply. /Jonas -----Original Message----- From: Hani Suleiman [mailto:[EMAIL PROTECTED] Sent: Thursday, February 19, 2004 10:52 PM To: [EMAIL PROTECTED] Subject: Re: [OS-webwork] Rendering java.sql.Timestamp? The tag is actually incorrect. The right thing to do is: <ww:text name="'timestamp'" value0="timeStamp"/> then in your action i18n properties file: timestamp={0,date,yyyy-MM-dd HH:mm:ss} The idea being that you can have different ways of displaying time based on different locales etc. On Feb 19, 2004, at 4:48 PM, Larsson, Jonas wrote: > > Hmm I was too fast. > > When using this tag it seems WW also wants to find a i18n resource > that has > my formatting string as key! > The formatting works great but I get a stacktrace in > ActionSupport.getText() > ... > > Caused by: java.util.MissingResourceException: Can't find resource for > bundle java.util.PropertyResourceBundle, key {0,d ate,yyyy-MM-dd > HH:mm:ss} > at java.util.ResourceBundle.getObject(ResourceBundle.java:314) > at java.util.ResourceBundle.getString(ResourceBundle.java:274) > at webwork.action.ActionSupport.getText(ActionSupport.java:324) > ... 54 more > > My tag looks like this: > > <ww:text name="'{0,date,yyyy-MM-dd HH:mm:ss}'" value0="timeStamp"/> > > Where timeStamp is my java.sql.Timestamp property from the valuestack > object. > > Do I need to supply some kind if default properties file for this to > work? > > /Jonas > > -----Original Message----- > From: Larsson, Jonas > Sent: Thursday, February 19, 2004 9:42 PM > To: '[EMAIL PROTECTED]' > Subject: RE: [OS-webwork] Rendering java.sql.Timestamp? > > > > Now if found it! I found the reference to MessageFormat in the WW > docs, but > I did not realize that it was a standard Java class. I thought it was > a WW > class and thought I was crazy when I did not find it in the WW Javadoc > ... > > Well. It seems I learned something today too. Who would have thought > that ;) > > Thanks to all who came with helpful suggestions! > > /Jonas > > -----Original Message----- > From: Cuong Tran [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 19, 2004 8:59 PM > To: [EMAIL PROTECTED] > Subject: RE: [OS-webwork] Rendering java.sql.Timestamp? > > > > Not sure where the doc is, but it's using MessageFormat. Something > like > > <webwork:text name="'this is a date {0,date,yyyy/mm/dd} plus number > {1,number}'" value0="myDate" value1="1" .../> > > > --- "Larsson, Jonas" <[EMAIL PROTECTED]> wrote: >> >> I saw this last night when browsing the list archive. Where is this >> use of the text tag documented? I've looked in the wiki, the API docs >> and the Cookbook but I can't seem to >> find it... >> > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail SpamGuard - Read only the mail you want. > http://antispam.yahoo.com/tools > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and > deploy apps & Web services for Linux with a free DVD software kit from > IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > ---------------------------------------------------------------------- > - > ----- > -- > This message is intended only for the personal and confidential use of > the > designated recipient(s) named above. If you are not the intended > recipient > of this message you are hereby notified that any review, dissemination, > distribution or copying of this message is strictly prohibited. This > communication is for information purposes only and should not be > regarded as > an offer to sell or as a solicitation of an offer to buy any financial > product, an official confirmation of any transaction, or as an official > statement of Lehman Brothers. Email transmission cannot be guaranteed > to be > secure or error-free. Therefore, we do not represent that this > information > is complete or accurate and it should not be relied upon as such. All > information is subject to change without notice. > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and > deploy apps & Web services for Linux with a free DVD software kit from > IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > ---------------------------------------------------------------------- > - > ----- > -- > This message is intended only for the personal and confidential use of > the > designated recipient(s) named above. If you are not the intended > recipient > of this message you are hereby notified that any review, dissemination, > distribution or copying of this message is strictly prohibited. This > communication is for information purposes only and should not be > regarded as > an offer to sell or as a solicitation of an offer to buy any financial > product, an official confirmation of any transaction, or as an official > statement of Lehman Brothers. Email transmission cannot be guaranteed > to be > secure or error-free. Therefore, we do not represent that this > information > is complete or accurate and it should not be relied upon as such. All > information is subject to change without notice. > > > ---------------------------------------------------------------------- > - > ------- > This message is intended only for the personal and confidential use of > the > designated recipient(s) named above. If you are not the intended > recipient of > this message you are hereby notified that any review, dissemination, > distribution or copying of this message is strictly prohibited. This > communication is for information purposes only and should not be > regarded as > an offer to sell or as a solicitation of an offer to buy any financial > product, an official confirmation of any transaction, or as an official > statement of Lehman Brothers. Email transmission cannot be guaranteed > to be > secure or error-free. Therefore, we do not represent that this > information is > complete or accurate and it should not be relied upon as such. All > information is subject to change without notice. > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and > deploy apps & Web services for Linux with a free DVD software kit from > IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork ------------------------------------------------------------------------------ This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork