> I agree totally, at the level were currenrly arguing,
> I dare anyone to disagree !
> 
> A good way to tackle this is Use Case by Use Case, to
> avoid talking in general terms.
> 
> 1) What specific tags have you or do you want to modify the 
> behaviour of.

Well, this is the thing...how would I know in advance? :)
Seriously. I have no idea what kind of requirements are
coming up next month.

An example of something we've done in the past is extending
Struts HTML tags to incorporate access control features
(read-only, write, mask sensitive info, etc.) While I wasn't
involved with that effort, I'm looking at the source code,
and it's done with copy-and-pasteing the old code and sprinkling
in the access control checks and changes to rendering the
value property. 90% of the code remains unchanged, but
we had to copy-and-paste the entire thing.

There is no other way to plug-in the access control
enhancements in the tags without doing that. And we didn't
feel like littering JSP code with logic tags.

That's probably the most drastic change I've ever personally
seen, but shows perfectly how impossible it is to extend
custom tags in any flexible way.

Personally I think the first priority should be on
ability to easily change how properties are rendered
and an ability to add new properties and render them
without having to copy-and-paste the entire code.

I wonder, if this could be done by keeping the
attributes and the details of how they're rendered
in some sort of Collection any tag that extends from
Struts tags could register (or change) things onto,
then dynamically render everything in the Collection
instead of hardcoding the rendering details in
doStartTag()? Don't ask me what that pattern would be,
I have no idea...Rule, Rule Engine? The kind of stuff
Digester uses.

The next thing on my personal list would be the ability
to add or change logic in tags, at any place. That should
be somewhat more of a challenge, I would think.

                                -TPP

-----------------------------------------
This email may contain confidential and privileged material for the sole use of the 
intended recipient(s). Any review, use, retention, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete all 
copies of this message.  Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive emails on the 
basis that we are not liable for any such corruption, interception, tampering, 
amendment or viruses or any consequence thereof.


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

Reply via email to