This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See welcome thread
Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Recursivity with custom tag  RSS feed

Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I'm trying to deal with Data structure which contains recursivity.
The aim is to display this structure in a web page using a custom tag.
I suppose it's a common situation but I'm not really familiar with TagLib.
Suppose your data structure is something like:
- fisrName
- lastName
- list of Person

This is not a problem to create a custom tag that generate the output in a recursive way
containing all the presentation logic (I mean html code).
Of course I don't find this approach beautiful.
So my question is: is it possible to do this in a more generic way with the tag lib.
With some nested tag. One that iterate et put the data into the request, the other taking this data
and siplay it on the screen.
I don't really get how I can do recursivity with the return EVAL_BODY_INCLUDE.
Any solutions or hints are welcome.
Hey cool! They got a blimp! But I have a tiny ad:
ScroogeXHTML 7.2 - RTF to HTML5 / XHTML converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!