Hello Displaytag-Users,
i try to get the pageContext in the LongDateWrapper class from the examples.
I changed the class and it looks like this now:
(Therefore I also changed TableDecorator.java to "public abstact")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
package here.you.go.LongDateWrapper;
import this.and.that... ;
public class LongDateWrapper extends TableDecorator implements
ColumnDecorator
{
public LongDateWrapper()
{
super();
PageContext pageContext = getPageContext();
System.out.println("pageContextLDW "+ pageContext);
}
private FastDateFormat dateFormat =
FastDateFormat.getInstance("dd.MM.yyyy"); //$NON-NLS-1$
public final String decorate(Object columnValue)
{
Date date = (Date) columnValue;
if(date != null)
{
return this.dateFormat.format(date);
}
else
{
return "something else";
}
}
}
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
And my JSP calls the decorater with that:
<display:column property="date1" decorator="here.you.go.LongDateWrapper"
title="Birthday" sortable="true" />
Unfortunately the logfile says:
[18.11.05 09:11:58:203 CET] 226e89dd SystemOut O pageContextLDW null
Has andybody an idea how to get this working?!
Thanks
Best regards
Tobias-Win
--
Highspeed-Freiheit. Bei GMX supergünstig, z.B. GMX DSL_Cityflat,
DSL-Flatrate für nur 4,99 Euro/Monat* http://www.gmx.net/de/go/dsl
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user