Package com.sun.webui.jsf.component

Examples of com.sun.webui.jsf.component.Tree


  // Create a Tree dataSource...
  TreeDataSource dataSource = new CallFlowStackTreeDS(content);

  // Fill the Tree
  Tree tree = dataSource.createJSFTree(parent);

  // Set the output
  handlerCtx.setOutputValue("tree", tree);
    }
View Full Code Here


  public Tree createJSFTree(UIComponent parent) {
      Map nodeMap = null;
      UIComponent child = null;
      String type = null;
      String methodName = null;
      Tree tree = null;

      // Get the interator...
      Iterator<Map> it = _maps.iterator();
      if (!it.hasNext()) {
    return null;
      }
           
            //Get the application name from the methodStart row.
            String application = "";
            for(int i=0; i<_maps.size(); i++){
                Map ms = _maps.get(i);
                String rowType = (String) ms.get(CallFlowMonitor.CALL_STACK_ROW_TYPE_KEY);
                if(rowType.equals(CallFlowMonitor.CALL_STACK_METHOD_START )){
                    application = (String) ms.get(CallFlowMonitor.APPLICATION_NAME_KEY );
                    if(! GuiUtil.isEmpty(application))
                        break;
                }
            }
                   
      // Process first Map (should be RequestStart)
      nodeMap = (Map) it.next();
      if (!((String) nodeMap.get(CallFlowMonitor.CALL_STACK_ROW_TYPE_KEY)).
        equals(CallFlowMonitor.CALL_STACK_REQUEST_START)) {
    throw new RuntimeException("CallFlow stack should begin with "
      + "RequestStart, instead got: '"
      + nodeMap.get(CallFlowMonitor.CALL_STACK_ROW_TYPE_KEY) + "'.");
      }
      Properties props = new Properties();
      props.put("expanded", Boolean.TRUE);
            //ensure application is not null
            if (application == null) application = "";
      props.put("text", application);
      //props.put("imageURL", ...);
      child = ComponentUtil.getChild(parent, "callFlowTree",
        "com.sun.jsftemplating.component.factory.sun.TreeFactory",
        props);
      parent.getChildren().add(child);
      tree = (Tree) child;
      tree.setClientSide(false);

      int idx = 0;
      while (it.hasNext()) {
    nodeMap = (Map) it.next();
    type = (String) nodeMap.get(CallFlowMonitor.CALL_STACK_ROW_TYPE_KEY);
View Full Code Here

TOP

Related Classes of com.sun.webui.jsf.component.Tree

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.