Author: nbelaevski
Date: 2011-01-31 11:27:30 -0500 (Mon, 31 Jan 2011)
New Revision: 21333
Modified:
trunk/ui/core/ui/src/main/java/org/richfaces/renderkit/html/CommandButtonRendererBase.java
Log:
https://issues.jboss.org/browse/RF-10115
Modified:
trunk/ui/core/ui/src/main/java/org/richfaces/renderkit/html/CommandButtonRendererBase.java
===================================================================
---
trunk/ui/core/ui/src/main/java/org/richfaces/renderkit/html/CommandButtonRendererBase.java 2011-01-31
15:51:46 UTC (rev 21332)
+++
trunk/ui/core/ui/src/main/java/org/richfaces/renderkit/html/CommandButtonRendererBase.java 2011-01-31
16:27:30 UTC (rev 21333)
@@ -24,6 +24,7 @@
package org.richfaces.renderkit.html;
import java.io.IOException;
+import java.util.Locale;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -31,6 +32,8 @@
import org.richfaces.renderkit.AjaxCommandRendererBase;
+import com.google.common.base.Strings;
+
/**
* @author Nick Belaevski
*
@@ -54,8 +57,8 @@
writer.writeAttribute("alt", value, "value");
}
} else {
- if (null != type) {
- writer.writeAttribute("type", type.toLowerCase(),
"type");
+ if (!Strings.isNullOrEmpty(type)) {
+ writer.writeAttribute("type", type.toLowerCase(Locale.US),
"type");
} else {
writer.writeAttribute("type", "submit",
"type");
}