Per the spec, valid types are only "submit" and "reset":
http://java.sun.com/javaee/javaserverfaces/1.2/docs/tlddocs/h/commandButton.html
On 9/19/07, Gurkan Erdogdu <gurkanerdogdu_at_yahoo.com> 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?
>
> 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>
>
--
Jason Lee, SCJP
Software Architect -- Objectstream, Inc.
JSF RI Dev Team
http://blogs.steeplesoft.com