From: Wendy Smoak <[EMAIL PROTECTED]>
From: "Gary Cauthon" <[EMAIL PROTECTED]>
> Using HTML, I can create a button using this syntax:
> <button name="removeButton" value="1">remove</button>
> <button name="removeButton" value="2">remove</button>
>
> So how do I
> do this with the struts html:button tag? As far as I can tell, it just
> renders an tag of type "input" that does nothing when you click it.
> Do I need to write it myself via a taglib?
Struts <html:button> does render an <input> tag, not a <button> tag.
http://struts.apache.org/userGuide/struts-html.html#button
I can't say why we don't have something that renders <button>. It's in the
HTML 4.01 specification so I don't think there would be any objection to
adding it if someone wanted to. (Though what would we call it?)
Back to your issue... if the content isn't dynamic, you can just use
<button> directly. If it is dynamic, you can embed a <c:out> tag for the
values... or just an expression if you're on a JSP 2.0 container.
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I wrote my own tag only to find out that this is one big area where IE
violates the HTML standards. It doesn't make "type=submit" the default even
though the spec says it should. And IE always submits what is between the
<button></button> tags rather than the "value=" attribute. It also submits
every single button on the page even though you only clicked on one. Maybe
the Struts developers saw all of this and decided it wasn't worthwhile to
implement this feature. Sort of like what I just did. :)
-Gary
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]