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 2009/01/03 00:21:54 UTC

svn commit: r730866 - in /myfaces/tobago/trunk/extension/tobago-taglib-extension/src/main/java/org/apache/myfaces/tobago/taglib: extension/ extension12/

Author: bommel
Date: Fri Jan  2 15:21:52 2009
New Revision: 730866

URL: http://svn.apache.org/viewvc?rev=730866&view=rev
Log:
(TOBAGO-735) check only if renderedPartially Property is not set

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=730866&r1=730865&r2=730866&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 Fri Jan  2 15:21:52 2009
@@ -128,15 +128,17 @@
   @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, ", "));
+    if (renderedPartially == null) {
+      // 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();

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=730866&r1=730865&r2=730866&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 Fri Jan  2 15:21:52 2009
@@ -136,15 +136,17 @@
   @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, ", "));
+    if (renderedPartially == null) {
+      // 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();

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=730866&r1=730865&r2=730866&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 Fri Jan  2 15:21:52 2009
@@ -124,15 +124,17 @@
   @Override
   public int doEndTag() throws JspException {
 
-    // Move attribute renderedPartially from selectOne to menuCommand component
-    UIComponent selectBooleanComponent = selectBooleanCheckbox.getComponentInstance();
-    UICommand command = (UICommand) menuCommandTag.getComponentInstance();
-    javax.el.ValueExpression expression = selectBooleanComponent.getValueExpression(Attributes.RENDERED_PARTIALLY);
-    if (expression != null) {
-      command.setValueExpression(Attributes.RENDERED_PARTIALLY, expression);
-    } else {
-      Object renderedPartially = selectBooleanComponent.getAttributes().get(Attributes.RENDERED_PARTIALLY);
-      command.setRenderedPartially(StringUtils.split((String) renderedPartially, ", "));
+    if (renderedPartially == null) {
+      // Move attribute renderedPartially from selectOne to menuCommand component
+      UIComponent selectBooleanComponent = selectBooleanCheckbox.getComponentInstance();
+      UICommand command = (UICommand) menuCommandTag.getComponentInstance();
+      javax.el.ValueExpression expression = selectBooleanComponent.getValueExpression(Attributes.RENDERED_PARTIALLY);
+      if (expression != null) {
+        command.setValueExpression(Attributes.RENDERED_PARTIALLY, expression);
+      } else {
+        Object renderedPartially = selectBooleanComponent.getAttributes().get(Attributes.RENDERED_PARTIALLY);
+        command.setRenderedPartially(StringUtils.split((String) renderedPartially, ", "));
+      }
     }
     
     selectBooleanCheckbox.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=730866&r1=730865&r2=730866&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 Fri Jan  2 15:21:52 2009
@@ -131,15 +131,17 @@
   @Override
   public int doEndTag() throws JspException {
 
-    // Move attribute renderedPartially from selectOne to menuCommand component
-    UIComponent selectOneComponent = selectOneRadio.getComponentInstance();
-    UICommand command = (UICommand) menuCommandTag.getComponentInstance();
-    javax.el.ValueExpression expression = selectOneComponent.getValueExpression(Attributes.RENDERED_PARTIALLY);
-    if (expression != null) {
-      command.setValueExpression(Attributes.RENDERED_PARTIALLY, expression);
-    } else {
-      Object renderedPartially = selectOneComponent.getAttributes().get(Attributes.RENDERED_PARTIALLY);
-      command.setRenderedPartially(StringUtils.split((String) renderedPartially, ", "));
+    if (renderedPartially == null) {
+      // Move attribute renderedPartially from selectOne to menuCommand component
+      UIComponent selectOneComponent = selectOneRadio.getComponentInstance();
+      UICommand command = (UICommand) menuCommandTag.getComponentInstance();
+      javax.el.ValueExpression expression = selectOneComponent.getValueExpression(Attributes.RENDERED_PARTIALLY);
+      if (expression != null) {
+        command.setValueExpression(Attributes.RENDERED_PARTIALLY, expression);
+      } else {
+        Object renderedPartially = selectOneComponent.getAttributes().get(Attributes.RENDERED_PARTIALLY);
+        command.setRenderedPartially(StringUtils.split((String) renderedPartially, ", "));
+      }
     }
 
     selectOneRadio.doEndTag();