> -----Original Message----- > From: Henri Yandell [mailto:bayard@;generationjava.com] > Sent: Friday, November 01, 2002 10:54 AM > > String Taglib [and all the Jakarta taglibs to my knowledge] > are not ELized > yet. > > JSP 2.0 will make all taglibs ELized, so the question on > whether to add > hacked in support for ELs to the taglibs is a bit up in the > air depending > on when JSP 2.0 is released, and how long this is going to be > before it's > released [I thought it would be soon, but hard to tell sometimes].
If there's interest in "EL-izing" certain non-ELed tag libraries, without changing the library (so the original library can still work in Servlet 2.2 environments), and you don't want to wait for JSP 2.0, you might consider using the strategy I used in building the Struts-EL tag library. All the tag classes in the Struts-EL tag library are subclasses of the corresponding class in the Struts tag library, and all of them look almost identical. In each one, the "doStartTag()" method calls a method called "evaluateExpressions()", which just has one block of almost identical code for each property of the tag, which just passes the current value of the property through the EL parser and into the "setter" method for the property. The only exception to this relatively clean mapping comes in if the property type is NOT "java.lang.String". If ONE of the base class properties is not String, then in order to use the same tag attribute name, you have to use a separate BeanInfo class (from the JavaBeans specification) to map from the same attribute name to a different property setter method. Then, you write a new TLD descriptor using the new class names, and you have an EL-ized tag library. You have to deploy the two jar files together, the new taglib and the original one. -- To unsubscribe, e-mail: <mailto:taglibs-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:taglibs-user-help@;jakarta.apache.org>