I think one of the creators of displaytag weighed in on this quite some time ago, explaining that basically they didn't want to weigh displaytag down with data manipulation functions. It's not really a matter of creating a decorator. Just remove unwanted entries from the list before passing it to displaytag (or storing it as an attribute in whatever scope).
There are any number of ways to accomplish this, including creating a copy of the list that only contains the items you want in it (since lists contain objects by reference, the only extra weight is that of the list, since the objects in both lists are actually the same objects). You could also extend a list class, e.g. extend ArrayList as FilteredArrayList, with something allows you to create a filter on the list. Then you could create your list of items, stash it in the attributes, and displaytag would get a list that would only return those items that meet the filter criteria. I think creating a decorator is probably not such a good way to do this, though. Rick Herrick [EMAIL PROTECTED] > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:displaytag- > [EMAIL PROTECTED] On Behalf Of Ed Webb > Sent: Monday, May 29, 2006 6:58 AM > To: [email protected] > Subject: Re: [displaytag-user] Excluding entries from table > > > > Harakiri wrote: > > Hi list, > > > > is anyone aware of excluding entries from a table ? > > > > I.e. i have an arraylist with objects and i only want > > to show specific entries from that list. > > > > Is it possible to do this without writing an own > > decorator ? if that would be the case i had to do that > > for every table / listing i have. > > > > > > > You cannot do this using conditional tags within the display:table tag > as you found out. You will have to filter the list yourself before > passing it to displaytag to display. > > Ed! > > > _______________________________________________ > displaytag-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/displaytag-user _______________________________________________ displaytag-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/displaytag-user

