myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r546814 - /myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
Date Wed, 13 Jun 2007 10:43:36 GMT
Author: weber
Date: Wed Jun 13 03:43:33 2007
New Revision: 546814

URL: http://svn.apache.org/viewvc?view=rev&rev=546814
Log:
(TOBAGO-423) markup attribute did not support multiple markups when using valueBindig

Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java?view=diff&rev=546814&r1=546813&r2=546814
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
Wed Jun 13 03:43:33 2007
@@ -1158,10 +1158,19 @@
       Object markups = vb.getValue(facesContext);
       if (markups instanceof String[]) {
         return (String[]) markups;
+      } else if (markups instanceof String) {
+        String[] strings = ((String) markups).split("[, ]");
+        List<String> result = new ArrayList<String>(strings.length);
+        for (String string : strings) {
+          if (string.trim().length() != 0) {
+            result.add(string.trim());
+          }
+        }
+        return (String[]) result.toArray(new String[result.size()]);
       } else if (markups == null) {
         return new String[0];
       } else {
-        return new String[]{(String) markups};
+        return new String[]{(String) markups.toString()};
       }
     }
 
@@ -1257,4 +1266,4 @@
     // we should reset rowIndex on UIData
     uiData.setRowIndex(oldRowIndex);
   }
-}
+    }



Mime
View raw message