Changes between Initial Version and Version 1 of SopUseJQuerytree


Ignore:
Timestamp:
2012-01-10T16:52:41+01:00 (12 years ago)
Author:
antonak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SopUseJQuerytree

    v1 v1  
     1= Demo =
     2http://vm7.target.rug.nl/catalogue/molgenis.do?__target=main&select=LLcatalogueTreePlugin (test/test)
     3
     4= Location =
     5
     6
     7{{{
     8/molgenis/src/org/molgenis/framework/ui/html/JQueryTreeView.java
     9
     10}}}
     11
     12{{{
     13and /molgenis/src/org/molgenis/framework/ui/html/JQueryTreeViewElement.java
     14
     15}}}
     16
     17JQueryTreeView.java contains the constructor , renderTree() and toHtml().
     18The function renderTree() is used by toHtml() is order to print each specific node to html <li>.The function toHtml() is actually serving the whole tree if called . Contains the css and js references as well as the jquery functionality.
     19About the tree: No Nodes collapsed explicitly. Node is manually closed then by giving its LI element a "closed"(/opened) CSS class.
     20The animation is enabled, and the speed is "normal" (this can be modified). "Cookie" persistence enabled, causing the current tree state to be persisted. Dynamically adding a sub tree to the existing tree demonstrated.
     21
     22==How to instantiate and use it ==
     23 * Inside your plugin instantiate a tree object by calling
     24
     25{{{
     26JQueryTreeView<JQueryTreeViewElement> treeView 
     27
     28}}}
     29
     30*You will probably need a function like addingObjectsToTree which will actually create the JQueryTreeViewElemen and fill the JQueryTreeView. 
     31*For the purposes of the measurements tree in LLcatalogueTree plugin(/molgenis_apps/apps/lifelines/plugins/LLcatalogueTree)  we have instantiated the JQuery tree  in public class JQueryTreeViewElementMeasurement extends JQueryTreeViewElement{ where the elements of the tree are measurements.
     32* There is an example in LLcatalogueTree       
     33public void addingMeasurementTotree(List<String> c
     34Also public String getTreeView() { return treeView.toHtml(); } will call render the tree in your ftl.