01: /*
02: * projectManagement
03: *
04: * Enhydra super-servlet presentation object
05: *
06: */
07:
08: package projectmanagement.presentation.worksheets;
09:
10: import projectmanagement.presentation.*;
11:
12: import org.w3c.dom.*;
13: import org.w3c.dom.html.*;
14:
15: // Enhydra SuperServlet imports
16: import com.lutris.appserver.server.httpPresentation.*;
17: import org.enhydra.xml.xmlc.XMLObject;
18:
19: // Standard imports
20: import java.io.IOException;
21:
22: /**
23: * Generates the blank HTML page.
24: */
25: public class Context extends BasePO {
26:
27: private static String IS_PERSONAL = "isPersonal";
28: private static String DISPLAY_ADMIN = "displayAdmin";
29: private static String EMPLOYEE = "employee";
30:
31: /**
32: * Superclass method override. Returns 1 or 2, depending on action.
33: */
34: protected int getRequiredAuthLevel() {
35: String isPersonal = "";
36: try {
37: isPersonal = this .getComms().request
38: .getParameter(IS_PERSONAL);
39: } catch (Exception ex) {
40: }
41:
42: if (isPersonal != null && isPersonal.equalsIgnoreCase("true")) {
43: return 1;
44: } else {
45: return 2;
46: }
47: }
48:
49: /**
50: * Default event. Just show the page.
51: */
52: public XMLObject handleDefault() throws HttpPresentationException {
53:
54: ContextHTML page = new ContextHTML();
55:
56: String isPersonal = this .getComms().request
57: .getParameter(IS_PERSONAL);
58: String displayAdmin = this .getComms().request
59: .getParameter(DISPLAY_ADMIN);
60: String employee = this .getComms().request
61: .getParameter(EMPLOYEE);
62:
63: if (isPersonal != null && isPersonal.equalsIgnoreCase("true")) {
64: page.getElementFrameControl().setSrc(
65: "Controls.po?isPersonal=true");
66: }
67:
68: return page;
69: }
70:
71: }
|