I have developed a set of three tags to provide a parameterized include (or template) mechanism that is essentially an extension of the struts bean taglib.

(Overview)

* The include tag specifies a file to be included (like the bean include tag).

* The param tag allows named parameters to be given values, which may come from a name 
attribute (referencing a JSP bean), a value attribute, or JSP content.

* The getParam tag, used in the included file, specifies which named parameters to import into page attributes, and what their default values are.

* Normal bean:write tags are used to access the parameters in page attributes.

(Motivation)

I am aware of many other include and template mechanisms, but none of them do quite what I want. The main unique feature of this taglib is that the parameters of the include may be given values from the JSP content of the param tag. This allows much easier composition of pages than the alternatives. Only XSL's named templates have the equivalent power. I have an in-depth writeup of the requirements and design that I would be happy to share with anyone interested.

(Requirements)

This taglib doesn't require much (probably any JSP/Java) but it effectively requires 
use of the struts bean tags (particularly bean:write).

(Commitment)

We have used these tags at work (ProfitLogic) for almost two years, allowing us to 
factor out all common HTML into template files.  I have been given permission to 
release this work, with the hope that Apache struts (or Jakarta?) will adopt it.   
There is more work that logically should be done, but we did not need to do more for 
ourselves.

I'd suggest that these tags should be incorporated into an existing taglib because it 
is such a small set on its own, and it fits in stylistically with the bean and logic 
taglibs.  I don't expect I would be a very active contributor to the taglibs-dev 
outside of my interest in getting this taglib adopted in some form.

Please let me know if you are interested.

Daniel LaLiberte
[EMAIL PROTECTED]

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



Reply via email to