[richfaces-svn-commits] JBoss Rich Faces SVN: r18989 - in trunk/ui/iteration/ui/src/main: resources/META-INF/resources/org.richfaces and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Aug 26 11:09:40 EDT 2010


Author: abelevich
Date: 2010-08-26 11:09:39 -0400 (Thu, 26 Aug 2010)
New Revision: 18989

Modified:
   trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractSubTable.java
   trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/subtable.js
Log:
RF-9136

Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractSubTable.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractSubTable.java	2010-08-26 14:10:54 UTC (rev 18988)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractSubTable.java	2010-08-26 15:09:39 UTC (rev 18989)
@@ -1,5 +1,5 @@
 /*
- * JBoss, Home of Professional Open Source
+* JBoss, Home of Professional Open Source
  * Copyright ${year}, Red Hat, Inc. and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
@@ -69,9 +69,14 @@
         expanded
     }
             
-    @Attribute(defaultValue = "true")
-    public abstract boolean isExpanded();
+    public boolean isExpanded() {
+        return (Boolean)getStateHelper().eval(PropertyKeys.expanded, true);
+    }
     
+    public void setExpanded(boolean expanded) {
+        getStateHelper().put(PropertyKeys.expanded, expanded);
+    }
+    
     @Attribute(defaultValue = MODE_CLIENT)
     public abstract String getExpandMode();
 
@@ -79,6 +84,7 @@
         if (event instanceof ToggleEvent) {
             ToggleEvent toggleEvent = (ToggleEvent) event;
             boolean newValue = toggleEvent.isExpanded();
+
             getStateHelper().put(PropertyKeys.expanded, newValue);
             
             FacesContext facesContext = getFacesContext();

Modified: trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/subtable.js
===================================================================
--- trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/subtable.js	2010-08-26 14:10:54 UTC (rev 18988)
+++ trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/subtable.js	2010-08-26 15:09:39 UTC (rev 18989)
@@ -85,7 +85,7 @@
     		},
     		    		    		
     		isExpand: function() {
-    			return (this.getState() > richfaces.ui.SubTable.collapse);
+    			return (parseInt(this.getState()) == richfaces.ui.SubTable.expand);
            	},
            
     		switchState: function(options) {



More information about the richfaces-svn-commits mailing list