any reason, why the spec doesn't say, render as <button>blah</button> ?
-M
On 9/19/07, Ryan Lubke <Ryan.Lubke_at_sun.com> wrote:
> Gurkan Erdogdu wrote:
> > Hi,
> > When I want to add <h:commandButton type='button'>, renderer renders
> > it as submit button. Because of the following code in ButtonRenderer
> > encodeBegin method
> >
> > // Which button type (SUBMIT, RESET, or BUTTON) should we generate?
> > String type = (String) component.getAttributes().get("type");
> > String styleClass;
> > if (type == null || (!"reset".equals(type) &&
> > !"submit".equals(type))) {
> > type = "submit";
> > // This is needed in the decode method
> > component.getAttributes().put("type", type);
> > }
> >
> > Because type not reset and not submit always put submit type.
> >
> > Is it intentionally written like this?
> Yes. The renderkit docs [1] clearly state the valid values for the type
> attribute.
>
> [1]
> http://java.sun.com/javaee/javaserverfaces/1.2_MR1/docs/renderkitdocs/HTML_BASIC/javax.faces.Commandjavax.faces.Button.html
> >
> > Thanks
> > Gurkan
> >
> >
> >
> >
> >
> > ------------------------------------------------------------------------
> > Shape Yahoo! in your own image. Join our Network Research Panel today!
> > <http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>
--
Matthias Wessendorf
further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org