You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Paul Benedict <pb...@apache.org> on 2007/06/29 21:14:52 UTC

s1: FormTag/OptionTag

Does anyone know why FormTag and OptionTag do not inherit from 
BaseHandlerTag?

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


Re: s1: FormTag/OptionTag

Posted by Paul Benedict <pb...@apache.org>.
I propose adding a superclass to BaseHandlerTag because all W3C 
form-related elements (that's more than input fields) share a "common 
attributes" ... so I want the new superclass to be the basis for the 
FormTag and OptionTag too, so that I don't have to hardcode the same 
properties. I would then push those common attributes from 
BaseHandlerTag to the new class.

Paul

Niall Pemberton wrote:
> On 6/29/07, Paul Benedict <pb...@apache.org> wrote:
>> Does anyone know why FormTag and OptionTag do not inherit from
>> BaseHandlerTag?
>
> I don't know because I wasn't around at the start when these classes
> were being developed. I'd hazard a guess though - most of the html
> tags are geared around form field elements (text, textarea, checkbox
> etc) which share alot of common attributes - and are defined in
> BaseHandlerTag to avoid repetition. Looking at form tag - it doesn't
> share many of those and so it makes no sense to inherit from a base
> class that defines them all. The same is true for option tag.
>
> Niall
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>


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


Re: s1: FormTag/OptionTag

Posted by Niall Pemberton <ni...@gmail.com>.
On 6/29/07, Paul Benedict <pb...@apache.org> wrote:
> Does anyone know why FormTag and OptionTag do not inherit from
> BaseHandlerTag?

I don't know because I wasn't around at the start when these classes
were being developed. I'd hazard a guess though - most of the html
tags are geared around form field elements (text, textarea, checkbox
etc) which share alot of common attributes - and are defined in
BaseHandlerTag to avoid repetition. Looking at form tag - it doesn't
share many of those and so it makes no sense to inherit from a base
class that defines them all. The same is true for option tag.

Niall

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