001: /*
002: * JFolder, Copyright 2001-2006 Gary Steinmetz
003: *
004: * Distributable under LGPL license.
005: * See terms of license at gnu.org.
006: */
007:
008: package org.jfolder.console.web.develop.web.page;
009:
010: //base classes
011: import java.io.IOException;
012:
013: //project specific classes
014: import org.jfolder.common.UnexpectedSystemException;
015: import org.jfolder.console.base.ConsolePageContext;
016: import org.jfolder.console.base.NamesForSubCpc;
017: import org.jfolder.console.base.context.BaseSubPaneContentConsolePageContext;
018:
019: //other classes
020:
021: public class DevelopWebPagePanelessViewContext extends
022: BaseSubPaneContentConsolePageContext {
023:
024: //
025: private String sectionId = null;
026:
027: //private int baseToggleLinkListLength = 0;
028: //private StringBuffer webPageContent = null;
029:
030: //
031: //
032: //
033: private DevelopWebPagePanelessViewContext(ConsolePageContext inCpc) {
034:
035: super (inCpc, NamesForSubCpc
036: .getDevelopWebPagePanelessViewCpcName());
037: //this.webPageContent = new StringBuffer();
038: }
039:
040: public final static DevelopWebPagePanelessViewContext newInstance(
041: ConsolePageContext inCpc) throws IOException {
042:
043: DevelopWebPagePanelessViewContext outValue = null;
044:
045: if (inCpc.isSubConsolePageContextPresent(NamesForSubCpc
046: .getDevelopWebPagePanelessViewCpcName())) {
047: //
048: Object o = inCpc.getSubConsolePageContext(NamesForSubCpc
049: .getDevelopWebPagePanelessViewCpcName());
050: outValue = (DevelopWebPagePanelessViewContext) o;
051: } else {
052: outValue = new DevelopWebPagePanelessViewContext(inCpc);
053: inCpc.registerSubConsolePageContext(NamesForSubCpc
054: .getDevelopWebPagePanelessViewCpcName(), outValue);
055: }
056:
057: outValue.copyFromParent(inCpc);
058: outValue.createConsolePage(inCpc.getWriter(), inCpc
059: .getPageSetupContext());
060:
061: return outValue;
062: }
063:
064: //
065: //
066: //
067: //private DevelopWebPageContext(ConsolePageSession inCps) {
068: //
069: // super(inCs);
070: // ConceptTagPreferences localCtp =
071: // inCps.getCurrentApplicationRootHolder().getPreferences();
072: // //setTreeState(ConsolePageParameters.BRANCH_SEPARATOR
073: // // + localCtp.getRootHandle()
074: // // + ConsolePageParameters.BRANCH_SEPARATOR);
075: // setTreeState(localCtp.getRootHandle());
076: // setHighlightHandle(localCtp.getRootHandle());
077: //}
078: //
079: //
080: //
081: public String getSectionId() {
082: return this .sectionId;
083: }
084:
085: public String getDownShiftToHighlightHandle() {
086: throw UnexpectedSystemException.unknownState();
087: }
088:
089: //private String templateContent = null;
090: //private String mainContent = null;
091: protected void renderConsolePage() throws IOException {
092:
093: //
094: this .sectionId = getConsolePageSession().getToggleLink();
095: //
096: int baseToggleLinkListLength = getConsolePageSession()
097: .getToggleLinkAsArrayList().size();
098: //
099: //
100: renderWebPageTagInstanceViewContext(baseToggleLinkListLength);
101: //
102: }
103:
104: }
|