Package com.tensegrity.wpalo.client.serialization

Examples of com.tensegrity.wpalo.client.serialization.XNode


  class ReportTreeModel {
    private final TreeNode root;
   
    public ReportTreeModel(XUser user) {
      //children:
      XNode sheetTemplates = new XNode(user, XConstants.TYPE_SHEET_TEMPLATES_NODE);
      sheetTemplates.setName("Spreadsheet Reports");
      sheetTemplates.setHasChildren(true);
      sheetTemplates.setId("ReportNavigatorView#SheetTemplatesNode");
     
      XNode adhocTemplates = new XNode(user, XConstants.TYPE_ADHOC_TEMPLATES_NODE);
      adhocTemplates.setName("Adhoc Reports");
      adhocTemplates.setHasChildren(true);
      adhocTemplates.setId("ReportNavigatorView#AdhocTemplatesNodes");
     
      //root node
      XNode rootNode = new XNode(user, XConstants.TYPE_ROOT_NODE);
      rootNode.setId("ReportNavigatorView#RootNode");
      rootNode.addChild(sheetTemplates);
      rootNode.addChild(adhocTemplates);
      rootNode.setHasChildren(true);
     
      root = new TreeNode(null, rootNode);
    }
View Full Code Here


      if (event.data instanceof XUser) {
        user = (XUser) event.data;
      }
      initUI();
      // Create initial tree structure:
      XNode root = new XNode(user, XConstants.TYPE_ROOT_REPORT_STRUCTURE_NODE);
      root.setName("DummyRoot");
      root.setId("ReportStructureNavigatorView#RootNode");
      root.setHasChildren(true);
      rootNode = new TreeNode(null, root);
      Dispatcher.forwardEvent(WPaloEvent.EXPANDED_REPORT_STRUCTURE_SECTION,
          rootNode);
                 
//      Dispatcher.forwardEvent(WPaloEvent.EXPANDED_REPORT_STRUCTURE_SECTION,
View Full Code Here

  class ListTreeModel {
    private final TreeNode root;
   
    public ListTreeModel(XUser user) {
      //root node
      XNode rootNode = new XNode(user, XConstants.TYPE_ROOT_NODE);
      rootNode.setId("ReportNavigatorView_ListTab#RootNode");
      rootNode.setHasChildren(true);
     
      root = new TreeNode(null, rootNode);
    }
View Full Code Here

 
  private final TreeNode root;
 
  public AdminTreeModel(XUser user) {
    //children:
    XNode users = new XNode(user, XConstants.TYPE_USERS_NODE);
    users.setName(constants.users());
    users.setHasChildren(true);
    users.setId("AdminNavigatorView#UsersNode");
   
    XNode groups = new XNode(user, XConstants.TYPE_GROUPS_NODE);
    groups.setName(constants.groups());
    groups.setHasChildren(true);
    groups.setId("AdminNavigatorView#GroupsNode");
   
    XNode roles = new XNode(user, XConstants.TYPE_ROLES_NODE);
    roles.setName(constants.roles());
    roles.setHasChildren(true);
    roles.setId("AdminNavigatorView#RolesNode");
   
   
    //root node
    XNode rootNode = new XNode(null, XConstants.TYPE_ROOT_NODE);
    rootNode.setId("AdminNavigatorView#RootNode");
    rootNode.addChild(users);
    rootNode.addChild(groups);
    rootNode.addChild(roles);
    rootNode.setHasChildren(true);
   
    root = new TreeNode(null, rootNode);
  }
View Full Code Here

 
  private final TreeNode root;
 
  public AccountTreeModel(XUser user) {
    //children:
    XNode accounts = new XNode(user, XConstants.TYPE_ACCOUNTS_NODE);
    accounts.setName(constants.accounts());
    accounts.setHasChildren(true);
    accounts.setId("AccountNavigatorView#AccountsNode");
   
    XNode connections = new XNode(user, XConstants.TYPE_CONNECTIONS_NODE);
    connections.setName(constants.connections());
    connections.setHasChildren(true);
    connections.setId("AccountNavigatorView#ConnectionsNode");
   
    //root node
    XNode rootNode = new XNode(null, XConstants.TYPE_ROOT_NODE);
    rootNode.setId("AccountNavigatorView#RootNode");
    rootNode.addChild(connections);
    rootNode.addChild(accounts);   
    rootNode.setHasChildren(true);
   
    root = new TreeNode(null, rootNode);
  }
View Full Code Here

class ReportTreeModel {
  private final TreeNode root;
 
  public ReportTreeModel(XUser user) {
    //children:
    XNode sheetTemplates = new XNode(user, XConstants.TYPE_SHEET_TEMPLATES_NODE);
    sheetTemplates.setName(WPalo.i18n.reportNavigatorView_sheetTemplatesName());
//        "Sheet Templates");
    sheetTemplates.setHasChildren(true);
    sheetTemplates.setId("ReportNavigatorView#SheetTemplatesNode");
   
    XNode adhocTemplates = new XNode(user, XConstants.TYPE_ADHOC_TEMPLATES_NODE);
    adhocTemplates.setName(WPalo.i18n.reportNavigatorView_adhocTemplatesName());
//        "Adhoc Templates");
    adhocTemplates.setHasChildren(true);
    adhocTemplates.setId("ReportNavigatorView#AdhocTemplatesNodes");
   
    //root node
    XNode rootNode = new XNode(null, XConstants.TYPE_ROOT_NODE);
    rootNode.setId("ReportNavigatorView#RootNode");
    rootNode.addChild(sheetTemplates);
    rootNode.addChild(adhocTemplates);
    rootNode.setHasChildren(true);
   
    root = new TreeNode(null, rootNode);
  }
View Full Code Here

      if (event.data instanceof XUser) {
        user = (XUser) event.data;
      }
      initUI();
      // Create initial tree structure:
      XNode root = new XNode(user, XConstants.TYPE_ROOT_REPORT_STRUCTURE_NODE);
      root.setName("DummyRoot");
      root.setId("ReportStructureNavigatorView#RootNode");
      root.setHasChildren(true);
      rootNode = new TreeNode(null, root);
      Dispatcher.forwardEvent(WPaloEvent.EXPANDED_VIEW_REPORT_STRUCTURE_SECTION,
          rootNode);
                 
//      Dispatcher.forwardEvent(WPaloEvent.EXPANDED_REPORT_STRUCTURE_SECTION,
View Full Code Here

    switch (event.type) {
    case WPaloEvent.INIT:
      initUI();
      Workbench wb = (Workbench)Registry.get(Workbench.ID);
      XUser xuser = wb.getUser();
      XNode root = new XNode(xuser, XConstants.TYPE_ROOT_NODE);
      root.setName("DummyRoot");
      root.setId("0");
      root.setHasChildren(true);
      Dispatcher.forwardEvent(WPaloEvent.EXPANDED_SERVER_SECTION,
          new TreeNode(null, root));
      break;
    case WPaloEvent.EXPANDED_SERVER_SECTION: //load tree data
      TreeNode node = (TreeNode) event.data;
View Full Code Here

  public boolean accepts(XObject parent) {
    return parent.getType().equals(XConstants.TYPE_ROOT_NODE);
  }

  public XObject[] loadChildren(XObject parent, UserSession userSession) {
    XNode node = (XNode) parent;
    return node.getChildren();
  }
View Full Code Here

    store.add(parent, node, false);
    if(node.getParent() == null)
      node.setParent(parent);
  }
  private final void initialize() {
    XNode rootNode = new XNode(user, TYPE);
    rootNode.setId(TYPE);
    setRoot(new TreeNode(null, wrap(rootNode)));
  }
View Full Code Here

TOP

Related Classes of com.tensegrity.wpalo.client.serialization.XNode

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.