Re: looping on a list of lists (or accessing custom attributes of a list)
Luca Passani <[email protected]>
| Newsgroups | gmane.comp.jakarta.taglibs.user |
|---|---|
| Message-ID | <[email protected]> |
Martin Cooper wrote:
>
>
> Hmm... ;-)
>
> Two suggestions:
>
> 1) Instead of extending ArrayList, just encapsulate it. In other
> words, add
> a property to LinkWithIconList for the list, so that you can access
> the list
> explicitly using ${sub_list.list} or something. This seems like the
> simplest
> approach.
yeah, this is what I ended up doing. It works, thanks. I was just
wondering if I was missing something.
>
> 2) The Unstandard taglib in the Taglibs sandbox has an 'instanceOf'
> tag that
> might be useful to you.
this crossed my mind too, but I was a bit worried about the performance
of "instanceOf" in Java.
I know that premature optimization is the root of all evil, but this app
I am working on must deal with a lot of list manipulation....
thank you, Martin.
Luca