You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gr...@apache.org on 2006/06/03 00:42:45 UTC
svn commit: r411322 -
/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/HtmlDataTable.java
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);