]> source.dussan.org Git - vaadin-framework.git/commitdiff
Sampler: removed "View section" -links from ListView for clarity.
authorMarc Englund <marc.englund@itmill.com>
Tue, 10 Feb 2009 19:48:58 +0000 (19:48 +0000)
committerMarc Englund <marc.englund@itmill.com>
Tue, 10 Feb 2009 19:48:58 +0000 (19:48 +0000)
svn changeset:6790/svn branch:trunk

src/com/itmill/toolkit/demo/sampler/SamplerApplication.java

index aadf405edba4f93ff7040001220fe8ed0d7063d7..4131b58207d705480ba47e7911afc11f884e052d 100644 (file)
@@ -579,20 +579,23 @@ public class SamplerApplication extends Application {
                 public Component generateCell(Table source, Object itemId,
                         Object columnId) {
                     final Feature feature = (Feature) itemId;
-                    ActiveLink b = new ActiveLink(
-                            (feature instanceof FeatureSet ? "View section ‣"
-                                    : "View sample ‣"), new ExternalResource(
-                                    "#" + getPathFor(feature)));
-                    b.addListener(new ActiveLink.LinkActivatedListener() {
-                        public void linkActivated(LinkActivatedEvent event) {
-                            if (!event.isLinkOpened()) {
-                                ((SamplerWindow) getWindow())
-                                        .setFeature(feature);
+                    if (feature instanceof FeatureSet) {
+                        return null;
+                    } else {
+                        ActiveLink b = new ActiveLink("View sample ‣",
+                                new ExternalResource("#" + getPathFor(feature)));
+                        b.addListener(new ActiveLink.LinkActivatedListener() {
+                            public void linkActivated(LinkActivatedEvent event) {
+                                if (!event.isLinkOpened()) {
+                                    ((SamplerWindow) getWindow())
+                                            .setFeature(feature);
+                                }
                             }
-                        }
-                    });
-                    b.setStyleName(Button.STYLE_LINK);
-                    return b;
+                        });
+
+                        b.setStyleName(Button.STYLE_LINK);
+                        return b;
+                    }
                 }
 
             });