// @@
// @@
/*
* Wi.Ser Framework
*
* Version: 1.8.1, 20-September-2007
* Copyright (C) 2005 Dirk von der Weiden <dvdw@imail.de>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library located in LGPL.txt in the
* license directory; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* If this agreement does not cover your requirements, please contact us
* via email to get detailed information about the commercial license
* or our service offerings!
*
*/
// @@
package de.ug2t.unifiedGui;
import java.io.*;
import java.util.*;
import java.util.Map;
import javax.swing.text.html.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import de.ug2t.channel.ho.*;
import de.ug2t.channel.ho.server.generic.*;
import de.ug2t.channel.ho.session.*;
import de.ug2t.channel.markup.generic.*;
import de.ug2t.kernel.*;
import de.ug2t.model.values.*;
import de.ug2t.unifiedGui.interfaces.*;
import de.ug2t.unifiedGui.plugins.*;
import de.ug2t.unifiedGui.scripting.*;
public final class UnApplFactSAXHandler extends DefaultHandler
{
protected IMoValue pdm_actMValue = null;
protected KeTreeElement pdm_act = null;
protected final Stack pdm_elements = new Stack();
protected final Stack pdm_names = new Stack();
protected final Stack pdm_feStack = new Stack();
protected final Stack pdm_allNameStack = new Stack();
protected final Stack pdm_sourceStack = new Stack();
protected int pdm_AppType = UnComponentFactory.MARKUP;
protected boolean pdm_mixed = false;
protected IUnApplication pdm_appl = null;
protected IUnPage pdm_page = null;
protected String pdm_name = null;
protected UnComponentFactory pdm_objFact = null;
protected int pdm_optionNr = 0;
protected int pdm_optionFalseNr = 0;
protected boolean pdm_optional = true;
protected final Map pdm_forEachs = new LinkedHashMap();
static final private Map pem_producers = new HashMap();
private boolean pem_terminateOnError = true;
protected UnApplicationFactory pdm_myProducer = null;
public KeTreeElement pcmf_getActNode()
{
return (this.pdm_act);
}
public String pcmf_getActName()
{
return (this.pdm_name);
}
public IUnPage pcmf_getPage()
{
return (this.pdm_page);
}
static
{
UnApplFactSAXHandler.pcmf_addProducer("application", new de.ug2t.unifiedGui.UnXMLTAGapp());
UnApplFactSAXHandler.pcmf_addProducer("button", new de.ug2t.unifiedGui.UnXMLTAGbut());
UnApplFactSAXHandler.pcmf_addProducer("optDlg", new de.ug2t.unifiedGui.UnXMLTAGoptDlg());
UnApplFactSAXHandler.pcmf_addProducer("link", new de.ug2t.unifiedGui.UnXMLTAGlink());
UnApplFactSAXHandler.pcmf_addProducer("roLink", new de.ug2t.unifiedGui.UnXMLTAGroLink());
UnApplFactSAXHandler.pcmf_addProducer("html", new de.ug2t.unifiedGui.UnXMLTAGhtml());
UnApplFactSAXHandler.pcmf_addProducer("tplSec", new de.ug2t.unifiedGui.UnXMLTAGhtmlTplSec());
UnApplFactSAXHandler.pcmf_addProducer("renderCache", new de.ug2t.unifiedGui.UnXMLTAGrenderCache());
UnApplFactSAXHandler.pcmf_addProducer("inputField", new de.ug2t.unifiedGui.UnXMLTAGinpField());
UnApplFactSAXHandler.pcmf_addProducer("input", new de.ug2t.unifiedGui.UnXMLTAGinpField());
UnApplFactSAXHandler.pcmf_addProducer("page", new de.ug2t.unifiedGui.UnXMLTAGpage());
UnApplFactSAXHandler.pcmf_addProducer("htmlPage", new de.ug2t.unifiedGui.UnXMLTAGhtmlPage());
UnApplFactSAXHandler.pcmf_addProducer("htmlForm", new de.ug2t.unifiedGui.UnXMLTAGhtmlForm());
UnApplFactSAXHandler.pcmf_addProducer("htmlLink", new de.ug2t.unifiedGui.UnXMLTAGhtmlLink());
UnApplFactSAXHandler.pcmf_addProducer("htmlhbox", new de.ug2t.unifiedGui.UnXMLTAGhtmlHBox());
UnApplFactSAXHandler.pcmf_addProducer("htmlvbox", new de.ug2t.unifiedGui.UnXMLTAGhtmlVBox());
UnApplFactSAXHandler.pcmf_addProducer("htmlbox", new de.ug2t.unifiedGui.UnXMLTAGhtmlBox());
UnApplFactSAXHandler.pcmf_addProducer("htmlButton", new de.ug2t.unifiedGui.UnXMLTAGhtmlButton());
UnApplFactSAXHandler.pcmf_addProducer("htmlGui", new de.ug2t.unifiedGui.UnXMLTAGhtmlGui());
UnApplFactSAXHandler.pcmf_addProducer("htmlTabPane", new de.ug2t.unifiedGui.UnXMLTAGhtmlTabPane());
UnApplFactSAXHandler.pcmf_addProducer("htmlSplitPane", new de.ug2t.unifiedGui.UnXMLTAGhtmlSplitPane());
UnApplFactSAXHandler.pcmf_addProducer("pageTpl", new de.ug2t.unifiedGui.UnXMLTAGpageTempl());
UnApplFactSAXHandler.pcmf_addProducer("swingGrid", new de.ug2t.unifiedGui.UnXMLTAGsetGrid());
UnApplFactSAXHandler.pcmf_addProducer("swingFill", new de.ug2t.unifiedGui.UnXMLTAGsetSwingFill());
UnApplFactSAXHandler.pcmf_addProducer("swingPos", new de.ug2t.unifiedGui.UnXMLTAGsetPosSwing());
UnApplFactSAXHandler.pcmf_addProducer("swingLayout", new de.ug2t.unifiedGui.UnXMLTAGsetSwingLayout());
UnApplFactSAXHandler.pcmf_addProducer("swingWeights", new de.ug2t.unifiedGui.UnXMLTAGsetSwingWeights());
UnApplFactSAXHandler.pcmf_addProducer("swingInsets", new de.ug2t.unifiedGui.UnXMLTAGsetSwingInsets());
UnApplFactSAXHandler.pcmf_addProducer("weights", new de.ug2t.unifiedGui.UnXMLTAGsetWeights());
UnApplFactSAXHandler.pcmf_addProducer("fill", new de.ug2t.unifiedGui.UnXMLTAGsetFill());
UnApplFactSAXHandler.pcmf_addProducer("fixedSize", new de.ug2t.unifiedGui.UnXMLTAGsetFSize());
UnApplFactSAXHandler.pcmf_addProducer("swingPSize", new de.ug2t.unifiedGui.UnXMLTAGsetPSizeSwing());
UnApplFactSAXHandler.pcmf_addProducer("logWriter", new de.ug2t.unifiedGui.UnXMLTAGsetLog());
UnApplFactSAXHandler.pcmf_addProducer("insets", new de.ug2t.unifiedGui.UnXMLTAGsetInsets());
UnApplFactSAXHandler.pcmf_addProducer("position", new de.ug2t.unifiedGui.UnXMLTAGsetPos());
UnApplFactSAXHandler.pcmf_addProducer("font", new de.ug2t.unifiedGui.UnXMLTAGsetFont());
UnApplFactSAXHandler.pcmf_addProducer("disable", new de.ug2t.unifiedGui.UnXMLTAGdisable());
UnApplFactSAXHandler.pcmf_addProducer("java", new de.ug2t.unifiedGui.UnXMLTAGjava());
UnApplFactSAXHandler.pcmf_addProducer("preFunction", new de.ug2t.unifiedGui.UnXMLTAGpreFct());
UnApplFactSAXHandler.pcmf_addProducer("postFunction", new de.ug2t.unifiedGui.UnXMLTAGpostFct());
UnApplFactSAXHandler.pcmf_addProducer("hide", new de.ug2t.unifiedGui.UnXMLTAGhide());
UnApplFactSAXHandler.pcmf_addProducer("hideAll", new de.ug2t.unifiedGui.UnXMLTAGhideall());
UnApplFactSAXHandler.pcmf_addProducer("onValueSetRepaint", new de.ug2t.unifiedGui.UnXMLTAGrpons());
UnApplFactSAXHandler.pcmf_addProducer("generalRepaint", new de.ug2t.unifiedGui.UnXMLTAGrpg());
UnApplFactSAXHandler.pcmf_addProducer("readOnly", new de.ug2t.unifiedGui.UnXMLTAGreadonly());
UnApplFactSAXHandler.pcmf_addProducer("autoEcho", new de.ug2t.unifiedGui.UnXMLTAGautoEcho());
UnApplFactSAXHandler.pcmf_addProducer("eventLatency", new de.ug2t.unifiedGui.UnXMLTAGeventlatency());
UnApplFactSAXHandler.pcmf_addProducer("focus", new de.ug2t.unifiedGui.UnXMLTAGfocus());
UnApplFactSAXHandler.pcmf_addProducer("view", new de.ug2t.unifiedGui.UnXMLTAGsetView());
UnApplFactSAXHandler.pcmf_addProducer("span", new de.ug2t.unifiedGui.UnXMLTAGsetSpan());
UnApplFactSAXHandler.pcmf_addProducer("extCss", new de.ug2t.unifiedGui.UnXMLTAGsetExtCss());
UnApplFactSAXHandler.pcmf_addProducer("autoDelete", new de.ug2t.unifiedGui.UnXMLTAGsetAutoDelete());
UnApplFactSAXHandler.pcmf_addProducer("htmlPos", new de.ug2t.unifiedGui.UnXMLTAGsetPos());
UnApplFactSAXHandler.pcmf_addProducer("htmlLOM", new de.ug2t.unifiedGui.UnXMLTAGsetHtmlLOM());
UnApplFactSAXHandler.pcmf_addProducer("container", new de.ug2t.unifiedGui.UnXMLTAGcontainer());
UnApplFactSAXHandler.pcmf_addProducer("addProd", new de.ug2t.unifiedGui.UnXMLTAGaddProd());
UnApplFactSAXHandler.pcmf_addProducer("addInfo", new de.ug2t.unifiedGui.UnXMLTAGaddInfo());
UnApplFactSAXHandler.pcmf_addProducer("srvListener", new de.ug2t.unifiedGui.UnXMLTAGsrvListener());
UnApplFactSAXHandler.pcmf_addProducer("mapListener", new de.ug2t.unifiedGui.UnXMLTAGmapListener());
UnApplFactSAXHandler.pcmf_addProducer("pcListener", new de.ug2t.unifiedGui.UnXMLTAGpcListener());
UnApplFactSAXHandler.pcmf_addProducer("srvStmtListener", new de.ug2t.unifiedGui.UnXMLTAGsrvListenerStmt());
UnApplFactSAXHandler.pcmf_addProducer("navigationErrorHandler", new de.ug2t.unifiedGui.UnXMLTAGnavHdl());
UnApplFactSAXHandler.pcmf_addProducer("eventChannel", new de.ug2t.unifiedGui.UnXMLTAGevChannel());
UnApplFactSAXHandler.pcmf_addProducer("eventOnChange", new de.ug2t.unifiedGui.UnXMLTAGevOc());
UnApplFactSAXHandler.pcmf_addProducer("eventPrio", new de.ug2t.unifiedGui.UnXMLTAGevPrio());
UnApplFactSAXHandler.pcmf_addProducer("submitEvent", new de.ug2t.unifiedGui.UnXMLTAGsubmit());
UnApplFactSAXHandler.pcmf_addProducer("sync", new de.ug2t.unifiedGui.UnXMLTAGsync());
UnApplFactSAXHandler.pcmf_addProducer("xScript", new de.ug2t.unifiedGui.UnXMLTAGxScript());
UnApplFactSAXHandler.pcmf_addProducer("script", new de.ug2t.unifiedGui.UnXMLTAGscripting());
UnApplFactSAXHandler.pcmf_addProducer("inlinePlugin", new de.ug2t.unifiedGui.UnXMLTAGinlinePlugin());
UnApplFactSAXHandler.pcmf_addProducer("label", new de.ug2t.unifiedGui.UnXMLTAGtext());
UnApplFactSAXHandler.pcmf_addProducer("aPopup", new de.ug2t.unifiedGui.UnXMLTAGaPopup());
UnApplFactSAXHandler.pcmf_addProducer("htmlAPopup", new de.ug2t.unifiedGui.UnXMLTAGhtmlaPopup());
UnApplFactSAXHandler.pcmf_addProducer("progressBar", new de.ug2t.unifiedGui.UnXMLTAGprogressBar());
UnApplFactSAXHandler.pcmf_addProducer("hbox", new de.ug2t.unifiedGui.UnXMLTAGHBox());
UnApplFactSAXHandler.pcmf_addProducer("vbox", new de.ug2t.unifiedGui.UnXMLTAGVBox());
UnApplFactSAXHandler.pcmf_addProducer("box", new de.ug2t.unifiedGui.UnXMLTAGBox());
UnApplFactSAXHandler.pcmf_addProducer("flex", new de.ug2t.unifiedGui.UnXMLTAGFlex());
UnApplFactSAXHandler.pcmf_addProducer("hidden", new de.ug2t.unifiedGui.UnXMLTAGhidden());
UnApplFactSAXHandler.pcmf_addProducer("filler", new de.ug2t.unifiedGui.UnXMLTAGfiller());
UnApplFactSAXHandler.pcmf_addProducer("line", new de.ug2t.unifiedGui.UnXMLTAGline());
UnApplFactSAXHandler.pcmf_addProducer("spinner", new de.ug2t.unifiedGui.UnXMLTAGspinner());
UnApplFactSAXHandler.pcmf_addProducer("comboBox", new de.ug2t.unifiedGui.UnXMLTAGcomboBox());
UnApplFactSAXHandler.pcmf_addProducer("checkBox", new de.ug2t.unifiedGui.UnXMLTAGCB());
UnApplFactSAXHandler.pcmf_addProducer("drawPane", new de.ug2t.unifiedGui.UnXMLTAGdrawPane());
UnApplFactSAXHandler.pcmf_addProducer("snapShot", new de.ug2t.unifiedGui.UnXMLTAGssWidget());
UnApplFactSAXHandler.pcmf_addProducer("splitPane", new de.ug2t.unifiedGui.UnXMLTAGsplitPane());
UnApplFactSAXHandler.pcmf_addProducer("slider", new de.ug2t.unifiedGui.UnXMLTAGslider());
UnApplFactSAXHandler.pcmf_addProducer("plugin", new de.ug2t.unifiedGui.UnXMLTAGplugin());
UnApplFactSAXHandler.pcmf_addProducer("pluginObj", new de.ug2t.unifiedGui.UnXMLTAGpluginObj());
UnApplFactSAXHandler.pcmf_addProducer("pluginObjRef", new de.ug2t.unifiedGui.UnXMLTAGpluginComponentReference());
UnApplFactSAXHandler.pcmf_addProducer("cursor", new de.ug2t.unifiedGui.UnXMLTAGcursor());
UnApplFactSAXHandler.pcmf_addProducer("entry", new de.ug2t.unifiedGui.UnXMLTAGentry());
UnApplFactSAXHandler.pcmf_addProducer("item", new de.ug2t.unifiedGui.UnXMLTAGentry());
UnApplFactSAXHandler.pcmf_addProducer("icon", new de.ug2t.unifiedGui.UnXMLTAGicon());
UnApplFactSAXHandler.pcmf_addProducer("htmlColorSchema", new de.ug2t.unifiedGui.UnXMLTAGhtmlColorSchema());
UnApplFactSAXHandler.pcmf_addProducer("objRef", new de.ug2t.unifiedGui.UnXMLTAGref());
UnApplFactSAXHandler.pcmf_addProducer("refObj", new de.ug2t.unifiedGui.UnXMLTAGrefObj());
UnApplFactSAXHandler.pcmf_addProducer("radio", new de.ug2t.unifiedGui.UnXMLTAGradio());
UnApplFactSAXHandler.pcmf_addProducer("singleRadio", new de.ug2t.unifiedGui.UnXMLTAGsingleRadio());
UnApplFactSAXHandler.pcmf_addProducer("textBox", new de.ug2t.unifiedGui.UnXMLTAGtextBox());
UnApplFactSAXHandler.pcmf_addProducer("editor", new de.ug2t.unifiedGui.UnXMLTAGeditor());
UnApplFactSAXHandler.pcmf_addProducer("listBox", new de.ug2t.unifiedGui.UnXMLTAGlistBox());
UnApplFactSAXHandler.pcmf_addProducer("table", new de.ug2t.unifiedGui.UnXMLTAGtable());
UnApplFactSAXHandler.pcmf_addProducer("tree", new de.ug2t.unifiedGui.UnXMLTAGtreeView());
UnApplFactSAXHandler.pcmf_addProducer("menu", new de.ug2t.unifiedGui.UnXMLTAGmenu());
UnApplFactSAXHandler.pcmf_addProducer("ctxMenu", new de.ug2t.unifiedGui.UnXMLTAGctxMenu());
UnApplFactSAXHandler.pcmf_addProducer("border", new de.ug2t.unifiedGui.UnXMLTAGborder());
UnApplFactSAXHandler.pcmf_addProducer("toolTip", new de.ug2t.unifiedGui.UnXMLTAGtip());
UnApplFactSAXHandler.pcmf_addProducer("color", new de.ug2t.unifiedGui.UnXMLTAGcolor());
UnApplFactSAXHandler.pcmf_addProducer("image", new de.ug2t.unifiedGui.UnXMLTAGimage());
UnApplFactSAXHandler.pcmf_addProducer("bgimage", new de.ug2t.unifiedGui.UnXMLTAGbgimage());
UnApplFactSAXHandler.pcmf_addProducer("wdgBorder", new de.ug2t.unifiedGui.UnXMLTAGwdgBorder());
UnApplFactSAXHandler.pcmf_addProducer("tabIdx", new de.ug2t.unifiedGui.UnXMLTAGtabIdx());
UnApplFactSAXHandler.pcmf_addProducer("cssClass", new de.ug2t.unifiedGui.UnXMLTAGcssClass());
UnApplFactSAXHandler.pcmf_addProducer("takeMaxSpace", new de.ug2t.unifiedGui.UnXMLTAGtakeMax());
UnApplFactSAXHandler.pcmf_addProducer("commonLayout", new de.ug2t.unifiedGui.UnXMLTAGlayout());
UnApplFactSAXHandler.pcmf_addProducer("form", new de.ug2t.unifiedGui.UnXMLTAGform());
UnApplFactSAXHandler.pcmf_addProducer("htmlText", new de.ug2t.unifiedGui.UnXMLTAGhtmlPane());
UnApplFactSAXHandler.pcmf_addProducer("tabPane", new de.ug2t.unifiedGui.UnXMLTAGtabPane());
UnApplFactSAXHandler.pcmf_addProducer("setTab", new de.ug2t.unifiedGui.UnXMLTAGsetTab());
UnApplFactSAXHandler.pcmf_addProducer("fileChooser", new de.ug2t.unifiedGui.UnXMLTAGfileChooser());
UnApplFactSAXHandler.pcmf_addProducer("dialog", new de.ug2t.unifiedGui.UnXMLTAGdialog());
UnApplFactSAXHandler.pcmf_addProducer("include", new de.ug2t.unifiedGui.UnXMLTAGinclude());
UnApplFactSAXHandler.pcmf_addProducer("default", new de.ug2t.unifiedGui.UnXMLTAGsetDefault());
UnApplFactSAXHandler.pcmf_addProducer("value", new de.ug2t.unifiedGui.UnXMLTAGsetValue());
UnApplFactSAXHandler.pcmf_addProducer("pluginLocal", new de.ug2t.unifiedGui.UnXMLTAGsetPlLocal());
UnApplFactSAXHandler.pcmf_addProducer("deleteColors", new de.ug2t.unifiedGui.UnXMLTAGdeleteColorSettings());
UnApplFactSAXHandler.pcmf_addProducer("toolBox", new de.ug2t.unifiedGui.UnXMLTAGtoolBox());
UnApplFactSAXHandler.pcmf_addProducer("option", new de.ug2t.unifiedGui.UnXMLTAGsetOption());
UnApplFactSAXHandler.pcmf_addProducer("forEach", new de.ug2t.unifiedGui.UnXMLTAGsetForEach());
UnApplFactSAXHandler.pcmf_addProducer("comment", new de.ug2t.unifiedGui.UnXMLTAGcomment());
UnApplFactSAXHandler.pcmf_addProducer("dataCallback", new de.ug2t.unifiedGui.UnXMLTAGCallBack());
UnApplFactSAXHandler.pcmf_addProducer("metaModel", new de.ug2t.unifiedGui.UnXMLTAGmodelTpl());
UnApplFactSAXHandler.pcmf_addProducer("model", new de.ug2t.unifiedGui.UnXMLTAGmodel());
UnApplFactSAXHandler.pcmf_addProducer("singleValue", new de.ug2t.unifiedGui.UnXMLTAGsingleValue());
UnApplFactSAXHandler.pcmf_addProducer("stdSingleValue", new de.ug2t.unifiedGui.UnXMLTAGstdSingleValue());
UnApplFactSAXHandler.pcmf_addProducer("modelValRef", new de.ug2t.unifiedGui.UnXMLTAGvalueReference());
UnApplFactSAXHandler.pcmf_addProducer("modelValRtRef", new de.ug2t.unifiedGui.UnXMLTAGvalueRtReference());
UnApplFactSAXHandler.pcmf_addProducer("multipleValue", new de.ug2t.unifiedGui.UnXMLTAGmultipleValue());
UnApplFactSAXHandler.pcmf_addProducer("transformer", new de.ug2t.unifiedGui.UnXMLTAGtransformer());
UnApplFactSAXHandler.pcmf_addProducer("observer", new de.ug2t.unifiedGui.UnXMLTAGobserver());
UnApplFactSAXHandler.pcmf_addProducer("validator", new de.ug2t.unifiedGui.UnXMLTAGvalidator());
UnApplFactSAXHandler.pcmf_addProducer("uiMap", new de.ug2t.unifiedGui.UnXMLTAGuiMap());
UnApplFactSAXHandler.pcmf_addProducer("uiErrorGW", new de.ug2t.unifiedGui.UnXMLTAGuiErrorGW());
UnApplFactSAXHandler.pcmf_addProducer("HoTcpIpSessionReader", new de.ug2t.unifiedGui.UnXMLTAGreader());
UnApplFactSAXHandler.pcmf_addProducer("writer", new de.ug2t.unifiedGui.UnXMLTAGwriter());
UnApplFactSAXHandler.pcmf_addProducer("appInit", new de.ug2t.unifiedGui.UnXMLTAGappInit());
UnApplFactSAXHandler.pcmf_addProducer("active", new de.ug2t.unifiedGui.UnXMLTAGactive());
UnApplFactSAXHandler.pcmf_addProducer("maximize", new de.ug2t.unifiedGui.UnXMLTAGmaximize());
UnApplFactSAXHandler.pcmf_addProducer("registerGlobal", new de.ug2t.unifiedGui.UnXMLTAGregisterGlobal());
UnApplFactSAXHandler.pcmf_addProducer("registerValue", new de.ug2t.unifiedGui.UnXMLTAGregisterValue());
UnApplFactSAXHandler.pcmf_addProducer("unregisterValue", new de.ug2t.unifiedGui.UnXMLTAGunregisterValue());
UnApplFactSAXHandler.pcmf_addProducer("key", new de.ug2t.unifiedGui.UnXMLTAGkey());
UnApplFactSAXHandler.pcmf_addProducer("uiSqlMap", new de.ug2t.unifiedGui.UnXMLTAGsqlTableMapUI());
UnApplFactSAXHandler.pcmf_addProducer("sqlModelMap", new de.ug2t.unifiedGui.UnXMLTAGsqlTableMapModel());
UnApplFactSAXHandler.pcmf_addProducer("sqlTable", new de.ug2t.unifiedGui.UnXMLTAGsqlTable());
UnApplFactSAXHandler.pcmf_addProducer("sqlTableJoin", new de.ug2t.unifiedGui.UnXMLTAGsqlTableJoin());
UnApplFactSAXHandler.pcmf_addProducer("sqlObjectMap", new de.ug2t.unifiedGui.UnXMLTAGsqlUiMap());
UnApplFactSAXHandler.pcmf_addProducer("sqlTableUiMap", new de.ug2t.unifiedGui.UnXMLTAGsqlTableUiMap());
UnApplFactSAXHandler.pcmf_addProducer("listLoader", new de.ug2t.unifiedGui.UnXMLTAGlistLoader());
UnApplFactSAXHandler.pcmf_addProducer("treeViewLoader", new de.ug2t.unifiedGui.UnXMLTAGtreeLoader());
UnApplFactSAXHandler.pcmf_addProducer("tableLoader", new de.ug2t.unifiedGui.UnXMLTAGtableLoader());
// Internal Use
UnApplFactSAXHandler.pcmf_addProducer("INT_SCF", new de.ug2t.unifiedGui.UnXMLTAGsetCurrentFile());
};
public final void pcmf_init(int xApplType, UnComponentFactory xObjFact, UnApplicationFactory xProd)
{
if (xApplType == UnComponentFactory.MIXED)
{
this.pdm_mixed = true;
xApplType = UnComponentFactory.HALFOBJECT;
}
else
this.pdm_mixed = false;
this.pdm_AppType = xApplType;
this.pdm_objFact = xObjFact;
this.pdm_myProducer = xProd;
return;
};
public final void pcmf_init(UnComponentFactory xObjFact, IUnApplication xAppl, KeTreeNode xRoot, UnApplicationFactory xProd)
{
if (xAppl instanceof MuGenericApplication)
this.pdm_AppType = UnComponentFactory.MARKUP;
else
this.pdm_AppType = UnComponentFactory.HALFOBJECT;
this.pdm_mixed = false;
this.pdm_objFact = xObjFact;
// Aktuelles Item setzen
pdm_act = xRoot;
pdm_name = xRoot.pcmf_getName();
pdm_appl = xAppl;
this.pdm_myProducer = xProd;
return;
};
public final void pcmf_init(int xApplType, UnComponentFactory xObjFact, IUnApplication xAppl, KeTreeNode xRoot, UnApplicationFactory xProd)
{
if (xApplType == UnComponentFactory.MIXED)
{
this.pdm_mixed = true;
xApplType = UnComponentFactory.HALFOBJECT;
}
else
this.pdm_mixed = false;
this.pdm_AppType = xApplType;
this.pdm_objFact = xObjFact;
// Aktuelles Item setzen
pdm_act = xRoot;
pdm_name = xRoot.pcmf_getName();
pdm_appl = xAppl;
this.pdm_myProducer = xProd;
return;
};
public final void pcmf_exit()
{
pdm_actMValue = null;
pdm_act = null;
pdm_appl = null; // Aktuelle Appl
pdm_page = null; // Aktuelle Seite
pdm_name = null; // Aktueller Name
pdm_optionNr = 0;
pdm_optionFalseNr = 0;
pdm_optional = true;
pdm_forEachs.clear();
pdm_elements.clear();
pdm_names.clear();
pdm_feStack.clear();
pdm_allNameStack.clear();
pdm_sourceStack.clear();
}
public static final IUnSAXAppFactHandler pcmf_addProducer(String xName, IUnSAXAppFactHandler xProd)
{
return ((IUnSAXAppFactHandler) pem_producers.put(xName, xProd));
};
public final void pcmf_doExecStack(Object xIf, Object xObj, String xName)
{
// Aktuelles Item setzen
if (xObj instanceof IMoValue)
this.pdm_actMValue = (IMoValue) xObj;
else if (xObj instanceof KeTreeElement)
pdm_act = (KeTreeElement) xObj;
else
KeLog.pcmf_log(this.pdm_appl.pcmf_getUnComponent().toString(), "no valid type on parsing-stack: " + xObj.getClass().toString(), this, KeLog.FATAL);
pdm_elements.push(xIf);
// Aktuellen Namen setzen
pdm_name = xName;
pdm_names.push(xName);
return;
};
public final void startElementFromCache(String uri, String localName, String qName, Attributes attributes, IUnSAXAppFactHandler handler,
UnApplFactSAXHandler xHdl) throws Exception
{
String l_name = KeTools.pcmf_deRef(attributes.getValue("name"));
if (l_name == null)
l_name = "";
this.pdm_allNameStack.push(l_name);
handler.pcmf_hdlSaxEvent(xHdl, qName, attributes);
}
public final void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
{
String l_name = KeTools.pcmf_deRef(attributes.getValue("name"));
if (l_name == null)
l_name = "";
this.pdm_allNameStack.push(l_name);
if (this.pdm_optional == false)
{
if (qName.equals("option") || qName.equals("xScript"))
this.pdm_optionNr++;
return;
}
IUnSAXAppFactHandler l_prod = (IUnSAXAppFactHandler) UnApplFactSAXHandler.pem_producers.get(qName);
// @@
try
{
if (l_prod == null)
KeLog.pcmf_log("ug2t", "no such producer found: " + qName, this, KeLog.ERROR);
else
l_prod.pcmf_hdlSaxEvent(this, qName, attributes);
}
catch (Exception e)
{
KeLog.pcmf_logException("ug2t", this, e);
String l_attributes = "";
for (int i = 0; i < attributes.getLength(); i++)
l_attributes += attributes.getQName(i) + "=\'" + attributes.getValue(i) + "\' ";
KeLog.pcmf_log("ug2t", "XML Error: [URI: " + uri + "] [Tag: " + qName + "] [Attributes: + " + l_attributes + "]", this, KeLog.FATAL);
IHoSession l_session = (IHoSession) KeRegisteredObject.pcmf_getObjByName(IHoSession.SESSION_NAME);
if (this.pem_terminateOnError)
{
if (this.pdm_appl != null)
{
this.pdm_appl.pcmf_close();
if (l_session != null)
l_session.pcmf_commitTr();
}
else
{
if (l_session != null)
l_session.pcmf_kill();
}
}
throw new SAXException("SAX parsing aborted! Application instance could not start");
};
return;
};
// Store CDATA if enabled
private StringBuffer pem_cdata = null;
protected void pdmf_startCDataRecording()
{
this.pem_cdata = new StringBuffer();
}
protected String pdmf_endCDataRecording()
{
if (this.pem_cdata == null)
return ("");
String l_ret = this.pem_cdata.toString();
this.pem_cdata = null;
// @@
return (l_ret);
}
public void characters(char[] arg0, int arg1, int arg2) throws SAXException
{
if (this.pem_cdata != null)
this.pem_cdata.append(new String(arg0, arg1, arg2));
}
public final void endElement(String uri, String localName, String qName) throws SAXException
{
String l_feStr = this.pdm_allNameStack.pop().toString();
// @@
if (qName.equals("option") || qName.equals("xScript"))
{
if (this.pdm_optionFalseNr == this.pdm_optionNr)
{
this.pdm_optional = true;
this.pdm_optionFalseNr = 0;
}
this.pdm_optionNr--;
}
else if (qName.equals("html"))
{
String l_html = this.pdmf_endCDataRecording();
if (this.pdm_act instanceof MuGenericRaw)
((MuGenericRaw) this.pdm_act).pcmf_setValue(l_html);
}
else if (qName.equals("htmlForm") || qName.equals("htmlPage"))
{
try
{
String l_html = this.pdmf_endCDataRecording();
if (!l_html.trim().equals(""))
{
UnHtmlParserCallback l_cb = new UnHtmlParserCallback(l_html, this, false);
HTMLEditorKit.Parser l_parser = new UnHtmlEditorKit().pcmf_getHtmlParser();
l_parser.parse(new StringReader(l_html), l_cb, false);
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", this.pdm_name);
l_attr.addAttribute(null, null, "htmlTpl", "", l_cb.pcmf_getHtmlTpl());
l_attr.addAttribute(null, null, "orphan", "", "true");
l_attr.addAttribute(null, null, "asLayoutManager", "", "true");
l_attr.addAttribute(null, null, "handleVar", "", "true");
this.startElement("", "tplSec", "tplSec", l_attr);
this.endElement("", "tplSec", "tplSec");
}
}
catch (Exception e)
{
KeLog.pcmf_logException("ug2t", this, e);
KeLog.pcmf_log("ug2t", "Exception during application-production (EndElement) [URI: " + uri + "] [Tag: " + localName + "]", this, KeLog.FATAL);
}
}
else if (qName.equals("htmlText"))
{
String l_html = this.pdmf_endCDataRecording();
if (this.pdm_act instanceof IUnHtmlPane)
((IUnHtmlPane) this.pdm_act).pcmf_setHtmlString(l_html);
}
else if (qName.equals("script"))
{
String l_script = this.pdmf_endCDataRecording();
if (this.pdm_elements.peek() instanceof IUnScriptIntegrator)
{
IUnScriptIntegrator l_scriptobj = (IUnScriptIntegrator) this.pdm_elements.peek();
l_scriptobj.pcmf_setScript(l_script);
if (l_scriptobj.pcmf_getType().equals(IUnScriptIntegrator.CALL))
{
this.pdm_elements.pop();
l_scriptobj.pcmf_execObj(this.pdm_elements.peek());
this.pdm_elements.push(l_scriptobj);
}
}
}
else if (qName.equals("inlinePlugin"))
{
String l_pl = this.pdmf_endCDataRecording();
if (this.pdm_elements.peek() instanceof String)
{
String l_name = (String) this.pdm_names.peek();
String l_register = (String) this.pdm_elements.peek();
PlBasicComponentAggregat l_plug = this.pdm_objFact.pcmf_createAggregatedInlinePlugin(l_name, pdm_AppType, pcmf_getAppl(), l_pl);
l_plug.pcmf_reRegister(l_register);
}
}
if (this.pdm_optional == false)
return;
// @@
if (qName.equals("forEach"))
this.pdm_forEachs.remove(this.pdm_feStack.pop());
else
{
Iterator l_it = this.pdm_forEachs.keySet().iterator();
UnFEContainer l_fe = null;
while (l_it.hasNext())
{
UnFeDescriptor l_desc = (UnFeDescriptor) l_it.next();
if (l_desc.pcmf_getFEMode() == UnFeDescriptor.FE_DESC_NAME && l_desc.pcmf_evaluateName(l_feStr))
{
l_fe = (UnFEContainer) this.pdm_forEachs.get(l_desc);
l_fe.pcmf_doInclude(this);
continue;
}
else if (l_desc.pcmf_getFEMode() == UnFeDescriptor.FE_DESC_TAG && l_desc.pcmf_evaluateTag(qName))
{
l_fe = (UnFEContainer) this.pdm_forEachs.get(l_desc);
l_fe.pcmf_doInclude(this);
continue;
}
}
};
// @@
try
{
Object l_obj = this.pdm_elements.pop();
if (this.pdm_AppType == UnComponentFactory.HALFOBJECT)
{
// Font setzen
UnFontDescriptor l_font = this.pdm_appl.pcmf_getUnComponent().pcmf_getFont();
if (l_font != null && this.pdm_elements.size() > 0 && l_obj != this.pdm_elements.peek())
{
if (l_obj instanceof UnComponent)
{
UnComponent l_c = (UnComponent) l_obj;
if (l_c.pcmf_getAppl() != null && l_c.pcmf_getFont() == null && l_c.pcmf_getCssClass() == null)
l_c.pcmf_setFont(l_font);
}
}
// @@
}
if (qName.equals("INT_SCF"))
this.pdm_myProducer.pem_mySource = (InputSource) this.pdm_sourceStack.pop();
else if (qName.equals("container"))
{
KeTreeNode l_parent = ((KeTreeNode) l_obj).pcmf_getParentNode();
if (l_parent instanceof IUnTable)
((IUnTable) l_parent).pcmf_addRow(((KeTreeNode) l_obj).pcmf_getAllSubs());
else if (l_parent instanceof IUnListComponent)
{
Iterator l_myIt = ((KeTreeNode) l_obj).pcmf_getSubIterator();
KeTreeNode l_myObj = null;
while (l_myIt.hasNext())
{
l_myObj = (KeTreeNode) l_myIt.next();
((IUnListComponent) l_parent).pcmf_addValueObj(l_myObj.pcmf_getName(), l_myObj);
}
}
else if (l_parent instanceof HoGenericTreeNode)
{
ArrayList l_childs = new ArrayList(((KeTreeNode) l_obj).pcmf_getAllSubs());
Iterator l_myIt = l_childs.iterator();
KeTreeNode l_myObj = null;
l_parent.pcmf_removeNode(((KeTreeNode) l_obj));
if (l_childs.size() == 1)
{
l_myObj = (KeTreeNode) l_myIt.next();
((KeTreeNode) l_obj).pcmf_removeNode(l_myObj);
l_parent.pcmf_setValue("~" + l_myObj.pcmf_getRemName());
l_myObj.pcmf_setEarlyAutoDelete(false);
}
else
{
while (l_myIt.hasNext())
{
l_myObj = (KeTreeNode) l_myIt.next();
((KeTreeNode) l_obj).pcmf_removeNode(l_myObj);
l_parent.pcmf_addNode(l_myObj.pcmf_getName(), l_myObj);
}
}
}
else if (l_parent instanceof IUnSlider)
{
Iterator l_myIt = ((KeTreeNode) l_obj).pcmf_getSubIterator();
KeTreeNode l_myObj = null;
while (l_myIt.hasNext())
{
l_myObj = (KeTreeNode) l_myIt.next();
((IUnSlider) l_parent).pcmf_addValueItem(l_myObj.pcmf_getName(), l_myObj);
}
}
}
if (l_obj instanceof IUnTabbedPane)
((IUnTabbedPane) l_obj).pcmf_commitTabs();
else if (l_obj instanceof IUnMenu)
((IUnMenu) l_obj).pcmf_commitMenu();
else if (l_obj instanceof IUnTable)
((IUnTable) l_obj).pcmf_commitTable();
else if (l_obj instanceof IUnTreeView)
((IUnTreeView) l_obj).pcmf_getUnComponent().pcmf_repaint();
else if (l_obj instanceof IUnSlider)
((IUnSlider) l_obj).pcmf_commitSlider();
this.pdm_names.pop();
if (pdm_elements.size() != 0)
{
Object l_act = this.pdm_elements.peek();
if (l_act instanceof IMoValue)
this.pdm_actMValue = (IMoValue) l_act;
else
{
this.pdm_actMValue = null;
pdm_act = (KeTreeElement) l_act;
}
pdm_name = (String) this.pdm_names.peek();
if (pdm_act instanceof de.ug2t.unifiedGui.interfaces.IUnPage)
this.pdm_page = (IUnPage) pdm_act;
}
else
{
pdm_act = null;
pdm_name = null;
};
}
catch (Exception e)
{
KeLog.pcmf_logException("ug2t", this, e);
KeLog.pcmf_log("ug2t", "Exception during application-production (EndElement) [URI: " + uri + "] [Tag: " + localName + "]", this, KeLog.FATAL);
IHoSession l_session = (IHoSession) KeRegisteredObject.pcmf_getObjByName(IHoSession.SESSION_NAME);
if (this.pem_terminateOnError)
{
if (this.pdm_appl != null)
{
this.pdm_appl.pcmf_close();
if (l_session != null)
l_session.pcmf_commitTr();
}
else
{
if (l_session != null)
l_session.pcmf_kill();
}
}
throw new SAXException("SAX parsing aborted! Application instance could not start");
};
return;
};
public final IUnApplication pcmf_getAppl()
{
return (pdm_appl);
};
public void pcmf_setTerminateOnError(boolean xTerm)
{
this.pem_terminateOnError = xTerm;
}
};
|