myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grantsm...@apache.org
Subject svn commit: r411328 - /myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlDataTable.java
Date Fri, 02 Jun 2006 23:02:23 GMT
Author: grantsmith
Date: Fri Jun  2 16:02:23 2006
New Revision: 411328

URL: http://svn.apache.org/viewvc?rev=411328&view=rev
Log:
TOMAHAWK-388 retry patch

Modified:
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlDataTable.java

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlDataTable.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlDataTable.java?rev=411328&r1=411327&r2=411328&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlDataTable.java
(original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlDataTable.java
Fri Jun  2 16:02:23 2006
@@ -1285,6 +1285,52 @@
         getFacets().put(SPACER_FACET_NAME, spacer);
     }
 
+    /**
+     * Expand all details
+     */
+    public void expandAllDetails()
+    {
+        int rowCount = getRowCount();
+
+        _expandedNodes.clear();
+        for (int row = 0; row < rowCount; row++)
+        {
+            _expandedNodes.add(new Integer(row));
+        }
+    }
+
+    /**
+     * Collapse all details
+     */
+    public void collapseAllDetails()
+    {
+        _expandedNodes.clear();
+    }
+
+    /**
+     * @return true is any of the details is expanded
+     */
+    public boolean isExpandedEmpty() {
+        boolean expandedEmpty = true;
+        if (_expandedNodes != null) {
+            expandedEmpty = _expandedNodes.isEmpty();
+        }
+        return expandedEmpty;
+    }
+
+    /**
+     * Clears expanded nodes set if expandedEmpty is true
+     * @param expandedEmpty
+     */
+    public void setExpandedEmpty(boolean expandedEmpty) {
+        if (expandedEmpty) {
+            if (_expandedNodes != null) {
+                _expandedNodes.clear();
+            }
+        }
+    }
+
+
     //------------------ GENERATED CODE BEGIN (do not modify!) --------------------
 
     public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlDataTable";



Mime
View raw message