Examples of ChildPropertyTreeModel


Examples of org.apache.myfaces.trinidad.model.ChildPropertyTreeModel

  public void endDocument()
  {
    _menuList = _menuNodes.get(0);
   
    // Create the treeModel
    ChildPropertyTreeModel treeModel =
                  new ChildPropertyTreeModel(_menuList, "children");
                 
    // Put it in the map
    _treeModelMap.put(_currentTreeModelMapKey, treeModel);
   
    // If Model is the Root, then build Model's hashmaps
    // and set them on the Root Model.
    XMLMenuModel rootModel = getRootModel();
   
    if (rootModel == getModel())
    {
      _viewIdFocusPathMap = new HashMap<String,List<Object>>();
      _nodeFocusPathMap   = new HashMap<Object, List<Object>>();
      _idNodeMap          = new HashMap<String, Object>();
      Object oldPath      = treeModel.getRowKey();

      treeModel.setRowKey(null);

      // Populate the maps
      _addToMaps(treeModel, _viewIdFocusPathMap, _nodeFocusPathMap, _idNodeMap);
     
      // Cache the maps.  There is a possibility of multiple
      // root models so we must cache the maps on a per root model
      // basis.
      _viewIdFocusPathMapMap.put(_currentTreeModelMapKey, _viewIdFocusPathMap);
      _nodeFocusPathMapMap.put(_currentTreeModelMapKey, _nodeFocusPathMap);
      _idNodeMapMap.put(_currentTreeModelMapKey, _idNodeMap);
     
      treeModel.setRowKey(oldPath);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.