Hello Ilari,
thanks for your answer. Since there is apperently no ready-to-use
implementation to modify the column headers via a decorator or something
similar I made a workaround for my concern:
I simply doubled properties that I uses for the columns and save the values
without html encoding for the special characters.
(e.g.: Schlü ;ssel --> Schlüssel)
Since I only use Displaytag's export mechanism in my application (the
display of the data was prior implemented in another way), my aim was to use
only one property for both, web appearance and export. But copying the
properties works aswell.
Have a nice day!
Regads,
Bastian
2009/6/5 J Ilari Moilanen <[email protected]>
> Uh oh, I just remembered that code modifications took place after all. We
> changed the way displaytag handles internationalization. In the properties
> file we changed the class that handles it. Sorry for the false info.
>
> Regards,
> Ilari
>
> >
> > Hi
> > I use Struts 2 in this application (and the property file is Struts 2
> > property file) so I don't know if this helps you. But the following works
> > without code modifications (displaytag version 1.1.1).
> >
> > ...
> > <display:table export="true" uid="pack" name="packages" pagesize="1000"
> > class="dt-table" requestURI="arrivalList.action">
> > <display:column sortable="true" titleKey="label.study" property="
> study.name" />
> > <display:column sortable="true" titleKey="label.product" property="
> product.name" />
> > ...
> > </display:table>
> > ...
> >
> > Regards,
> > Ilari
> >
> >
> > > Date: Fri, 5 Jun 2009 08:52:02 +0200
> > > From: Bastian Pawlik <[email protected]>
> > > Reply-To: [email protected]
> > > To: [email protected]
> > > Subject: [displaytag-user] How to decorate the columnHeader,
> columnTitle?
> > >
> > > Good morning folks,
> > >
> > > I'm wondering if there is any possibility to decorate the column header
> > > itself?
> > >
> > > It's because of I am using the titleKey Attribute of the
> <display:column>
> > > Tag to retrieve the Columnheader from a property file
> > > Unfortunately some special characters (like ä, ö, ü in the german
> language)
> > > in the property file are html encoded like & auml; (without the
> whitespace).
> > >
> > > So I assumed that I could create a Decorator Class to modify the header
> and
> > > replace some characters in the title string. But the only Interface i
> found
> > > was the Displaytag ColumnDecorator. With the given "decorate" Method it
> > > seems that you can only modify the columnValue but not the
> columnHeader.
> > >
> > > If anyone of you has an idea how to encounter my problem, please let me
> > > know.
> > >
> > > By the way, for better understanding: this is a snippet of my current
> > > implementation
> > >
> > > {...}
> > > <fmt:setBundle basename="i18nProperty" />
> > > <display:table name="assetTreeBeans" export="true" requestURI=""
> > > decorator="path.to.my.displaytag.TableDecorator">
> > > <display:setProperty
> name="export.modifiedcsv.include_header"
> > > value="true" />
> > > <display:column property="Id" titleKey="property_id"/>
> > > <display:column property="productKey"
> > > titleKey="property_productKey"/>
> > > {...}
> > > </display:table>
> > >
> > > Thanks in advance & kind regards,
> > > Bastian
> > >
> >
> >
> >
> >
>
>
>
> --
>
> "Friends come and go, but enemies accumulate."
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> displaytag-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/displaytag-user
>
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user