myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r698989 - /myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java
Date Thu, 25 Sep 2008 14:44:46 GMT
Author: bommel
Date: Thu Sep 25 07:44:46 2008
New Revision: 698989

URL: http://svn.apache.org/viewvc?rev=698989&view=rev
Log:
(TOBAGO-701) By using a tx:selectBooleanCheckbox component that is readonly the command facet
still works

Modified:
    myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java

Modified: myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java?rev=698989&r1=698988&r2=698989&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java
(original)
+++ myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/LayoutableRendererBase.java
Thu Sep 25 07:44:46 2008
@@ -21,10 +21,13 @@
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ONCLICK;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_WIDTH;
 import static org.apache.myfaces.tobago.TobagoConstants.FACET_MENUBAR;
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_READONLY;
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DISABLED;
 import org.apache.myfaces.tobago.component.ComponentUtil;
 import org.apache.myfaces.tobago.component.UICell;
 import org.apache.myfaces.tobago.component.UICommand;
 import org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.util.LayoutUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
@@ -148,6 +151,11 @@
 
   protected void checkForCommandFacet(UIComponent component, List<String> clientIds,
FacesContext facesContext,
       TobagoResponseWriter writer) throws IOException {
+    if (ComponentUtil.getBooleanAttribute(component, ATTR_READONLY)
+        || ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED)) {
+      // skip if readonly
+      return;
+    }
     Map<String, UIComponent> facets = component.getFacets();
     for (Map.Entry<String, UIComponent> entry : facets.entrySet()) {
       if (entry.getValue() instanceof UICommand) {



Mime
View raw message