after learning how to write a TagLib (I call them JSP components, but thats
because I'm warped after using WebObjects for so long), I started porting
some of my WebObjects components. this is the result. enjoy. or not. i
dont care either way, really :)
- HSTagLibDescriptor [TLD]
- TLD file (required!) for the tags below.
- HSTable [Tag] [TagExtraInfo]
- Dynamically builds a table. Iterates through a collection, builds a
table with configurable row colors, heights, widths, etc, sending the
current object back to the parent. Quite nice. Needs the TEI class
too, since items are exchanged with the parent.
- HSString [Tag]
- Not-quite-full replacement for Struts' bean:write tag. Does most things
that bean:write does, but has a problem with items that are in the
page's context... or something like that. You'll know it when it happens.
I havent been able to track it down. But anyway... you can pass off
a date format string (ala SimpleDateFormat) and, assuming the object
you wish to print is a Date or Calendar, it'll be formatted just like
you want it to. Also provides for trimming text, useful in search
results where you only want to show, say, the first 80 chars of a
500-char description. You can even add your own elipses! WOW!
- HSRepetition [Tag] [TagExtraInfo]
- Basically like WORepetition, or Struts' logic:iterate. Provides for
looping (eg "keep going until you've gone 10 times"). This tag
will be basically trash once the JSTL
is finalized and released.