You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by aw...@apache.org on 2007/08/04 03:08:43 UTC

svn commit: r562637 - in /myfaces/trinidad/trunk/trinidad/trinidad-impl/src: main/java/org/apache/myfaces/trinidadinternal/agent/ main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ main/resources/META-INF/agent/ test/resources/org/apac...

Author: awiner
Date: Fri Aug  3 18:08:41 2007
New Revision: 562637

URL: http://svn.apache.org/viewvc?view=rev&rev=562637
Log:
TRINIDAD-85: PDAs: "icon" attribute on commandButton does not work
- Patch from Piyush Hari, slightly cleaned up (in particular, fixed handling of disabled icon commandButtons in patch)

Modified:
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/TrinidadAgent.java
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/CommandButtonRenderer.java
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/blackberry4.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/htmlBasic.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/pocketie.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/pocketie03.xml
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/commandButton-minimalPPC-golden.xml

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/TrinidadAgent.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/TrinidadAgent.java?view=diff&rev=562637&r1=562636&r2=562637
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/TrinidadAgent.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/TrinidadAgent.java Fri Aug  3 18:08:41 2007
@@ -31,6 +31,9 @@
   static public final CapabilityKey CAP_DOM =
           CapabilityKey.getCapabilityKey("dom", true);
 
+  static public final CapabilityKey CAP_ONCLICK_IMG_INPUT =
+          CapabilityKey.getCapabilityKey("-adfinternal-onclickOnImgInput", true);
+            
   static public final CapabilityKey CAP_XMLDOM =
           CapabilityKey.getCapabilityKey("-adfinternal-xmldom", true);
 

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/CommandButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/CommandButtonRenderer.java?view=diff&rev=562637&r1=562636&r2=562637
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/CommandButtonRenderer.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/CommandButtonRenderer.java Fri Aug  3 18:08:41 2007
@@ -1,271 +1,314 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
-
-import java.io.IOException;
-
-import java.util.Collections;
-import java.util.List;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-
-import org.apache.myfaces.trinidad.bean.FacesBean;
-import org.apache.myfaces.trinidad.bean.PropertyKey;
-import org.apache.myfaces.trinidad.component.core.nav.CoreCommandButton;
-import org.apache.myfaces.trinidad.context.RenderingContext;
-
-public class CommandButtonRenderer extends CommandLinkRenderer
-{
-  public CommandButtonRenderer()
-  {
-    this(CoreCommandButton.TYPE);
-  }
-
-  protected CommandButtonRenderer(FacesBean.Type type)
-  {
-    super(type);
-  }
-
-  @Override
-  protected void findTypeConstants(FacesBean.Type type)
-  {
-    super.findTypeConstants(type);
-    _iconKey = type.findKey("icon");
-  }
-
-
-  @Override
-  public boolean getRendersChildren()
-  {
-    return true;
-  }
-
-  @Override
-  protected void encodeAll(
-    FacesContext        context,
-    RenderingContext    arc,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
-  {
-    if (getPartialSubmit(bean))
-    {
-      AutoSubmitUtils.writeDependencies(context, arc);
-    }
-
-    String clientId = getClientId(context, component);
-    // Make sure we don't have anything to save
-    assert(arc.getCurrentClientId() == null);
-    arc.setCurrentClientId(clientId);
- 
-    boolean useButtonTag = useButtonTags(arc);
-    String element = useButtonTag ? "button" : "input";
-    ResponseWriter rw = context.getResponseWriter();
-    rw.startElement(element, component);
-    renderId(context, component);
-
-    // Write the text and access key
-    String text = getText(bean);
-    String icon = getIcon(bean);
-
-    if (useButtonTag)
-      rw.writeAttribute("type", getButtonType(), null);
-    else if (icon != null)
-      rw.writeAttribute("type", "image", null);
-    else
-      rw.writeAttribute("type", getInputType(), null);
-
-    if (getDisabled(bean))
-    {
-      rw.writeAttribute("disabled", Boolean.TRUE, "disabled");
-      // Skip over event attributes when disabled
-      renderStyleAttributes(context, arc, bean);
-    }
-    else
-    {
-      renderAllAttributes(context, arc, bean);
-    }
-
-    char accessKey;
-    if (supportsAccessKeys(arc))
-    {
-      accessKey = getAccessKey(bean);
-      if (accessKey != CHAR_UNDEFINED)
-      {
-        rw.writeAttribute("accesskey",
-                          Character.valueOf(accessKey),
-                          "accessKey");
-      }                   
-    }
-    else
-    {
-      accessKey = CHAR_UNDEFINED;
-    }
-
-    if (useButtonTag)
-    {
-      AccessKeyUtils.renderAccessKeyText(context,
-                                         text,
-                                         accessKey,
-                                         SkinSelectors.AF_ACCESSKEY_STYLE_CLASS);
-      if (icon != null)
-        OutputUtils.renderImage(context, arc, icon, null, null, null,
-                                getShortDesc(bean));
-    }
-    else
-    {
-      if (icon != null)
-      {
-        renderEncodedResourceURI(context, "src", icon);
-      }
-      else
-      {
-        rw.writeAttribute("value", text, "text");
-      }
-    }
-
-    rw.endElement(element);
-
-    arc.setCurrentClientId(null);
-  }
-
-  protected String getButtonType()
-  {
-    return "button";
-  }
-
-  protected String getInputType()
-  {
-    return "submit";
-  }
-    
-  protected boolean useButtonTags(RenderingContext arc)
-  {
-    return (supportsScripting(arc) &&
-            supportsAdvancedForms(arc) &&
-            supportsIntrinsicEvents(arc));
-            
-  }
-
-  /**
-   * Override to return any state-based (selected, disabled, etc.)
-   * CSS style markers.  HINT: use an immutable, cached List<String>
-   * for better performance.
-   */
-  protected List<String> getStateStyleClasses(
-    FacesContext        context,
-    RenderingContext arc,
-    FacesBean           bean)
-  {
-    if (getDisabled(bean))
-      return _DISABLED_STATE_LIST;
-    return null;
-  }
-
-  // FIXME: move this implementation to XhtmlRenderer
-  @Override
-  protected void renderStyleAttributes(
-    FacesContext        context,
-    RenderingContext    arc,
-    FacesBean           bean,
-    String              defaultStyleClass) throws IOException
-  {
-    String styleClass = getStyleClass(bean);
-    // -= Simon =-
-    // FIXME: How come inline style is never read locally?
-    // String inlineStyle = getInlineStyle(bean);
-    List<String> stateStyleClasses = getStateStyleClasses(context, arc, bean);
-
-    if ((styleClass==null) && 
-        (defaultStyleClass != null) && 
-        (stateStyleClasses == null))
-    {
-      renderStyleClass(context, arc, defaultStyleClass);
-    }
-    else
-    {
-      List<String> parsedStyleClasses = OutputUtils.parseStyleClassList(styleClass);
-      int userStyleClassCount;
-      if (parsedStyleClasses == null)
-        userStyleClassCount = (styleClass == null) ? 0 : 1;
-      else
-        userStyleClassCount = parsedStyleClasses.size();
-
-      int numStates =   ((stateStyleClasses != null) ? 
-                         stateStyleClasses.size() : 0);
-      int numClasses = userStyleClassCount +
-                        ((defaultStyleClass != null) ? 1 : 0) +
-                        numStates;
-      if (numClasses > 0)
-      {
-        // set all the styleClasses in one array so we can pass it to 
-        // renderStyleClasses
-        String[] styleClasses = new String[numClasses];
-        
-        int i=0;
-        if (parsedStyleClasses != null)
-        {
-          while (i < userStyleClassCount)
-          {
-            styleClasses[i] = parsedStyleClasses.get(i);
-            i++;
-          }
-        }
-        else if (styleClass != null)
-        {
-          styleClasses[i++] = styleClass;
-        }
-        if (defaultStyleClass != null)
-          styleClasses[i++] = defaultStyleClass;
-         
-        for (int j=0; j < numStates; j++, i++)
-        {
-          styleClasses[i] = stateStyleClasses.get(j);
-        }        
-
-        renderStyleClasses(context, arc, styleClasses);         
-      }
-    }
-
-    String style = getInlineStyle(bean);
-    if (style != null)
-    {
-      context.getResponseWriter().writeAttribute("style",
-                                                 style,
-                                                 "inlineStyle");
-    }
-  }
-
-  @Override
-  protected String getDefaultStyleClass(FacesBean bean)
-  {
-    return SkinSelectors.AF_COMMAND_BUTTON_STYLE_CLASS;
-  }
-
-  protected String getIcon(FacesBean bean)
-  {
-    return toUri(bean.getProperty(_iconKey));
-  }
-
-  private PropertyKey _iconKey;
-
-  static private final List<String> _DISABLED_STATE_LIST =
-    Collections.singletonList(SkinSelectors.STATE_DISABLED);
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
+
+import java.io.IOException;
+
+import java.util.Collections;
+import java.util.List;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.apache.myfaces.trinidad.bean.FacesBean;
+import org.apache.myfaces.trinidad.bean.PropertyKey;
+import org.apache.myfaces.trinidad.component.core.nav.CoreCommandButton;
+import org.apache.myfaces.trinidad.context.RenderingContext;
+
+import org.apache.myfaces.trinidadinternal.agent.TrinidadAgent;
+
+public class CommandButtonRenderer extends CommandLinkRenderer
+{
+  public CommandButtonRenderer()
+  {
+    this(CoreCommandButton.TYPE);
+  }
+
+  protected CommandButtonRenderer(FacesBean.Type type)
+  {
+    super(type);
+  }
+
+  @Override
+  protected void findTypeConstants(FacesBean.Type type)
+  {
+    super.findTypeConstants(type);
+    _iconKey = type.findKey("icon");
+  }
+
+
+  @Override
+  public boolean getRendersChildren()
+  {
+    return true;
+  }
+
+  @Override
+  protected void encodeAll(
+    FacesContext        context,
+    RenderingContext    arc,
+    UIComponent         component,
+    FacesBean           bean) throws IOException
+  {
+    if (getPartialSubmit(bean))
+    {
+       AutoSubmitUtils.writeDependencies(context, arc);
+    }
+
+    String clientId = getClientId(context, component);
+    // Make sure we don't have anything to save
+    assert(arc.getCurrentClientId() == null);
+    arc.setCurrentClientId(clientId);
+ 	
+    ResponseWriter rw = context.getResponseWriter();
+    String icon = getIcon(bean);
+
+    //if icon is set, render as an image element within a link element
+    //since "buttons" html element is not supported and "input" element of
+    //type=image does not support "onClick" JS handler.
+    if((icon != null) && !_supportsOnClickOnImgInput(arc)) 
+    {
+      if(!getDisabled(bean))
+      {
+        rw.startElement(XhtmlConstants.LINK_ELEMENT, component);
+        renderEncodedActionURI(context, XhtmlConstants.HREF_ATTRIBUTE, "#");
+        rw.writeAttribute(XhtmlConstants.ONCLICK_ATTRIBUTE, 
+                           getOnclick(bean), null);
+        rw.startElement("img", component);
+        renderAllAttributes(context, arc, bean);
+        renderEncodedResourceURI(context, "src", icon);
+        rw.endElement("img");
+        rw.endElement(XhtmlConstants.LINK_ELEMENT);
+      }    
+      else
+      {
+        //If disabled attribute is set on PDAs for commandButtons set as icon,
+        //render a static image
+        rw.startElement("img",component);
+        renderAllAttributes(context, arc, bean);
+        renderEncodedResourceURI(context, "src", icon);
+        rw.endElement("img");
+      }
+    } 
+    else
+    {
+      boolean useButtonTag = useButtonTags(arc);
+      String element = useButtonTag ? "button" : "input";
+      rw.startElement(element, component);
+      renderId(context, component);
+
+      // Write the text and access key
+      String text = getText(bean);
+      
+      if (useButtonTag)
+        rw.writeAttribute("type", getButtonType(), null);
+      else if (icon != null)
+        rw.writeAttribute("type", "image", null);
+      else
+        rw.writeAttribute("type", getInputType(), null);
+
+      if (getDisabled(bean))
+      {
+        rw.writeAttribute("disabled", Boolean.TRUE, "disabled");
+        // Skip over event attributes when disabled
+        renderStyleAttributes(context, arc, bean);
+      }
+      else
+      {
+        renderAllAttributes(context, arc, bean);
+      }
+
+      char accessKey;
+      if (supportsAccessKeys(arc))
+      {
+        accessKey = getAccessKey(bean);
+        if (accessKey != CHAR_UNDEFINED)
+        {
+          rw.writeAttribute("accesskey",
+                             Character.valueOf(accessKey),
+                             "accessKey");
+        }                   
+      }  
+      else
+      {
+        accessKey = CHAR_UNDEFINED;
+      }
+      if (useButtonTag)
+      {
+        AccessKeyUtils.renderAccessKeyText(context,
+                                           text,
+                                           accessKey,
+                                           SkinSelectors.AF_ACCESSKEY_STYLE_CLASS);
+        if (icon != null)
+          OutputUtils.renderImage(context, arc, icon, null, null, null,
+                                    getShortDesc(bean));
+      } 
+      else
+      {
+        if (icon != null)
+        {
+          renderEncodedResourceURI(context, "src", icon);
+        }
+        else
+        {
+          rw.writeAttribute("value", text, "text");
+        }
+      }
+ 
+      rw.endElement(element);
+      arc.setCurrentClientId(null);
+    }
+  }
+
+  protected String getButtonType()
+  {
+    return "button";
+  }
+
+  protected String getInputType()
+  {
+    return "submit";
+  }
+    
+  protected boolean useButtonTags(RenderingContext arc)
+  {
+    return (supportsScripting(arc) &&
+            supportsAdvancedForms(arc) &&
+            supportsIntrinsicEvents(arc));
+            
+  }
+
+  /**
+   * Override to return any state-based (selected, disabled, etc.)
+   * CSS style markers.  HINT: use an immutable, cached List<String>
+   * for better performance.
+   */
+  protected List<String> getStateStyleClasses(
+    FacesContext        context,
+    RenderingContext arc,
+    FacesBean           bean)
+  {
+    if (getDisabled(bean))
+      return _DISABLED_STATE_LIST;
+    return null;
+  }
+
+  // FIXME: move this implementation to XhtmlRenderer
+  @Override
+  protected void renderStyleAttributes(
+    FacesContext        context,
+    RenderingContext    arc,
+    FacesBean           bean,
+    String              defaultStyleClass) throws IOException
+  {
+    String styleClass = getStyleClass(bean);
+    // -= Simon =-
+    // FIXME: How come inline style is never read locally?
+    // String inlineStyle = getInlineStyle(bean);
+    List<String> stateStyleClasses = getStateStyleClasses(context, arc, bean);
+
+    if ((styleClass==null) && 
+        (defaultStyleClass != null) && 
+        (stateStyleClasses == null))
+    {
+      renderStyleClass(context, arc, defaultStyleClass);
+    }
+    else
+    {
+      List<String> parsedStyleClasses = OutputUtils.parseStyleClassList(styleClass);
+      int userStyleClassCount;
+      if (parsedStyleClasses == null)
+        userStyleClassCount = (styleClass == null) ? 0 : 1;
+      else
+        userStyleClassCount = parsedStyleClasses.size();
+
+      int numStates =   ((stateStyleClasses != null) ? 
+                         stateStyleClasses.size() : 0);
+      int numClasses = userStyleClassCount +
+                        ((defaultStyleClass != null) ? 1 : 0) +
+                        numStates;
+      if (numClasses > 0)
+      {
+        // set all the styleClasses in one array so we can pass it to 
+        // renderStyleClasses
+        String[] styleClasses = new String[numClasses];
+        
+        int i=0;
+        if (parsedStyleClasses != null)
+        {
+          while (i < userStyleClassCount)
+          {
+            styleClasses[i] = parsedStyleClasses.get(i);
+            i++;
+          }
+        }
+        else if (styleClass != null)
+        {
+          styleClasses[i++] = styleClass;
+        }
+        if (defaultStyleClass != null)
+          styleClasses[i++] = defaultStyleClass;
+         
+        for (int j=0; j < numStates; j++, i++)
+        {
+          styleClasses[i] = stateStyleClasses.get(j);
+        }        
+
+        renderStyleClasses(context, arc, styleClasses);         
+      }
+    }
+
+    String style = getInlineStyle(bean);
+    if (style != null)
+    {
+      context.getResponseWriter().writeAttribute("style",
+                                                 style,
+                                                 "inlineStyle");
+    }
+  }
+
+  @Override
+  protected String getDefaultStyleClass(FacesBean bean)
+  {
+    return SkinSelectors.AF_COMMAND_BUTTON_STYLE_CLASS;
+  }
+
+  protected String getIcon(FacesBean bean)
+  {
+    return toUri(bean.getProperty(_iconKey));
+  }
+
+  /**
+   * Returns true if the agent supports the "onclick" JS Handler in an "input" 
+   * HTML element of type "image"
+   *
+   */
+  static private boolean _supportsOnClickOnImgInput(RenderingContext arc)
+  {
+    Object cap = arc.getAgent().getCapabilities().get(
+                      TrinidadAgent.CAP_ONCLICK_IMG_INPUT);
+    return !Boolean.FALSE.equals(cap);
+  }
+
+  private PropertyKey _iconKey;
+
+  static private final List<String> _DISABLED_STATE_LIST =
+    Collections.singletonList(SkinSelectors.STATE_DISABLED);
+}

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/blackberry4.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/blackberry4.xml?view=diff&rev=562637&r1=562636&r2=562637
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/blackberry4.xml (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/blackberry4.xml Fri Aug  3 18:08:41 2007
@@ -30,6 +30,7 @@
   <capability name="-adfinternal-readonlyFormElements" value="true"/>  
   <capability name="-adfinternal-styleAttributes" value="external"/>
   <capability name="-adfinternal-scriptingSpeed" value="slow"/>
+  <capability name="-adfinternal-onclickOnImgInput" value="false"/>    
   <!-- note the following that is not captured in the capability list:
        1) textPresentation:  BlackBerry Browser 4.0 does not support all
        of the XHTML text presentation module (5.4.1), specifically not 

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/htmlBasic.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/htmlBasic.xml?view=diff&rev=562637&r1=562636&r2=562637
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/htmlBasic.xml (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/htmlBasic.xml Fri Aug  3 18:08:41 2007
@@ -48,4 +48,5 @@
   <capability name="-adfinternal-cssSelectors" value="none"/>
   <capability name="-adfinternal-fieldset" value="false"/>  
   <capability name="-adfinternal-supportsDisabledOptions" value="false"/>
+  <capability name="-adfinternal-onclickOnImgInput" value="true"/>    
 </capabilityData>

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/pocketie.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/pocketie.xml?view=diff&rev=562637&r1=562636&r2=562637
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/pocketie.xml (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/pocketie.xml Fri Aug  3 18:08:41 2007
@@ -27,4 +27,5 @@
   <capability name="-adfinternal-disabledFormElements" value="false"/>
   <capability name="-adfinternal-readonlyFormElements" value="false"/> 
   <capability name="-adfinternal-valign" value="true"/>
+  <capability name="-adfinternal-onclickOnImgInput" value="false"/>    
 </capabilityData>

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/pocketie03.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/pocketie03.xml?view=diff&rev=562637&r1=562636&r2=562637
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/pocketie03.xml (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/agent/pocketie03.xml Fri Aug  3 18:08:41 2007
@@ -26,4 +26,6 @@
   <capability name="-adfinternal-scriptingSpeed" value="slow"/>
   <capability name="-adfinternal-partialRendering" value="true"/>
   <capability name="-adfinternal-xmldom" value="true"/>  
+  <capability name="-adfinternal-onclick-input" value="true"/>  
+  <capability name="-adfinternal-onclickOnImgInput" value="false"/>    
 </capabilityData>

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/commandButton-minimalPPC-golden.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/commandButton-minimalPPC-golden.xml?view=diff&rev=562637&r1=562636&r2=562637
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/commandButton-minimalPPC-golden.xml (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/commandButton-minimalPPC-golden.xml Fri Aug  3 18:08:41 2007
@@ -174,16 +174,19 @@
       </input>
 <!--AttributeTest[icon,/foo.gif]-->
 
-      <input
-           class="af_commandButton"
+      <a
            onclick="submitForm('formId',1,{source:'mainId'});return false;"
-           type="image"
-           id="uri-attr:mainId"
-           name="uri-attr:mainId"
-           src="uri-attr:encoded-resource-url:/test-context-path/foo.gif"
+           href="uri-attr:encoded-action-url:#"
           >
         
-      </input>
+        <img
+             class="af_commandButton"
+             onclick="submitForm('formId',1,{source:'mainId'});return false;"
+             src="uri-attr:encoded-resource-url:/test-context-path/foo.gif"
+            >
+          
+        </img>
+      </a>
 <!--AttributeTest[onclick,null]-->
 
       <input