01: /*
02: * JFolder, Copyright 2001-2006 Gary Steinmetz
03: *
04: * Distributable under LGPL license.
05: * See terms of license at gnu.org.
06: */
07:
08: package org.jfolder.console.web.admin.workflow.instance.migration;
09:
10: //base classes
11: import java.io.IOException;
12: import java.util.ArrayList;
13: import java.util.HashMap;
14: import java.util.Iterator;
15:
16: //project specific classes
17: import org.jfolder.common.UnexpectedSystemException;
18: import org.jfolder.common.utils.misc.MiscHelper;
19: import org.jfolder.common.utils.xml.XMLHelper;
20: import org.jfolder.common.web.template.ConsoleParameterContext;
21: import org.jfolder.common.web.template.SubmitActionContext;
22: import org.jfolder.common.web.template.SubmitActionParameters;
23: import org.jfolder.console.base.ConsolePageContext;
24: import org.jfolder.console.base.ConsolePageParameters;
25: import org.jfolder.console.base.ConsolePageSession;
26:
27: //other classes
28:
29: public class AdminImportExportContext extends ConsolePageContext {
30:
31: private final static String BUTTON__GO_BACK = "BUTTON__GO_BACK";
32:
33: private AdminImportExportContext(ConsolePageSession inCps) {
34:
35: super (inCps);
36: }
37:
38: public final static AdminImportExportContext newInstance(
39: ConsolePageSession inCps) {
40:
41: return new AdminImportExportContext(inCps);
42: }
43:
44: public String getFromPage() {
45: return ConsolePageParameters.SERVLET_IMPORT_EXPORT;
46: }
47:
48: public String getHandle() {
49: return NULL_HANDLE;
50: }
51:
52: public String getHandleExtension() {
53: throw new UnexpectedSystemException(
54: "This function should not be called in this class");
55: }
56:
57: protected void renderConsolePage() throws IOException {
58:
59: int columnWidth = getColumnWidth();
60:
61: startCommonPage();
62: //
63: startEnclosingTableAndRowAndCell(alignCenter(null));
64: //
65: startAndEndStretchTableAndRowAndCell("<hr/>");
66: //
67: startTable(3);
68: startRow();
69: startAndEndCell(2, "Import/Export", getFontStyle(20, ARIAL,
70: BLACK));
71: startCell(1, alignCenter(null));
72: //
73: SubmitActionContext sacGoBack = SubmitActionContext
74: .newInstance(this );
75: sacGoBack.setGoToPage(ConsolePageParameters.SERVLET_CONSOLE);
76: //
77: sacGoBack.addAction(ConsoleParameterContext.FIRST_INPUT,
78: singleQuotes(SubmitActionParameters.RETURN));
79: sacGoBack.addAction(ConsoleParameterContext.SECOND_INPUT,
80: singleQuotes(SubmitActionParameters.IMPORT_EXPORT));
81: //
82: createButton(BUTTON__GO_BACK, "Go Back", 150,
83: submitActionCall(sacGoBack), null, null, null, null);
84: //
85: endCell();
86: endRow();
87: endTable();
88: //
89: startAndEndStretchTableAndRowAndCell("<hr/>");
90: //
91: endEnclosingTableAndRowAndCell();
92: //
93: endCommonPage();
94: }
95:
96: }
|