You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2006/08/05 17:24:01 UTC

svn commit: r429006 - in /myfaces/tobago/trunk: core/src/main/java/org/apache/myfaces/tobago/renderkit/ core/src/main/java/org/apache/myfaces/tobago/taglib/component/ core/src/main/java/org/apache/myfaces/tobago/taglib/extension/ theme/scarborough/src/...

Author: bommel
Date: Sat Aug  5 08:24:00 2006
New Revision: 429006

URL: http://svn.apache.org/viewvc?rev=429006&view=rev
Log:
TOBAGO-109
added UICommand facet for click and change Events in selectOneRadio, selectBooleanCheckbox, selectManyCheckbox and selectOneChoice

Added:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AbstractCommandTag.java   (contents, props changed)
      - copied, changed from r427925, myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AbstractCommandTagDeclaration.java   (contents, props changed)
      - copied, changed from r427925, myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTagDeclaration.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CommandRenderer.java
Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/CommandRendererBase.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/SelectOneRendererBase.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/DatePickerTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCheckboxTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuRadioTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuSelectBooleanTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuSelectOneTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectBooleanCommandTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneCommandTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarCommandTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarCommandTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarSelectBooleanTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarSelectOneTagDeclaration.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuCheckboxExtensionTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuRadioExtensionTag.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectBooleanCheckboxRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneChoiceRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneListboxRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/CommandRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/CommandRendererBase.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/CommandRendererBase.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/CommandRendererBase.java Sat Aug  5 08:24:00 2006
@@ -46,7 +46,7 @@
     if (actionId != null && actionId.equals(clientId)) {
 
       if (LOG.isDebugEnabled()) {
-        LOG.debug("queueEvent");
+        LOG.debug("queueEvent = '" + actionId + "'");
       }
       component.queueEvent(new ActionEvent(component));
     }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java Sat Aug  5 08:24:00 2006
@@ -25,8 +25,11 @@
 import org.apache.myfaces.tobago.component.ComponentUtil;
 import org.apache.myfaces.tobago.component.UIPage;
 import org.apache.myfaces.tobago.component.UICell;
+import org.apache.myfaces.tobago.component.UICommand;
 import org.apache.myfaces.tobago.config.ThemeConfig;
 import org.apache.myfaces.tobago.util.LayoutUtil;
+import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
+import org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil;
 
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIInput;
@@ -42,6 +45,8 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
+import java.util.Arrays;
 
 public abstract class RendererBase
     extends Renderer implements TobagoRenderer {
@@ -393,5 +398,36 @@
       return converter.getAsString(context, component, currentValue);
     }
   }
+  protected void checkForCommandFacet(UIComponent component, FacesContext facesContext, TobagoResponseWriter writer)
+      throws IOException {
+    checkForCommandFacet(component, Arrays.asList(component.getClientId(facesContext)) , facesContext, writer);
+  }
+  protected void checkForCommandFacet(UIComponent component, List<String> clientIds, FacesContext facesContext, TobagoResponseWriter writer)
+      throws IOException {
+    Map<String, UIComponent> facets = component.getFacets();
+    for (Map.Entry<String, UIComponent> entry: facets.entrySet()) {
+      if (entry.getValue() instanceof UICommand) {
+        addCommandFacet(component, clientIds, entry, facesContext, writer);
+      }
+    }
+  }
+  // TODO create HtmlRendererBase
+  private void addCommandFacet(UIComponent component, List<String> clientIds, Map.Entry<String, UIComponent> facetEntry,
+      FacesContext facesContext, TobagoResponseWriter writer) throws
+      IOException {
+    for (String clientId: clientIds) {
+      writeScriptForClientId(clientId, facetEntry, facesContext, writer);
+    }
+  }
 
