myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r730584 - in /myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib: extension/ extension12/
Date Thu, 01 Jan 2009 18:36:51 GMT
Author: weber
Date: Thu Jan  1 10:36:50 2009
New Revision: 730584

URL: http://svn.apache.org/viewvc?rev=730584&view=rev
Log:
Created: (TOBAGO-735) partial rendering did not work on tx:menuRadio
<https://issues.apache.org/jira/browse/TOBAGO-735>

Modified:
    myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuCheckboxExtensionTag.java
    myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuRadioExtensionTag.java
    myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension12/MenuCheckboxExtensionTag.java
    myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension12/MenuRadioExtensionTag.java

Modified: myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuCheckboxExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuCheckboxExtensionTag.java?rev=730584&r1=730583&r2=730584&view=diff
==============================================================================
--- myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuCheckboxExtensionTag.java
(original)
+++ myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuCheckboxExtensionTag.java
Thu Jan  1 10:36:50 2009
@@ -20,6 +20,8 @@
 import org.apache.myfaces.tobago.apt.annotation.ExtensionTag;
 import org.apache.myfaces.tobago.apt.annotation.Tag;
 import org.apache.myfaces.tobago.component.Facets;
+import org.apache.myfaces.tobago.component.UICommand;
+import static org.apache.myfaces.tobago.component.Attributes.RENDERED_PARTIALLY;
 import org.apache.myfaces.tobago.internal.taglib.MenuItemTag;
 import org.apache.myfaces.tobago.internal.taglib.SelectBooleanCheckboxTag;
 import org.apache.myfaces.tobago.taglib.decl.AbstractCommandTagDeclaration;
@@ -29,9 +31,13 @@
 import org.apache.myfaces.tobago.taglib.decl.IsDisabled;
 
 import javax.faces.webapp.FacetTag;
+import javax.faces.component.UIComponent;
+import javax.faces.el.ValueBinding;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.BodyTagSupport;
 
