Ok....it is hard to help you out here. I'm not really a
java-programmer, but maybe someone else can? What does the
timelogList property refer to? I thought you would like to format the
date property?
Bard
----- Original Message -----
From: "Frances Aleah Z. de Guzman" <[EMAIL PROTECTED]>
Date: Thu, 7 Aug 2003 14:05:08 +0800
To: [EMAIL PROTECTED], B�rd Arve Evjen <[EMAIL PROTECTED]>
Subject: Re: [displaytag-user] TableDecorator: InvocationTargetException
> im afraid that didnt work either..the format method of SimpleDateFormat is
> acceptiong also a Date object
>
> On Thursday 07 August 2003 01:28 pm, B�rd Arve Evjen wrote:
> > Well, my guess is that the class should return a String and you are
> > handling with dates. Maybe if you changed "return
> > (this.datefmt.format(rep.getDate()))" to "return
> > (this.datefmt.format(rep.getDate()).toString())".
> >
> > Check your datatypes everywhere.
> >
> > Hope this get you on the way!
> >
> > Cheers,
> > Bard
> >
> > ----- Original Message -----
> > From: "Frances Aleah Z. de Guzman" <[EMAIL PROTECTED]>
> > Date: Thu, 7 Aug 2003 11:13:26 +0800
> > To: [EMAIL PROTECTED]
> > Subject: [displaytag-user] TableDecorator: InvocationTargetException
> >
> > > hi, im new in using display tag and i have a problem creating my own
> > > table decorator. i want to reformat the display of my dates but im
> > > getting this exception ....
> > > "InvocationTargetException trying to fetch property date on bean
> > > [EMAIL PROTECTED]". what seems to be the
> > > problem? please help me out here guys! thanks.
> > >
> > > my decorator looks like this:
> > >
> > > public class TimelogDecorator extends TableDecorator{
> > >
> > > private SimpleDateFormat datefmt = null;
> > > private SimpleDateFormat timeinfmt = null;
> > > private SimpleDateFormat timeoutfmt = null;
> > >
> > > /**
> > > * Creates a new Wrapper decorator who's job is to reformat some of the
> > > * data located in our TestObject's.
> > > */
> > >
> > > public TimelogDecorator()
> > > {
> > > super();
> > >
> > > // Formats for displaying dates and money.
> > >
> > > this.datefmt = new SimpleDateFormat( "MM/dd/yy" );
> > > this.timeinfmt = new SimpleDateFormat( "hh:mm a" );
> > > this.timeoutfmt = new SimpleDateFormat( "hh:mm a" );
> > > }
> > >
> > > /**
> > > * Returns the date as a String in MM/dd/yy format
> > > */
> > >
> > > public String getDate()
> > > {
> > > TimeLogReport rep = (TimeLogReport)this.getObject();
> > > return (this.datefmt.format(rep.getDate()));
> > > //return this.datefmt.format( ( (TimeLogReport)this.getObject()
> > > ).getDate() );
> > > }
> > >
> > > /**
> > > * Returns the date as a String in hh:mm a format
> > > */
> > >
> > > public String getTimein()
> > > {
> > > return
> > > this.timeinfmt.format(((TimeLogReport)this.getObject()).getTimein());
> > > }
> > >
> > > /**
> > > * Returns the date as a String in hh:mm a format
> > > */
> > >
> > > public String getTimeout()
> > > {
> > > /return this.timeoutfmt.format( ( (TimeLogReport)this.getObject()
> > > ).getTimeout() );
> > > }
> > >
> > > }
> > >
> > > and my jsp look like this:
> > >
> > > <display:table name="user" property="timelogList" width="100%"
> > > scope="session" decorator="com.ingenium.struts.TimelogDecorator">
> > > <display:column width="20%" property="date" title="Date"
> > > sort="true"/>
> > > <display:column width="10%" property="employeeId"
> > > title="Employee Id"
> > > sort="true"/>
> > > <display:column width="15%" property="employee.name"
> > > title="Name"/>
> > > <display:column width="15%" property="timein" title="Time-in"/>
> > > <display:column width="20%" property="timeout"
> > > title="Time-out"/>
> > > <display:column width="20%" property="wrksked" title="Work
> > > Schedule"/>
> > >
> > > <display:setProperty name="paging.banner.group_size" value="6"
> > > />
> > > <display:setProperty name="paging.banner.prev_label"
> > > value="Prev" />
> > > <display:setProperty name="paging.banner.next_label"
> > > value="Next" />
> > > </display:table>
> > >
> > > --
> > > Frances Aleah Z. De Guzman
> > > SA/Programmer
> > > Ingenium Technology, Inc.
> > > http://www.ingenium.com.ph
> > >
> > > Disclaimer :
> > > This message is intended only for the named recipient. If you are not the
> > > intended recipient you are notified that disclosing, copying,
> > > distributing or taking any action in reliance on the contents of this
> > > information is strictly prohibited.
> > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> > > Data Reports, E-commerce, Portals, and Forums are available now.
> > > Download today and enter to win an XBOX or Visual Studio .NET.
> > > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/
> > >01 _______________________________________________
> > > displaytag-user mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/displaytag-user
> >
> > -------------------------------------------------------
> > This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> > Data Reports, E-commerce, Portals, and Forums are available now.
> > Download today and enter to win an XBOX or Visual Studio .NET.
> > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> > _______________________________________________
> > displaytag-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/displaytag-user
>
> --
> Frances Aleah Z. De Guzman
> SA/Programmer
> Ingenium Technology, Inc.
> http://www.ingenium.com.ph
>
> Disclaimer :
> This message is intended only for the named recipient. If you are not the
> intended recipient you are notified that disclosing, copying, distributing
> or taking any action in reliance on the contents of this information is
> strictly prohibited.
>
>
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
displaytag-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-user