Happy new year!

A question regarding commandButtons.
I noticed that the attribute type="button" is not working anymore.

type="button" is rendered with myfaces 1.1.5.
type="submit" is rendered with myfaces 1.2.8.

Is this expected behavior according to spec or is it a bug?

myfaces 1.2.8
org.apache.myfaces.shared_impl.renderkit.html.HtmlButtonRendererBase.encodeEnd()
Line 116:
String type = getType(uiComponent);
if (type == null || !isReset(uiComponent))
{
    type = HTML.INPUT_TYPE_SUBMIT;
}

myfaces 1.1.5
String type = getType(uiComponent);
if (type == null) {
    type = HTML.INPUT_TYPE_SUBMIT;
}

Type "submit" is set now if type is not Reset!

Same is true for 
org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlButtonRendererBase.encodeEnd()

Workarounds are obvious:
a) patch HtmlButtonRendererBase locally and remove isReset check
b) add 'return false;' to the onclick attributes of all these buttons
c) write html directly

Question:
Should I create a Jira issue for this or is this working correctly in myfaces 
1.2.8 and was a bug in myfaces 1.1.5?

Michael

Reply via email to