type button for ButtonRenderer

From: Yann Simon <>
Date: Thu, 30 Aug 2007 09:24:43 +0200


I'm using JSF ri 1.2_04.
I wanted to create a input of type button.

But the code does not let that:
ButtonRenderer, l. 143:
        // 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);

The comment let us forsee that we can use the type button, but the
code lets only submit and reset.

Was the "button" type removed on purpose? Why?

I just ended by writting my own ButtonRenderer, but I found this
solution "overengineer" :) just for an input of type button.