Package org.apache.myfaces.trinidad.model

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


  {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    Map<String, Object> requestMap =
      facesContext.getExternalContext().getRequestMap();
   
    XMLMenuModel model = (XMLMenuModel) requestMap.get(getRootModelKey());
    return model;
  }
View Full Code Here


  {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    Map<String, Object> requestMap =
      facesContext.getExternalContext().getRequestMap();
   
    XMLMenuModel model =  (XMLMenuModel) requestMap.get(getRootModelKey());
    return model;
  }
View Full Code Here

       
        // Need to push several items onto the stack now as we recurse
        // into another menu model.
        _saveModelData();       

        XMLMenuModel menuModel = (XMLMenuModel)MenuUtils.getBoundValue(expr);
       
        // Now must pop the values cause we are back to the parent
        // model.
        _restoreModelData();
       
        Object         subMenuObj  = menuModel.getWrappedData();
        List<MenuNode> subMenuList = null;
       
        if (subMenuObj instanceof ChildPropertyTreeModel)
        {
          subMenuList = 
View Full Code Here

    // 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>>();
View Full Code Here

        // Need to push several items onto the stack now as we recurse
        // into another menu model.
        _saveModelData();       

        // Create the sub menu model specified in the sharedNode
        XMLMenuModel menuModel = (XMLMenuModel)MenuUtils.getBoundValue(expr);
       
        // Now must pop the values cause we are back to the parent
        // model.
        _restoreModelData();
       
        // Name of the managed bean that is the sub menu XMLMenuModel.
        String modelStr = expr.substring(expr.indexOf('{')+1,
                                         expr.indexOf('}'));
       
        // There are 2 ways that a Model can be invalid:
        // 1) Something such as a missing managed bean definition
        //    for the submenu model causes the creation of the
        //    XMLMenuModel for the submenu to fail. This will result
        //    in menuModel being NULL.
        // 2) Some kind of parsing error in its metadata.  If a node
        //    type is invalid, an exception will be thrown (see below)
        //    and caught in getTreeModel().  This will result in a
        //    null submenu list the following SAXException will also
        //    be logged.
        if (menuModel != null)
        {
          Object         subMenuObj  = menuModel.getWrappedData();
          List<MenuNode> subMenuList = null;
         
          if (subMenuObj instanceof ChildPropertyTreeModel)
          {
            subMenuList = 
View Full Code Here

      // 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>>();
View Full Code Here

  {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    Map<String, Object> requestMap =
      facesContext.getExternalContext().getRequestMap();
   
    XMLMenuModel model = (XMLMenuModel) requestMap.get(getRootModelKey());
    return model;
  }
View Full Code Here

    FacesContext facesContext = FacesContext.getCurrentInstance();
    Map<String, Object> requestMap =
      facesContext.getExternalContext().getRequestMap();

    Map map =  (Map) requestMap.get(getRootModelKey());
    XMLMenuModel model = (XMLMenuModel) map.get(getRootId());
    return model;
  }
View Full Code Here

    FacesContext facesContext = FacesContext.getCurrentInstance();
    Map<String, Object> requestMap =
      facesContext.getExternalContext().getRequestMap();

    Map map =  (Map) requestMap.get(getRootModelKey());
    XMLMenuModel model = (XMLMenuModel) map.get(getRootId());
    return model;
  }
View Full Code Here

        // Need to push several items onto the stack now as we recurse
        // into another menu model.
        _saveModelData();

        // Create the sub menu model specified in the sharedNode
        XMLMenuModel menuModel = (XMLMenuModel)MenuUtils.getBoundValue(expr,
                                                              Object.class);


        // Now must pop the values cause we are back to the parent
        // model.
        _restoreModelData();
       
        recurseLevel = (Integer) requestMap.get(_RECURSE_COUNTER);
        recurseLevel --;
        requestMap.put(_RECURSE_COUNTER, recurseLevel);
       
        if(recurseLevel == 0)
          requestMap.remove(XMLMenuModel.SHARED_MODEL_INDICATOR_KEY);
       

        // Name of the managed bean that is the sub menu XMLMenuModel.
        String modelStr = expr.substring(expr.indexOf('{')+1,
                                         expr.indexOf('}'));

        // There are 2 ways that a Model can be invalid:
        // 1) Something such as a missing managed bean definition
        //    for the submenu model causes the creation of the
        //    XMLMenuModel for the submenu to fail. This will result
        //    in menuModel being NULL.
        // 2) Some kind of parsing error in its metadata.  If a node
        //    type is invalid, an exception will be thrown (see below)
        //    and caught in getTreeModel().  This will result in a
        //    null submenu list the following SAXException will also
        //    be logged.
        if (menuModel != null)
        {
          Object         subMenuObj  = menuModel.getWrappedData();
          List<MenuNode> subMenuList = null;

          if (subMenuObj instanceof ChildPropertyTreeModel)
          {
            subMenuList =
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.model.XMLMenuModel

Copyright © 2018 www.massapicom. 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.