my problem is still the same. I am trying to use your Stitch Demo with 
gridcollapse to display nested grids. This worked okay, then I suddenly  got 
this error message a wrote you about. 

/*
Hi,
i have been trying to solve this problem for weeks now without any success. I 
have some difficulties using your stich-demo.
i get the error message: org.apache.tapestry5.dom.Text cannot be cast to 
org.apache.tapestry5.dom.Element
it comes from GridCollapse.java in the function:

private Element findTable(Element container) {
  List<Node> topChildren = container.getChildren();
      Element containingDiv = (Element)  topChildren.get(topChildren.size()-1); 
   //this line causes the error
      
      
    Element table = containingDiv.find("table");
      if (table == null) {    
        throw new RuntimeException("Could not find table element");
      }
      return table;
  }
}


*/


I just dont get it.


Will


De : Lance Java <lance.j...@googlemail.com>
À : Tapestry users <users@tapestry.apache.org> 
Envoyé le : Mardi 18 juin 2013 9h35
Objet : Re: DefaultTreeModel doesnt user encoder to get the node
 

Even if this functionality changes, I still think that DefaultTreeModel is
flawed.

DefaultTreeModel requires the roots to be instantiated for the model to
exist (it's part of the constructor). If you source your data from a
database and don't store the model in the session or as a singleton this
will cause unnecessary hits to the database. For example when expanding a
tree node, the model is required but the roots are not.

Luckily, TreeModel is an interface and DefaultTreeModel is optional. You
can use my LazyTreeModel or similar.

Reply via email to