edgar wrote:
> It would really be nice :-) to add object orientation to the tld as the
> amount of time spent debugging missing / incorrect tld's is larger than
> it should be.  Also, the ability to specify default values would be nice
> as well.
> 
> My idea would be something like
> 
>       <tag>
>               <name>tagextendingtag</name>
>       <tagclass>org.apache.struts.taglib.TagExtendingTag</tagclass>
>               <bodycontent>JSP</bodycontent>
>               <attribute>
>                       <name>property</name>
>                       <required>false</required>
>                       <rtexprvalue>true</rtexprvalue>
>                       <default>mydefault</default>
>               </attribute>
>       <includeattibutes>[tldfilename]originaltagname</includeattibutes>
>       </tag>

XDoclet really makes childs play out of dealing with the headaches of 
deployment descriptors.  Here's what my LabelTag looks like:

/**
  * @jsp.tag name="label" bodycontent="empty"
  */
public class LabelTag extends MessageTag {
     public int doStartTag() throws JspException {
        // ...
     }

     /**
      * @jsp.attribute required="true"
      */
     public void setKey(String key) {
         super.setKey(key);
     }

}

The TLD entry is generated automatically for me.  Inheritance would be 
nice, and it would work if I put @tags on MessageTag and used Struts 
source code in my generation too, but thats not my source.

I do highly encourage the Struts committers to use XDoclet for TLD and 
documentation generation (but I guess if it ain't broke, don't fix it, eh?).

        Erik




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to