Feature Requests item #683989, was opened at 2003-02-11 02:19
Message generated for change (Comment added) made by ianbdev
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=536616&aid=683989&group_id=73068

Category: None
Group: None
Status: Closed
Resolution: Wont Fix
Priority: 5
Submitted By: Thorbjoern Ravn Andersen (ravn)
Assigned to: Nobody/Anonymous (nobody)
Summary: <display:column format="dd-MMM-yyyy"> needed for date propt

Initial Comment:
We have a need for providing a formatstring for dates
as the default is not good enough.

I have a patch, which I am testing out.  If there is
interest I can upload it.

----------------------------------------------------------------------

Comment By: Ian Barnett (ianbdev)
Date: 2004-01-07 16:24

Message:
Logged In: YES 
user_id=461701

Great idea.

As a suggestion use of the MessageFormat class would allow 
for greater flexibility in formatting different object types such 
as numbers (e.g. currency formats are also very common in 
some apps).

----------------------------------------------------------------------

Comment By: andy pruitt (rapruitt)
Date: 2003-12-01 17:38

Message:
Logged In: YES 
user_id=573666

Text formatting is now typically being handled by the jsp
body of the column tag.

----------------------------------------------------------------------

Comment By: Thorbjoern Ravn Andersen (ravn)
Date: 2003-11-05 06:32

Message:
Logged In: YES 
user_id=14845

Have you timed this?  My experiments with this approach 
showed a substantional slowdown as noted earlier.

----------------------------------------------------------------------

Comment By: Tim Golden (luckynh)
Date: 2003-10-28 07:34

Message:
Logged In: YES 
user_id=704330

use a custom decorator:

/*
 * <p>Simple Date Format</p>
 * @author luckynh
 * @version 1.0 $Revision: .0 $ ($Author: luckynh $)
 */
 use a custom decorator:

import java.text.SimpleDateFormat;
import java.util.Date;
import org.apache.taglibs.display.ColumnDecorator;

public class ShortDateWrapper extends ColumnDecorator
{
     private SimpleDateFormat sdf = new SimpleDateFormat(
"MM/dd/yyyy" );
     
        public String decorate( Object columnValue )
          {
          Date t = (Date)columnValue;
          return sdf.format( t );
     }
}


----------------------------------------------------------------------

Comment By: Thorbjoern Ravn Andersen (ravn)
Date: 2003-08-11 22:38

Message:
Logged In: YES 
user_id=14845

I have now taken the time to merge the changes with the
latest source from CVS, and submit patch 786617.


----------------------------------------------------------------------

Comment By: Thorbjoern Ravn Andersen (ravn)
Date: 2003-08-07 21:37

Message:
Logged In: YES 
user_id=14845

I have now tried to upgrade my old source tree to be in
synch with the SF CVS, but Eclipse has some problems with
this.  When this is resolved, I will submit my patch which
is in production use here.

----------------------------------------------------------------------

Comment By: Thorbjoern Ravn Andersen (ravn)
Date: 2003-03-14 07:11

Message:
Logged In: YES 
user_id=14845

I have found that the Wrapper system is noticably slower
than just overriding the toString method.  Unfortunately, I
cannot do this in our scenario (objects come from JDBC).

I hope to have time to prepare the patch this week.



----------------------------------------------------------------------

Comment By: Didier Dubois (didier_dubois)
Date: 2003-03-06 19:41

Message:
Logged In: YES 
user_id=726985

I resolved the problem doing the following step:
 - using a patch similar to the one posted by scottnsmith. 
This allow null Date comparison
 - Using a bean returning a "Date" object (which is correctly 
compared by Java)
 - Using a DateWrapper for this column that returns the 
formated Date as a String.

HTH.

----------------------------------------------------------------------

Comment By: Didier Dubois (didier_dubois)
Date: 2003-03-06 02:29

Message:
Logged In: YES 
user_id=726985

YES!

I have the same problem. But further more I need to sort my 
table on this date. Do your pathc support this?

Didier

----------------------------------------------------------------------

Comment By: Matt Raible (mraible)
Date: 2003-02-14 23:51

Message:
Logged In: YES 
user_id=226669

I've subclassed Date and overridden the toString() method as 
a workaround.  I agreet that adding a format attribute is 
probably a better solution.  Please submit your patch.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=536616&aid=683989&group_id=73068


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to