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: import de.ug2t.unifiedGui.interfaces.*;
036:
037: public final class HtmlEventChannelRenderer implements IKeView {
038: private MuGenericCache pem_cache = new MuGenericCache();
039:
040: public boolean pcmf_supportsCaching() {
041: return (true);
042: }
043:
044: public void pcmf_clearCache() {
045: this .pem_cache.pcmf_clearCache();
046: }
047:
048: public void pcmf_activateCache(boolean xAc) {
049: this .pem_cache.pcmf_activateThisCache(xAc);
050: return;
051: }
052:
053: public Object pcmf_output(KeTreeElement xTreeEl) {
054: MuGenericComponent html_xTreeEl = (MuGenericComponent) xTreeEl;
055:
056: // @@
057: MuGenericEventChannel l_event = (MuGenericEventChannel) xTreeEl;
058:
059: if (l_event.pcmf_isDisabled())
060: return ("");
061:
062: if (l_event.pcmf_getType() == IUnEventChannel.EVENT_POSITION) {
063: KeStringTemplate l_wstring = l_event
064: .pcmf_getMarkupString("WDGPOS");
065: l_wstring = KeTools.pcmf_stringSubst(l_wstring, "$PID",
066: l_event.pcmf_getParentNode().pcmf_getObjName());
067: l_wstring = KeTools.pcmf_stringSubst(l_wstring, "$CID",
068: l_event.pcmf_getObjName());
069: ((MuGenericApplication) html_xTreeEl.pcmf_getAppl())
070: .pcmf_getRenderer().pcmf_addCommand(
071: l_wstring.toString());
072: }
073:
074: KeStringTemplate l_string = l_event
075: .pcmf_getMarkupString("MAIN");
076:
077: l_string.pcmf_beginTR();
078: l_string = KeTools.pcmf_stringSubst(l_string, "$OID",
079: html_xTreeEl.pcmf_getObjName());
080:
081: if (l_event.pcmf_getType() == IUnEventChannel.EVENT_SCROLL)
082: l_string = KeTools.pcmf_stringSubst(l_string, "$ID",
083: l_event.pcmf_getParentNode().pcmf_getObjName()
084: + IUnEventChannel.EVENTs[l_event
085: .pcmf_getType()]);
086: else
087: l_string = KeTools.pcmf_stringSubst(l_string, "$ID",
088: l_event.pcmf_getObjName());
089:
090: l_string = KeTools.pcmf_stringSubst(l_string, "$NAME", l_event
091: .pcmf_getObjName());
092:
093: if (l_event.pcmf_getKeyFilter() != null)
094: l_string = KeTools.pcmf_stringSubst(l_string, "$SUBMIT",
095: !l_event.pcmf_isSubmit() ? "0" : "1"
096: + l_event.pcmf_getKeyFilter());
097: else
098: l_string = KeTools.pcmf_stringSubst(l_string, "$SUBMIT",
099: !l_event.pcmf_isSubmit() ? "0" : "1");
100:
101: l_string.pcmf_endTR(true);
102:
103: // @@
104:
105: return (l_string);
106: };
107:
108: public Object pcmf_execView(KeTreeElement xTreeEl) {
109: return (xTreeEl.pcmf_execView().toString());
110: };
111: };
|