+import org.apache.commons.lang.StringUtils;
+
 /*
  * Date: 09.05.2006
  * Time: 00:00:49
@@ -121,6 +127,18 @@
 
   @Override
   public int doEndTag() throws JspException {
+
+    // Move attribute renderedPartially from selectOne to menuCommand component
+    UIComponent selectBooleanComponent = selectBooleanCheckbox.getComponentInstance();
+    UICommand command = (UICommand) menuCommandTag.getComponentInstance();
+    ValueBinding binding = selectBooleanComponent.getValueBinding(RENDERED_PARTIALLY);
+    if (binding != null) {
+      command.setValueBinding(RENDERED_PARTIALLY, binding);
+    } else {
+      Object renderedPartially = selectBooleanComponent.getAttributes().get(RENDERED_PARTIALLY);
+      command.setRenderedPartially(StringUtils.split((String) renderedPartially, ", "));
+    }
+
     selectBooleanCheckbox.doEndTag();
     facetTag.doEndTag();
     menuCommandTag.doEndTag();

Modified: myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuRadioExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuRadioExtensionTag.java?rev=730584&r1=730583&r2=730584&view=diff
==============================================================================
--- myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuRadioExtensionTag.java
(original)
+++ myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension/MenuRadioExtensionTag.java
Thu Jan  1 10:36:50 2009
@@ -20,6 +20,8 @@
 import org.apache.myfaces.tobago.apt.annotation.ExtensionTag;
 import org.apache.myfaces.tobago.apt.annotation.Tag;
 import org.apache.myfaces.tobago.component.Facets;
+import org.apache.myfaces.tobago.component.UICommand;
+import static org.apache.myfaces.tobago.component.Attributes.RENDERED_PARTIALLY;
 import org.apache.myfaces.tobago.internal.taglib.MenuItemTag;
 import org.apache.myfaces.tobago.internal.taglib.SelectOneRadioTag;
 import org.apache.myfaces.tobago.taglib.decl.AbstractCommandTagDeclaration;
@@ -30,9 +32,13 @@
 import org.apache.myfaces.tobago.taglib.decl.IsDisabled;
 
 import javax.faces.webapp.FacetTag;
+import javax.faces.component.UIComponent;
+import javax.faces.el.ValueBinding;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.BodyTagSupport;
 
+import org.apache.commons.lang.StringUtils;
+
 /*
  * Date: 09.05.2006
  * Time: 17:41:39
@@ -129,6 +135,18 @@
 
   @Override
   public int doEndTag() throws JspException {
+
+    // Move attribute renderedPartially from selectOne to menuCommand component
+    UIComponent selectOneComponent = selectOneRadio.getComponentInstance();
+    UICommand command = (UICommand) menuCommandTag.getComponentInstance();
+    ValueBinding binding = selectOneComponent.getValueBinding(RENDERED_PARTIALLY);
+    if (binding != null) {
+      command.setValueBinding(RENDERED_PARTIALLY, binding);
+    } else {
+      Object renderedPartially = selectOneComponent.getAttributes().get(RENDERED_PARTIALLY);
+      command.setRenderedPartially(StringUtils.split((String) renderedPartially, ", "));
+    }
+    
     selectOneRadio.doEndTag();
     facetTag.doEndTag();
     menuCommandTag.doEndTag();

Modified: myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension12/MenuCheckboxExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension12/MenuCheckboxExtensionTag.java?rev=730584&r1=730583&r2=730584&view=diff
==============================================================================
--- myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension12/MenuCheckboxExtensionTag.java
(original)
+++ myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension12/MenuCheckboxExtensionTag.java
Thu Jan  1 10:36:50 2009
@@ -23,14 +23,20 @@
 import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
 import org.apache.myfaces.tobago.component.Facets;
+import org.apache.myfaces.tobago.component.UICommand;
+import static org.apache.myfaces.tobago.component.Attributes.RENDERED_PARTIALLY;
 import org.apache.myfaces.tobago.internal.taglib.MenuItemTag;
 import org.apache.myfaces.tobago.internal.taglib.SelectBooleanCheckboxTag;
 
 import javax.el.MethodExpression;
 import javax.faces.webapp.FacetTag;
+import javax.faces.component.UIComponent;
+import javax.faces.el.ValueBinding;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.BodyTagSupport;
 
+import org.apache.commons.lang.StringUtils;
+
 /*
  * Date: 09.05.2006
  * Time: 00:00:49
@@ -119,6 +125,18 @@
 
   @Override
   public int doEndTag() throws JspException {
+
+    // Move attribute renderedPartially from selectOne to menuCommand component
+    UIComponent selectBooleanComponent = selectBooleanCheckbox.getComponentInstance();
+    UICommand command = (UICommand) menuCommandTag.getComponentInstance();
+    ValueBinding binding = selectBooleanComponent.getValueBinding(RENDERED_PARTIALLY);
+    if (binding != null) {
+      command.setValueBinding(RENDERED_PARTIALLY, binding);
+    } else {
+      Object renderedPartially = selectBooleanComponent.getAttributes().get(RENDERED_PARTIALLY);
+      command.setRenderedPartially(StringUtils.split((String) renderedPartially, ", "));
+    }
+    
     selectBooleanCheckbox.doEndTag();
     facetTag.doEndTag();
     menuCommandTag.doEndTag();

Modified: myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension12/MenuRadioExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension12/MenuRadioExtensionTag.java?rev=730584&r1=730583&r2=730584&view=diff
==============================================================================
--- myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension12/MenuRadioExtensionTag.java
(original)
+++ myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib/extension12/MenuRadioExtensionTag.java
Thu Jan  1 10:36:50 2009
@@ -23,13 +23,19 @@
 import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
 import org.apache.myfaces.tobago.component.Facets;
+import org.apache.myfaces.tobago.component.UICommand;
+import static org.apache.myfaces.tobago.component.Attributes.RENDERED_PARTIALLY;
 import org.apache.myfaces.tobago.internal.taglib.MenuItemTag;
 import org.apache.myfaces.tobago.internal.taglib.SelectOneRadioTag;
 
 import javax.faces.webapp.FacetTag;
+import javax.faces.component.UIComponent;
+import javax.faces.el.ValueBinding;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.BodyTagSupport;
 
+import org.apache.commons.lang.StringUtils;
+
 /*
  * Date: 09.05.2006
  * Time: 17:41:39
@@ -125,6 +131,18 @@
 
   @Override
   public int doEndTag() throws JspException {
+
+    // Move attribute renderedPartially from selectOne to menuCommand component
+    UIComponent selectOneComponent = selectOneRadio.getComponentInstance();
+    UICommand command = (UICommand) menuCommandTag.getComponentInstance();
+    ValueBinding binding = selectOneComponent.getValueBinding(RENDERED_PARTIALLY);
+    if (binding != null) {
+      command.setValueBinding(RENDERED_PARTIALLY, binding);
+    } else {
+      Object renderedPartially = selectOneComponent.getAttributes().get(RENDERED_PARTIALLY);
+      command.setRenderedPartially(StringUtils.split((String) renderedPartially, ", "));
+    }
+
     selectOneRadio.doEndTag();
     facetTag.doEndTag();
     menuCommandTag.doEndTag();



Mime
View raw message