click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r830419 - /incubator/click/trunk/click/examples/src/org/apache/click/examples/control/exporter/TableExportBanner.java
Date Wed, 28 Oct 2009 01:11:54 GMT
Author: sabob
Date: Wed Oct 28 01:11:54 2009
New Revision: 830419

URL: http://svn.apache.org/viewvc?rev=830419&view=rev
Log:
don't render banner if no exporters are defined

Modified:
    incubator/click/trunk/click/examples/src/org/apache/click/examples/control/exporter/TableExportBanner.java

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/control/exporter/TableExportBanner.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/control/exporter/TableExportBanner.java?rev=830419&r1=830418&r2=830419&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/control/exporter/TableExportBanner.java
(original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/control/exporter/TableExportBanner.java
Wed Oct 28 01:11:54 2009
@@ -25,6 +25,7 @@
 import org.apache.click.Control;
 import org.apache.click.control.Renderable;
 import org.apache.click.util.HtmlStringBuffer;
+import org.apache.commons.collections.CollectionUtils;
 
 /**
  *
@@ -123,6 +124,10 @@
      * @param buffer the StringBuffer to render the paging controls to
      */
     protected void renderExportBanner(HtmlStringBuffer buffer) {
+        List exportFormats = getExportFormats();
+        if (exportFormats == null || exportFormats.isEmpty()) {
+            return;
+        }
 
         HtmlStringBuffer banner = new HtmlStringBuffer();
         Iterator<AbstractTableExporter> it = getExportFormats().iterator();



Mime
View raw message