01: /**
02: * Copyright 2002 Sun Microsystems, Inc. All
03: * rights reserved. Use of this product is subject
04: * to license terms. Federal Acquisitions:
05: * Commercial Software -- Government Users
06: * Subject to Standard License Terms and
07: * Conditions.
08: *
09: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
10: * are trademarks or registered trademarks of Sun Microsystems,
11: * Inc. in the United States and other countries.
12: *
13: * Author: Anurag Gupta
14: */package com.sun.portal.netfile.admin;
15:
16: // JDK classes
17: import java.util.ArrayList;
18: import com.sun.portal.log.common.PortalLogger;
19: import java.util.List;
20:
21: // Servlet classes
22: import javax.servlet.http.HttpServletRequest;
23:
24: // iPlanet JATO classes
25: import com.iplanet.jato.view.View;
26:
27: // iDS/AME classes
28: import com.iplanet.am.console.components.view.html.DynamicGUI;
29: import com.iplanet.am.console.components.view.html.DynamicGUIComp;
30:
31: public class NetFileTotalFiveView extends NetFileViewBase {
32:
33: /*
34: * @param parent The reference of the parent container
35: * @param name The name of this view.
36: */
37: public NetFileTotalFiveView(View parent, String name, int type) {
38: super (parent, name, type);
39: attributeListSize = 1;
40: String[] attributeNameListTemp = { "sunPortalNetFileMimetypesConfigFileLocation" };
41:
42: attributeNameList = attributeNameListTemp;
43: attributeIndicesSet = false;
44: attributeIndicesList = new int[attributeListSize];
45: }
46:
47: /**
48: * re-creates dynamic gui components for saving purposes
49: *
50: * @return dynamic gui components for action value
51: */
52: public List getDynamicCompList(int netfilehostsIndex) {
53: List dynamicGUIs = new ArrayList(10);
54: HttpServletRequest req = getRequestContext().getRequest();
55:
56: int count = 0;
57: while (attributeListSize > 0) {
58: /*
59: * Skip if it is the index of Attributes not in this Bean's list
60: */
61: if (count == netfilehostsIndex) {
62: count++;
63: continue;
64: }
65: DynamicGUI dGUI = DynamicGUIComp.createDynamicGUI(req,
66: getQualifiedName(), CC_ATTR_SET, count++);
67:
68: if (dGUI != null) {
69: dynamicGUIs.add(dGUI);
70: } else {
71: break;
72: }
73: }
74: return dynamicGUIs;
75: }
76:
77: }
|