Package org.nextime.ion.backoffice.tree

Examples of org.nextime.ion.backoffice.tree.TreeControlNode


    // retrieve selected section
    TreeControl tree =
      (TreeControl) request.getSession().getAttribute("treeControlTest");
    String selectedId = request.getParameter("id");
    TreeControlNode node = tree.findNode(selectedId);

    try {
      Mapping.begin();

      Section section = Section.getInstance(selectedId);
      section.remove();
      // update tree
      try {
        TreeControlNode parent = node.getParent();
        node.remove();
        if (parent != null) {
          parent.rebuildLastChildren();
        }
      } catch (Exception e) {
      }

      Mapping.commit();
View Full Code Here


  }
       
        // retrieve selected section
        TreeControl tree = (TreeControl)request.getSession().getAttribute("treeControlTest");
        String selectedId = request.getParameter("id") ;      
        TreeControlNode node = tree.findNode(selectedId);
               
        try {
          Mapping.begin();         
         
          Section section = Section.getInstance(selectedId);
          String newId = IdGenerator.nextSectionId();
          Section newSection = section.create(section,newId);
          newSection.setMetaData("status","offline");
          request.setAttribute("id",newId);
          // update tree
          TreeControlNode newNode = WcmTreeBuilder.buildNode(newSection);
          node.addChild(newNode);
          newNode.rebuildLast();
         
          Mapping.commit();
        } catch(Exception e) {
          Mapping.rollback();
          throw new ServletException(e);
View Full Code Here

    // get section
    try {
      Mapping.begin();
     
      Section section = Section.getInstance(request.getParameter("id"));
      TreeControlNode node = ((TreeControl)(request.getSession().getAttribute("treeControlTest"))).findNode(request.getParameter("id"));
      // up or down ?
      if( request.getParameter("type").equals("up") ) {
        section.up();
        node.up();
      } else {
        section.down();
        node.down();
      }
     
      Mapping.commit();
    } catch (Exception e) {
      Mapping.rollback();
View Full Code Here

        name = request.getParameter("tree");

        if (name != null) {
            getServlet().log("Tree expand/contract on " + name);

            TreeControlNode node = control.findNode(name);

            if (node != null){
                getServlet().log("Found Node: " + name);
                node.setExpanded(!node.isExpanded());
            }
        }else{
            getServlet().log("tree param is null");
        }
View Full Code Here

      // Make the root node and tree control

      // The root node gets rendered only if its value
      // is set as an init-param in web.xml

      TreeControlNode root =
        new TreeControlNode(
          "ROOT-NODE",
          "root.gif",
          rootnodeName,
          "setUpTree.x?select=ROOT-NODE",
          "content",
View Full Code Here

            name.substring(5),
            request.getParameter(name));
        }
      }
      // update the tree ...
      TreeControlNode node =
        (
          (TreeControl) request.getSession().getAttribute(
            "treeControlTest")).findNode(
          request.getParameter("id"));
      node.setLabel(sform.getName());
      String img = "section.gif";
      if ("offline".equals(section.getMetaData("status"))) {
        img = "section-offline.gif";
      }
      node.setIcon(img);

      Mapping.commit();
    } catch (Exception e) {
      Mapping.rollback();
      throw new ServletException(e);
View Full Code Here

TOP

Related Classes of org.nextime.ion.backoffice.tree.TreeControlNode

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.