+  private void writeScriptForClientId(String clientId, Map.Entry<String, UIComponent> facetEntry,
+      FacesContext facesContext, TobagoResponseWriter writer) throws IOException {
+    String script =
+        "var element = Tobago.element(\"" + clientId  + "\");\n"
+        + "if (element) {\n"
+        + "   Tobago.addEventListener(element, \"" + facetEntry.getKey() + "\", function(){Tobago.submitAction('"
+        + facetEntry.getValue().getClientId(facesContext) + "')});\n"
+        + "}";
+    HtmlRendererUtil.writeJavascript(writer, script);
+  }
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/SelectOneRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/SelectOneRendererBase.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/SelectOneRendererBase.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/SelectOneRendererBase.java Sat Aug  5 08:24:00 2006
@@ -19,12 +19,10 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.tobago.component.ComponentUtil;
-import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
 import javax.faces.component.UISelectOne;
 import javax.faces.context.FacesContext;
-import java.io.IOException;
 
 public abstract class SelectOneRendererBase extends InputRendererBase {
 
@@ -44,21 +42,6 @@
       LOG.debug("decode: key='" + clientId + "' value='" + newValue + "'");
     }
     uiSelectOne.setSubmittedValue(newValue);
-  }
-
-
-  protected abstract void renderMain(FacesContext facesContext, UIComponent input,
-      TobagoResponseWriter writer) throws IOException;
-
-  public void encodeEndTobago(FacesContext facesContext,
-      UIComponent component)
-      throws IOException {
-    super.encodeEndTobago(facesContext, component);
-    TobagoResponseWriter writer = (TobagoResponseWriter)
-        facesContext.getResponseWriter();
-
-
-    renderMain(facesContext, component, writer);
   }
 
 }

