You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2012/05/25 10:55:47 UTC
svn commit: r1342533 - in /myfaces/tobago/trunk:
tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/
tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/
Author: lofwyr
Date: Fri May 25 08:55:47 2012
New Revision: 1342533
URL: http://svn.apache.org/viewvc?rev=1342533&view=rev
Log:
Cleanup: Using correct type values for buttons.
Added:
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlButtonTypes.java
- copied, changed from r1342527, myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlInputTypes.java
Modified:
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlInputTypes.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyShuttleRenderer.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java
Copied: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlButtonTypes.java (from r1342527, myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlInputTypes.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlButtonTypes.java?p2=myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlButtonTypes.java&p1=myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlInputTypes.java&r1=1342527&r2=1342533&rev=1342533&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlInputTypes.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlButtonTypes.java Fri May 25 08:55:47 2012
@@ -17,20 +17,13 @@ package org.apache.myfaces.tobago.render
* limitations under the License.
*/
-public final class HtmlInputTypes {
+public final class HtmlButtonTypes {
- public static final String TEXT = "text";
- public static final String PASSWORD = "password";
- public static final String CHECKBOX = "checkbox";
- public static final String RADIO = "radio";
- public static final String SUBMIT = "submit";
- public static final String RESET = "reset";
- public static final String FILE = "file";
- public static final String HIDDEN = "hidden";
- public static final String IMAGE = "image";
public static final String BUTTON = "button";
+ public static final String RESET = "reset";
+ public static final String SUBMIT = "submit";
- private HtmlInputTypes() {
-
+ private HtmlButtonTypes() {
+ // prevent creating objects
}
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlInputTypes.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlInputTypes.java?rev=1342533&r1=1342532&r2=1342533&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlInputTypes.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlInputTypes.java Fri May 25 08:55:47 2012
@@ -31,6 +31,6 @@ public final class HtmlInputTypes {
public static final String BUTTON = "button";
private HtmlInputTypes() {
-
+ // prevent creating objects
}
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java?rev=1342533&r1=1342532&r2=1342533&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java Fri May 25 08:55:47 2012
@@ -17,11 +17,6 @@ package org.apache.myfaces.tobago.render
* limitations under the License.
*/
-/*
- * Created 07.02.2003 16:00:00.
- * $Id$
- */
-
import org.apache.myfaces.tobago.component.Attributes;
import org.apache.myfaces.tobago.component.UIButton;
import org.apache.myfaces.tobago.config.Configurable;
@@ -33,6 +28,7 @@ import org.apache.myfaces.tobago.renderk
import org.apache.myfaces.tobago.renderkit.css.Classes;
import org.apache.myfaces.tobago.renderkit.css.Style;
import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
+import org.apache.myfaces.tobago.renderkit.html.HtmlButtonTypes;
import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
import org.apache.myfaces.tobago.renderkit.html.HtmlInputTypes;
import org.apache.myfaces.tobago.renderkit.html.util.CommandRendererHelper;
@@ -122,7 +118,7 @@ public class ButtonRenderer extends Comm
private String createButtonType(UIComponent component) {
boolean defaultCommand = ComponentUtils.getBooleanAttribute(component, Attributes.DEFAULT_COMMAND);
- return defaultCommand ? HtmlInputTypes.SUBMIT : HtmlInputTypes.BUTTON;
+ return defaultCommand ? HtmlButtonTypes.SUBMIT : HtmlButtonTypes.BUTTON;
}
@Override
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyShuttleRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyShuttleRenderer.java?rev=1342533&r1=1342532&r2=1342533&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyShuttleRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyShuttleRenderer.java Fri May 25 08:55:47 2012
@@ -24,8 +24,8 @@ import org.apache.myfaces.tobago.renderk
import org.apache.myfaces.tobago.renderkit.css.Classes;
import org.apache.myfaces.tobago.renderkit.css.Style;
import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
+import org.apache.myfaces.tobago.renderkit.html.HtmlButtonTypes;
import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
-import org.apache.myfaces.tobago.renderkit.html.HtmlInputTypes;
import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
import org.apache.myfaces.tobago.util.ComponentUtils;
@@ -160,7 +160,7 @@ public class SelectManyShuttleRenderer e
private void createButton(FacesContext context, UIComponent component, TobagoResponseWriter writer,
boolean disabled, String label, String sub) throws IOException {
writer.startElement(HtmlElements.BUTTON, null);
- writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.BUTTON, false);
+ writer.writeAttribute(HtmlAttributes.TYPE, HtmlButtonTypes.BUTTON, false);
writer.writeClassAttribute(Classes.create(component, sub));
writer.writeIdAttribute(component.getClientId(context) + ComponentUtils.SUB_SEPARATOR + sub);
writer.writeAttribute(HtmlAttributes.DISABLED, disabled);
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java?rev=1342533&r1=1342532&r2=1342533&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java Fri May 25 08:55:47 2012
@@ -422,6 +422,7 @@ public abstract class ToolBarRendererBas
writer.startElement(HtmlElements.SPAN, command);
writer.writeClassAttribute(Classes.create(toolBar, "menu"));
writer.writeStyleAttribute(menuStyle);
+ // todo: span has not type: use data-tobago-type here (TOBAGO-1004)
writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.BUTTON, false);
writer.writeAttribute(HtmlAttributes.ONCLICK, menuClick, true);
}