myfaces-commits mailing list archives

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

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


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=411322&r1=411321&r2=411322&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 15:42:45 2006
@@ -1230,6 +1230,51 @@
     {
         Integer rowIndex = new Integer(getRowIndex());
 
+     * 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();
+            }
+        }
+    } 
+    
+    /**
         if(_expandedNodes.contains(rowIndex))
         {
             _expandedNodes.remove(rowIndex);



Mime
View raw message