001: // @@
002: // @@
003: /*
004: * Wi.Ser Framework
005: *
006: * LGPL Version: 1.8.1, 20-September-2007
007: * Copyright (C) 2005-2006 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.ho.server.generic;
032:
033: import de.ug2t.kernel.*;
034: import de.ug2t.unifiedGui.interfaces.*;
035: import de.ug2t.xmlScript.*;
036:
037: public final class HoSrvGenericOptionDialog extends
038: AHoSrvGenericComponent implements IUnOptionDialog {
039:
040: /**
041: *
042: */
043: public HoSrvGenericOptionDialog(String xName, IUnApplication xAppl,
044: String xClass) throws Exception {
045: super (xName);
046: this .pcmf_setAppl(xAppl);
047: this .pcmf_setLocalValue("");
048: this .pcmf_setEventOnChange(true);
049: this .pcmf_setAutoEcho(false);
050:
051: if (xClass == null)
052: pdm_clientClass = "de.ug2t.channel.ho.client.swing.HoSwingOptionDialog";
053: else
054: pdm_clientClass = xClass;
055:
056: KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
057: "");
058:
059: if (this .pdm_session.pcmf_isInTransaction()) {
060: ScXmlScript.pcmf_createPBody(l_remCall);
061: } else {
062: ScXmlScript.pcmf_createxScriptString(l_remCall, null);
063: ScXmlScript.pcmf_addProc(l_remCall, null);
064: }
065: ;
066: ScXmlScript.pcmf_addDecl(l_remCall, this .pcmf_getRemName(),
067: this .pdm_clientClass, "global");
068: ScXmlScript.pcmf_addDeclPar(l_remCall, xName, "false",
069: "java.lang.String");
070: ScXmlScript.pcmf_addDeclPar(l_remCall,
071: ((HoSrvGenericApplication) xAppl).pcmf_getRemName(),
072: "true", "de.ug2t.unifiedGui.interfaces.IUnApplication");
073:
074: ScXmlScript.pcmf_endAll(l_remCall);
075:
076: this .pdm_session.pcmf_call(l_remCall.toString(), this );
077:
078: return;
079:
080: }
081:
082: public void pcmf_showAlert(String xMessage) {
083: KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
084: "");
085:
086: if (this .pdm_session.pcmf_isInTransaction()) {
087: ScXmlScript.pcmf_createPBody(l_remCall);
088: } else {
089: ScXmlScript.pcmf_createxScriptString(l_remCall, null);
090: ScXmlScript.pcmf_addProc(l_remCall, null);
091: }
092: ;
093: ScXmlScript.pcmf_addCall(l_remCall, null, this
094: .pcmf_getRemName(), "pcmf_showAlert");
095: ScXmlScript.pcmf_addCallPar(l_remCall, xMessage, "false",
096: "java.lang.String");
097: ScXmlScript.pcmf_endAll(l_remCall);
098:
099: this .pdm_session.pcmf_call(l_remCall.toString(), this );
100: }
101:
102: public void pcmf_showOption(String xMessage) {
103: KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
104: "");
105:
106: if (this .pdm_session.pcmf_isInTransaction()) {
107: ScXmlScript.pcmf_createPBody(l_remCall);
108: } else {
109: ScXmlScript.pcmf_createxScriptString(l_remCall, null);
110: ScXmlScript.pcmf_addProc(l_remCall, null);
111: }
112: ;
113: ScXmlScript.pcmf_addCall(l_remCall, null, this
114: .pcmf_getRemName(), "pcmf_showOption");
115: ScXmlScript.pcmf_addCallPar(l_remCall, xMessage, "false",
116: "java.lang.String");
117: ScXmlScript.pcmf_endAll(l_remCall);
118:
119: this .pdm_session.pcmf_call(l_remCall.toString(), this );
120: }
121:
122: public void pcmf_showTextInput(String xMessage) {
123: KeStringTemplateWrapper l_remCall = new KeStringTemplateWrapper(
124: "");
125:
126: if (this .pdm_session.pcmf_isInTransaction()) {
127: ScXmlScript.pcmf_createPBody(l_remCall);
128: } else {
129: ScXmlScript.pcmf_createxScriptString(l_remCall, null);
130: ScXmlScript.pcmf_addProc(l_remCall, null);
131: }
132: ;
133: ScXmlScript.pcmf_addCall(l_remCall, null, this
134: .pcmf_getRemName(), "pcmf_showTextInput");
135: ScXmlScript.pcmf_addCallPar(l_remCall, xMessage, "false",
136: "java.lang.String");
137: ScXmlScript.pcmf_endAll(l_remCall);
138:
139: this .pdm_session.pcmf_call(l_remCall.toString(), this );
140: }
141:
142: public AHoSrvGenericComponent pcmf_buildRefObj() throws Exception {
143: AHoSrvGenericComponent l_obj = new HoSrvGenericOptionDialog(
144: this .pcmf_getName(), this .pcmf_getAppl(),
145: this .pdm_clientClass);
146:
147: l_obj.pcmf_setGlobal(true);
148: l_obj.pcmf_setAutoEcho(this .pcmf_doAutoEcho());
149: l_obj.pcmf_setRefFrom(this );
150: this .pcmf_setGlobal(true);
151: this.pcmf_addRef(l_obj);
152:
153: return (l_obj);
154: };
155: }
|