Hi ,

I am using the following code to format the date in my display tag

<display:column headerClass="myclass" property="submittedDate" title="DATE
SUBMITTED" decorator="org.displaytag.sample.LongDateWrapper" />    which
displays the date like '12/22/2005 00:00'

I don't need this format . Instead ,I want to extend the decorator and
create my own . For that , I'm using

import java.text.SimpleDateFormat;

import org.displaytag.decorator.TableDecorator;


public class DateDecorator extends TableDecorator{

      public DateDecorator(){
            super();
            System.out.println("Date decorator constructor called...");
      }

      public String getSubmittedDate(Object obj){

            SimpleDateFormat sdf = new SimpleDateFormat();
            sdf.applyPattern("MM/dd/yyyy");
            System.out.println("In getSubmittedDate()...");
            String date = sdf.format(obj);
            System.out.println("Formatted date is ::"+date);

            return date;



      }

}


but at runtime it gives me the classcast exception saying that
class DateDecorator could not be loaded .

Kindly guide me through it .




Thanks and Regards,
Pranav Parikh


Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information. If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited. If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments. Thank you



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to