01: /**
02: * Title: OpenUSS - Open Source University Support System
03: * My Piggy Bank Example
04: * Description: Enhydra Presentation Object
05: * Copyright: Copyright (c) 2003 by B. Lofi Dewanto, T. Menzel
06: * Company: University of Muenster, HTWK Leipzig
07: * @author B. Lofi Dewanto, T. Menzel
08: * @version 1.1
09: */package net.sourceforge.ejosa.piggybank.presentation.enhydra;
10:
11: import com.lutris.appserver.server.httpPresentation.*;
12:
13: //import com.lutris.xml.xmlc.*;
14:
15: import java.io.*;
16:
17: import java.util.*;
18:
19: import org.openuss.presentation.enhydra.framework.*;
20:
21: import org.openuss.utility.*;
22:
23: import org.w3c.dom.*;
24: import org.w3c.dom.html.*;
25:
26: /**
27: * Welcome Page
28: *
29: * @author B. Lofi Dewanto, T. Menzel
30: * @version 1.1
31: */
32: public class WelcomePage extends FoundationPO {
33: /**
34: * Default event. Just show the page.
35: */
36: public String handleDefault() throws HttpPresentationException {
37: // Create the page
38: WelcomeHTML page = (WelcomeHTML) this .getComms().xmlcFactory
39: .create(WelcomeHTML.class);
40:
41: // Look for an error
42: String errorMsg = this .getSessionData()
43: .getAndClearUserMessage();
44:
45: if (errorMsg == null) {
46: // No error
47: page.getElementTStatusbar().getParentNode().removeChild(
48: page.getElementTStatusbar());
49: } else {
50: // Error, put it in the statusbar
51: page.setTextTStatusbar(errorMsg);
52: }
53:
54: // Work with the page
55: return page.toDocument();
56: }
57:
58: /**
59: * Superclass method override.
60: */
61: public boolean loggedInUserRequired() {
62: // This page doesn't need a login
63: return false;
64: }
65: }
|