001: // @@
002: // @@
003: /*
004: * Wi.Ser Framework
005: *
006: * Version: 1.8.1, 20-September-2007
007: * Copyright (C) 2005 Dirk von der Weiden <dvdw@imail.de>
008: *
009: * This library is free software; you can redistribute it and/or
010: * modify it under the terms of the GNU Lesser General Public
011: * License as published by the Free Software Foundation; either
012: * version 2 of the License, or (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017: * Lesser General Public License for more details.
018: *
019: * You should have received a copy of the GNU Lesser General Public
020: * License along with this library located in LGPL.txt in the
021: * license directory; if not, write to the
022: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
023: * Boston, MA 02111-1307, USA.
024: *
025: * If this agreement does not cover your requirements, please contact us
026: * via email to get detailed information about the commercial license
027: * or our service offerings!
028: *
029: */
030: // @@
031: package de.ug2t.channel.markup.html.renderer;
032:
033: import de.ug2t.channel.markup.generic.*;
034: import de.ug2t.kernel.*;
035:
036: public final class HtmlPageRenderer implements IKeView {
037: public boolean pcmf_supportsCaching() {
038: return (false);
039: }
040:
041: public void pcmf_activateCache(boolean xAc) {
042: throw (new UnsupportedOperationException());
043: }
044:
045: public void pcmf_clearCache() {
046: throw (new UnsupportedOperationException());
047: }
048:
049: public Object pcmf_output(KeTreeElement xTreeEl) {
050: MuGenericPage html_xTreeEl = (MuGenericPage) xTreeEl;
051:
052: html_xTreeEl.pcmf_evalRepaint();
053:
054: MuGenericApplication l_appl = (MuGenericApplication) html_xTreeEl
055: .pcmf_getAppl();
056: KeStringTemplate l_string = html_xTreeEl
057: .pcmf_getMarkupString("MAIN");
058:
059: KeStringTemplate l_minit = html_xTreeEl
060: .pcmf_getMarkupString("MINIT");
061: KeStringTemplate l_tm = html_xTreeEl
062: .pcmf_getMarkupString("TOPMENU");
063:
064: l_string = html_xTreeEl.pcmf_insertToolTip(l_string);
065: l_string = html_xTreeEl
066: .pcmf_insertColorandFontandBorder(l_string);
067: l_string = html_xTreeEl.pcmf_insertPosition(l_string);
068: l_string = html_xTreeEl.pcmf_insertChannelandMenu(l_string);
069: l_string = html_xTreeEl.pcmf_insertBgImage(l_string);
070:
071: l_string.pcmf_beginTR();
072:
073: if (html_xTreeEl.pcmf_getScroll())
074: l_string = KeTools.pcmf_stringSubst(l_string, "$SCROLL",
075: "auto");
076: else
077: l_string = KeTools.pcmf_stringSubst(l_string, "$SCROLL",
078: "hidden");
079:
080: l_string = KeTools.pcmf_stringSubst(l_string, "$TITLE",
081: (html_xTreeEl.pcmf_getValue()).toString());
082:
083: StringBuffer l_str = new StringBuffer();
084: l_str.append(l_appl.pcmf_getHostName());
085: l_str.append(":");
086: l_str.append(Integer.toString(l_appl.pcmf_getPort()));
087: l_str.append("/");
088: l_str.append(l_appl.pcmf_getRootUrl());
089:
090: if (l_appl.pcmf_getClientPoll()) {
091: KeStringTemplate l_push = html_xTreeEl
092: .pcmf_getMarkupString("PUSH");
093: l_string = KeTools.pcmf_stringSubst(l_string, "$PUSH",
094: l_push);
095: } else
096: l_string = KeTools.pcmf_stringSubst(l_string, "$PUSH", "");
097:
098: l_string = KeTools.pcmf_stringSubst(l_string, "$URL", l_str
099: .toString());
100: l_string = KeTools.pcmf_stringSubst(l_string, "$PROT", l_appl
101: .pcmf_getProtocol());
102:
103: l_string = KeTools.pcmf_stringSubst(l_string, "$OID",
104: html_xTreeEl.pcmf_getObjName());
105:
106: if (l_appl.pcmf_getActiveMenu() != null)
107: l_minit = KeTools.pcmf_stringSubst(l_minit, "$TOPMENU",
108: l_tm);
109: else if (html_xTreeEl.pcmf_getMenu() != null)
110: l_minit = KeTools.pcmf_stringSubst(l_minit, "$TOPMENU",
111: l_tm);
112: else
113: l_minit = KeTools.pcmf_stringSubst(l_minit, "$TOPMENU", "");
114:
115: l_string = KeTools
116: .pcmf_stringSubst(l_string, "$MINIT", l_minit);
117:
118: l_string.pcmf_endTR(true);
119:
120: return (l_string);
121: };
122:
123: public Object pcmf_execView(KeTreeElement xTreeEl) {
124: return (xTreeEl.pcmf_execView());
125: };
126: };
|