Package org.apache.tapestry.contrib.tree.model

Examples of org.apache.tapestry.contrib.tree.model.ITreeModelSource


        return getSelectedNodeID();
    }

    public String getSelectedID(){
    ITreeRowSource objTreeRowSource = getTreeRowSource();
    ITreeModelSource objTreeModelSource = getTreeModelSource();
    TreeRowObject objTreeRowObject = objTreeRowSource.getTreeRow();
        Object objNodeValueUID = objTreeRowObject.getTreeNodeUID();
        Object objSelectedNode = objTreeModelSource.getTreeModel().getTreeStateModel().getSelectedNode();
        if(objNodeValueUID.equals(objSelectedNode)) {
            return getSelectedNodeID();
        }
        return "";
    }
View Full Code Here


    return "tree"
  }
   
    public String getNodeStyleClass() {
    ITreeRowSource objTreeRowSource = getTreeRowSource();
    ITreeModelSource objTreeModelSource = getTreeModelSource();
    TreeRowObject objTreeRowObject = objTreeRowSource.getTreeRow();
    boolean bResult = false;
    if(objTreeRowObject != null){
          Object objNodeValueUID = objTreeRowObject.getTreeNodeUID();
          Object objSelectedNode = objTreeModelSource.getTreeModel().getTreeStateModel().getSelectedNode();
      bResult = objNodeValueUID.equals(objSelectedNode);
    }
        if (bResult) {
            return "selectedNodeViewClass";
        }
View Full Code Here

    ITreeRowSource objSource = (ITreeRowSource)getPage().getRequestCycle().getAttribute(ITreeRowSource.TREE_ROW_SOURCE_ATTRIBUTE);
      return objSource;
    }

  public ITreeModelSource getTreeModelSource(){
    ITreeModelSource objSource = (ITreeModelSource)getPage().getRequestCycle().getAttribute(ITreeModelSource.TREE_MODEL_SOURCE_ATTRIBUTE);
    return objSource;
  }
View Full Code Here

    initialize();
  }


    public ITreeModelSource getTreeModelSource() {
    ITreeModelSource objSource = (ITreeModelSource) getPage().getRequestCycle().getAttribute(ITreeModelSource.TREE_MODEL_SOURCE_ATTRIBUTE);
      if(objSource == null){
      objSource = (ITreeModelSource) getBinding("treeView").getObject();
      }
      return objSource;
    }
View Full Code Here

    }

    public ArrayList generateNodeList() {
        if(m_arrAllExpandedNodes == null){
          // render data
      ITreeModelSource objTreeModelSource = getTreeModelSource();
          ITreeModel objTreeModel = objTreeModelSource.getTreeModel();
          ITreeDataModel objTreeDataModel = objTreeModel.getTreeDataModel();
          Object objValue = objTreeDataModel.getRoot();
          Object objValueUID = objTreeDataModel.getUniqueKey(objValue, null);
 
          // Object objSelectedNode = objTreeModel.getTreeStateModel().getSelectedNode();
View Full Code Here

  /**
   * @see org.apache.tapestry.workbench.tree.examples.ISelectedFolderSource#getSelectedFolder()
   */
  public Collection getSelectedFolderChildren() {
    TreeTable objTreeTable = (TreeTable)getComponent("tree");
    ITreeModelSource objTreeModelSource = objTreeTable.getTreeModelSource();
    ITreeStateModel objTreeStateModel = objTreeModelSource.getTreeModel().getTreeStateModel();
    Object objSelectedNodeUID = objTreeStateModel.getSelectedNode();
    ITreeNode objSelectedNode = null;
    if(objSelectedNodeUID != null)
      objSelectedNode = (ITreeNode)getTreeModel().getTreeDataModel().getObject(objSelectedNodeUID);
    else{
View Full Code Here

  /**
   * @see org.apache.tapestry.workbench.tree.examples.ISelectedFolderSource#getSelectedNodeName()
   */
  public String getSelectedNodeName() {
    TreeTable objTreeTable = (TreeTable)getComponent("tree");
    ITreeModelSource objTreeModelSource = objTreeTable.getTreeModelSource();
    ITreeStateModel objTreeStateModel = objTreeModelSource.getTreeModel().getTreeStateModel();
    Object objSelectedNodeUID = objTreeStateModel.getSelectedNode();
    ITreeNode objSelectedNode = null;
    if(objSelectedNodeUID != null)
      objSelectedNode = (ITreeNode)getTreeModel().getTreeDataModel().getObject(objSelectedNodeUID);
    else{
View Full Code Here

    initialize();
  }


    public ITreeModelSource getTreeModelSource() {
    ITreeModelSource objSource = (ITreeModelSource) getPage().getRequestCycle().getAttribute(ITreeModelSource.TREE_MODEL_SOURCE_ATTRIBUTE);
      if(objSource == null){
      objSource = (ITreeModelSource) getBinding("treeView").getObject();
      }
      return objSource;
    }
View Full Code Here

    }

    public ArrayList generateNodeList() {
        if(m_arrAllExpandedNodes == null){
          // render data
      ITreeModelSource objTreeModelSource = getTreeModelSource();
          ITreeModel objTreeModel = objTreeModelSource.getTreeModel();
          ITreeDataModel objTreeDataModel = objTreeModel.getTreeDataModel();
          Object objValue = objTreeDataModel.getRoot();
          Object objValueUID = objTreeDataModel.getUniqueKey(objValue, null);
 
          // Object objSelectedNode = objTreeModel.getTreeStateModel().getSelectedNode();
View Full Code Here

    public abstract ITreeModelSource getTreeViewParameter();

    public ITreeModelSource getTreeModelSource()
    {
        ITreeModelSource objSource = (ITreeModelSource) getPage().getRequestCycle().getAttribute(
                ITreeModelSource.TREE_MODEL_SOURCE_ATTRIBUTE);

        return objSource == null ? getTreeViewParameter() : objSource;
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.contrib.tree.model.ITreeModelSource

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.