Thanks load for this it works.

Cheers
Mark

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ed
Webb
Sent: 12 June 2008 17:22
To: displaytag-user@lists.sourceforge.net
Subject: Re: [displaytag-user] Getting the content of ArrayLists without
the brackets

Hanlon, Mark wrote:
> Hello
>
> I have an object that has member variables which are arraylists. The
> ArrayLists just contain strings.
>
> I can display them in a table using Display tag no problem.
>
> However, whenever display tag shows the contents of the arraylists it
> has brackets around them.
>
> The container I am deploying onto is only at J2EE version 1.3 (so I
> can't use expression language and nested tables).
>
> Is there an easy way to get rid of the brackets (I am not absolutely
not
> allowed to use EL)?
>
>   
Yes. You can use a decorator. Either create a TableDecorator and write a

method with the same name as the method in your object that returns the 
List or create a ColumnDecorator and override the decorate method. You 
can then either iterate through the List to create a String of the 
contents or snip the brackets from the start and end of the toString() 
return value.

<http://displaytag.sourceforge.net/11/tut_decorators.html>

Ed!



------------------------------------------------------------------------
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user


Internet email is not to be treated as a secure means of communication.
SPSA monitors all internet email activity and content. This
communication is intended for the addressee(s) only. Please notify the
sender if received in error. Unauthorised use or disclosure of the
content may be unlawful. Opinions expressed in this document may not be
official policy. Thank you for your co-operation. SPSA.




Internet email is not to be treated as a secure means of communication. SPSA 
monitors all internet email activity and content. This communication is 
intended for the addressee(s) only. Please notify the sender if received in 
error. Unauthorised use or disclosure of the content may be unlawful. Opinions 
expressed in this document may not be official policy. Thank you for your 
co-operation. SPSA.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to