Class TreeViewParser

java.lang.Object
org.openxava.web.editors.TreeViewParser

public class TreeViewParser extends Object
Parse the tree view and produces a javascript snippet.
Author:
Federico Alcantara
  • Field Details

  • Constructor Details

    • TreeViewParser

      public TreeViewParser()
      Default constructor
  • Method Details

    • createMetaTreeView

      public void createMetaTreeView(Tab tab, String viewObject, String collectionName, Style style, Messages errors) throws Exception
      Creates the MetaTreeView for later use
      Parameters:
      tab - Tab object containing model, TableModel, etc.
      viewObject - Visible object
      collectionName - Name of the collection
      style - Display style
      errors - Errors message container
      Throws:
      Exception
    • getMetaTreeView

      public TreeView getMetaTreeView(String modelName)
      Returns the saved metaTreeView
      Parameters:
      modelName - name of the model
      Returns:
      A MetaTreeView object. Should not be null.
    • parse

      public String parse(String modelName) throws Exception
      Creates the treeview script to be used in the jsp page
      Parameters:
      modelName - name of the model to render
      Returns:
      Script for creating the treeview.
      Throws:
      Exception
    • getMetaTreeViews

      public Map<String,TreeView> getMetaTreeViews()
      Returns the metaTreeviews Map that stores the already processed Metatreeview.
      Returns:
      A map, never null
    • findChildrenOfNode

      public static org.json.JSONArray findChildrenOfNode(String parentId, org.json.JSONArray data, Map<String,Object> map, boolean rootNodeFound)