private Node createServletsNode() { ExtendedServletsType[] servlets = webext.getExtendedServlets(); Children servch = new Children.Array(); Node[] servletNode = null; if (servlets != null && servlets.length > 0) { servletNode = new Node[servlets.length]; for (int i = 0; i < servlets.length; i++) { servletNode[i] = new ServletsNode(); servletNode[i].setDisplayName("Extended Servlet #" + (i + 1)); } servch.add(servletNode); } Node servletsNode = new SectionContainerNode(servch); servletsNode.setDisplayName("Extended Servlets"); servletsCont = new SectionContainer(this, servletsNode, "Extended Servlets"); servletsCont.setHeaderActions(new javax.swing.Action[] {addServletAction}); // creatings section panels for ResRefs if (servlets != null) { SectionPanel[] pan = new SectionPanel[servlets.length]; for (int i = 0; i < servlets.length; i++) { pan[i] = new SectionPanel(this, servletNode[i], servlets[i]); pan[i].setHeaderActions(new javax.swing.Action[] {removeServletAction}); servletsCont.addSection(pan[i]); } } addSection(servletsCont); return servletsNode; }
WSWebExtView(WSWebExtDataObject dObj) { super(factory); Children rootChildren = new Children.Array(); Node root = new AbstractNode(rootChildren); try { this.webext = dObj.getWebExt(); rootChildren.add(new Node[] {createWebExtAttrNode(), createServletsNode()}); /* rootChildren.add(new Node[]{ createWebExtAttrNode(), createResRefNode(), createEjbRefNode(), createResEnvRefNode()} );*/ } catch (java.io.IOException ex) { System.out.println("ex=" + ex); root.setDisplayName("Invalid WebExt"); } finally { setRoot(root); } }