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

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


    public Collection getSelectedFolderChildren()
    {
        TreeView objTreeView = (TreeView) getComponent("treeView");
        ITreeStateModel objTreeStateModel = objTreeView.getTreeModel().getTreeStateModel();
        Object objSelectedNodeUID = objTreeStateModel.getSelectedNode();
        ITreeNode objSelectedNode = null;
        if (objSelectedNodeUID != null)
            objSelectedNode = (ITreeNode) getTreeModel().getTreeDataModel().getObject(
                    objSelectedNodeUID);
        else
        {
            objSelectedNode = (ITreeNode) getTreeModel().getTreeDataModel().getRoot();
        }
        return objSelectedNode.getChildren();
    }
View Full Code Here


    public String getSelectedNodeName()
    {
        TreeView objTreeView = (TreeView) getComponent("treeView");
        ITreeStateModel objTreeStateModel = objTreeView.getTreeModel().getTreeStateModel();
        Object objSelectedNodeUID = objTreeStateModel.getSelectedNode();
        ITreeNode objSelectedNode = null;
        if (objSelectedNodeUID != null)
            objSelectedNode = (ITreeNode) getTreeModel().getTreeDataModel().getObject(
                    objSelectedNodeUID);
        else
        {
            objSelectedNode = (ITreeNode) getTreeModel().getTreeDataModel().getRoot();
        }
        return objSelectedNode.toString();
    }
View Full Code Here

     * @see org.apache.tapestry.contrib.tree.model.ITreeSessionStateManager#getModel(Object)
     */
    public ITreeModel getModel(Object objSessionState) {
        ITreeStateModel objStateModel = (ITreeStateModel) objSessionState;

        ITreeNode objParent;

        if (m_strRootDir == null || "".equals(m_strRootDir)) {
            objParent = new FileSystem();
        } else {
            FolderObject objFolder = new FolderObject(null, new File(m_strRootDir), true);
View Full Code Here

        m_objTreeSessionStateManager = null;
    }

    public void initTableModel()
    {
        ITreeNode objParent;
        String strRootDir = getRequestCycle().getRequestContext().getServlet().getInitParameter(
                "TreeRootDir");

        System.out.println("strRootDir = " + strRootDir);
View Full Code Here

    {
        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
        {
            objSelectedNode = (ITreeNode) getTreeModel().getTreeDataModel().getRoot();
        }
        return objSelectedNode.getChildren();
    }
View Full Code Here

    {
        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
        {
            objSelectedNode = (ITreeNode) getTreeModel().getTreeDataModel().getRoot();
        }
        return objSelectedNode.toString();
    }
View Full Code Here

        m_objTreeSessionStateManager = null;
    }

    public void initTableModel()
    {
        ITreeNode objParent;
        String strRootDir = getRequestCycle().getRequestContext().getServlet().getInitParameter(
                "TreeRootDir");

        System.out.println("strRootDir = " + strRootDir);
View Full Code Here

    public Collection getSelectedFolderChildren()
    {
        TreeView objTreeView = (TreeView) getComponent("treeView");
        ITreeStateModel objTreeStateModel = objTreeView.getTreeModel().getTreeStateModel();
        Object objSelectedNodeUID = objTreeStateModel.getSelectedNode();
        ITreeNode objSelectedNode = null;
        if (objSelectedNodeUID != null)
            objSelectedNode = (ITreeNode) getTreeModel().getTreeDataModel().getObject(
                    objSelectedNodeUID);
        else
        {
            objSelectedNode = (ITreeNode) getTreeModel().getTreeDataModel().getRoot();
        }
        return objSelectedNode.getChildren();
    }
View Full Code Here

    public String getSelectedNodeName()
    {
        TreeView objTreeView = (TreeView) getComponent("treeView");
        ITreeStateModel objTreeStateModel = objTreeView.getTreeModel().getTreeStateModel();
        Object objSelectedNodeUID = objTreeStateModel.getSelectedNode();
        ITreeNode objSelectedNode = null;
        if (objSelectedNodeUID != null)
            objSelectedNode = (ITreeNode) getTreeModel().getTreeDataModel().getObject(
                    objSelectedNodeUID);
        else
        {
            objSelectedNode = (ITreeNode) getTreeModel().getTreeDataModel().getRoot();
        }
        return objSelectedNode.toString();
    }
View Full Code Here

     */
    public ITreeModel getModel(Object objSessionState)
    {
        ITreeStateModel objStateModel = (ITreeStateModel) objSessionState;

        ITreeNode objParent;

        if (m_strRootDir == null || "".equals(m_strRootDir))
        {
            objParent = new FileSystem(_assetService);
        }
View Full Code Here

TOP

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

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.