01: /*
02: * projectManagement
03: *
04: * Enhydra super-servlet presentation object
05: *
06: */
07:
08: package projectmanagement.presentation.projects;
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 CUSTOMER = "customer";
28: private static String DISPLAY_ADMIN = "displayAdmin";
29:
30: /**
31: * Superclass method override. Returns 2.
32: */
33: protected int getRequiredAuthLevel() {
34: return 2;
35: }
36:
37: /**
38: * Default event. Just show the page.
39: */
40: public XMLObject handleDefault() throws HttpPresentationException {
41:
42: ContextHTML page = new ContextHTML();
43: String customerID = this .getComms().request
44: .getParameter(CUSTOMER);
45: String displayAdmin = this .getComms().request
46: .getParameter(DISPLAY_ADMIN);
47: if (customerID != null) {
48: page.getElementFrameControl().setSrc(
49: "Controls.po?" + CUSTOMER + "=" + customerID);
50: }
51: if (displayAdmin != null
52: && displayAdmin.equalsIgnoreCase("true")) {
53: page.getElementFrameAdministering().setSrc(
54: "Administering.po?" + CUSTOMER + "=" + customerID);
55: }
56:
57: return page;
58: }
59:
60: }
|