Package org.openxava.web.editors
Class TreeViewParser
java.lang.Object
org.openxava.web.editors.TreeViewParser
Parse the tree view and produces a javascript snippet.
- Author:
- Federico Alcantara
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCreates the MetaTreeView for later usestatic org.json.JSONArrayfindChildrenOfNode(String parentId, org.json.JSONArray data, Map<String, Object> map, boolean rootNodeFound) getMetaTreeView(String modelName) Returns the saved metaTreeViewReturns the metaTreeviews Map that stores the already processed Metatreeview.Creates the treeview script to be used in the jsp page
-
Field Details
-
XAVA_TREE_VIEW_PARSER
- See Also:
-
XAVA_TREE_VIEW_NODE_FULL_PATH
- See Also:
-
-
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 objectcollectionName- Name of the collectionstyle- Display styleerrors- Errors message container- Throws:
Exception
-
getMetaTreeView
Returns the saved metaTreeView- Parameters:
modelName- name of the model- Returns:
- A MetaTreeView object. Should not be null.
-
parse
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
Returns the metaTreeviews Map that stores the already processed Metatreeview.- Returns:
- A map, never null
-
findChildrenOfNode
-