You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Mike Jasnowski <mj...@bea.com> on 2003/10/27 19:01:55 UTC

BaseHandlerTag and getName(), getProperty()

Greetings,

 I was curious if what (if any) particular reason there is that
BaseHanderTag doesn't define getName() and getProperty(), which seemingly
most form tags need. The scenario that's prompted this question is an tag
extension scenario. In a particular instance I want to set the value of the
"styleId" attr to a default value, but can't do so using code like this:

 ((BaseFieldTag)tag).setStyleId((BaseFieldTag)tag).getProperty())

because tags like CheckboxTag and RadioTag don't extend BaseFieldTag, but
BaseHandlerTag. Likewise if I cast them to BaseHandlerTag, the getProperty()
is unavailable. The code above is invoked in a utility before the Struts Tag
is rendered, somewhat like a decorator.

Just another general question is why the split between tags that extend
BaseFieldTag, and BaseHandlerTag. Why don't they just all extend
BaseFieldTag?

Thanks!
Mike

(P.S.) If there is some general concensus on any changes, I'm willing to
make them and submit patches myself, just wanted to get general impressions
first.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org