You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Hubert Rabago <ja...@yahoo.com> on 2004/02/09 18:28:14 UTC

Re: Browser-specific attrs for html tags (was: [Bug 26795])

This probably won't be the last request for an attribute which turns out to
be browser specific.  Perhaps the html taglib can include some mechanism to
allow developers to add other attributes.  There *are* times when it makes
sense to use browser-specific extensions.  Some applications, for instance,
are targetted to specific browsers (like intranet apps).  Some apps require
functionality which would dictate the use of such features.  By requiring tag
subclasses, Struts doesn't make it easy to take advantage of browser-specific
features.

While the html taglib shouldn't include every attribute of every tag of every
browser on the face of the planet, perhaps some generic way of adding
attributes might be acceptable.  something like

<html:sometag custom="browserspecific1=value1 browserspecific2=\"value 2\""/>


...or args="" / attrs="" / whatever that the html:tag can render as-is.


Another option would be:

<html:sometag ...>
    <html:attr name="browserspecific1" value="value1"/>
    <html:attr name="browserspecific2" value="value 2"/>
</html:sometag>

...though the code to implement this might require some considerable
refactoring of the existing tag classes.


- Hubert


--- bugzilla@apache.org wrote:
> DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
> RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
> <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26795>.
> ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
> INSERTED IN THE BUG DATABASE.
> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26795
> 
> adding href to html:button tag
> 
> Joe@Germuska.com changed:
> 
>            What    |Removed                     |Added
>
----------------------------------------------------------------------------
>              Status|NEW                         |RESOLVED
>          Resolution|                            |INVALID
> 
> 
> 
> ------- Additional Comments From Joe@Germuska.com  2004-02-09 16:41 -------
> By design, Struts tags only emit valid HTML 4.01.  According to the spec,
> 'href' is not a valid attribute of 
> BUTTON.
> 
> http://www.w3.org/TR/REC-html40/interact/forms.html#edef-BUTTON
> 
> Nothing stopping you from subclassing the tag and adding another property
> though!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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


Re: Browser-specific attrs for html tags (was: [Bug 26795])

Posted by Martin Cooper <ma...@apache.org>.
On Mon, 9 Feb 2004, Hubert Rabago wrote:

> This probably won't be the last request for an attribute which turns out to
> be browser specific.  Perhaps the html taglib can include some mechanism to
> allow developers to add other attributes.  There *are* times when it makes
> sense to use browser-specific extensions.  Some applications, for instance,
> are targetted to specific browsers (like intranet apps).  Some apps require
> functionality which would dictate the use of such features.  By requiring tag
> subclasses, Struts doesn't make it easy to take advantage of browser-specific
> features.
>
> While the html taglib shouldn't include every attribute of every tag of every
> browser on the face of the planet, perhaps some generic way of adding
> attributes might be acceptable.  something like
>
> <html:sometag custom="browserspecific1=value1 browserspecific2=\"value 2\""/>

If you check the archives, you'll find that there has been considerable
discussion on this in the past, and that I vetoed it in the past. I will
continue to veto a change such as this, or the alternative below for the
same reasons - we support HTML 4.01 attributes, no more, and no less.

--
Martin Cooper


>
>
> ...or args="" / attrs="" / whatever that the html:tag can render as-is.
>
>
> Another option would be:
>
> <html:sometag ...>
>     <html:attr name="browserspecific1" value="value1"/>
>     <html:attr name="browserspecific2" value="value 2"/>
> </html:sometag>
>
> ...though the code to implement this might require some considerable
> refactoring of the existing tag classes.
>
>
> - Hubert
>
>
> --- bugzilla@apache.org wrote:
> > DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
> > RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
> > <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26795>.
> > ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
> > INSERTED IN THE BUG DATABASE.
> >
> > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26795
> >
> > adding href to html:button tag
> >
> > Joe@Germuska.com changed:
> >
> >            What    |Removed                     |Added
> >
> ----------------------------------------------------------------------------
> >              Status|NEW                         |RESOLVED
> >          Resolution|                            |INVALID
> >
> >
> >
> > ------- Additional Comments From Joe@Germuska.com  2004-02-09 16:41 -------
> > By design, Struts tags only emit valid HTML 4.01.  According to the spec,
> > 'href' is not a valid attribute of
> > BUTTON.
> >
> > http://www.w3.org/TR/REC-html40/interact/forms.html#edef-BUTTON
> >
> > Nothing stopping you from subclassing the tag and adding another property
> > though!
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> >
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing online.
> http://taxes.yahoo.com/filing.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>

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


Re: Browser-specific attrs for html tags (was: [Bug 26795])

Posted by Martin Cooper <ma...@apache.org>.
On Mon, 9 Feb 2004, David Graham wrote:

>
> --- Joe Germuska <Jo...@Germuska.com> wrote:
> > At 9:28 AM -0800 2/9/04, Hubert Rabago wrote:
> > >This probably won't be the last request for an attribute which turns
> > out to
> > >be browser specific.  Perhaps the html taglib can include some
> > mechanism to
> > >allow developers to add other attributes.
> >
> >
> > You can always subclass the tag and change the TLD file.  This seems
> > like a much simpler solution to me.
>
> +1
>
> And for the record I am a big -1 on changing Struts tags to support
> non-standard HTML.  IMO, if you want to support just IE (which is
> invariably the cause for these type of requests), you shouldn't get any
> help from Struts.

+1. Or is that -1. How does one support a -1? ;-) For once, "I agree with
you" seems to be a somewhat more concise way of saying what I mean. :-)

--
Martin Cooper


>
> David
>
> >
> > Joe
> >
> >
> > --
> > Joe Germuska
> > Joe@Germuska.com
> > http://blog.germuska.com
> >        "Imagine if every Thursday your shoes exploded if you tied them
> > the usual way.  This happens to us all the time with computers, and
> > nobody thinks of complaining."
> >              -- Jef Raskin
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> >
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing online.
> http://taxes.yahoo.com/filing.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>

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


Re: Browser-specific attrs for html tags (was: [Bug 26795])

Posted by David Graham <gr...@yahoo.com>.
--- Joe Germuska <Jo...@Germuska.com> wrote:
> At 9:28 AM -0800 2/9/04, Hubert Rabago wrote:
> >This probably won't be the last request for an attribute which turns
> out to
> >be browser specific.  Perhaps the html taglib can include some
> mechanism to
> >allow developers to add other attributes.
> 
> 
> You can always subclass the tag and change the TLD file.  This seems 
> like a much simpler solution to me.

+1 

And for the record I am a big -1 on changing Struts tags to support
non-standard HTML.  IMO, if you want to support just IE (which is
invariably the cause for these type of requests), you shouldn't get any
help from Struts.

David

> 
> Joe
> 
> 
> -- 
> Joe Germuska            
> Joe@Germuska.com  
> http://blog.germuska.com    
>        "Imagine if every Thursday your shoes exploded if you tied them 
> the usual way.  This happens to us all the time with computers, and 
> nobody thinks of complaining."
>              -- Jef Raskin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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


Re: Browser-specific attrs for html tags (was: [Bug 26795])

Posted by Joe Germuska <Jo...@Germuska.com>.
At 9:28 AM -0800 2/9/04, Hubert Rabago wrote:
>This probably won't be the last request for an attribute which turns out to
>be browser specific.  Perhaps the html taglib can include some mechanism to
>allow developers to add other attributes.


You can always subclass the tag and change the TLD file.  This seems 
like a much simpler solution to me.

Joe


-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
       "Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining."
             -- Jef Raskin

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