im resending my problem again, i think u guys didnt receive it.

im new in using display tags and im having problems creating my own decorator. 
i created a TimelogDecorator that extends tabledecorator and i have a 
business object TimeLogReport, i have a collection of TimeLogReport in my jsp 
and im encoutering this exception...."InvocationTargetException trying to 
fetch property date on bean [EMAIL PROTECTED]". by 
the way, im using struts. please help me guys, i would really appreciate it. 
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 looks 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

Reply via email to