title: Vaadin 7.1 ItemStyleGenerator
body: <p>I have a problem formatting toplevel-nodes in a Vaadin-Tree. I understand using the ItemStyleGenerator to set ccs-Style for particular nodes. I did this with following code:</p>
  
  <pre><code>        this.setItemStyleGenerator(new Tree.ItemStyleGenerator() {
              @Override
              public String getStyle(Tree source, Object itemId) {
                  if (source.isRoot(itemId)) {
                      return "toplevel";
                  } else {
                      return null;
                  }
               }
           });
  </code></pre>
  
  <p>The CSS is as follows:</p>
  
  <pre><code>        .v-tree-node-toplevel {
              border: 1px solid #d8d9d9;
              background: #fff;
              @include border-radius(6px);
          }
  </code></pre>
  
  <p>And the result is, that the root-node and all its child nodes have the same background-color and the border is around the toplevel- and all its child-nodes and the node icon is missing</p>
  
  <p>My goal is to format just the root-node.</p>
  
  <p>When i set the toplevel-style to a child node it is formatted as expected. </p>
  
  <p>Can somebody help? Thanks.</p>
  
  <p>Bernhard</p>