Copied: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AbstractCommandTag.java (from r427925, myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTag.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AbstractCommandTag.java?p2=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AbstractCommandTag.java&p1=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTag.java&r1=427925&r2=429006&rev=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AbstractCommandTag.java Sat Aug  5 08:24:00 2006
@@ -26,7 +26,7 @@
 
 import javax.faces.component.UIComponent;
 
-public abstract class CommandTag extends TobagoTag implements CommandTagDeclaration {
+public abstract class AbstractCommandTag extends TobagoTag implements AbstractCommandTagDeclaration {
 
   private String disabled;
   private String action;

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AbstractCommandTag.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AbstractCommandTag.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Copied: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AbstractCommandTagDeclaration.java (from r427925, myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTagDeclaration.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AbstractCommandTagDeclaration.java?p2=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AbstractCommandTagDeclaration.java&p1=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTagDeclaration.java&r1=427925&r2=429006&rev=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AbstractCommandTagDeclaration.java Sat Aug  5 08:24:00 2006
@@ -20,17 +20,17 @@
 import org.apache.myfaces.tobago.taglib.decl.HasActionListener;
 import org.apache.myfaces.tobago.taglib.decl.HasLink;
 import org.apache.myfaces.tobago.taglib.decl.HasOnclick;
-
+import org.apache.myfaces.tobago.taglib.decl.IsImmediateCommand;
 
 /*
- * Created by IntelliJ IDEA.
- * User: bommel
- * Date: 10.02.2006
- * Time: 22:03:07
- * To change this template use File | Settings | File Templates.
- */
+* Created by IntelliJ IDEA.
+* User: bommel
+* Date: 10.02.2006
+* Time: 22:03:07
+* To change this template use File | Settings | File Templates.
+*/
 
 
-public interface CommandTagDeclaration extends TobagoTagDeclaration,
-    HasAction, HasActionListener, HasOnclick, HasLink {
+public interface AbstractCommandTagDeclaration extends TobagoTagDeclaration,
+    HasAction, HasActionListener, IsImmediateCommand, HasOnclick, HasLink {
 }

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AbstractCommandTagDeclaration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTag.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTag.java Sat Aug  5 08:24:00 2006
@@ -35,7 +35,7 @@
  * Renders a button element.
  */
 // FIXME: bodyContent
-public class ButtonTag extends CommandTag
+public class ButtonTag extends AbstractCommandTag
     implements ButtonTagDeclaration {
 
   private static final Log LOG = LogFactory.getLog(ButtonTag.class);

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTagDeclaration.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTagDeclaration.java Sat Aug  5 08:24:00 2006
@@ -47,8 +47,8 @@
     uiComponent = "org.apache.myfaces.tobago.component.UICommand",
     rendererType = "Button")
 
-public interface ButtonTagDeclaration extends CommandTagDeclaration,
+public interface ButtonTagDeclaration extends AbstractCommandTagDeclaration,
     HasIdBindingAndRendered, HasLabelAndAccessKey, HasImage,
     IsDisabled, HasCommandType,
-    IsImmediateCommand, IsDefaultCommand, HasDeprecatedWidth, HasTip, IsInline {
+    IsDefaultCommand, HasDeprecatedWidth, HasTip, IsInline {
 }

Added: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTag.java?rev=429006&view=auto
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTag.java (added)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTag.java Sat Aug  5 08:24:00 2006
@@ -0,0 +1,27 @@
+package org.apache.myfaces.tobago.taglib.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 05.08.2006
+ * Time: 11:59:21
+ */
+public class CommandTag  extends AbstractCommandTag implements CommandTagDeclaration {
+
+}

Added: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTagDeclaration.java?rev=429006&view=auto
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTagDeclaration.java (added)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTagDeclaration.java Sat Aug  5 08:24:00 2006
@@ -0,0 +1,38 @@
+package org.apache.myfaces.tobago.taglib.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+
+/*
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 05.08.2006
+ * Time: 12:01:32
+ */
+
+/**
+ * Use this tag only as a facet for click, change in selectOneRadio, selectBooleanCheckbox, selectManyCheckbox and selectOneChoice
+ */
+@Tag(name = "command", tagExtraInfoClassName = "org.apache.myfaces.tobago.taglib.component.CommandTagExtraInfo")
+@UIComponentTag(
+    uiComponent = "org.apache.myfaces.tobago.component.UICommand",
+    rendererType = "Command")
+public interface CommandTagDeclaration  extends AbstractCommandTagDeclaration{
+
+}

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/DatePickerTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/DatePickerTag.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/DatePickerTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/DatePickerTag.java Sat Aug  5 08:24:00 2006
@@ -30,7 +30,7 @@
  * Time: 19:11:07
  * To change this template use File | Settings | File Templates.
  */
-public class DatePickerTag extends CommandTag implements DatePickerTagDeclaration {
+public class DatePickerTag extends AbstractCommandTag implements DatePickerTagDeclaration {
 
   private String forComponent;
 

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTag.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTag.java Sat Aug  5 08:24:00 2006
@@ -27,7 +27,7 @@
 
 import javax.faces.component.UIComponent;
 
-public class LinkTag extends CommandTag
+public class LinkTag extends AbstractCommandTag
     implements LinkTagDeclaration {
 
   private static final Log LOG = LogFactory.getLog(LinkTag.class);

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTagDeclaration.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTagDeclaration.java Sat Aug  5 08:24:00 2006
@@ -45,8 +45,8 @@
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UICommand",
     rendererType = "Link")
-public interface LinkTagDeclaration extends CommandTagDeclaration,
+public interface LinkTagDeclaration extends AbstractCommandTagDeclaration,
     HasIdBindingAndRendered, HasLabelAndAccessKey, IsDisabled,
     IsInline, HasCommandType,
-    HasTarget, HasTip, IsImmediateCommand, HasImage {
+    HasTarget, HasTip, HasImage {
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCheckboxTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCheckboxTagDeclaration.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCheckboxTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCheckboxTagDeclaration.java Sat Aug  5 08:24:00 2006
@@ -37,7 +37,7 @@
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UISelectBooleanCommand",
     rendererType = "MenuCommand")
-public interface MenuCheckboxTagDeclaration extends TobagoTagDeclaration, CommandTagDeclaration,
-    HasIdBindingAndRendered, IsDisabled, HasCommandType, HasBooleanValue, HasLabelAndAccessKey,
-    IsImmediateCommand {
+public interface MenuCheckboxTagDeclaration extends TobagoTagDeclaration, AbstractCommandTagDeclaration,
+    HasIdBindingAndRendered, IsDisabled, HasCommandType, HasBooleanValue,
+    HasLabelAndAccessKey {
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTag.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTag.java Sat Aug  5 08:24:00 2006
@@ -27,7 +27,7 @@
 import javax.faces.component.UIComponent;
 
 
-public class MenuCommandTag extends CommandTag
+public class MenuCommandTag extends AbstractCommandTag
     implements MenuCommandTagDeclaration {
   private static final Log LOG = LogFactory.getLog(MenuCommandTag.class);
 

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTagDeclaration.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTagDeclaration.java Sat Aug  5 08:24:00 2006
@@ -39,6 +39,6 @@
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UIMenuCommand",
     rendererType = "MenuCommand")
-public interface MenuCommandTagDeclaration extends TobagoTagDeclaration, CommandTagDeclaration, HasIdBindingAndRendered,
-    HasLabelAndAccessKey, IsDisabled,  HasCommandType, HasImage, IsImmediateCommand {
+public interface MenuCommandTagDeclaration extends TobagoTagDeclaration, AbstractCommandTagDeclaration, HasIdBindingAndRendered,
+    HasLabelAndAccessKey, IsDisabled,  HasCommandType, HasImage {
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuRadioTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuRadioTagDeclaration.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuRadioTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuRadioTagDeclaration.java Sat Aug  5 08:24:00 2006
@@ -36,6 +36,6 @@
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UISelectOneCommand",
     rendererType = "MenuCommand")
-public interface MenuRadioTagDeclaration extends TobagoTagDeclaration, CommandTagDeclaration,
-    HasIdBindingAndRendered, HasLabel, IsDisabled, HasCommandType, HasValue, IsImmediateCommand {
+public interface MenuRadioTagDeclaration extends TobagoTagDeclaration, AbstractCommandTagDeclaration,
+    HasIdBindingAndRendered, HasLabel, IsDisabled, HasCommandType, HasValue {
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuSelectBooleanTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuSelectBooleanTagDeclaration.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuSelectBooleanTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuSelectBooleanTagDeclaration.java Sat Aug  5 08:24:00 2006
@@ -42,7 +42,7 @@
     uiComponent = "org.apache.myfaces.tobago.component.UISelectBooleanCommand",
     rendererType = "MenuCommand")
 @Deprecated
-public interface MenuSelectBooleanTagDeclaration extends TobagoTagDeclaration, CommandTagDeclaration,
-    HasIdBindingAndRendered, IsDisabled, HasCommandType, HasBooleanValue, HasLabelAndAccessKey,
-    IsImmediateCommand {
+public interface MenuSelectBooleanTagDeclaration extends TobagoTagDeclaration, AbstractCommandTagDeclaration,
+    HasIdBindingAndRendered, IsDisabled, HasCommandType,
+    HasBooleanValue, HasLabelAndAccessKey {
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuSelectOneTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuSelectOneTagDeclaration.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuSelectOneTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuSelectOneTagDeclaration.java Sat Aug  5 08:24:00 2006
@@ -41,6 +41,6 @@
     uiComponent = "org.apache.myfaces.tobago.component.UISelectOneCommand",
     rendererType = "MenuCommand")
 @Deprecated
-public interface MenuSelectOneTagDeclaration extends TobagoTagDeclaration, CommandTagDeclaration,
-    HasIdBindingAndRendered, HasLabel, IsDisabled, HasCommandType, HasValue, IsImmediateCommand {
+public interface MenuSelectOneTagDeclaration extends TobagoTagDeclaration, AbstractCommandTagDeclaration,
+    HasIdBindingAndRendered, HasLabel, IsDisabled, HasCommandType, HasValue {
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectBooleanCommandTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectBooleanCommandTag.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectBooleanCommandTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectBooleanCommandTag.java Sat Aug  5 08:24:00 2006
@@ -32,7 +32,7 @@
  * Date: Apr 26, 2005
  * Time: 3:01:45 PM
  */
-public class SelectBooleanCommandTag extends CommandTag {
+public class SelectBooleanCommandTag extends AbstractCommandTag {
 
   private static final Log LOG = LogFactory.getLog(SelectBooleanCommandTag.class);
 

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneCommandTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneCommandTag.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneCommandTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneCommandTag.java Sat Aug  5 08:24:00 2006
@@ -28,7 +28,7 @@
  * Date: Apr 26, 2005
  * Time: 3:03:44 PM
  */
-public class SelectOneCommandTag extends CommandTag {
+public class SelectOneCommandTag extends AbstractCommandTag {
 
   private String value;
 

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarCommandTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarCommandTag.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarCommandTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarCommandTag.java Sat Aug  5 08:24:00 2006
@@ -27,7 +27,7 @@
 import javax.faces.component.UIComponent;
 
 
-public class ToolBarCommandTag extends CommandTag
+public class ToolBarCommandTag extends AbstractCommandTag
     implements ToolBarCommandTagDeclaration {
 
   private static final Log LOG = LogFactory.getLog(ToolBarCommandTag.class);

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarCommandTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarCommandTagDeclaration.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarCommandTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarCommandTagDeclaration.java Sat Aug  5 08:24:00 2006
@@ -41,7 +41,6 @@
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UICommand",
     rendererType = "Button")
-public interface ToolBarCommandTagDeclaration extends CommandTagDeclaration, HasIdBindingAndRendered,
-    HasLabelAndAccessKey, HasImage, IsDisabled, HasCommandType, HasTip,
-    IsImmediateCommand {
+public interface ToolBarCommandTagDeclaration extends AbstractCommandTagDeclaration, HasIdBindingAndRendered,
+    HasLabelAndAccessKey, HasImage, IsDisabled, HasCommandType, HasTip {
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarSelectBooleanTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarSelectBooleanTagDeclaration.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarSelectBooleanTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarSelectBooleanTagDeclaration.java Sat Aug  5 08:24:00 2006
@@ -42,7 +42,8 @@
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UISelectBooleanCommand",
     rendererType = "MenuCommand")
-public interface ToolBarSelectBooleanTagDeclaration extends TobagoTagDeclaration, CommandTagDeclaration,
-    HasIdBindingAndRendered, HasLabelAndAccessKey, HasCommandType, HasImage, IsDisabled, HasBooleanValue,
-    HasTip, IsImmediateCommand {
+public interface ToolBarSelectBooleanTagDeclaration extends TobagoTagDeclaration, AbstractCommandTagDeclaration,
+    HasIdBindingAndRendered, HasLabelAndAccessKey,
+    HasCommandType, HasImage, IsDisabled, HasBooleanValue,
+    HasTip {
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarSelectOneTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarSelectOneTagDeclaration.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarSelectOneTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarSelectOneTagDeclaration.java Sat Aug  5 08:24:00 2006
@@ -40,6 +40,6 @@
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UISelectOneCommand",
     rendererType = "MenuCommand")
-public interface ToolBarSelectOneTagDeclaration extends TobagoTagDeclaration, CommandTagDeclaration,
-    HasIdBindingAndRendered, IsDisabled, HasCommandType, HasValue, IsImmediateCommand {
+public interface ToolBarSelectOneTagDeclaration extends TobagoTagDeclaration, AbstractCommandTagDeclaration,
+    HasIdBindingAndRendered, IsDisabled, HasCommandType, HasValue{
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuCheckboxExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuCheckboxExtensionTag.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuCheckboxExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuCheckboxExtensionTag.java Sat Aug  5 08:24:00 2006
@@ -17,7 +17,7 @@
  */
 
 import org.apache.myfaces.tobago.apt.annotation.Tag;
-import org.apache.myfaces.tobago.taglib.component.CommandTagDeclaration;
+import org.apache.myfaces.tobago.taglib.component.AbstractCommandTagDeclaration;
 import org.apache.myfaces.tobago.taglib.component.MenuCommandTag;
 import org.apache.myfaces.tobago.taglib.component.SelectBooleanCheckboxTag;
 import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
@@ -43,9 +43,8 @@
  */
 
 @Tag(name = "menuCheckbox", tagExtraInfoClassName = "org.apache.myfaces.tobago.taglib.component.CommandTagExtraInfo")
-public class MenuCheckboxExtensionTag extends BodyTagSupport implements CommandTagDeclaration,
-    HasIdBindingAndRendered, IsDisabled, HasBooleanValue, HasLabel,
-    IsImmediateCommand {
+public class MenuCheckboxExtensionTag extends BodyTagSupport implements AbstractCommandTagDeclaration,
+    HasIdBindingAndRendered, IsDisabled, HasBooleanValue, HasLabel {
   private String rendered;
   private String value;
 

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuRadioExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuRadioExtensionTag.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuRadioExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuRadioExtensionTag.java Sat Aug  5 08:24:00 2006
@@ -18,13 +18,12 @@
 
 import org.apache.myfaces.tobago.apt.annotation.Tag;
 import org.apache.myfaces.tobago.taglib.component.MenuCommandTag;
-import org.apache.myfaces.tobago.taglib.component.CommandTagDeclaration;
+import org.apache.myfaces.tobago.taglib.component.AbstractCommandTagDeclaration;
 import org.apache.myfaces.tobago.taglib.component.SelectOneRadioTag;
 import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
 import org.apache.myfaces.tobago.taglib.decl.HasLabel;
 import org.apache.myfaces.tobago.taglib.decl.IsDisabled;
 import org.apache.myfaces.tobago.taglib.decl.HasValue;
-import org.apache.myfaces.tobago.taglib.decl.IsImmediateCommand;
 import org.apache.myfaces.tobago.taglib.decl.HasConverter;
 
 import javax.faces.webapp.FacetTag;
@@ -45,8 +44,8 @@
  */
 
 @Tag(name = "menuRadio", tagExtraInfoClassName = "org.apache.myfaces.tobago.taglib.component.CommandTagExtraInfo")
-public class MenuRadioExtensionTag extends BodyTagSupport implements CommandTagDeclaration,
-    HasIdBindingAndRendered, HasLabel, IsDisabled, HasValue, IsImmediateCommand, HasConverter {
+public class MenuRadioExtensionTag extends BodyTagSupport implements AbstractCommandTagDeclaration,
+    HasIdBindingAndRendered, HasLabel, IsDisabled, HasValue, HasConverter {
 
   private String rendered;
   private String value;

Added: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CommandRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CommandRenderer.java?rev=429006&view=auto
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CommandRenderer.java (added)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CommandRenderer.java Sat Aug  5 08:24:00 2006
@@ -0,0 +1,13 @@
+package org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag;
+
+import org.apache.myfaces.tobago.renderkit.CommandRendererBase;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 05.08.2006
+ * Time: 13:47:27
+ * To change this template use File | Settings | File Templates.
+ */
+public class CommandRenderer extends CommandRendererBase {
+}

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectBooleanCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectBooleanCheckboxRenderer.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectBooleanCheckboxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectBooleanCheckboxRenderer.java Sat Aug  5 08:24:00 2006
@@ -25,8 +25,10 @@
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_INLINE;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TIP;
 import org.apache.myfaces.tobago.component.ComponentUtil;
+import org.apache.myfaces.tobago.component.UICommand;
 import org.apache.myfaces.tobago.renderkit.RenderUtil;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
+import org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
@@ -34,6 +36,7 @@
 import javax.faces.component.UISelectBoolean;
 import javax.faces.context.FacesContext;
 import java.io.IOException;
+import java.util.Map;
 
 public class SelectBooleanCheckboxRenderer extends RendererBase {
 
@@ -55,7 +58,7 @@
       uiInput.setSubmittedValue(Boolean.FALSE);
     }
   }
-  
+
   public void encodeEndTobago(FacesContext facesContext,
       UIComponent uiComponent) throws IOException {
 
@@ -111,6 +114,7 @@
       writer.endElement("tr");
       writer.endElement("table");
     }
+    checkForCommandFacet(component, facesContext, writer);
   }
 }
 

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java Sat Aug  5 08:24:00 2006
@@ -36,6 +36,7 @@
 import javax.faces.model.SelectItem;
 import java.io.IOException;
 import java.util.List;
+import java.util.ArrayList;
 
 public class SelectManyCheckboxRenderer extends SelectManyRendererBase {
 
@@ -64,7 +65,7 @@
     writer.writeAttribute("cellspacing", "0", null);
     writer.writeAttribute("cellpadding", "0", null);
     writer.writeAttribute("summary", "", null);
-
+    List clientIds = new ArrayList();
     for (SelectItem item : items) {
 
       writer.startElement("tr", null);
@@ -73,7 +74,7 @@
       String itemId = id
           + NamingContainer.SEPARATOR_CHAR + NamingContainer.SEPARATOR_CHAR
           + item.getValue().toString();
-
+      clientIds.add(itemId);
       writer.startElement("input", component);
       writer.writeAttribute("type", "checkbox", null);
 
@@ -122,6 +123,7 @@
 
     }
     writer.endElement("table");
+    checkForCommandFacet(component, clientIds, facesContext, writer);
   }
 
   public int getFixedHeight(FacesContext facesContext, UIComponent component) {

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java Sat Aug  5 08:24:00 2006
@@ -47,15 +47,7 @@
   }
 
   public int getComponentExtraWidth(FacesContext facesContext, UIComponent component) {
-    int space = 0;
-
-//    if (component.getFacet(FACET_LABEL) != null) {
-//      int labelWidth = LayoutUtil.getLabelWidth(component);
-//      space += labelWidth != 0 ? labelWidth : getLabelWidth(facesContext, component);
-//      space += getConfiguredValue(facesContext, component, "labelSpace");
-//    }
-
-    return space;
+    return 0;
   }
 
   public int getLabelWidth(FacesContext facesContext, UIComponent component) {
@@ -124,6 +116,7 @@
 
 
     writer.endElement("select");
+    checkForCommandFacet(component, facesContext, writer);
   }
 
 // ///////////////////////////////////////////// bean getter + setter

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneChoiceRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneChoiceRenderer.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneChoiceRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneChoiceRenderer.java Sat Aug  5 08:24:00 2006
@@ -47,8 +47,8 @@
     return true;
   }
 
-  protected void renderMain(FacesContext facesContext, UIComponent uiComponent,
-                            TobagoResponseWriter writer) throws IOException {
+  public void encodeEndTobago(FacesContext facesContext, UIComponent uiComponent) throws IOException {
+    TobagoResponseWriter writer = (TobagoResponseWriter) facesContext.getResponseWriter();
     UISelectOne component = (UISelectOne) uiComponent;
     List<SelectItem> items = ComponentUtil.getSelectItems(component);
 
@@ -86,11 +86,12 @@
       writer.endElement("option");
     }
     writer.endElement("select");
+    super.encodeEndTobago(facesContext, component);
+    checkForCommandFacet(component, facesContext, writer);
   }
 
   public int getComponentExtraWidth(FacesContext facesContext, UIComponent component) {
-    int space = 0;
-    return space;
+    return 0;
   }
 }
 

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneListboxRenderer.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneListboxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneListboxRenderer.java Sat Aug  5 08:24:00 2006
@@ -48,15 +48,7 @@
   }
 
   public int getComponentExtraWidth(FacesContext facesContext, UIComponent component) {
-    int space = 0;
-
-//    if (component.getFacet(FACET_LABEL) != null) {
-//      int labelWidth = LayoutUtil.getLabelWidth(component);
-//      space += labelWidth != 0 ? labelWidth : getLabelWidth(facesContext, component);
-//      space += getConfiguredValue(facesContext, component, "labelSpace");
-//    }
-
-    return space;
+    return 0;
   }
   public int getFixedHeight(FacesContext facesContext, UIComponent component) {
     int fixedHeight = -1;
@@ -75,8 +67,8 @@
     return fixedHeight;
   }
 
-  protected void renderMain(FacesContext facesContext, UIComponent input,
-                            TobagoResponseWriter writer) throws IOException {
+  public void encodeEndTobago(FacesContext facesContext, UIComponent input) throws IOException {
+    TobagoResponseWriter writer = (TobagoResponseWriter) facesContext.getResponseWriter();
 
     UISelectOne component = (UISelectOne) input;
     List<SelectItem> items = ComponentUtil.getSelectItems(component);
@@ -117,9 +109,10 @@
 
 
     writer.endElement("select");
+    super.encodeEndTobago(facesContext, component);
+    checkForCommandFacet(component, facesContext, writer);
   }
 
-// ///////////////////////////////////////////// bean getter + setter
 
 }
 

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java?rev=429006&r1=429005&r2=429006&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java Sat Aug  5 08:24:00 2006
@@ -38,19 +38,13 @@
 import javax.faces.context.FacesContext;
 import javax.faces.model.SelectItem;
 import java.io.IOException;
-import java.util.Iterator;
 import java.util.List;
+import java.util.ArrayList;
 
 public class SelectOneRadioRenderer extends SelectOneRendererBase {
 
   private static final Log LOG = LogFactory.getLog(SelectOneRadioRenderer.class);
 
-
-  protected void renderMain(FacesContext facesContext, UIComponent input,
-                            TobagoResponseWriter writer) throws IOException {
-    // nothing to do here, this method is used by overwritten encodeEndTobago()
-  }
-
   public void encodeEndTobago(FacesContext facesContext,
       UIComponent uiComponent) throws IOException {
 
@@ -60,8 +54,7 @@
     ComponentUtil.findPage(component).getOnloadScripts().add("Tobago.selectOneRadioInit('" + clientId + "')");
 
     if (LOG.isDebugEnabled()) {
-      for (Iterator i = component.getChildren().iterator(); i.hasNext();) {
-        Object o = i.next();
+      for (Object o : component.getChildren()) {
         LOG.debug("ITEMS " + o);
         if (o instanceof UISelectItems) {
           UISelectItems uiitems = (UISelectItems) o;
@@ -91,6 +84,7 @@
     }
 
     Object value = component.getValue();
+    List clientIds = new ArrayList();
     for (SelectItem item : items) {
 
       if (!inline) {
@@ -100,7 +94,7 @@
 
       String id = clientId + NamingContainer.SEPARATOR_CHAR
           + NamingContainer.SEPARATOR_CHAR + item.getValue().toString();
-
+      clientIds.add(id);
       writer.startElement("input", component);
       writer.writeAttribute("type", "radio", null);
       writer.writeComponentClass();
@@ -108,6 +102,7 @@
         writer.writeAttribute("checked", "checked", null);
       }
       writer.writeNameAttribute(clientId);
+
       writer.writeIdAttribute(id);
       String formattedValue
           = getFormattedValue(facesContext, component, item.getValue());
@@ -154,6 +149,9 @@
     if (!inline) {
       writer.endElement("table");
     }
+
+    checkForCommandFacet(component, clientIds, facesContext, writer);
+
   }
 
   public int getFixedHeight(FacesContext facesContext, UIComponent component) {