// @@
// @@
/*
* 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.awt.*;
import java.io.*;
import java.util.*;
import java.util.regex.*;
import javax.servlet.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.text.*;
import javax.swing.text.html.*;
import javax.swing.text.html.HTML.*;
import javax.swing.text.html.HTMLEditorKit.*;
import javax.swing.tree.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import com.bluecast.xml.*;
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.connector.*;
import de.ug2t.kernel.*;
import de.ug2t.model.*;
import de.ug2t.model.persistence.*;
import de.ug2t.model.values.*;
import de.ug2t.unifiedGui.cellRenderer.*;
import de.ug2t.unifiedGui.interfaces.*;
import de.ug2t.unifiedGui.listener.*;
import de.ug2t.unifiedGui.loader.*;
import de.ug2t.unifiedGui.plugins.*;
import de.ug2t.unifiedGui.scripting.*;
import de.ug2t.unifiedGui.service.*;
import de.ug2t.unifiedGui.transformer.*;
import de.ug2t.unifiedGui.validator.*;
import de.ug2t.unifiedGui.views.*;
import de.ug2t.xmlScript.*;
// Html parser
final class UnHtmlEditorKit extends HTMLEditorKit
{
public Parser pcmf_getHtmlParser()
{
return (this.getParser());
}
}
final class UnHtmlCssStyles
{
private String pem_style = null;
private String pem_background = null;
private String pem_foreground = null;
private String pem_width = null;
private String pem_height = null;
private String pem_sl_top = null;
private String pem_sl_left = null;
private String pem_sl_width = null;
private String pem_sl_height = null;
private String pem_valign = null;
private String pem_halign = null;
private String pem_font = null;
private String pem_fontSize = null;
private String pem_fontWeight = null;
private String pem_border = null;
private String pem_borderWidth = null;
private String pem_borderColor = null;
private String pem_visibility = null;
private String pem_sfill_x = null;
private String pem_sfill_y = null;
private String pem_sweight_x = null;
private String pem_sweight_y = null;
private String pem_scroll = null;
private String pem_s_layout = null;
private String pem_delDefCol = null;
private String pem_padding = null;
private String pem_margin = null;
private String pem_borderT = null;
private String pem_borderB = null;
private String pem_borderL = null;
private String pem_borderR = null;
protected String pdmf_convertAlign(String xHAlign, String xVAlign)
{
if (xHAlign == null)
xHAlign = "center";
if (xVAlign == null)
xVAlign = "middle";
if (xHAlign.equalsIgnoreCase("left"))
{
if (xVAlign.equalsIgnoreCase("top"))
return ("NORTHWEST");
else if (xVAlign.equalsIgnoreCase("middle"))
return ("WEST");
else if (xVAlign.equalsIgnoreCase("bottom"))
return ("SOUTHWEST");
}
else if (xHAlign.equalsIgnoreCase("right"))
{
if (xVAlign.equalsIgnoreCase("top"))
return ("NORTHEAST");
else if (xVAlign.equalsIgnoreCase("middle"))
return ("EAST");
else if (xVAlign.equalsIgnoreCase("bottom"))
return ("SOUTHEAST");
}
else if (xHAlign.equalsIgnoreCase("center"))
{
if (xVAlign.equalsIgnoreCase("top"))
return ("NORTH");
else if (xVAlign.equalsIgnoreCase("middle"))
return ("CENTER");
else if (xVAlign.equalsIgnoreCase("bottom"))
return ("SOUTH");
}
return ("CENTER");
}
/**
* @return Returns the align.
*/
public String pcmf_getAlign()
{
return (this.pdmf_convertAlign(this.pem_halign, this.pem_valign));
}
/**
* @return Returns the background.
*/
public String pcmf_getBackground()
{
return pem_background;
}
/**
* @return Returns the margin.
*/
public String pcmf_getMargin()
{
return pem_margin;
}
/**
* @return Returns the padding.
*/
public String pcmf_getPadding()
{
return pem_padding;
}
/**
* @return Returns the right border.
*/
public String pcmf_getBorderR()
{
return pem_borderR;
}
/**
* @return Returns the bottom border.
*/
public String pcmf_getBorderB()
{
return pem_borderB;
}
/**
* @return Returns the left border.
*/
public String pcmf_getBorderL()
{
return pem_borderL;
}
/**
* @return Returns the top border.
*/
public String pcmf_getBorderT()
{
return pem_borderT;
}
/**
* @return Returns the visibility.
*/
public String pcmf_getVisibility()
{
return this.pem_visibility;
}
/**
* @return Returns the font.
*/
public String pcmf_getFont()
{
return pem_font;
}
/**
* @return Returns the fontSize.
*/
public String pcmf_getFontSize()
{
return pem_fontSize;
}
/**
* @return Returns the fontWeight.
*/
public String pcmf_getFontWeight()
{
return pem_fontWeight;
}
/**
* @return Returns the foreground.
*/
public String pcmf_getForeground()
{
return pem_foreground;
}
/**
* @return Returns the height.
*/
public String pcmf_getHeight()
{
return pem_height;
}
/**
* @return Returns the sl_left.
*/
public String pcmf_getSl_left()
{
return pem_sl_left;
}
/**
* @return Returns the s_layout.
*/
public String pcmf_getS_layout()
{
return pem_s_layout;
}
/**
* @return Returns the sl_top.
*/
public String pcmf_getSl_top()
{
return pem_sl_top;
}
/**
* @return Returns the sl_width.
*/
public String pcmf_getSl_width()
{
return pem_sl_width;
}
/**
* @return Returns the sl_height.
*/
public String pcmf_getSl_height()
{
return pem_sl_height;
}
/**
* @return Returns the width.
*/
public String pcmf_getWidth()
{
return pem_width;
}
/**
* @return Returns the border.
*/
public String pcmf_getBorder()
{
return pem_border;
}
/**
* @return Returns the border width.
*/
public String pcmf_getBorderWidth()
{
return pem_borderWidth;
}
/**
* @return Returns the border color.
*/
public String pcmf_getBorderColor()
{
return pem_borderColor;
}
/**
* @return Returns the fill x direction.
*/
public String pcmf_getSFill_x()
{
return (this.pem_sfill_x);
}
/**
* @return Returns the fill y direction.
*/
public String pcmf_getSFill_y()
{
return (this.pem_sfill_y);
}
/**
* @return Returns the weights x direction.
*/
public String pcmf_getSWeight_x()
{
return (this.pem_sweight_x);
}
/**
* @return Returns the weights y direction.
*/
public String pcmf_getSWeight_y()
{
return (this.pem_sweight_y);
}
public boolean pcmf_getDelDefCol()
{
if (this.pem_delDefCol != null && this.pem_delDefCol.equalsIgnoreCase("true"))
return (true);
else
return (false);
}
public String pcmf_getScroll()
{
if (this.pem_scroll != null && (this.pem_scroll.equalsIgnoreCase("auto") || this.pem_scroll.equalsIgnoreCase("scroll")))
return ("true");
else
return ("false");
}
public UnHtmlCssStyles(String xStyle)
{
if (xStyle == null)
return;
this.pem_style = KeTools.pcmf_stringSubst(xStyle, "px", "");
this.pem_style = this.pem_style.toUpperCase();
this.pem_width = this.pdmf_getValue("width");
this.pem_height = this.pdmf_getValue("height");
this.pem_sl_left = this.pdmf_getValue("swingGridX");
this.pem_sl_top = this.pdmf_getValue("swingGridY");
this.pem_sl_width = this.pdmf_getValue("swingGridWidth");
this.pem_sl_height = this.pdmf_getValue("swingGridHeight");
this.pem_sfill_x = this.pdmf_getValue("swingFillX");
this.pem_sfill_y = this.pdmf_getValue("swingFillY");
this.pem_sweight_x = this.pdmf_getValue("swingWeightX");
this.pem_sweight_y = this.pdmf_getValue("swingWeightY");
this.pem_background = this.pdmf_getValue("background-color");
this.pem_foreground = this.pdmf_getValue("color");
this.pem_valign = this.pdmf_getValue("vertical-align");
this.pem_halign = this.pdmf_getValue("text-align");
this.pem_font = this.pdmf_getValue("font-familiy");
this.pem_fontSize = this.pdmf_getValue("font-size");
this.pem_fontWeight = this.pdmf_getValue("font-weight");
this.pem_border = this.pdmf_getValue("border");
this.pem_borderWidth = this.pdmf_getValue("border-width");
this.pem_borderColor = this.pdmf_getValue("border-color");
this.pem_visibility = this.pdmf_getValue("visibility");
this.pem_scroll = this.pdmf_getValue("overflow");
this.pem_s_layout = this.pdmf_getValue("swingLayout");
this.pem_delDefCol = this.pdmf_getValue("useCssColor");
this.pem_padding = this.pdmf_getValue("padding");
this.pem_margin = this.pdmf_getValue("margin");
this.pem_borderT = this.pdmf_getValue("border-top");
this.pem_borderB = this.pdmf_getValue("border-bottom");
this.pem_borderL = this.pdmf_getValue("border-left");
this.pem_borderR = this.pdmf_getValue("border-right");
}
protected String pdmf_getValue(String xKey)
{
String l_key = xKey.toUpperCase();
int l_begin = this.pem_style.indexOf(l_key);
if (l_begin != 0)
{
xKey = " " + l_key;
l_begin = this.pem_style.indexOf(xKey);
if (l_begin == -1)
{
xKey = ";" + l_key;
l_begin = this.pem_style.indexOf(xKey);
if (l_begin == -1)
return (null);
}
}
int l_end = this.pem_style.indexOf(";", l_begin + 1);
if (l_end == -1)
l_end = this.pem_style.length();
String l_match = this.pem_style.substring(l_begin);
l_match = l_match.substring(0, l_match.indexOf(":"));
if (l_match.trim().equalsIgnoreCase(xKey.trim()) == false)
return (null);
String l_style = this.pem_style.substring(l_begin + 1, l_end);
l_begin = l_style.indexOf(":");
l_style = l_style.substring(l_begin + 1, l_style.length());
return (l_style);
}
}
final class UnHtmlParserCallback extends ParserCallback
{
final class UnHtmlTagStackElement
{
public Tag pcm_current = null;
public int pcm_startPos = 0;
public AttributeSet pcm_attributes = null;
public boolean pcm_inRecursion = false;
}
private String pem_lastText = "";
private boolean pem_inRecursion = false;
private String pem_html = null;
private int pem_prevPos = 0;
private int pem_bodyStart = 0;
private int pem_bodyEnd = 0;
private Tag pem_current = null;
private AttributeSet pem_currentAttr = null;
private String pem_cName = null;
private String pem_cType = null;
private boolean pem_filterBody = true;
private boolean pem_recordBodyStart = false;
private static final String CONVERT_TYPED = "TYPED";
private static final String CONVERT_UNTYPED = "UNTYPED";
private static final String CONVERT_DISABLED = "DISABLED";
private String pem_conversionMode = CONVERT_TYPED;
private Stack pem_conversions = new Stack();
private Stack pem_tagStack = new Stack();
private UnApplFactSAXHandler pem_hdl = null;
public UnHtmlParserCallback(String xHtml, UnApplFactSAXHandler l_hdl, boolean xFilterBody)
{
this.pem_html = xHtml;
this.pem_hdl = l_hdl;
this.pem_filterBody = xFilterBody;
this.pem_conversions.push(CONVERT_TYPED);
}
private boolean pemf_handleRecursive(Tag t, AttributeSet a)
{
return (t.equals(Tag.DIV)
&& a.getAttribute(HTML.Attribute.TYPE) != null
&& (a.getAttribute(HTML.Attribute.TYPE).toString().equalsIgnoreCase("label") == false && a.getAttribute(HTML.Attribute.TYPE).toString()
.equalsIgnoreCase("html") == false) || t instanceof HTML.UnknownTag && ((HTML.UnknownTag) t).toString().equalsIgnoreCase("button") || (t
.equals(Tag.A) && a.getAttribute(HTML.Attribute.HREF) == null));
}
private boolean pemf_isConvertable()
{
if (this.pem_current != null
&& (this.pem_current.equals(Tag.INPUT) || this.pem_current.equals(Tag.SELECT) || this.pem_current.equals(Tag.IMG)
|| this.pem_current instanceof HTML.UnknownTag && ((HTML.UnknownTag) pem_current).toString().equalsIgnoreCase("button")
|| (this.pem_current.equals(Tag.A) && this.pem_currentAttr.getAttribute(HTML.Attribute.HREF) == null)
|| (this.pem_current.equals(Tag.DIV) || this.pem_current.equals(Tag.SPAN)) && this.pem_cType != null || this.pem_current.equals(Tag.TEXTAREA)))
return (true);
else
return (false);
}
private void pemf_buildHtmlTplString(String xName, int xCPos, int xSPos)
{
int l_s1Pos = xSPos;
int l_s2Pos = this.pem_html.indexOf(">", xCPos) + 1;
char l_subst[] = new char[l_s2Pos - l_s1Pos];
char l_var[] = ("{" + xName + "}").toCharArray();
System.arraycopy(l_var, 0, l_subst, 0, l_var.length);
this.pem_html = KeTools.pcmf_stringSingleSubst(this.pem_html, this.pem_html.substring(l_s1Pos, l_s2Pos), String.valueOf(l_subst));
}
public String pcmf_getHtmlTpl()
{
if (this.pem_filterBody)
return (this.pem_html.substring(pem_bodyStart, pem_bodyEnd).replace((char) 0, ' '));
else
return (this.pem_html.replace((char) 0, ' '));
}
public void flush() throws BadLocationException
{
super.flush();
}
public void handleComment(char[] data, int pos)
{
if (this.pem_inRecursion)
{
super.handleComment(data, pos);
return;
}
String l_unknown = String.valueOf(data).trim();
if (l_unknown.startsWith("@cmd:"))
{
l_unknown = KeTools.pcmf_stringSingleSubst(l_unknown, "@cmd:", "");
if (l_unknown != null)
{
if (l_unknown.equalsIgnoreCase("convert_typed_begin"))
{
this.pem_conversionMode = CONVERT_TYPED;
this.pem_conversions.push(this.pem_conversionMode);
}
else if (l_unknown.equalsIgnoreCase("convert_untyped_begin"))
{
this.pem_conversionMode = CONVERT_UNTYPED;
this.pem_conversions.push(this.pem_conversionMode);
}
else if (l_unknown.equalsIgnoreCase("convert_disabled_begin"))
{
this.pem_conversionMode = CONVERT_DISABLED;
this.pem_conversions.push(this.pem_conversionMode);
}
else if (l_unknown.equalsIgnoreCase("convert_typed_end"))
{
if (this.pem_conversions.pop() != CONVERT_TYPED)
KeLog.pcmf_log("ug2t", "conversion tags stack missmatch" + this.pem_current, this, KeLog.FATAL);
this.pem_conversionMode = (String) this.pem_conversions.peek();
}
else if (l_unknown.equalsIgnoreCase("convert_untyped_end"))
{
if (this.pem_conversions.pop() != CONVERT_UNTYPED)
KeLog.pcmf_log("ug2t", "conversion tags stack missmatch" + this.pem_current, this, KeLog.FATAL);
this.pem_conversionMode = (String) this.pem_conversions.peek();
}
else if (l_unknown.equalsIgnoreCase("convert_disabled_end"))
{
if (this.pem_conversions.pop() != CONVERT_DISABLED)
KeLog.pcmf_log("ug2t", "conversion tags stack missmatch" + this.pem_current, this, KeLog.FATAL);
this.pem_conversionMode = (String) this.pem_conversions.peek();
}
}
}
else if (l_unknown.startsWith("@html_include:"))
{
try
{
l_unknown = KeTools.pcmf_stringSingleSubst(l_unknown, "@html_include:", "");
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "htmlTpl", "", l_unknown);
l_attr.addAttribute(null, null, "external", "", "true");
this.pem_hdl.startElement(this.pem_html, "htmlGui", "htmlGui", l_attr);
this.pem_hdl.endElement(this.pem_html, "htmlGui", "htmlGui");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error including html file:" + l_unknown, this, KeLog.FATAL);
}
}
else if (l_unknown.startsWith("@xml_include:"))
{
try
{
l_unknown = KeTools.pcmf_stringSingleSubst(l_unknown, "@xml_include:", "");
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "file", "", l_unknown);
this.pem_hdl.startElement(this.pem_html, "include", "include", l_attr);
this.pem_hdl.endElement(this.pem_html, "include", "include");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error including xml file:" + l_unknown, this, KeLog.FATAL);
}
}
else if (l_unknown.startsWith("@xscript_include:"))
{
try
{
l_unknown = KeTools.pcmf_stringSingleSubst(l_unknown, "@xscript_include:", "");
AttributesImpl l_attr = new AttributesImpl();
ArrayList l_tok = KeTools.pcmf_stringTokens(l_unknown, ":");
l_attr.addAttribute(null, null, "file", "", l_tok.get(0).toString());
l_attr.addAttribute(null, null, "exec", "", l_tok.get(1).toString());
this.pem_hdl.startElement(this.pem_html, "xScript", "xScript", l_attr);
this.pem_hdl.endElement(this.pem_html, "xScript", "xScript");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error including xml script file:" + l_unknown, this, KeLog.FATAL);
}
}
else if (l_unknown.startsWith("@javaclass:"))
{
try
{
l_unknown = KeTools.pcmf_stringSingleSubst(l_unknown, "@javaclass:", "");
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "class", "", l_unknown);
this.pem_hdl.startElement(this.pem_html, "java", "java", l_attr);
this.pem_hdl.endElement(this.pem_html, "java", "java");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error including executing java class:" + l_unknown, this, KeLog.FATAL);
}
}
else if (l_unknown.startsWith("@javaobject:"))
{
try
{
l_unknown = KeTools.pcmf_stringSingleSubst(l_unknown, "@javaclass:", "");
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "object", "", l_unknown);
this.pem_hdl.startElement(this.pem_html, "java", "java", l_attr);
this.pem_hdl.endElement(this.pem_html, "java", "java");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error including executing java class:" + l_unknown, this, KeLog.FATAL);
}
}
if (this.pemf_isConvertable())
{
char l_subst[] = new char[pos - this.pem_prevPos];
char l_var[] = ("{" + this.pem_cName + "}").toCharArray();
System.arraycopy(l_var, 0, l_subst, 0, l_var.length);
this.pem_html = KeTools.pcmf_stringSingleSubst(this.pem_html, this.pem_html.substring(this.pem_prevPos, pos), String.valueOf(l_subst));
this.pem_current = null;
}
super.handleComment(data, pos);
}
public void handleEndOfLineString(String eol)
{
super.handleEndOfLineString(eol);
}
public void handleEndTag(Tag t, int pos)
{
// body rausschneiden
if (t.equals(Tag.BODY))
this.pem_bodyEnd = pos;
if (this.pem_inRecursion == false)
{
if (this.pemf_isConvertable())
{
try
{
char l_subst[] = new char[pos - this.pem_prevPos];
char l_var[] = ("{" + this.pem_cName + "}").toCharArray();
System.arraycopy(l_var, 0, l_subst, 0, l_var.length);
this.pem_html = KeTools.pcmf_stringSingleSubst(this.pem_html, this.pem_html.substring(this.pem_prevPos, pos), String.valueOf(l_subst));
this.pem_current = null;
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error converting html stream, Tag:" + t.toString() + ", position: " + pos + " ,streamed so far: "
+ this.pem_html.substring(0, pos), this, KeLog.FATAL);
}
}
// Closing Tags
try
{
if (t.equals(Tag.SPAN) || t.equals(Tag.DIV))
{
if (this.pem_hdl.pdm_act instanceof IUnLabel)
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", this.pem_lastText);
this.pem_hdl.startElement(this.pem_html, "value", "value", l_attr);
this.pem_hdl.endElement(this.pem_html, "value", "value");
this.pem_hdl.endElement(this.pem_html, "label", "label");
}
else if (this.pem_hdl.pdm_act instanceof MuGenericRaw && this.pem_hdl.pdm_AppType == UnComponentFactory.MARKUP)
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", this.pem_lastText);
this.pem_hdl.startElement(this.pem_html, "value", "value", l_attr);
this.pem_hdl.endElement(this.pem_html, "value", "value");
this.pem_hdl.endElement(this.pem_html, "html", "html");
}
else if (this.pem_conversionMode == CONVERT_UNTYPED)
this.pem_hdl.endElement(this.pem_html, "hidden", "hidden");
}
else if (t.equals(Tag.OPTION))
{
if (this.pem_conversionMode == CONVERT_TYPED)
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", this.pem_lastText);
l_attr.addAttribute(null, null, "entry", "", this.pem_lastText);
this.pem_hdl.startElement(this.pem_html, "entry", "entry", l_attr);
this.pemf_setStdProps(((UnHtmlTagStackElement) pem_tagStack.peek()).pcm_attributes);
this.pem_hdl.endElement(this.pem_html, "entry", "entry");
if (((UnHtmlTagStackElement) pem_tagStack.peek()).pcm_attributes.getAttribute(HTML.Attribute.SELECTED) != null)
{
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", this.pem_lastText);
this.pem_hdl.startElement(this.pem_html, "value", "value", l_attr);
this.pem_hdl.endElement(this.pem_html, "value", "value");
}
}
else if (this.pem_conversionMode == CONVERT_UNTYPED)
{
if (((UnHtmlTagStackElement) pem_tagStack.peek()).pcm_attributes.getAttribute(HTML.Attribute.SELECTED) != null)
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", this.pem_lastText);
this.pem_hdl.startElement(this.pem_html, "value", "value", l_attr);
this.pem_hdl.endElement(this.pem_html, "value", "value");
}
}
}
else if (t.equals(Tag.SELECT))
{
if (this.pem_conversionMode == CONVERT_TYPED)
{
if (this.pem_hdl.pdm_act instanceof IUnListBox)
this.pem_hdl.endElement(this.pem_html, "listBox", "listBox");
else
this.pem_hdl.endElement(this.pem_html, "comboBox", "comboBox");
}
else if (this.pem_conversionMode == CONVERT_UNTYPED)
this.pem_hdl.endElement(this.pem_html, "hidden", "hidden");
}
if (t.equals(Tag.TEXTAREA))
{
if (this.pem_conversionMode == CONVERT_TYPED)
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", this.pem_lastText);
this.pem_hdl.startElement(this.pem_html, "value", "value", l_attr);
this.pem_hdl.endElement(this.pem_html, "value", "value");
this.pem_hdl.endElement(this.pem_html, "textBox", "textBox");
}
if (this.pem_conversionMode == CONVERT_UNTYPED)
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", this.pem_lastText);
this.pem_hdl.startElement(this.pem_html, "value", "value", l_attr);
this.pem_hdl.endElement(this.pem_html, "value", "value");
this.pem_hdl.endElement(this.pem_html, "hidden", "hidden");
}
}
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error closing html tag: " + t.toString(), this, KeLog.ERROR);
}
};
UnHtmlTagStackElement l_tagEl = (UnHtmlTagStackElement) this.pem_tagStack.pop();
if (this.pem_inRecursion == false && this.pem_conversionMode == CONVERT_TYPED)
{
this.pem_current = l_tagEl.pcm_current;
this.pem_currentAttr = l_tagEl.pcm_attributes;
this.pem_prevPos = l_tagEl.pcm_startPos;
this.pem_cName = (String) l_tagEl.pcm_attributes.getAttribute(HTML.Attribute.NAME);
this.pem_cType = (String) l_tagEl.pcm_attributes.getAttribute(HTML.Attribute.TYPE);
}
if (l_tagEl.pcm_inRecursion && this.pemf_handleRecursive(l_tagEl.pcm_current, l_tagEl.pcm_attributes))
{
this.pem_inRecursion = false;
String l_type = (String) l_tagEl.pcm_attributes.getAttribute(HTML.Attribute.TYPE);
String l_id = (String) l_tagEl.pcm_attributes.getAttribute(HTML.Attribute.ID);
try
{
String l_name = (String) l_tagEl.pcm_attributes.getAttribute(HTML.Attribute.NAME);
String l_fdesc = null;
if (l_name != null)
{
ArrayList l_toks = KeTools.pcmf_stringTokens(l_name, ".");
if (l_toks.size() > 1)
l_fdesc = l_toks.get(1).toString();
}
else
l_name = l_id;
if (l_name == null)
KeLog.pcmf_log("ug2t", "tag does not have a name or id: " + l_tagEl.pcm_current.toString(), this, KeLog.FATAL);
if (l_tagEl.pcm_current.equals(Tag.DIV))
{
if (l_type.equalsIgnoreCase("form"))
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
int l_startPos = this.pem_html.indexOf(">", l_tagEl.pcm_startPos) + 1;
String l_style = (String) l_tagEl.pcm_attributes.getAttribute(HTML.Attribute.STYLE);
if (l_style == null)
l_style = "";
UnHtmlCssStyles l_styles = new UnHtmlCssStyles(l_style);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
l_attr.addAttribute(null, null, "htmlTpl", "", this.pem_html.substring(l_startPos, pos));
l_attr.addAttribute(null, null, "scroll", "", l_styles.pcmf_getScroll());
String l_cont = (String) l_tagEl.pcm_attributes.getAttribute(HTML.Attribute.CONTENT);
if (l_cont != null && l_cont.equalsIgnoreCase("variable"))
l_attr.addAttribute(null, null, "handleVar", "", "true");
this.pem_hdl.startElement(this.pem_html, "htmlForm", "htmlForm", l_attr);
this.pemf_setStdProps(l_tagEl.pcm_attributes);
this.pem_hdl.endElement(this.pem_html, "htmlForm", "htmlForm");
this.pemf_buildHtmlTplString(l_name, pos, l_tagEl.pcm_startPos);
}
else if (l_type.equalsIgnoreCase("tabbedpane"))
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
int l_startPos = this.pem_html.indexOf(">", l_tagEl.pcm_startPos) + 1;
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
l_attr.addAttribute(null, null, "htmlTpl", "", this.pem_html.substring(l_startPos, pos));
this.pem_hdl.startElement(this.pem_html, "htmlTabPane", "htmlTabPane", l_attr);
this.pemf_setStdProps(l_tagEl.pcm_attributes);
this.pem_hdl.endElement(this.pem_html, "htmlTabPane", "htmlTabPane");
this.pemf_buildHtmlTplString(l_name, pos, l_tagEl.pcm_startPos);
}
else if (l_type.equalsIgnoreCase("apopup"))
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
int l_startPos = this.pem_html.indexOf(">", l_tagEl.pcm_startPos) + 1;
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
l_attr.addAttribute(null, null, "htmlTpl", "", this.pem_html.substring(l_startPos, pos));
this.pem_hdl.startElement(this.pem_html, "htmlAPopup", "htmlAPopup", l_attr);
this.pemf_setStdProps(l_tagEl.pcm_attributes);
this.pem_hdl.endElement(this.pem_html, "htmlAPopup", "htmlAPopup");
this.pemf_buildHtmlTplString(l_name, pos, l_tagEl.pcm_startPos);
}
else if (l_type.equalsIgnoreCase("splitpane"))
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
int l_startPos = this.pem_html.indexOf(">", l_tagEl.pcm_startPos) + 1;
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
l_attr.addAttribute(null, null, "htmlTpl", "", this.pem_html.substring(l_startPos, pos));
this.pem_hdl.startElement(this.pem_html, "htmlSplitPane", "htmlSplitPane", l_attr);
this.pemf_setStdProps(l_tagEl.pcm_attributes);
this.pem_hdl.endElement(this.pem_html, "htmlSplitPane", "htmlSplitPane");
this.pemf_buildHtmlTplString(l_name, pos, l_tagEl.pcm_startPos);
}
else if (l_type.equalsIgnoreCase("hbox"))
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
int l_startPos = this.pem_html.indexOf(">", l_tagEl.pcm_startPos) + 1;
String spacing = (String) l_tagEl.pcm_attributes.getAttribute(HTML.Attribute.CELLSPACING);
if (spacing != null)
l_attr.addAttribute(null, null, "gap", "", "spacing");
this.pemf_setBoxAttributes(l_attr, l_tagEl);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
l_attr.addAttribute(null, null, "htmlTpl", "", this.pem_html.substring(l_startPos, pos));
this.pem_hdl.startElement(this.pem_html, "htmlhbox", "htmlhbox", l_attr);
this.pemf_setStdProps(l_tagEl.pcm_attributes);
this.pem_hdl.endElement(this.pem_html, "htmlhbox", "htmlhbox");
this.pemf_buildHtmlTplString(l_name, pos, l_tagEl.pcm_startPos);
}
else if (l_type.equalsIgnoreCase("vbox"))
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
int l_startPos = this.pem_html.indexOf(">", l_tagEl.pcm_startPos) + 1;
String spacing = (String) l_tagEl.pcm_attributes.getAttribute(HTML.Attribute.CELLSPACING);
if (spacing != null)
l_attr.addAttribute(null, null, "gap", "", "spacing");
this.pemf_setBoxAttributes(l_attr, l_tagEl);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
l_attr.addAttribute(null, null, "htmlTpl", "", this.pem_html.substring(l_startPos, pos));
this.pem_hdl.startElement(this.pem_html, "htmlvbox", "htmlvbox", l_attr);
this.pemf_setStdProps(l_tagEl.pcm_attributes);
this.pem_hdl.endElement(this.pem_html, "htmlvbox", "htmlvbox");
this.pemf_buildHtmlTplString(l_name, pos, l_tagEl.pcm_startPos);
}
else if (l_type.equalsIgnoreCase("box"))
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
int l_startPos = this.pem_html.indexOf(">", l_tagEl.pcm_startPos) + 1;
this.pemf_setBoxAttributes(l_attr, l_tagEl);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
l_attr.addAttribute(null, null, "htmlTpl", "", this.pem_html.substring(l_startPos, pos));
this.pem_hdl.startElement(this.pem_html, "htmlbox", "htmlbox", l_attr);
this.pemf_setStdProps(l_tagEl.pcm_attributes);
this.pem_hdl.endElement(this.pem_html, "htmlbox", "htmlbox");
this.pemf_buildHtmlTplString(l_name, pos, l_tagEl.pcm_startPos);
}
}
else if (l_tagEl.pcm_current.equals(Tag.A))
{
if (this.pem_conversionMode == CONVERT_DISABLED)
this.pem_current = null;
else if (this.pem_conversionMode == CONVERT_UNTYPED)
{
this.pem_current = null;
this.pemf_createHidden(l_name, "", l_id, true);
}
else
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
int l_startPos = this.pem_html.indexOf(">", l_tagEl.pcm_startPos) + 1;
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
l_attr.addAttribute(null, null, "htmlTpl", "", this.pem_html.substring(l_startPos, pos));
l_attr.addAttribute(null, null, "value", "", this.pem_lastText);
this.pem_hdl.startElement(this.pem_html, "htmlLink", "htmlLink", l_attr);
this.pemf_setStdProps(l_tagEl.pcm_attributes);
this.pem_hdl.endElement(this.pem_html, "htmlLink", "htmlLink");
this.pemf_buildHtmlTplString(l_name, pos, l_tagEl.pcm_startPos);
}
}
else if (l_tagEl.pcm_current instanceof HTML.UnknownTag && ((HTML.UnknownTag) l_tagEl.pcm_current).toString().equalsIgnoreCase("button"))
{
if (this.pem_conversionMode == CONVERT_DISABLED)
this.pem_current = null;
else if (this.pem_conversionMode == CONVERT_UNTYPED)
{
this.pem_current = null;
this.pemf_createHidden(l_name, "", l_id, true);
}
else
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
int l_startPos = this.pem_html.indexOf(">", l_tagEl.pcm_startPos) + 1;
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
l_attr.addAttribute(null, null, "htmlTpl", "", this.pem_html.substring(l_startPos, pos));
l_attr.addAttribute(null, null, "value", "", this.pem_lastText);
this.pem_hdl.startElement(this.pem_html, "htmlButton", "htmlButton", l_attr);
this.pemf_setStdProps(l_tagEl.pcm_attributes);
this.pem_hdl.endElement(this.pem_html, "htmlButton", "htmlButton");
this.pemf_buildHtmlTplString(l_name, pos, l_tagEl.pcm_startPos);
}
}
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error processing recursive html tag: " + l_type, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
super.handleEndTag(t, pos);
}
private void pemf_setBoxAttributes(AttributesImpl xAttr, UnHtmlTagStackElement xTagEl)
{
String l_style = (String) xTagEl.pcm_attributes.getAttribute(HTML.Attribute.STYLE);
UnHtmlCssStyles l_styles = new UnHtmlCssStyles(l_style);
String l_pad = l_styles.pcmf_getPadding();
String l_marg = l_styles.pcmf_getMargin();
String l_bt = l_styles.pcmf_getBorderT();
String l_br = l_styles.pcmf_getBorderR();
String l_bl = l_styles.pcmf_getBorderL();
String l_bb = l_styles.pcmf_getBorderB();
if (l_pad != null)
xAttr.addAttribute(null, null, "padding", "", l_pad);
if (l_marg != null)
xAttr.addAttribute(null, null, "margin", "", l_marg);
if (l_bt != null)
xAttr.addAttribute(null, null, "borderTop", "", l_bt);
if (l_br != null)
xAttr.addAttribute(null, null, "borderRight", "", l_br);
if (l_bl != null)
xAttr.addAttribute(null, null, "borderLeft", "", l_bl);
if (l_bb != null)
xAttr.addAttribute(null, null, "borderBottom", "", l_bb);
}
public void handleError(String errorMsg, int pos)
{
super.handleError(errorMsg, pos);
}
public void handleSimpleTag(Tag t, MutableAttributeSet a, int pos)
{
if (this.pem_recordBodyStart)
{
this.pem_recordBodyStart = false;
this.pem_bodyStart = pos;
}
if (t.equals(HTML.Tag.LINK))
{
if ("text/css".equalsIgnoreCase((String) a.getAttribute(HTML.Attribute.TYPE))
&& "stylesheet".equalsIgnoreCase((String) a.getAttribute(HTML.Attribute.REL)))
{
String l_css = (String) a.getAttribute(HTML.Attribute.HREF);
if (l_css != null)
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", l_css);
this.pem_hdl.startElement(this.pem_html, "extCss", "extCss", l_attr);
this.pem_hdl.endElement(this.pem_html, "extCss", "extCss");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error setting external css: " + l_css, this, KeLog.ERROR);
}
};
}
}
if (t instanceof HTML.UnknownTag)
{
if (this.pem_html.charAt(pos + 1) == '/')
this.handleEndTag(t, pos);
else
this.handleStartTag(t, a, pos);
return;
}
if (this.pem_inRecursion)
{
super.handleSimpleTag(t, a, pos);
return;
}
if (this.pemf_isConvertable())
{
try
{
char l_subst[] = new char[pos - this.pem_prevPos];
char l_var[] = ("{" + this.pem_cName + "}").toCharArray();
System.arraycopy(l_var, 0, l_subst, 0, l_var.length);
this.pem_html = KeTools.pcmf_stringSingleSubst(this.pem_html, this.pem_html.substring(this.pem_prevPos, pos), String.valueOf(l_subst));
this.pem_current = null;
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error converting html stream, Tag:" + t.toString() + ", position: " + pos + " ,streamed so far: "
+ this.pem_html.substring(0, pos), this, KeLog.FATAL);
}
}
if (t.equals(Tag.IMG) || t.equals(Tag.INPUT))
{
this.pem_prevPos = pos;
this.pem_current = t;
this.pem_currentAttr = a.copyAttributes();
this.pem_cName = (String) a.getAttribute(HTML.Attribute.NAME);
this.pem_cType = (String) a.getAttribute(HTML.Attribute.TYPE);
String l_value = (String) a.getAttribute(HTML.Attribute.VALUE);
String l_id = (String) a.getAttribute(HTML.Attribute.ID);
String l_name = this.pem_cName;
String l_fdesc = null;
if (l_name != null)
{
ArrayList l_toks = KeTools.pcmf_stringTokens(l_name, ".");
if (l_toks.size() > 1)
l_fdesc = l_toks.get(1).toString();
}
else
{
l_name = l_id;
this.pem_cName = l_id;
}
if (l_name == null && this.pem_conversionMode != CONVERT_DISABLED)
KeLog.pcmf_log("ug2t", "tag does not have a name or id: " + this.pem_current, this, KeLog.FATAL);
if (t.equals(Tag.IMG))
{
try
{
if (this.pem_conversionMode == CONVERT_DISABLED)
this.pem_current = null;
else if (this.pem_conversionMode == CONVERT_UNTYPED)
{
this.pem_current = null;
this.pemf_createHidden(l_name, l_value, l_id, true);
}
else
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
String l_src = (String) a.getAttribute(HTML.Attribute.SRC);
if (l_src != null)
l_attr.addAttribute(null, null, "value", "", l_src);
else
l_attr.addAttribute(null, null, "value", "", "");
String l_data = (String) a.getAttribute(HTML.Attribute.TYPE);
if (l_data != null && l_data.equalsIgnoreCase("icon") || this.pem_hdl.pdm_act instanceof IUnLink || this.pem_hdl.pdm_act instanceof IUnButton)
l_attr.addAttribute(null, null, "icon", "", "true");
this.pem_hdl.startElement(this.pem_html, "image", "image", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "image", "image");
}
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (t.equals(Tag.INPUT))
{
if (this.pem_conversionMode == CONVERT_DISABLED)
this.pem_current = null;
else if (this.pem_conversionMode == CONVERT_UNTYPED)
{
this.pem_current = null;
this.pemf_createHidden(l_name, l_value, l_id, true);
}
else
{
if (this.pem_cType.equalsIgnoreCase("tree"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
this.pem_hdl.startElement(this.pem_html, "tree", "tree", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "tree", "tree");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("table"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
this.pem_hdl.startElement(this.pem_html, "table", "table", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "table", "table");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("slider"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
this.pem_hdl.startElement(this.pem_html, "slider", "slider", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "slider", "slider");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("hidden"))
this.pemf_createHidden(l_name, l_value, l_id, true);
else if (this.pem_cType.equalsIgnoreCase("drawpane"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
l_attr.addAttribute(null, null, "width", "", a.getAttribute(HTML.Attribute.WIDTH).toString());
l_attr.addAttribute(null, null, "height", "", a.getAttribute(HTML.Attribute.HEIGHT).toString());
this.pem_hdl.startElement(this.pem_html, "drawPane", "drawPane", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "drawPane", "drawPane");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("menu"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
this.pem_hdl.startElement(this.pem_html, "menu", "menu", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "menu", "menu");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("ctxmenu"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
this.pem_hdl.startElement(this.pem_html, "ctxMenu", "ctxMenu", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "ctxMenu", "ctxMenu");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("progressBar"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
if (l_value != null)
l_attr.addAttribute(null, null, "value", "", l_value);
this.pem_hdl.startElement(this.pem_html, "progressBar", "progressBar", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "progressBar", "progressBar");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("text"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
if (l_value != null)
l_attr.addAttribute(null, null, "value", "", l_value);
else
l_attr.addAttribute(null, null, "value", "", "");
// len,size
String l_size = (String) a.getAttribute(HTML.Attribute.SIZE);
String l_len = (String) a.getAttribute(HTML.Attribute.MAXLENGTH);
String l_style = (String) a.getAttribute(HTML.Attribute.STYLE);
if (l_style != null)
{
UnHtmlCssStyles l_styles = new UnHtmlCssStyles(l_style);
String l_ta = l_styles.pdmf_getValue("text-align");
if (l_ta != null)
{
String l_align = "CENTER";
if (l_ta.equalsIgnoreCase("left"))
l_align = "WEST";
else if (l_ta.equalsIgnoreCase("right"))
l_align = "EAST";
l_attr.addAttribute(null, null, "textAlign", "", l_align);
}
}
if (l_size != null)
l_attr.addAttribute(null, null, "size", "", l_size);
else
l_attr.addAttribute(null, null, "size", "", "20");
if (l_len != null)
l_attr.addAttribute(null, null, "len", "", l_len);
else
l_attr.addAttribute(null, null, "len", "", "20");
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
this.pem_hdl.startElement(this.pem_html, "input", "input", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "input", "input");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("password"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
if (l_value != null)
l_attr.addAttribute(null, null, "value", "", l_value);
else
l_attr.addAttribute(null, null, "value", "", "");
// len,size
String l_size = (String) a.getAttribute(HTML.Attribute.SIZE);
String l_len = (String) a.getAttribute(HTML.Attribute.MAXLENGTH);
if (l_size != null)
l_attr.addAttribute(null, null, "size", "", l_size);
if (l_len != null)
l_attr.addAttribute(null, null, "len", "", l_len);
l_attr.addAttribute(null, null, "pwd", "", "true");
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
this.pem_hdl.startElement(this.pem_html, "input", "input", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "input", "input");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("button"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
if (l_value != null)
l_attr.addAttribute(null, null, "value", "", l_value);
else
l_attr.addAttribute(null, null, "value", "", "");
this.pem_hdl.startElement(this.pem_html, "button", "button", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "button", "button");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("radio"))
{
// Alpha Implementation - does not Work due to different radio
// button behave patterns
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
String l_group = l_name.substring(l_name.indexOf(":") + 1);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
l_attr.addAttribute(null, null, "entry", "", "");
l_attr.addAttribute(null, null, "group", "", l_group);
String l_checked = (String) a.getAttribute(HTML.Attribute.CHECKED);
if (l_value != null)
l_attr.addAttribute(null, null, "value", "", l_value);
else
l_attr.addAttribute(null, null, "value", "", l_name);
this.pem_hdl.startElement(this.pem_html, "singleRadio", "singleRadio", l_attr);
l_attr = new AttributesImpl();
if (l_checked != null)
l_attr.addAttribute(null, null, "value", "", IUnRadioButton.CHECKED);
else
l_attr.addAttribute(null, null, "value", "", IUnRadioButton.NOTCHECKED);
this.pem_hdl.startElement(this.pem_html, "value", "value", l_attr);
this.pem_hdl.endElement(this.pem_html, "value", "value");
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "singleRadio", "singleRadio");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("radioPanel"))
{
// Alpha Implementation - does not Work due to different radio
// button behave patterns
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
l_attr.addAttribute(null, null, "label", "", "");
this.pem_hdl.startElement(this.pem_html, "radio", "radio", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "radio", "radio");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("checkbox"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
String l_checked = (String) a.getAttribute(HTML.Attribute.CHECKED);
if (l_checked != null)
l_attr.addAttribute(null, null, "value", "", IUnCheckBox.CHECKED);
else
l_attr.addAttribute(null, null, "value", "", IUnCheckBox.NOTCHECKED);
l_attr.addAttribute(null, null, "label", "", "");
this.pem_hdl.startElement(this.pem_html, "checkBox", "checkBox", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "checkBox", "checkBox");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("link"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
if (l_value != null)
l_attr.addAttribute(null, null, "value", "", l_value);
else
l_attr.addAttribute(null, null, "value", "", "");
this.pem_hdl.startElement(this.pem_html, "link", "link", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "link", "link");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("plugin"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "use", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
this.pem_hdl.startElement(this.pem_html, "plugin", "plugin", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "plugin", "plugin");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("raw"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
if (l_value != null)
l_attr.addAttribute(null, null, "html", "", l_value);
else
l_attr.addAttribute(null, null, "html", "", "");
this.pem_hdl.startElement(this.pem_html, "html", "html", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "html", "html");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (this.pem_cType.equalsIgnoreCase("label"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
if (l_value != null)
l_attr.addAttribute(null, null, "value", "", l_value);
else
l_attr.addAttribute(null, null, "value", "", "");
this.pem_hdl.startElement(this.pem_html, "label", "label", l_attr);
this.pemf_setStdProps(a);
this.pem_hdl.endElement(this.pem_html, "label", "label");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
}
}
}
super.handleSimpleTag(t, a, pos);
}
private void pemf_createHidden(String xName, String xValue, String xId, boolean xClose)
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", xName);
l_attr.addAttribute(null, null, "register", "", xId != null ? xId : xName);
if (xValue != null && xValue.startsWith("{$") == false && xValue.endsWith("}") == false)
l_attr.addAttribute(null, null, "value", "", xValue);
else
l_attr.addAttribute(null, null, "value", "", "");
this.pem_hdl.startElement(this.pem_html, "hidden", "hidden", l_attr);
if (xClose)
this.pem_hdl.endElement(this.pem_html, "hidden", "hidden");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
private void pemf_setStdProps(AttributeSet xA) throws Exception
{
String l_width = (String) xA.getAttribute(HTML.Attribute.WIDTH);
String l_height = (String) xA.getAttribute(HTML.Attribute.HEIGHT);
String l_align = (String) xA.getAttribute(HTML.Attribute.ALIGN);
String l_valign = (String) xA.getAttribute(HTML.Attribute.VALIGN);
String l_color = (String) xA.getAttribute(HTML.Attribute.COLOR);
String l_bgColor = (String) xA.getAttribute(HTML.Attribute.BGCOLOR);
String l_style = (String) xA.getAttribute(HTML.Attribute.STYLE);
String l_class = (String) xA.getAttribute(HTML.Attribute.CLASS);
String l_title = (String) xA.getAttribute(HTML.Attribute.TITLE);
String l_include = (String) xA.getAttribute(HTML.Attribute.DATA);
if (l_include == null)
l_include = (String) xA.getAttribute(HTML.Attribute.CODE);
String l_font = null;
String l_fSize = null;
String l_fWeight = null;
if (l_bgColor == null)
l_bgColor = (String) xA.getAttribute(HTML.Attribute.BACKGROUND);
UnHtmlCssStyles l_styles = new UnHtmlCssStyles(l_style);
String l_stop = l_styles.pcmf_getSl_top();
String l_sleft = l_styles.pcmf_getSl_left();
String l_swidth = l_styles.pcmf_getSl_width();
String l_sheight = l_styles.pcmf_getSl_height();
String l_visi = l_styles.pcmf_getVisibility();
String l_layout = l_styles.pcmf_getS_layout();
if (l_align == null && l_valign == null)
l_align = l_styles.pcmf_getAlign();
else
l_align = l_styles.pdmf_convertAlign(l_align, l_valign);
if (l_color == null)
l_color = l_styles.pcmf_getForeground();
if (l_bgColor == null)
l_bgColor = l_styles.pcmf_getBackground();
if (l_width == null)
l_width = l_styles.pcmf_getWidth();
else
l_width = KeTools.pcmf_stringSingleSubst(l_width, "px", "");
if (l_height == null)
l_height = l_styles.pcmf_getHeight();
else
l_height = KeTools.pcmf_stringSingleSubst(l_height, "px", "");
l_font = l_styles.pcmf_getFont();
l_fSize = l_styles.pcmf_getFontSize();
l_fWeight = l_styles.pcmf_getFontWeight();
AttributesImpl l_attr = null;
if (this.pem_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT)
{
if (this.pem_hdl.pdm_act instanceof IUnLayouted && l_layout != null)
{
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", l_layout);
// position setzen
this.pem_hdl.startElement(this.pem_html, "commonLayout", "commonLayout", l_attr);
this.pem_hdl.endElement(this.pem_html, "commonLayout", "commonLayout");
}
if (this.pem_hdl.pdm_act.pcmf_getParentNode() instanceof IUnPanel)
{
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "x", "", l_sleft != null ? l_sleft : "0");
l_attr.addAttribute(null, null, "y", "", l_stop != null ? l_stop : "0");
l_attr.addAttribute(null, null, "height", "", l_sheight != null ? l_sheight : "1");
l_attr.addAttribute(null, null, "width", "", l_swidth != null ? l_swidth : "1");
l_attr.addAttribute(null, null, "align", "", l_align);
// position setzen
this.pem_hdl.startElement(this.pem_html, "position", "position", l_attr);
this.pem_hdl.endElement(this.pem_html, "position", "position");
};
}
if (l_width != null || l_height != null)
{
if (this.pem_hdl.pdm_act.pcmf_getParentNode() instanceof IUnLayouted)
{
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "hFill", "", l_width != null ? "false" : "true");
l_attr.addAttribute(null, null, "vFill", "", l_height != null ? "false" : "true");
this.pem_hdl.startElement(this.pem_html, "fill", "fill", l_attr);
this.pem_hdl.endElement(this.pem_html, "fill", "fill");
}
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "height", "", l_height != null ? l_height : "-1");
l_attr.addAttribute(null, null, "width", "", l_width != null ? l_width : "-1");
this.pem_hdl.startElement(this.pem_html, "fixedSize", "fixedSize", l_attr);
this.pem_hdl.endElement(this.pem_html, "fixedSize", "fixedSize");
}
// swing only values
String l_sweightx = l_styles.pcmf_getSWeight_x();
String l_sweighty = l_styles.pcmf_getSWeight_y();
String l_sfillx = l_styles.pcmf_getSFill_x();
String l_sfilly = l_styles.pcmf_getSFill_y();
if (l_sweighty != null || l_sweightx != null)
{
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "weightX", "", l_sweightx);
l_attr.addAttribute(null, null, "weightY", "", l_sweighty);
this.pem_hdl.startElement(this.pem_html, "weights", "weights", l_attr);
this.pem_hdl.endElement(this.pem_html, "weights", "weights");
}
if (l_sfilly != null || l_sfillx != null)
{
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "hFill", "", l_sfillx);
l_attr.addAttribute(null, null, "vFill", "", l_sfilly);
this.pem_hdl.startElement(this.pem_html, "fill", "fill", l_attr);
this.pem_hdl.endElement(this.pem_html, "fill", "fill");
}
// visibility
if (l_visi != null && l_visi.equalsIgnoreCase("hidden"))
{
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", "true");
this.pem_hdl.startElement(this.pem_html, "hide", "hide", l_attr);
this.pem_hdl.endElement(this.pem_html, "hide", "hide");
}
// border
String l_border = l_styles.pcmf_getBorder();
if (l_border != null)
{
if (l_border.equalsIgnoreCase("solid"))
l_border = "LINE";
else if (l_border.equalsIgnoreCase("outset"))
l_border = "OUTSETS";
else if (l_border.equalsIgnoreCase("inset"))
l_border = "INSETS";
else if (l_border.equalsIgnoreCase("none"))
l_border = "NONE";
else
l_border = "LINE";
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "style", "", l_border);
l_attr.addAttribute(null, null, "width", "", l_styles.pcmf_getBorderWidth());
l_attr.addAttribute(null, null, "color", "", l_styles.pcmf_getBorderColor());
this.pem_hdl.startElement(this.pem_html, "wdgBorder", "wdgBorder", l_attr);
this.pem_hdl.endElement(this.pem_html, "wdgBorder", "wdgBorder");
}
// toolTip
if (l_title != null)
{
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "tip", "", l_title);
this.pem_hdl.startElement(this.pem_html, "toolTip", "toolTip", l_attr);
this.pem_hdl.endElement(this.pem_html, "toolTip", "toolTip");
}
// cssClass setzen
if (l_class != null)
{
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", l_class);
this.pem_hdl.startElement(this.pem_html, "cssClass", "cssClass", l_attr);
this.pem_hdl.endElement(this.pem_html, "cssClass", "cssClass");
}
// farbe setzen
if (l_color != null || l_bgColor != null)
{
l_attr = new AttributesImpl();
if (l_color != null)
l_attr.addAttribute(null, null, "fg", "", l_color);
if (l_bgColor != null)
l_attr.addAttribute(null, null, "bg", "", l_bgColor);
this.pem_hdl.startElement(this.pem_html, "color", "color", l_attr);
this.pem_hdl.endElement(this.pem_html, "color", "color");
}
boolean l_useCssColors = l_styles.pcmf_getDelDefCol();
if (l_useCssColors == true)
{
l_attr = new AttributesImpl();
this.pem_hdl.startElement(this.pem_html, "deleteColors", "deleteColors", l_attr);
this.pem_hdl.endElement(this.pem_html, "deleteColors", "deleteColors");
}
// font setzen
if (l_font != null)
{
l_attr = new AttributesImpl();
if (l_font != null)
l_attr.addAttribute(null, null, "name", "", l_font);
if (l_fSize != null)
l_attr.addAttribute(null, null, "size", "", l_fSize);
if (l_fWeight != null)
l_attr.addAttribute(null, null, "style", "", l_fWeight);
this.pem_hdl.startElement(this.pem_html, "font", "font", l_attr);
this.pem_hdl.endElement(this.pem_html, "font", "font");
}
// includen
if (l_include != null)
{
l_include = KeTools.pcmf_stringSubst(l_include, " ", "");
if (l_include.startsWith("javaclass:"))
{
l_include = KeTools.pcmf_stringSingleSubst(l_include, "javaclass:", "");
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "class", "", l_include);
this.pem_hdl.startElement(this.pem_html, "java", "java", l_attr);
this.pem_hdl.endElement(this.pem_html, "java", "java");
}
else if (l_include.startsWith("javaobject:"))
{
l_include = KeTools.pcmf_stringSingleSubst(l_include, "javaobject:", "");
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "object", "", l_include);
this.pem_hdl.startElement(this.pem_html, "java", "java", l_attr);
this.pem_hdl.endElement(this.pem_html, "java", "java");
}
else if (l_include.startsWith("xml:"))
{
l_include = KeTools.pcmf_stringSingleSubst(l_include, "xml:", "");
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "file", "", l_include);
this.pem_hdl.startElement(this.pem_html, "include", "include", l_attr);
this.pem_hdl.endElement(this.pem_html, "include", "include");
}
else if (l_include.startsWith("submit:"))
{
l_include = KeTools.pcmf_stringSingleSubst(l_include, "submit:", "");
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", l_include);
this.pem_hdl.startElement(this.pem_html, "submitEvent", "submitEvent", l_attr);
this.pem_hdl.endElement(this.pem_html, "submitEvent", "submitEvent");
}
else if (l_include.startsWith("eventonchange:"))
{
l_include = KeTools.pcmf_stringSingleSubst(l_include, "eventOnChange:", "");
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", l_include);
this.pem_hdl.startElement(this.pem_html, "eventOnChange", "eventOnChange", l_attr);
this.pem_hdl.endElement(this.pem_html, "eventOnChange", "eventOnChange");
}
else if (l_include.startsWith("disable:"))
{
l_include = KeTools.pcmf_stringSingleSubst(l_include, "disable:", "");
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", l_include);
this.pem_hdl.startElement(this.pem_html, "disable", "disable", l_attr);
this.pem_hdl.endElement(this.pem_html, "disable", "disable");
}
else if (l_include.startsWith("readonly:"))
{
l_include = KeTools.pcmf_stringSingleSubst(l_include, "readonly:", "");
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", l_include);
this.pem_hdl.startElement(this.pem_html, "readOnly", "readOnly", l_attr);
this.pem_hdl.endElement(this.pem_html, "readOnly", "readOnly");
}
else if (l_include.startsWith("hide:"))
{
l_include = KeTools.pcmf_stringSingleSubst(l_include, "hide:", "");
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", l_include);
this.pem_hdl.startElement(this.pem_html, "hide", "hide", l_attr);
this.pem_hdl.endElement(this.pem_html, "hide", "hide");
}
else if (l_include.startsWith("listenerclass:"))
{
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", "true");
this.pem_hdl.startElement(this.pem_html, "submitEvent", "submitEvent", l_attr);
this.pem_hdl.endElement(this.pem_html, "submitEvent", "submitEvent");
l_include = KeTools.pcmf_stringSingleSubst(l_include, "listenerclass:", "");
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "class", "", l_include);
this.pem_hdl.startElement(this.pem_html, "srvListener", "srvListener", l_attr);
this.pem_hdl.endElement(this.pem_html, "srvListener", "srvListener");
}
else if (l_include.startsWith("listenerobject:"))
{
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", "true");
this.pem_hdl.startElement(this.pem_html, "submitEvent", "submitEvent", l_attr);
this.pem_hdl.endElement(this.pem_html, "submitEvent", "submitEvent");
l_include = KeTools.pcmf_stringSingleSubst(l_include, "listenerobject:", "");
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "object", "", l_include);
this.pem_hdl.startElement(this.pem_html, "srvListener", "srvListener", l_attr);
this.pem_hdl.endElement(this.pem_html, "srvListener", "srvListener");
}
else if (l_include.startsWith("listenerstatement:"))
{
l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", "true");
this.pem_hdl.startElement(this.pem_html, "submitEvent", "submitEvent", l_attr);
this.pem_hdl.endElement(this.pem_html, "submitEvent", "submitEvent");
l_include = KeTools.pcmf_stringSingleSubst(l_include, "listenerstatement:", "");
l_attr = new AttributesImpl();
ArrayList l_list = KeTools.pcmf_stringTokens(l_include, ".", 3);
l_attr.addAttribute(null, null, "object", "", l_list.get(0).toString());
l_attr.addAttribute(null, null, "method", "", l_list.get(1).toString());
l_attr.addAttribute(null, null, "parameter", "", l_list.get(2).toString());
this.pem_hdl.startElement(this.pem_html, "srvStmtListener", "srvStmtListener", l_attr);
this.pem_hdl.endElement(this.pem_html, "srvStmtListener", "srvStmtListener");
}
}
return;
}
public void handleStartTag(Tag t, MutableAttributeSet a, int pos)
{
if (this.pem_recordBodyStart)
{
this.pem_recordBodyStart = false;
this.pem_bodyStart = pos;
}
UnHtmlTagStackElement l_tagEl = new UnHtmlTagStackElement();
l_tagEl.pcm_current = t;
l_tagEl.pcm_startPos = pos;
l_tagEl.pcm_attributes = a.copyAttributes();
this.pem_tagStack.push(l_tagEl);
if (t.equals(Tag.A) || t.equals(Tag.TEXTAREA) || t.equals(Tag.SELECT))
this.pem_lastText = "";
if (this.pem_inRecursion)
{
super.handleStartTag(t, a, pos);
return;
}
if (this.pemf_handleRecursive(t, a))
{
l_tagEl.pcm_inRecursion = true;
this.pem_inRecursion = true;
return;
};
if (t.equals(Tag.BODY))
{
this.pem_recordBodyStart = true;
try
{
this.pemf_setStdProps(a);
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: page", this, KeLog.ERROR);
}
}
if (this.pemf_isConvertable())
{
try
{
char l_subst[] = new char[pos - this.pem_prevPos];
char l_var[] = ("{" + this.pem_cName + "}").toCharArray();
System.arraycopy(l_var, 0, l_subst, 0, l_var.length);
this.pem_html = KeTools.pcmf_stringSingleSubst(this.pem_html, this.pem_html.substring(this.pem_prevPos, pos), String.valueOf(l_subst));
this.pem_current = null;
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error converting html stream, Tag:" + t.toString() + ", position: " + pos + " ,streamed so far: "
+ this.pem_html.substring(0, pos), this, KeLog.FATAL);
}
}
String l_type = (String) a.getAttribute(HTML.Attribute.TYPE);
String l_id = (String) a.getAttribute(HTML.Attribute.ID);
if (t.equals(Tag.SELECT) || t.equals(Tag.TEXTAREA) || (t.equals(Tag.SPAN) || t.equals(Tag.DIV)) && l_type != null
&& (l_type.equalsIgnoreCase("label") || l_type.equalsIgnoreCase("html")))
{
this.pem_cName = (String) a.getAttribute(HTML.Attribute.NAME);
this.pem_cType = l_type;
String l_value = (String) a.getAttribute(HTML.Attribute.VALUE);
// type in folgender form
// tree.factDesc
String l_name = this.pem_cName;
String l_fdesc = null;
if (l_name != null)
{
ArrayList l_toks = KeTools.pcmf_stringTokens(l_name, ".");
if (l_toks.size() > 1)
l_fdesc = l_toks.get(1).toString();
}
else
{
l_name = l_id;
this.pem_cName = l_id;
}
if (l_name == null && this.pem_conversionMode != CONVERT_DISABLED)
KeLog.pcmf_log("ug2t", "tag does not have a name or id: " + this.pem_current, this, KeLog.FATAL);
if (this.pem_conversionMode == CONVERT_DISABLED)
this.pem_current = null;
else if (this.pem_conversionMode == CONVERT_UNTYPED)
{
this.pem_current = null;
this.pemf_createHidden(l_name, l_value, l_id, false);
}
else
{
if (l_type != null && l_type.equalsIgnoreCase("label"))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "value", "", "");
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
this.pem_hdl.startElement(this.pem_html, "label", "label", l_attr);
this.pemf_setStdProps(l_tagEl.pcm_attributes);
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (l_type != null && l_type.equalsIgnoreCase("html") && this.pem_hdl.pdm_AppType == UnComponentFactory.MARKUP)
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "html", "", "");
l_attr.addAttribute(null, null, "register", "", l_id != null ? l_id : l_name);
this.pem_hdl.startElement(this.pem_html, "html", "html", l_attr);
this.pemf_setStdProps(l_tagEl.pcm_attributes);
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (t.equals(Tag.SELECT))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_name);
String l_size = (String) a.getAttribute(HTML.Attribute.SIZE);
if (l_size == null)
l_size = "0";
if (l_size.equals("1"))
{
this.pem_hdl.startElement(this.pem_html, "comboBox", "comboBox", l_attr);
this.pemf_setStdProps(a);
}
else
{
l_attr.addAttribute(null, null, "size", "", l_size);
this.pem_hdl.startElement(this.pem_html, "listBox", "listBox", l_attr);
this.pemf_setStdProps(a);
}
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
else if (t.equals(Tag.TEXTAREA))
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "name", "", l_name);
if (l_fdesc != null)
l_attr.addAttribute(null, null, "factoryDesc", "", l_fdesc);
l_attr.addAttribute(null, null, "register", "", l_name);
if (l_value != null)
l_attr.addAttribute(null, null, "value", "", l_value);
else
l_attr.addAttribute(null, null, "value", "", "");
String l_cols = (String) a.getAttribute(HTML.Attribute.COLS);
String l_rows = (String) a.getAttribute(HTML.Attribute.ROWS);
if (l_cols == null)
l_cols = "20";
if (l_rows == null)
l_rows = "4";
l_attr.addAttribute(null, null, "cols", "", l_cols);
l_attr.addAttribute(null, null, "rows", "", l_rows);
this.pem_hdl.startElement(this.pem_html, "textBox", "textBox", l_attr);
this.pemf_setStdProps(a);
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error during widget creation from html: " + this.pem_cName, this, KeLog.ERROR);
KeLog.pcmf_logException("ug2t", this, e);
}
}
}
}
super.handleStartTag(t, a, pos);
}
public void handleText(char[] data, int pos)
{
if (this.pem_recordBodyStart)
{
this.pem_recordBodyStart = false;
this.pem_bodyStart = pos;
}
this.pem_lastText = String.valueOf(data);
if (this.pem_lastText.startsWith("{$") && this.pem_lastText.endsWith("}"))
this.pem_lastText = "";
if (this.pem_inRecursion)
{
super.handleText(data, pos);
return;
}
if (this.pemf_isConvertable())
{
try
{
char l_subst[] = new char[pos - this.pem_prevPos];
char l_var[] = ("{" + this.pem_cName + "}").toCharArray();
System.arraycopy(l_var, 0, l_subst, 0, l_var.length);
this.pem_html = KeTools.pcmf_stringSingleSubst(this.pem_html, this.pem_html.substring(this.pem_prevPos, pos), String.valueOf(l_subst));
this.pem_current = null;
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error converting html stream, Text:" + new String(data) + ", position: " + pos + " ,streamed so far: "
+ this.pem_html.substring(0, pos), this, KeLog.FATAL);
}
}
super.handleText(data, pos);
}
}
// Html parser Ende
// @@
class UnFeDescriptor
{
// Methode equals oder getHash damit HashMap gleichartige findet
// Nur noch ein String und eine Kennung
protected String pdm_xCmpVal = null;
protected Pattern pdm_pattern = null;
protected int pdm_mode = FE_DESC_TAG;
public static final int FE_DESC_TAG = 0;
public static final int FE_DESC_NAME = 1;
public static UnFeDescriptor pcmf_createTagDesc(String xTag)
{
UnFeDescriptor l_desc = new UnFeDescriptor();
l_desc.pdm_xCmpVal = xTag;
l_desc.pdm_mode = FE_DESC_TAG;
return (l_desc);
}
public static UnFeDescriptor pcmf_createReTagDesc(String xReTag)
{
UnFeDescriptor l_desc = new UnFeDescriptor();
try
{
l_desc.pdm_xCmpVal = xReTag;
l_desc.pdm_pattern = Pattern.compile(xReTag);
l_desc.pdm_mode = FE_DESC_TAG;
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "<forEach> invalid regular expression: " + xReTag, null, KeLog.ERROR);
}
return (l_desc);
}
public static UnFeDescriptor pcmf_createNameDesc(String xName)
{
UnFeDescriptor l_desc = new UnFeDescriptor();
l_desc.pdm_xCmpVal = xName;
l_desc.pdm_mode = FE_DESC_NAME;
return (l_desc);
}
public static UnFeDescriptor pcmf_createReNameDesc(String xReName)
{
UnFeDescriptor l_desc = new UnFeDescriptor();
try
{
l_desc.pdm_xCmpVal = xReName;
l_desc.pdm_pattern = Pattern.compile(xReName);
l_desc.pdm_mode = FE_DESC_NAME;
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "<forEach> invalid regular expression: " + xReName, null, KeLog.ERROR);
}
return (l_desc);
}
public int pcmf_getFEMode()
{
return (pdm_mode);
}
public boolean pcmf_evaluateName(String xValue)
{
if (xValue == null)
return (false);
if (this.pdm_pattern != null)
return (this.pdm_pattern.matcher(xValue).matches());
else
return (this.pdm_xCmpVal.equals(xValue));
}
public boolean pcmf_evaluateTag(String xValue)
{
if (xValue == null)
return (false);
if (this.pdm_pattern != null)
return (this.pdm_pattern.matcher(xValue).matches());
else
return (this.pdm_xCmpVal.equals(xValue));
}
public String toString()
{
return (this.pdm_xCmpVal);
}
public boolean equals(Object xCmp)
{
if (this.pdm_mode == FE_DESC_NAME)
return (this.pcmf_evaluateName(xCmp.toString()));
else
return (this.pcmf_evaluateTag(xCmp.toString()));
}
}
final class UnFEContainer
{
private Stack pem_includes = new Stack();
public final void pcmf_pushInclude(String xInclude)
{
this.pem_includes.push(xInclude);
}
public final void pcmf_popInclude()
{
this.pem_includes.pop();
}
public final void pcmf_doInclude(UnApplFactSAXHandler l_hdl)
{
// @@
Iterator l_it = this.pem_includes.iterator();
String xSource = null;
UnApplicationFactory l_prod = null;
while (l_it.hasNext())
{
try
{
xSource = KeTools.pcmf_deRef((String) l_it.next());
l_prod = new UnApplicationFactory(xSource, l_hdl);
l_prod.pcmf_parseRecursiv();
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "<include> error during file include " + xSource, this, KeLog.ERROR);
};
};
// @@
};
};
final class UnXMLTAGapp implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xRootUrl = KeTools.pcmf_deRef(attributes.getValue("rootURL"));
String xProtocol = KeTools.pcmf_deRef(attributes.getValue("protocol"));
String xPort = KeTools.pcmf_deRef(attributes.getValue("port"));
String xDomain = KeTools.pcmf_deRef(attributes.getValue("domain"));
String xMDI = KeTools.pcmf_deRef(attributes.getValue("mdi"));
String xAwHi = KeTools.pcmf_deRef(attributes.getValue("height"));
String xAwWi = KeTools.pcmf_deRef(attributes.getValue("width"));
String xLf = KeTools.pcmf_deRef(attributes.getValue("plaf"));
String xCss = KeTools.pcmf_deRef(attributes.getValue("extCss"));
String xGenRs = KeTools.pcmf_deRef(attributes.getValue("genReshapeEvents"));
String xAs = KeTools.pcmf_deRef(attributes.getValue("autoShow"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xBubble = KeTools.pcmf_deRef(attributes.getValue("bubble"));
String xCache = KeTools.pcmf_deRef(attributes.getValue("renderCache"));
String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
String xServiceClass = KeTools.pcmf_deRef(attributes.getValue("serviceClass"));
String xServiceObject = KeTools.pcmf_deRef(attributes.getValue("serviceObject"));
String xServicePoll = KeTools.pcmf_deRef(attributes.getValue("servicePoll"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
ServletConfig l_config = ((ServletConfig) KeRegisteredObject.pcmf_getObjByName(UnBasicServlet.SERVLET_CONFIG));
if (l_config != null)
{
if (xPort == null)
{
String l_port = l_config.getInitParameter("port");
if (l_port != null)
xPort = l_port;
}
if (xDomain == null)
{
String l_domain = l_config.getInitParameter("domain");
if (l_domain != null && !l_domain.equals("READFROMURL"))
xDomain = l_domain;
}
if (xRootUrl == null)
{
String l_ru = l_config.getInitParameter("rootURL");
if (l_ru != null)
xRootUrl = l_ru;
}
if (xProtocol == null)
{
String l_pc = l_config.getInitParameter("protocol");
if (l_pc != null)
xProtocol = l_pc;
}
}
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
if (xPort == null)
xPort = "8080";
IUnApplication l_appl = null;
if (xLf != null)
{
if (xMDI != null && xMDI.equalsIgnoreCase("true"))
l_appl = l_hdl.pdm_objFact.pcmf_createApplPlugin(l_hdl.pdm_AppType, xName, Integer.parseInt(xPort), true, xLf, xFBlock);
else
l_appl = l_hdl.pdm_objFact.pcmf_createApplPlugin(l_hdl.pdm_AppType, xName, Integer.parseInt(xPort), false, xLf, xFBlock);
}
else
{
if (xMDI != null && xMDI.equalsIgnoreCase("true"))
l_appl = l_hdl.pdm_objFact.pcmf_createApplPlugin(l_hdl.pdm_AppType, xName, Integer.parseInt(xPort), true, xFBlock);
else
l_appl = l_hdl.pdm_objFact.pcmf_createApplPlugin(l_hdl.pdm_AppType, xName, Integer.parseInt(xPort), false, xFBlock);
}
if (xBubble != null && xBubble.equalsIgnoreCase("false"))
l_appl.pcmf_setEventBubbling(false);
if (xServiceObject != null || xServiceClass != null)
{
if (xServicePoll == null)
xServicePoll = "2000";
int l_spoll = Integer.parseInt(xServicePoll);
if (xServiceObject != null)
l_appl.pcmf_setService((IKeExecutable) KeRegisteredObject.pcmf_getObjByName(xServiceObject), l_spoll, l_spoll);
else
l_appl.pcmf_setService((IKeExecutable) Class.forName(xServiceClass).newInstance(), l_spoll, l_spoll);
}
if (l_config != null)
{
if (l_appl instanceof MuGenericApplication)
((MuGenericApplication) l_appl).pcmf_setRedirect(l_config.getInitParameter("REDIRECT_ON_EXIT"));
}
if (l_hdl.pdm_mixed)
((HoSrvGenericApplication) l_appl).pcmf_setMixedMode(true);
if (xDomain != null)
l_appl.pcmf_setHostName(xDomain);
if (xRootUrl != null)
l_appl.pcmf_setRootUrl(xRootUrl);
if (xProtocol != null)
l_appl.pcmf_setProtocol(xProtocol);
l_hdl.pdm_appl = l_appl;
if (l_appl instanceof MuGenericApplication)
((MuGenericApplication) l_appl).pcmf_setTemplateKit((MuGenericTemplateKit) KeRegisteredObject.pcmf_getObjByName(MuGenericTemplateKit.TEMPLATE_KIT_NAME));
else
l_appl.pcmf_setComponentFactory(l_hdl.pdm_objFact);
if (xAwHi != null && xAwWi != null)
l_appl.pcmf_setApplWinSize(Integer.parseInt(xAwWi), Integer.parseInt(xAwHi));
if (xCss != null && xCss.equals("") == false)
l_appl.pcmf_setExternalCss(xCss);
l_appl.pcmf_getUnComponent().pcmf_enableSubmit();
if (xSubm != null && xSubm.equals("false"))
l_appl.pcmf_getUnComponent().pcmf_disableSubmit();
if (xGenRs != null && xGenRs.equals("true"))
l_appl.pcmf_setGenerateReshapeEvents(true);
if (xAs != null && xAs.equals("false") && l_appl instanceof HoSrvGenericApplication)
((HoSrvGenericApplication) l_appl).pcmf_setAutoShow(false);
// @@
l_hdl.pcmf_doExecStack(l_appl, l_appl.pcmf_getUnComponent(), xName);
return (l_appl);
};
};
final class UnXMLTAGnavHdl implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
if (l_hdl.pdm_appl instanceof MuGenericApplication)
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
try
{
IUnGuiEventListener l_listen = null;
if (xClass != null && xClass.equals("") == false)
l_listen = (IUnGuiEventListener) Class.forName(xClass).newInstance();
else if (xObj != null && xObj.equals("") == false)
l_listen = (IUnGuiEventListener) KeRegisteredObject.pcmf_getObjByName(xObj);
if (l_listen == null)
KeLog.pcmf_log("ug2t", "<navigationErrorHandler> navigation errorhandling attributes require a valid class or a valid obj attribute: class[" + xClass
+ "] object[" + xObj + "]", this, KeLog.ERROR);
else
((MuGenericApplication) l_hdl.pdm_appl).pcmf_setNavigationErrorHandler(l_listen);
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "<navigationErrorHandler> class: " + xClass + " for listener could not be found", this, KeLog.ERROR);
}
}
l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act, l_hdl.pdm_name);
return (l_hdl.pdm_appl);
};
};
final class UnXMLTAGpage implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xActive = KeTools.pcmf_deRef(attributes.getValue("active"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xNL = KeTools.pcmf_deRef(attributes.getValue("layout"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xGenRs = KeTools.pcmf_deRef(attributes.getValue("genReshapeEvents"));
String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
String xMown = KeTools.pcmf_deRef(attributes.getValue("ownMenu"));
String xMdiDecCol = KeTools.pcmf_deRef(attributes.getValue("htmlDecoColor"));
String xCss = KeTools.pcmf_deRef(attributes.getValue("extCss"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnPage l_page = null;
if (xNL != null && xNL.equals("false"))
l_page = l_hdl.pdm_objFact.pcmf_createGuiPagePlugin(l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl, xFBlock);
else
l_page = l_hdl.pdm_objFact.pcmf_createGuiPagePlugin(l_hdl.pdm_AppType, xName, false, l_hdl.pdm_appl, xFBlock);
if (xCss != null && xCss.equals("") == false)
l_page.pcmf_setExternalCss(xCss);
if (l_hdl.pdm_appl.pcmf_isMDI())
{
l_page.pcmf_getUnComponent().pcmf_setGlobal(true);
if (l_hdl.pdm_appl.pcmf_getApplType() == UnComponentFactory.MARKUP && xMdiDecCol != null && l_page instanceof MuGenericPage)
((MuGenericPage) l_page).pcmf_getDeco().pcmf_getUnComponent().pcmf_setBgColor(xMdiDecCol);
}
if (l_page instanceof IUnPanel)
{
if (xScr != null && xScr.equals("false"))
((IUnPanel) l_page).pcmf_setScroll(false);
};
if (xMown != null && xMown.equals("true"))
l_page.pcmf_ownsMenu(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_page.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_page.pcmf_getUnComponent().pcmf_enableSubmit();
if (xSubm != null && xSubm.equals("false"))
l_page.pcmf_getUnComponent().pcmf_disableSubmit();
if (xGenRs != null && xGenRs.equals("true"))
l_page.pcmf_setGenerateReshapeEvents(true);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_page.pcmf_getUnComponent());
else
l_page.pcmf_getUnComponent().pcmf_setGlobal(true);
l_page.pcmf_setPostFct(false);
l_page.pcmf_setPreFct(false);
if (xActive != null && xActive.equals("true"))
l_hdl.pdm_appl.pcmf_setActive(xName);
l_hdl.pdm_page = l_page;
l_hdl.pcmf_doExecStack(l_page, l_page.pcmf_getUnComponent(), xName);
return (l_page);
};
};
// Erzeugt eine Seite aus einem Html file (Html parser)
final class UnXMLTAGhtmlPage implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xActive = KeTools.pcmf_deRef(attributes.getValue("active"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xNL = KeTools.pcmf_deRef(attributes.getValue("layout"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xGenRs = KeTools.pcmf_deRef(attributes.getValue("genReshapeEvents"));
String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
String xMown = KeTools.pcmf_deRef(attributes.getValue("ownMenu"));
String xMdiDecCol = KeTools.pcmf_deRef(attributes.getValue("htmlDecoColor"));
String xHandleVar = KeTools.pcmf_deRef(attributes.getValue("handleVar"));
String xCharSet = KeTools.pcmf_deRef(attributes.getValue("characterSet"));
String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
String xExt = KeTools.pcmf_deRef(attributes.getValue("external"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnPage l_page = null;
if (xNL != null && xNL.equals("false"))
l_page = l_hdl.pdm_objFact.pcmf_createGuiPagePlugin(l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl, xFBlock);
else
l_page = l_hdl.pdm_objFact.pcmf_createGuiPagePlugin(l_hdl.pdm_AppType, xName, false, l_hdl.pdm_appl, xFBlock);
if (l_hdl.pdm_appl.pcmf_isMDI())
{
l_page.pcmf_getUnComponent().pcmf_setGlobal(true);
if (l_hdl.pdm_appl.pcmf_getApplType() == UnComponentFactory.MARKUP && xMdiDecCol != null && l_page instanceof MuGenericPage)
((MuGenericPage) l_page).pcmf_getDeco().pcmf_getUnComponent().pcmf_setBgColor(xMdiDecCol);
}
if (l_page instanceof IUnPanel)
{
if (xScr != null && xScr.equals("false"))
((IUnPanel) l_page).pcmf_setScroll(false);
};
if (xMown != null && xMown.equals("true"))
l_page.pcmf_ownsMenu(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_page.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_page.pcmf_getUnComponent().pcmf_enableSubmit();
if (xSubm != null && xSubm.equals("false"))
l_page.pcmf_getUnComponent().pcmf_disableSubmit();
if (xGenRs != null && xGenRs.equals("true"))
l_page.pcmf_setGenerateReshapeEvents(true);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_page.pcmf_getUnComponent());
else
l_page.pcmf_getUnComponent().pcmf_setGlobal(true);
l_page.pcmf_setPostFct(false);
l_page.pcmf_setPreFct(false);
if (xActive != null && xActive.equals("true"))
l_hdl.pdm_appl.pcmf_setActive(xName);
l_hdl.pdm_page = l_page;
l_hdl.pcmf_doExecStack(l_page, l_page.pcmf_getUnComponent(), xName);
// Html file parsen - nur wenn kein cached run
// @@
String l_html = null;
if (xExt != null && xExt.equals("true"))
{
CoTextFileGetter l_tfg = new CoTextFileGetter();
if (xCharSet != null)
l_tfg.pcmf_setCharacterSet(xCharSet);
l_html = l_tfg.pcmf_getString(xHtmlFile);
l_tfg.pcmf_delete();
}
else
l_html = xHtmlFile;
if (l_html != null)
{
UnHtmlParserCallback l_cb = new UnHtmlParserCallback(l_html, l_hdl, true);
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", "", xName);
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", "", xHandleVar);
l_hdl.startElement("", "tplSec", "tplSec", l_attr);
l_hdl.endElement("", "tplSec", "tplSec");
}
else
l_hdl.pdmf_startCDataRecording();
// @@
return (l_page);
};
};
final class UnXMLTAGhtmlForm implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xNL = KeTools.pcmf_deRef(attributes.getValue("layout"));
String xIFr = KeTools.pcmf_deRef(attributes.getValue("iFrame"));
String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
String xLazy = KeTools.pcmf_deRef(attributes.getValue("lazy"));
String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
String xExt = KeTools.pcmf_deRef(attributes.getValue("external"));
String xHandleVar = KeTools.pcmf_deRef(attributes.getValue("handleVar"));
String xCharSet = KeTools.pcmf_deRef(attributes.getValue("characterSet"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnForm l_form = null;
if (xIFr == null || xIFr.equals("false"))
{
if (xNL != null && xNL.equals("false"))
l_form = l_hdl.pdm_objFact.pcmf_createFormPlugin(l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl, xFBlock);
else
l_form = l_hdl.pdm_objFact.pcmf_createFormPlugin(l_hdl.pdm_AppType, xName, false, l_hdl.pdm_appl, xFBlock);
}
else
{
if (xNL != null && xNL.equals("false"))
l_form = l_hdl.pdm_objFact.pcmf_createIForm(l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl);
else
l_form = l_hdl.pdm_objFact.pcmf_createIForm(l_hdl.pdm_AppType, xName, false, l_hdl.pdm_appl);
}
if (l_form instanceof IUnPanel)
{
if (xScr != null && xScr.equals("false"))
((IUnPanel) l_form).pcmf_setScroll(false);
};
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_form.pcmf_getUnComponent());
else
l_form.pcmf_getUnComponent().pcmf_setGlobal(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_form.pcmf_getUnComponent().pcmf_reRegister("html" + xReg);
// @@
l_hdl.pcmf_doExecStack(l_form, l_form.pcmf_getUnComponent(), xName);
// Html file parsen - nur wenn kein cached run
// @@
String l_html = null;
if (xExt != null && xExt.equals("true"))
{
CoTextFileGetter l_tfg = new CoTextFileGetter();
if (xCharSet != null)
l_tfg.pcmf_setCharacterSet(xCharSet);
l_html = l_tfg.pcmf_getString(xHtmlFile);
l_tfg.pcmf_delete();
}
else
l_html = xHtmlFile;
if (l_html != null)
{
UnHtmlParserCallback l_cb = new UnHtmlParserCallback(l_html, l_hdl, 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", "", xName);
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", "", xHandleVar);
l_hdl.startElement("", "tplSec", "tplSec", l_attr);
l_hdl.endElement("", "tplSec", "tplSec");
}
else
l_hdl.pdmf_startCDataRecording();
// @@
return (l_form);
};
};
final class UnXMLTAGhtmlLink implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnLink l_but = l_hdl.pdm_objFact.pcmf_createLinkPlugin(l_hdl.pdm_AppType, xValue != null ? xValue : xName, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_but.pcmf_getUnComponent());
else
l_but.pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("false"))
l_but.pcmf_disableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_but.pcmf_getUnComponent().pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_but.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_but, l_but, xName);
// Html file parsen - nur wenn kein cached run
// @@
l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
l_hdl.endElement("", "htmlGui", "htmlGui");
// @@
return (l_but);
};
};
final class UnXMLTAGhtmlButton implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnButton l_but = l_hdl.pdm_objFact.pcmf_createButtonPlugin(l_hdl.pdm_AppType, xValue != null ? xValue : xName, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_but.pcmf_getUnComponent());
else
l_but.pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("false"))
l_but.pcmf_disableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_but.pcmf_getUnComponent().pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_but.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_but, l_but, xName);
// Html file parsen - nur wenn kein cached run
// @@
l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
l_hdl.endElement("", "htmlGui", "htmlGui");
// @@
return (l_but);
};
};
final class UnXMLTAGhtmlSplitPane implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xSplit = KeTools.pcmf_deRef(attributes.getValue("split"));
String xDivPos = KeTools.pcmf_deRef(attributes.getValue("divPos"));
String xDivWi = KeTools.pcmf_deRef(attributes.getValue("divWidth"));
String xDivWiA = KeTools.pcmf_deRef(attributes.getValue("divWidthAbs"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
// String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
// String xExt = KeTools.pcmf_deRef(attributes.getValue("external"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnSplitPane l_if = l_hdl.pdm_objFact.pcmf_createSplitPanePlugin(l_hdl.pdm_AppType, xName, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xSplit != null && xSplit.equals("H"))
l_if.pcmf_setSplitMode(IUnSplitPane.HSPLIT);
if (xDivPos != null)
l_if.pcmf_setSplitPercent(Integer.parseInt(xDivPos));
if (xDivWi != null)
l_if.pcmf_setSliderPercent(Integer.parseInt(xDivWi));
if (xDivWiA != null)
l_if.pcmf_setSliderAbs(Integer.parseInt(xDivWiA));
if (xSubm != null && xSubm.equals("true"))
l_if.pcmf_getUnComponent().pcmf_enableSubmit();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
// Html file parsen - nur wenn kein cached run
// @@
l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
l_hdl.endElement("", "htmlGui", "htmlGui");
// @@
return (l_if);
};
};
final class UnXMLTAGhtmlTabPane implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xTD = KeTools.pcmf_deRef(attributes.getValue("tabsBottom"));
// String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
// String xExt = KeTools.pcmf_deRef(attributes.getValue("external"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnTabbedPane l_pane = l_hdl.pdm_objFact.pcmf_createTabPanePlugin(l_hdl.pdm_AppType, xName, (xTD != null && xTD.equals("true")) ? true : false,
l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_pane.pcmf_getUnComponent());
else
l_pane.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xSubm != null && xSubm.equals("true"))
l_pane.pcmf_getUnComponent().pcmf_enableSubmit();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_pane.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_pane, l_pane.pcmf_getUnComponent(), xName);
// Html file parsen - nur wenn kein cached run
// @@
l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
l_hdl.endElement("", "htmlGui", "htmlGui");
// @@
return (l_pane);
};
};
final class UnXMLTAGhtmlGui implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
String xExt = KeTools.pcmf_deRef(attributes.getValue("external"));
String xCharSet = KeTools.pcmf_deRef(attributes.getValue("characterSet"));
// Html file parsen - nur wenn kein cached run
// @@
String l_html = null;
if (xExt != null && xExt.equals("true"))
{
CoTextFileGetter l_tfg = new CoTextFileGetter();
if (xCharSet != null)
l_tfg.pcmf_setCharacterSet(xCharSet);
l_html = l_tfg.pcmf_getString(xHtmlFile);
l_tfg.pcmf_delete();
}
else
l_html = xHtmlFile;
UnHtmlParserCallback l_cb = new UnHtmlParserCallback(l_html, l_hdl, false);
HTMLEditorKit.Parser l_parser = new UnHtmlEditorKit().pcmf_getHtmlParser();
l_parser.parse(new StringReader(l_html), l_cb, false);
// @@
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGpageTempl implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xActive = KeTools.pcmf_deRef(attributes.getValue("active"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnPage l_page = l_hdl.pdm_objFact.pcmf_createGuiPageFromTplPlugin(l_hdl.pdm_AppType, xName, l_hdl.pdm_appl, xFBlock);
if (l_hdl.pdm_appl.pcmf_isMDI())
l_page.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_page.pcmf_getUnComponent());
else
l_page.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xActive != null && xActive.equals("true"))
l_hdl.pdm_appl.pcmf_setActive(xName);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_page.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pdm_page = l_page;
l_hdl.pcmf_doExecStack(l_page, l_page.pcmf_getUnComponent(), xName);
return (l_page);
};
};
final class UnXMLTAGhtmlTplSec implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xHtml = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
String xExt = KeTools.pcmf_deRef(attributes.getValue("external"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xSetLayoutMgmt = KeTools.pcmf_deRef(attributes.getValue("asLayoutManager"));
String xHandleVar = KeTools.pcmf_deRef(attributes.getValue("handleVar"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
boolean l_ext = (xExt != null && xExt.equals("true") ? true : false);
MuGenericTemplateSection l_tpl = l_hdl.pdm_objFact.pcmf_createMuTplSectionPlugin(l_hdl.pdm_AppType, xName, xHtml, l_ext, l_hdl.pdm_appl, xFBlock);
if (l_tpl != null)
{
if (xHandleVar != null && xHandleVar.equals("true"))
l_tpl.pcmf_setHandleVariables(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_tpl.pcmf_reRegister(xReg);
xName = Integer.toString(l_tpl.hashCode());
if ((xOrphan == null || xOrphan.equals("false")) && (xSetLayoutMgmt == null || xSetLayoutMgmt.equals("false")))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_tpl);
if (xSetLayoutMgmt != null && xSetLayoutMgmt.equals("true") && l_hdl.pdm_act instanceof MuGenericContainer)
((MuGenericContainer) l_hdl.pdm_act).pcmf_setLayoutManager(l_tpl);
l_hdl.pcmf_doExecStack(l_tpl, l_tpl, xName);
return (l_tpl);
}
else
{
IUnForm l_form = l_hdl.pdm_objFact.pcmf_createFormPlugin(l_hdl.pdm_AppType, xName, false, l_hdl.pdm_appl, xFBlock);
l_hdl.pcmf_doExecStack(l_form, l_form, xName);
return (l_hdl.pdm_act);
}
};
};
final class UnXMLTAGhtml implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
MuGenericRaw l_raw = l_hdl.pdm_objFact.pcmf_createMuRawPlugin(l_hdl.pdm_AppType, xName, "", l_hdl.pdm_appl, xFBlock);
l_hdl.pdmf_startCDataRecording();
if (l_raw != null)
{
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_raw.pcmf_reRegister(xReg);
if (xName == null)
xName = Integer.toString(l_raw.hashCode());
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_raw);
l_hdl.pcmf_doExecStack(l_raw, l_raw, xName);
return (l_raw);
}
else
{
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
}
};
};
final class UnXMLTAGpluginComponentReference implements IUnSAXAppFactHandler
{
public Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
PlBasicComponentAggregat l_pl = ((PlBasicComponentAggregat) KeRegisteredObject.pcmf_getObjByName(PlBasicComponentAggregat.MY_CURRENTPARSED_PLUGIN));
String l_lName = KeTools.pcmf_deRef(attributes.getValue("object"));
KeTreeNode l_comp = (KeTreeNode) l_pl.pcmf_getLocalByName(l_lName);
l_hdl.pcmf_doExecStack(l_comp, l_comp, l_comp.pcmf_getName());
return (l_hdl.pcmf_getActNode());
}
}
final class UnXMLTAGinpField implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xLen = KeTools.pcmf_deRef(attributes.getValue("len"));
String xSize = KeTools.pcmf_deRef(attributes.getValue("size"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xisPwd = KeTools.pcmf_deRef(attributes.getValue("pwd"));
String xTAlign = KeTools.pcmf_deRef(attributes.getValue("textAlign"));
String xValid = KeTools.pcmf_deRef(attributes.getValue("valid"));
String xDefault = KeTools.pcmf_deRef(attributes.getValue("default"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
if (xisPwd == null)
xisPwd = "false";
// Element erzeugen und in Parent einfgen
IUnInputField l_if = l_hdl.pdm_objFact.pcmf_createInputFieldPlugin(l_hdl.pdm_AppType, xName, Integer.parseInt(xSize), Integer.parseInt(xLen), xValue,
xisPwd.equals("true") ? true : false, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xTAlign != null && xTAlign.equals("EAST"))
l_if.pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_EAST);
else if (xTAlign != null && xTAlign.equals("CENTER"))
l_if.pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_CENTER);
// Submit setzen
if (xSubm != null && xSubm.equals("true"))
l_if.pcmf_getUnComponent().pcmf_enableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_if.pcmf_getUnComponent().pcmf_disable();
if (xValid != null && xValid.equals("") == false)
l_if.pcmf_setInputFilter(xValid);
if (xDefault != null)
l_if.pcmf_getUnComponent().pcmf_setDefaultValue(xDefault);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGlink implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xWrap = KeTools.pcmf_deRef(attributes.getValue("wrap"));
String xAlign = KeTools.pcmf_deRef(attributes.getValue("align"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnLink l_but = l_hdl.pdm_objFact.pcmf_createLinkPlugin(l_hdl.pdm_AppType, xValue != null ? xValue : xName, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_but.pcmf_getUnComponent());
else
l_but.pcmf_setGlobal(true);
if (xAlign != null)
{
if (xAlign.equalsIgnoreCase("CENTER"))
l_but.pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_CENTER);
else if (xAlign.equalsIgnoreCase("EAST"))
l_but.pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_EAST);
else if (xAlign.equalsIgnoreCase("WEST"))
l_but.pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_WEST);
}
// Submit setzen
if (xSubm != null && xSubm.equals("false"))
l_but.pcmf_disableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_but.pcmf_getUnComponent().pcmf_disable();
if (l_but instanceof MuGenericLink)
{
if (xWrap != null && xWrap.equals("false"))
((MuGenericLink) l_but).pcmf_setWrap(false);
}
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_but.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_but, l_but, xName);
return (l_but);
};
};
final class UnXMLTAGroLink implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnLink l_but = l_hdl.pdm_objFact.pcmf_createRoLinkPlugin(l_hdl.pdm_AppType, xValue != null && xValue.trim().equals("") == false ? xValue : xName,
l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_but.pcmf_getUnComponent());
else
l_but.pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("false"))
l_but.pcmf_disableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_but.pcmf_getUnComponent().pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_but.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_but, l_but, xName);
return (l_but);
};
};
final class UnXMLTAGbut implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnButton l_but = l_hdl.pdm_objFact.pcmf_createButtonPlugin(l_hdl.pdm_AppType, xValue != null ? xValue : xName, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_but.pcmf_getUnComponent());
else
l_but.pcmf_getUnComponent().pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("false"))
l_but.pcmf_getUnComponent().pcmf_disableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_but.pcmf_getUnComponent().pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_but.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_but, l_but.pcmf_getUnComponent(), xName);
return (l_but);
};
};
final class UnXMLTAGslider implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xDirection = KeTools.pcmf_deRef(attributes.getValue("direction"));
String xMin = KeTools.pcmf_deRef(attributes.getValue("min"));
String xMax = KeTools.pcmf_deRef(attributes.getValue("max"));
String xSteps = KeTools.pcmf_deRef(attributes.getValue("steps"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
int l_dir = IUnSlider.SLIDE_HORIZONTAL;
if (xDirection != null && xDirection.toUpperCase().equals("VERTICAL"))
l_dir = IUnSlider.SLIDE_VERTICAL;
IUnSlider l_sl = l_hdl.pdm_objFact.pcmf_createSliderPlugin(l_hdl.pdm_AppType, xName, l_dir, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_sl.pcmf_getUnComponent());
else
l_sl.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xSubm != null && xSubm.equals("true"))
l_sl.pcmf_getUnComponent().pcmf_enableSubmit();
if (xDiab != null && xDiab.equals("true"))
l_sl.pcmf_getUnComponent().pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_sl.pcmf_getUnComponent().pcmf_reRegister(xReg);
int l_min = 0;
int l_max = 100;
int l_step = 0;
if (xMin != null && xMin.trim().equals("") == false)
l_min = Integer.parseInt(xMin);
if (xMax != null && xMax.trim().equals("") == false)
l_max = Integer.parseInt(xMax);
if (xSteps != null && xSteps.trim().equals("") == false)
l_step = Integer.parseInt(xSteps);
l_sl.pcmf_setRange(l_min, l_max, l_step);
if (xValue != null)
l_sl.pcmf_getUnComponent().pcmf_setValue(xValue);
l_hdl.pcmf_doExecStack(l_sl, l_sl.pcmf_getUnComponent(), xName);
return (l_sl);
};
};
final class UnXMLTAGoptDlg implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xParent = KeTools.pcmf_deRef(attributes.getValue("parent"));
String xActive = KeTools.pcmf_deRef(attributes.getValue("active"));
String xType = KeTools.pcmf_deRef(attributes.getValue("type"));
String xMessage = KeTools.pcmf_deRef(attributes.getValue("message"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnOptionDialog l_dlg = l_hdl.pdm_objFact.pcmf_createOptDlgPlugin(l_hdl.pdm_AppType, xName, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
{
if (xParent != null && !xParent.equals(""))
((KeTreeNode) KeRegisteredObject.pcmf_getObjByName(xParent)).pcmf_addNode(xName, l_dlg.pcmf_getUnComponent());
else
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_dlg.pcmf_getUnComponent());
}
else
l_dlg.pcmf_getUnComponent().pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("false"))
l_dlg.pcmf_getUnComponent().pcmf_disableSubmit();
else
l_dlg.pcmf_getUnComponent().pcmf_enableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_dlg.pcmf_getUnComponent().pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_dlg.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (xActive != null && xActive.equals("true"))
{
if (xType.equalsIgnoreCase("alert"))
l_dlg.pcmf_showAlert(xMessage);
else if (xType.equalsIgnoreCase("message"))
l_dlg.pcmf_showOption(xMessage);
else
l_dlg.pcmf_showTextInput(xMessage);
}
l_hdl.pcmf_doExecStack(l_dlg, l_dlg.pcmf_getUnComponent(), xName);
return (l_dlg);
};
};
final class UnXMLTAGplugin implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xPlName = KeTools.pcmf_deRef(attributes.getValue("use"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
PlBasicComponentAggregat l_agg = (PlBasicComponentAggregat) l_hdl.pdm_objFact.pcmf_createAggregatedPlugin(xPlName, l_hdl.pdm_AppType, l_hdl.pdm_appl,
attributes);
UnComponent l_gobj = l_agg.pcmf_getPluginObject();
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_gobj);
else
l_gobj.pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("false"))
l_gobj.pcmf_disableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_gobj.pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
{
l_gobj.pcmf_reRegister(xReg);
l_agg.pcmf_reRegister("AGGREGATED_PLUGIN_" + xReg);
}
l_hdl.pcmf_doExecStack(l_gobj, l_gobj, xName);
return (l_gobj);
};
};
final class UnXMLTAGpluginObj implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xPlName = KeTools.pcmf_deRef(attributes.getValue("use"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
UnComponent l_gobj = l_hdl.pdm_objFact.pcmf_createPlugin(xPlName, l_hdl.pdm_AppType, xName, l_hdl.pdm_appl, attributes);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_gobj);
else
l_gobj.pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("false"))
l_gobj.pcmf_disableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_gobj.pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_gobj.pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_gobj, l_gobj, xName);
return (l_gobj);
};
};
final class UnXMLTAGevChannel implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xType = KeTools.pcmf_deRef(attributes.getValue("type"));
String xKey = KeTools.pcmf_deRef(attributes.getValue("key"));
String xRc = KeTools.pcmf_deRef(attributes.getValue("receive"));
String xRf = KeTools.pcmf_deRef(attributes.getValue("parent_refresh"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
if (xKey != null && xType == null)
xType = "KEYACTION";
int i = 0;
for (i = 0; i < IUnEventChannel.EVENTs.length; i++)
if (xType.equals(IUnEventChannel.EVENTs[i]))
break;
if (i >= IUnEventChannel.EVENTs.length)
KeLog.pcmf_log("ug2t", "<eventChannel> uncorrect event type to channel: " + xType, this, KeLog.ERROR);
IUnEventChannel l_ev = null;
if (xKey != null && xKey.equals("") == false)
l_ev = l_hdl.pdm_objFact.pcmf_createEvChannelPlugin(l_hdl.pdm_AppType, xName, xKey, l_hdl.pdm_appl, xFBlock);
else
l_ev = l_hdl.pdm_objFact.pcmf_createEvChannelPlugin(l_hdl.pdm_AppType, xName, i, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_ev.pcmf_getUnComponent());
else
l_ev.pcmf_getUnComponent().pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("true"))
l_ev.pcmf_getUnComponent().pcmf_enableSubmit();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_ev.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (xRc != null && xRc.equals("true"))
l_ev.pcmf_receiveEvent();
if (xRf != null && xRf.equals("true"))
l_ev.pcmf_refreshParent();
l_hdl.pcmf_doExecStack(l_ev, l_ev.pcmf_getUnComponent(), xName);
return (l_ev);
};
};
final class UnXMLTAGsetPosSwing implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xPos = KeTools.pcmf_deRef(attributes.getValue("x"));
String yPos = KeTools.pcmf_deRef(attributes.getValue("y"));
String hi = KeTools.pcmf_deRef(attributes.getValue("height"));
String wi = KeTools.pcmf_deRef(attributes.getValue("width"));
String al = KeTools.pcmf_deRef(attributes.getValue("align"));
if (l_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT)
{
int l_align = 0;
if (al == null || al.trim().equals(""))
l_align = java.awt.GridBagConstraints.WEST;
else
{
try
{
l_align = java.awt.GridBagConstraints.class.getDeclaredField(al).getInt(null);
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "<swingPos> no valid alignment", this, KeLog.ERROR);
}
}
if (l_hdl.pdm_act.pcmf_getParentNode() instanceof AHoSrvGenericContainer)
((de.ug2t.channel.ho.server.generic.AHoSrvGenericContainer) l_hdl.pdm_act.pcmf_getParentNode()).pcmf_setPosition(l_hdl.pdm_name,
Integer.parseInt(xPos), Integer.parseInt(yPos), Integer.parseInt(wi), Integer.parseInt(hi), l_align);
else
KeLog.pcmf_log("ug2t", "<swingPos> cannot set position due to invalid parent obj (no swing container)", this, KeLog.ERROR);
};
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGrenderCache implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xCache = KeTools.pcmf_deRef(attributes.getValue("enable"));
if (l_hdl.pdm_AppType == UnComponentFactory.MARKUP)
{
if (l_hdl.pdm_act instanceof UnComponent)
l_hdl.pdm_act.pcmf_getView().pcmf_activateCache(xCache == null || xCache.equals("true"));
else
KeLog.pcmf_log("ug2t", "<renderCache> cannot set render cache, no html-widget: " + l_hdl.pdm_act.getClass(), this, KeLog.ERROR);
}
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGhtmlColorSchema implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xBUT = KeTools.pcmf_deRef(attributes.getValue("button"));
String xPANEL = KeTools.pcmf_deRef(attributes.getValue("panel"));
String xDEF = KeTools.pcmf_deRef(attributes.getValue("default"));
String xFBOR = KeTools.pcmf_deRef(attributes.getValue("pageDeco"));
String xDBOR = KeTools.pcmf_deRef(attributes.getValue("dialogDeco"));
if (l_hdl.pdm_AppType == UnComponentFactory.MARKUP)
{
if (l_hdl.pdm_act instanceof MuGenericApplication)
{
MuGenericTemplateKit l_kit = ((MuGenericApplication) l_hdl.pdm_act).pcmf_getTemplateKit();
if (xBUT != null)
l_kit.setBUT_BG(xBUT);
if (xPANEL != null)
l_kit.setPANEL_BG(xPANEL);
if (xDEF != null)
l_kit.setDEF_BG(xDEF);
if (xFBOR != null)
l_kit.setDEF_FBOR(xFBOR);
if (xDBOR != null)
l_kit.setDEF_DBOR(xDBOR);
}
else
KeLog.pcmf_log("ug2t", "<htmlColorSchema> color schema cant only be set in application tag", this, KeLog.ERROR);
}
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetSwingLayout implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xTop = KeTools.pcmf_deRef(attributes.getValue("top"));
String xLeft = KeTools.pcmf_deRef(attributes.getValue("left"));
String xBut = KeTools.pcmf_deRef(attributes.getValue("bottom"));
String xRi = KeTools.pcmf_deRef(attributes.getValue("right"));
String weight = KeTools.pcmf_deRef(attributes.getValue("weights"));
if (l_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT)
{
if (l_hdl.pdm_act instanceof AHoSrvGenericContainer)
{
int ins1 = 4;
int ins2 = 4;
int ins3 = 4;
int ins4 = 4;
if (xTop != null && xTop.equals("") == false)
ins1 = Integer.parseInt(xTop);
if (xLeft != null && xLeft.equals("") == false)
ins2 = Integer.parseInt(xLeft);
if (xBut != null && xBut.equals("") == false)
ins3 = Integer.parseInt(xBut);
if (xRi != null && xRi.equals("") == false)
ins4 = Integer.parseInt(xRi);
((AHoSrvGenericContainer) l_hdl.pdm_act).pcmf_setInsets(ins1, ins2, ins3, ins4);
if (weight != null && weight.equals("false"))
((AHoSrvGenericContainer) l_hdl.pdm_act).pcmf_setWeights(false);
else
((AHoSrvGenericContainer) l_hdl.pdm_act).pcmf_setWeights(true);
}
else
KeLog.pcmf_log("ug2t", "<swingLayout> cannot set layout-parameter due to invalid parent obj (no swing container): class [" + l_hdl.pdm_act.getClass()
+ "]" + ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
};
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetWeights implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String weightx = KeTools.pcmf_deRef(attributes.getValue("weightX"));
String weighty = KeTools.pcmf_deRef(attributes.getValue("weightY"));
if (l_hdl.pdm_act.pcmf_getParentNode() instanceof IUnLayouted)
{
int wx = 0;
int wy = 0;
if (weightx != null && weightx.equals("") == false)
wx = Integer.parseInt(weightx);
if (weighty != null && weighty.equals("") == false)
wy = Integer.parseInt(weighty);
((IUnLayouted) l_hdl.pdm_act.pcmf_getParentNode()).pcmf_setWeights(l_hdl.pdm_name, wx, wy);
}
else
KeLog.pcmf_log("ug2t", "<weights> cannot set weights-parameter due to invalid parent obj (no container): class [" + l_hdl.pdm_act.getClass() + "]"
+ ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetFSize implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String wi = KeTools.pcmf_deRef(attributes.getValue("width"));
String hi = KeTools.pcmf_deRef(attributes.getValue("height"));
String type = KeTools.pcmf_deRef(attributes.getValue("type"));
if (l_hdl.pdm_act instanceof UnComponent)
{
int wx = -1;
int wy = -1;
int itype = UnFixedSize.FIX_SIZE;
if (type != null)
{
if (type.equals("MAX_SIZE"))
itype = UnFixedSize.MAX_SIZE;
else if (type.equals("MIN_SIZE"))
itype = UnFixedSize.MIN_SIZE;
else if (type.equals("PREF_SIZE"))
itype = UnFixedSize.PREF_SIZE;
else
itype = UnFixedSize.FIX_SIZE;
}
if (wi != null && wi.equals("") == false)
wx = Integer.parseInt(wi);
if (hi != null && hi.equals("") == false)
wy = Integer.parseInt(hi);
if (wi == null && hi == null)
((UnComponent) l_hdl.pdm_act).pcmf_deleteFixedSize();
else
{
((UnComponent) l_hdl.pdm_act).pcmf_setFixedSize(wx, wy, itype);
((UnComponent) l_hdl.pdm_act).pcmf_setTakeMaxSpace(false);
}
}
else
KeLog.pcmf_log("ug2t", "<fixedSize> cannot set fixed size current object is no gui-object: class [" + l_hdl.pdm_act.getClass() + "]" + ", name ["
+ l_hdl.pdm_name + "]", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGevOc implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String val = KeTools.pcmf_deRef(attributes.getValue("value"));
if (l_hdl.pdm_act instanceof UnComponent)
{
if (val != null && val.equals("false"))
((UnComponent) l_hdl.pdm_act).pcmf_setEventOnChange(false);
else
((UnComponent) l_hdl.pdm_act).pcmf_setEventOnChange(true);
}
else
KeLog.pcmf_log("ug2t", "<eventOnChange> cannot set eventOnChange, current object is no gui-object: class [" + l_hdl.pdm_act.getClass() + "]" + ", name ["
+ l_hdl.pdm_name + "]", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGevPrio implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String val = KeTools.pcmf_deRef(attributes.getValue("value"));
if (l_hdl.pdm_act instanceof UnComponent)
{
((UnComponent) l_hdl.pdm_act).pcmf_setEventPrio(Integer.parseInt(val));
}
else
KeLog.pcmf_log("ug2t", "<eventPrio> cannot set eventPrio, current object is no gui-object: class [" + l_hdl.pdm_act.getClass() + "]" + ", name ["
+ l_hdl.pdm_name + "]", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsubmit implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String val = KeTools.pcmf_deRef(attributes.getValue("value"));
if (l_hdl.pdm_act instanceof UnComponent)
{
if (val != null && val.equals("false"))
((UnComponent) l_hdl.pdm_act).pcmf_disableSubmit();
else
((UnComponent) l_hdl.pdm_act).pcmf_enableSubmit();
}
else
KeLog.pcmf_log("ug2t", "<submitEvent> cannot set submit, current object is no gui-object: class [" + l_hdl.pdm_act.getClass() + "]" + ", name ["
+ l_hdl.pdm_name + "]", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsync implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String val = KeTools.pcmf_deRef(attributes.getValue("widget"));
if (l_hdl.pdm_act instanceof UnComponent)
{
Object l_obj = KeRegisteredObject.pcmf_getObjByName(val);
if (l_obj instanceof IUnSyncComponent)
((UnComponent) l_hdl.pdm_act).pcmf_addSynced((IUnSyncComponent) l_obj);
else
KeLog.pcmf_log("ug2t", "<sync> object does not implement IUnSyncComponent: class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name
+ "]", this, KeLog.ERROR);
}
else
KeLog.pcmf_log("ug2t", "<sync> cannot add a syncable widget, current object is no gui-object: class [" + l_hdl.pdm_act.getClass() + "]" + ", name ["
+ l_hdl.pdm_name + "]", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetInsets implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xTop = KeTools.pcmf_deRef(attributes.getValue("top"));
String xLeft = KeTools.pcmf_deRef(attributes.getValue("left"));
String xBut = KeTools.pcmf_deRef(attributes.getValue("bottom"));
String xRi = KeTools.pcmf_deRef(attributes.getValue("right"));
if (l_hdl.pdm_act.pcmf_getParentNode() instanceof IUnLayouted)
{
int ins1 = 0;
int ins2 = 0;
int ins3 = 0;
int ins4 = 0;
if (xTop != null && xTop.equals("") == false)
ins1 = Integer.parseInt(xTop);
if (xLeft != null && xLeft.equals("") == false)
ins2 = Integer.parseInt(xLeft);
if (xBut != null && xBut.equals("") == false)
ins3 = Integer.parseInt(xBut);
if (xRi != null && xRi.equals("") == false)
ins4 = Integer.parseInt(xRi);
((IUnLayouted) l_hdl.pdm_act.pcmf_getParentNode()).pcmf_setInsets(l_hdl.pdm_name, ins1, ins2, ins3, ins4);
}
else
KeLog.pcmf_log("ug2t", "<insets> cannot set insets-parameter due to invalid parent obj (no container): class [" + l_hdl.pdm_act.getClass() + "]"
+ ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetSwingWeights implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String weightx = KeTools.pcmf_deRef(attributes.getValue("weightX"));
String weighty = KeTools.pcmf_deRef(attributes.getValue("weightY"));
if (l_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT)
{
if (l_hdl.pdm_act.pcmf_getParentNode() instanceof AHoSrvGenericContainer)
{
int wx = 0;
int wy = 0;
if (weightx != null && weightx.equals("") == false)
wx = Integer.parseInt(weightx);
if (weighty != null && weighty.equals("") == false)
wy = Integer.parseInt(weighty);
((AHoSrvGenericContainer) l_hdl.pdm_act.pcmf_getParentNode()).pcmf_setWeights(l_hdl.pdm_name, wx, wy);
}
else
KeLog.pcmf_log("ug2t", "<swingWeights> cannot set weights-parameter due to invalid parent obj (no swing container): class [" + l_hdl.pdm_act.getClass()
+ "]" + ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
};
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetSwingFill implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String hf = KeTools.pcmf_deRef(attributes.getValue("hFill"));
String vf = KeTools.pcmf_deRef(attributes.getValue("vFill"));
if (l_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT)
{
if (l_hdl.pdm_act.pcmf_getParentNode() instanceof AHoSrvGenericContainer)
{
((AHoSrvGenericContainer) l_hdl.pdm_act.pcmf_getParentNode()).pcmf_setFill(l_hdl.pdm_name, (hf != null && hf.equals("true")) ? true : false,
(vf != null && vf.equals("true")) ? true : false);
}
else
KeLog.pcmf_log("ug2t", "<swingFill> cannot set fill-parameter due to invalid parent obj (no swing container): class [" + l_hdl.pdm_act.getClass() + "]"
+ ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
};
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetLog implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String log = KeTools.pcmf_deRef(attributes.getValue("class"));
KeLog.pcmf_setLogWriter((IKeLogWriter) Class.forName(log).newInstance());
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetFill implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String hf = KeTools.pcmf_deRef(attributes.getValue("hFill"));
String vf = KeTools.pcmf_deRef(attributes.getValue("vFill"));
if (l_hdl.pdm_act.pcmf_getParentNode() instanceof IUnLayouted)
{
((IUnLayouted) l_hdl.pdm_act.pcmf_getParentNode()).pcmf_setFill(l_hdl.pdm_name, (hf != null && hf.equals("true")) ? true : false, (vf != null && vf
.equals("true")) ? true : false);
}
else
KeLog.pcmf_log("ug2t", "<fill> cannot set fill-parameter due to invalid parent obj (no layoutable container): class [" + l_hdl.pdm_act.getClass() + "]"
+ ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetSwingInsets implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xTop = KeTools.pcmf_deRef(attributes.getValue("top"));
String xLeft = KeTools.pcmf_deRef(attributes.getValue("left"));
String xBut = KeTools.pcmf_deRef(attributes.getValue("bottom"));
String xRi = KeTools.pcmf_deRef(attributes.getValue("right"));
if (l_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT)
{
if (l_hdl.pdm_act.pcmf_getParentNode() instanceof AHoSrvGenericContainer)
{
int ins1 = 0;
int ins2 = 0;
int ins3 = 0;
int ins4 = 0;
if (xTop != null && xTop.equals("") == false)
ins1 = Integer.parseInt(xTop);
if (xLeft != null && xLeft.equals("") == false)
ins2 = Integer.parseInt(xLeft);
if (xBut != null && xBut.equals("") == false)
ins3 = Integer.parseInt(xBut);
if (xRi != null && xRi.equals("") == false)
ins4 = Integer.parseInt(xRi);
((AHoSrvGenericContainer) l_hdl.pdm_act.pcmf_getParentNode()).pcmf_setInsets(l_hdl.pdm_name, ins1, ins2, ins3, ins4);
}
else
KeLog.pcmf_log("ug2t", "<swingInsets> cannot set insets-parameter due to invalid parent obj (no swing container): class [" + l_hdl.pdm_act.getClass()
+ "]" + ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
};
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetPSizeSwing implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String hi = KeTools.pcmf_deRef(attributes.getValue("height"));
String wi = KeTools.pcmf_deRef(attributes.getValue("width"));
if (l_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT)
{
if (l_hdl.pdm_act instanceof AHoSrvGenericContainer)
((de.ug2t.channel.ho.server.generic.AHoSrvGenericContainer) l_hdl.pdm_act).pcmf_setPSize(Integer.parseInt(wi), Integer.parseInt(hi));
else
KeLog.pcmf_log("ug2t", "<swingPSize> cannot set pane-size (no swing container): class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name
+ "]", this, KeLog.ERROR);
};
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetFont implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String fName = KeTools.pcmf_deRef(attributes.getValue("name"));
String fSize = KeTools.pcmf_deRef(attributes.getValue("size"));
String fStyle = KeTools.pcmf_deRef(attributes.getValue("style"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
String xAttach = KeTools.pcmf_deRef(attributes.getValue("attach"));
try
{
if (fSize == null)
fSize = "-1";
if (fName == null)
fName = "Arial";
if (fStyle == null)
fStyle = Integer.toString(Font.PLAIN);
else
{
if (fStyle.equals("italic"))
fStyle = Integer.toString(Font.ITALIC);
else if (fStyle.equals("bold"))
fStyle = Integer.toString(Font.BOLD);
else if (fStyle.equals("normal"))
fStyle = Integer.toString(Font.PLAIN);
}
UnFontDescriptor l_font = null;
if (xObj == null || xObj.equals(""))
l_font = new UnFontDescriptor(fName, Integer.parseInt(fSize), Integer.parseInt(fStyle));
else
l_font = (UnFontDescriptor) KeRegisteredObject.pcmf_getObjByName(xObj);
if (xOrphan == null || xOrphan.equals("false"))
{
if (l_hdl.pdm_act instanceof HoGenericTreeNode)
{
IKeView l_view = l_hdl.pdm_act.pcmf_getView();
if (l_view instanceof UnIconValueView)
((UnIconValueView) l_view).pcmf_setFont(l_font);
else
l_hdl.pdm_act.pcmf_setView(new UnIconValueView(null, null, null, l_font, null, null));
}
else
((UnComponent) l_hdl.pdm_act).pcmf_setFont(l_font);
}
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
{
l_font.pcmf_reRegister(xReg);
if (xAttach == null || xAttach.equals("true"))
l_font.pcmf_attachFont();
}
String xRegG = KeTools.pcmf_deRef(attributes.getValue("registerGlobal"));
if (xRegG != null && xRegG.equals("") == false)
{
l_font.pcmf_unRegister();
l_font.pcmf_registerGlobal(xRegG);
}
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "<font> error setting font: class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
}
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetPos implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xPos = KeTools.pcmf_deRef(attributes.getValue("x"));
String yPos = KeTools.pcmf_deRef(attributes.getValue("y"));
String hi = KeTools.pcmf_deRef(attributes.getValue("height"));
String wi = KeTools.pcmf_deRef(attributes.getValue("width"));
String al = KeTools.pcmf_deRef(attributes.getValue("align"));
if (wi == null)
wi = "1";
if (hi == null)
hi = "1";
Object l_parent = l_hdl.pdm_act.pcmf_getParentNode();
if (l_parent instanceof IUnPanel)
((IUnPanel) l_parent).pcmf_setGuiObjPosition(l_hdl.pdm_name, Integer.parseInt(xPos), Integer.parseInt(yPos), Integer.parseInt(wi), Integer.parseInt(hi),
al == null || al.trim().equals("") ? "WEST" : al);
else if (l_parent instanceof IUnApplication)
((IUnApplication) l_parent).pcmf_setGuiObjPosition(l_hdl.pdm_name, Integer.parseInt(xPos), Integer.parseInt(yPos), Integer.parseInt(wi), Integer
.parseInt(hi), al == null || al.trim().equals("") ? "WEST" : al);
else if (l_hdl.pdm_act instanceof IUnPage && l_parent == null)
((IUnPage) l_hdl.pdm_act).pcmf_setInnerPosition(Integer.parseInt(xPos), Integer.parseInt(yPos), Integer.parseInt(wi), Integer.parseInt(hi));
else
KeLog.pcmf_log("ug2t", "<position> cannot set position, parent object is no container or application (tag is ignored): class ["
+ l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]", this, KeLog.MESSAGE);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGjava implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
if (xObj != null)
((IKeExecutable) KeRegisteredObject.pcmf_getObjByName(xObj)).pcmf_execObj(l_hdl.pdm_act);
else if (xClass != null)
((IKeExecutable) Class.forName(xClass).newInstance()).pcmf_execObj(l_hdl.pdm_act);
else
KeLog.pcmf_log("ug2t", "<configure> no valid object or class defined", this, KeLog.MESSAGE);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGpreFct implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
IUnPreDisplayFunction l_fct = null;
if (xObj != null)
l_fct = (IUnPreDisplayFunction) KeRegisteredObject.pcmf_getObjByName(xObj);
else if (xClass != null)
l_fct = ((IUnPreDisplayFunction) Class.forName(xClass).newInstance());
else
KeLog.pcmf_log("ug2t", "<configure> no valid object or class defined", this, KeLog.MESSAGE);
if (l_fct != null)
{
if (l_hdl.pdm_page != null)
l_hdl.pdm_page.pcmf_setPreFct(true);
((UnComponent) l_hdl.pdm_act).pcmf_setPreFct(true);
((UnComponent) l_hdl.pdm_act).pcmf_addPreFct(l_fct);
}
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGpostFct implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
IUnPostDisplayFunction l_fct = null;
if (xObj != null)
l_fct = (IUnPostDisplayFunction) KeRegisteredObject.pcmf_getObjByName(xObj);
else if (xClass != null)
l_fct = ((IUnPostDisplayFunction) Class.forName(xClass).newInstance());
else
KeLog.pcmf_log("ug2t", "<configure> no valid object or class defined", this, KeLog.MESSAGE);
if (l_fct != null)
{
if (l_hdl.pdm_page != null)
l_hdl.pdm_page.pcmf_setPostFct(true);
((UnComponent) l_hdl.pdm_act).pcmf_setPostFct(true);
((UnComponent) l_hdl.pdm_act).pcmf_addPostFct(l_fct);
}
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGdisable implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xDis = KeTools.pcmf_deRef(attributes.getValue("value"));
if (xDis == null || xDis.equals("true"))
((KeTreeNode) l_hdl.pdm_act).pcmf_disable();
else
((KeTreeNode) l_hdl.pdm_act).pcmf_enable();
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGhide implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xDis = KeTools.pcmf_deRef(attributes.getValue("value"));
if (xDis == null || xDis.equals("true"))
((KeTreeNode) l_hdl.pdm_act).pcmf_hide();
else
((KeTreeNode) l_hdl.pdm_act).pcmf_unhide();
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGhideall implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xDis = KeTools.pcmf_deRef(attributes.getValue("value"));
if (xDis == null || xDis.equals("true"))
((KeTreeNode) l_hdl.pdm_act).pcmf_hideAll();
else
((KeTreeNode) l_hdl.pdm_act).pcmf_unHideAll();
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGrpons implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xRp = KeTools.pcmf_deRef(attributes.getValue("value"));
if (l_hdl.pdm_act instanceof MuGenericComponent)
{
if (xRp == null || xRp.equals("true"))
((MuGenericComponent) l_hdl.pdm_act).pcmf_setNeedRepaintOnValueSet(true);
else
((MuGenericComponent) l_hdl.pdm_act).pcmf_setNeedRepaintOnValueSet(false);
}
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGrpg implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xRp = KeTools.pcmf_deRef(attributes.getValue("value"));
if (l_hdl.pdm_act instanceof MuGenericComponent)
{
if (xRp == null || xRp.equals("true"))
((MuGenericComponent) l_hdl.pdm_act).pcmf_setNeedRepaint(true);
else
((MuGenericComponent) l_hdl.pdm_act).pcmf_setNeedRepaint(false);
}
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGreadonly implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xDis = KeTools.pcmf_deRef(attributes.getValue("value"));
if (l_hdl.pdm_act instanceof IUnInputComponent)
{
if (xDis == null || xDis.equals("true"))
((IUnInputComponent) l_hdl.pdm_act).pcmf_setReadOnly(true);
else
((IUnInputComponent) l_hdl.pdm_act).pcmf_setReadOnly(false);
}
else
KeLog.pcmf_log("ug2t", "<readOnly> can not set readonly on : class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]", this,
KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGautoEcho implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xAe = KeTools.pcmf_deRef(attributes.getValue("value"));
if (l_hdl.pdm_act instanceof AHoSrvGenericComponent)
{
if (xAe == null || xAe.equals("true"))
((AHoSrvGenericComponent) l_hdl.pdm_act).pcmf_setAutoEcho(true);
else
((AHoSrvGenericComponent) l_hdl.pdm_act).pcmf_setAutoEcho(false);
}
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGeventlatency implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xLat = KeTools.pcmf_deRef(attributes.getValue("value"));
((UnComponent) l_hdl.pdm_act).pcmf_setIterativeEventLatency(Integer.parseInt(xLat));
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGfocus implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
if (l_hdl.pdm_act instanceof UnComponent)
l_hdl.pdm_page.pcmf_setDefaultFocusWdg((UnComponent) l_hdl.pdm_act);
else
KeLog.pcmf_log("ug2t", "<focus> can not set focus on : class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGactive implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xAc = KeTools.pcmf_deRef(attributes.getValue("page"));
if (xAc != null && xAc.equals("") == false)
l_hdl.pdm_appl.pcmf_setActive(xAc);
else if (l_hdl.pdm_act instanceof IUnPage)
l_hdl.pdm_appl.pcmf_setActive(l_hdl.pdm_act.pcmf_getName());
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGmaximize implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xAc = KeTools.pcmf_deRef(attributes.getValue("page"));
if (xAc != null && xAc.equals("") == false)
((IUnPage) l_hdl.pdm_appl.pcmf_getUnComponent().pcmf_getSubNode(xAc)).pcmf_maximize(true);
else if (l_hdl.pdm_act instanceof IUnPage)
((IUnPage) l_hdl.pdm_act).pcmf_maximize(true);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetTab implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
String xIdx = KeTools.pcmf_deRef(attributes.getValue("tabIdx"));
if (l_hdl.pdm_act instanceof IUnTabbedPane)
((IUnTabbedPane) l_hdl.pdm_act).pcmf_setTabComponent(Integer.parseInt(xIdx), (IUnComponent) KeRegisteredObject.pcmf_getObjByName(xObj));
else
KeLog.pcmf_log("ug2t", "<setTab> can not set tab component, parent is no tabbedPane: class [" + l_hdl.pdm_act.getClass() + "]" + ", name ["
+ l_hdl.pdm_name + "]", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGregisterGlobal implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
if (xName != null || xName.equals("") == false)
{
l_hdl.pdm_act.pcmf_unRegister();
l_hdl.pdm_act.pcmf_registerGlobal(xName);
}
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGregisterValue implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
if (xName != null || xName.equals("") == false)
KeRegisteredObject.pcmf_register(xName, new KeStringWrapper(xValue));
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGunregisterValue implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
if (xName != null || xName.equals("") == false)
KeRegisteredObject.pcmf_unRegister(xName);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsqlTableMapUI implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xTable = KeTools.pcmf_deRef(attributes.getValue("table"));
String xField = KeTools.pcmf_deRef(attributes.getValue("field"));
CoSqlTable l_tab = (CoSqlTable) KeRegisteredObject.pcmf_getObjByName(xTable);
if (l_tab != null)
l_tab.pcmf_setConnectedField(xField, l_hdl.pdm_act);
else
KeLog.pcmf_log("ug2t", "<uiSqlMap> can not set table-map", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsqlTableMapModel implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xTable = KeTools.pcmf_deRef(attributes.getValue("table"));
String xField = KeTools.pcmf_deRef(attributes.getValue("field"));
String xModel = KeTools.pcmf_deRef(attributes.getValue("mvalue"));
if (xModel == null || xModel.equals(""))
xModel = xField;
CoSqlTable l_tab = (CoSqlTable) KeRegisteredObject.pcmf_getObjByName(xTable);
if (l_tab != null)
l_tab.pcmf_setConnectedField(xField, (IMoSingleValue) ((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_getModelValue(xModel));
else
KeLog.pcmf_log("ug2t", "<sqlModelMap> can not set table-map", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsqlTable implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xDriver = KeTools.pcmf_deRef(attributes.getValue("driver"));
String xJdbcUrl = KeTools.pcmf_deRef(attributes.getValue("url"));
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xKeyFld = KeTools.pcmf_deRef(attributes.getValue("keyFld"));
String xWhere = KeTools.pcmf_deRef(attributes.getValue("where"));
String xFld = KeTools.pcmf_deRef(attributes.getValue("fields"));
String xBc = KeTools.pcmf_deRef(attributes.getValue("blindCol"));
CoSqlTable l_nTable = null;
if ((xDriver == null || xDriver.equals("")) && (xJdbcUrl == null || xJdbcUrl.equals("")))
{
if (l_hdl.pdm_act instanceof CoSqlTable)
{
CoSqlTable l_pTable = (CoSqlTable) l_hdl.pdm_act;
l_nTable = new CoSqlTable(l_pTable.pcmf_getCon(), xName, xFld, xKeyFld, xWhere == null ? "" : xWhere);
}
else
{
KeLog.pcmf_log("ug2t", "<sqlTable> parent is no sqlTable, cannot get any connection info", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
}
}
else
{
l_nTable = new CoSqlTable(xDriver, xJdbcUrl, xName, xFld, xKeyFld, xWhere == null ? "" : xWhere);
}
if (l_hdl.pdm_act instanceof IUnTable)
{
KeTable l_table = l_nTable.pcmf_getComplete();
if (xBc != null)
l_table.pcmf_removeCol(Integer.parseInt(xBc));
if (((IUnTable) l_hdl.pdm_act).pcmf_getHeader() != null)
((IUnTable) l_hdl.pdm_act).pcmf_addRows(l_table.pcmf_getTableValues());
else
((IUnTable) l_hdl.pdm_act).pcmf_setComplete(l_table);
}
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_nTable);
l_hdl.pcmf_doExecStack(l_nTable, l_nTable, xName);
return (l_nTable);
};
};
final class UnXMLTAGsqlTableJoin implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xDriver = KeTools.pcmf_deRef(attributes.getValue("driver"));
String xJdbcUrl = KeTools.pcmf_deRef(attributes.getValue("url"));
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xKeyFld = KeTools.pcmf_deRef(attributes.getValue("keyFld"));
String xSourceFld = KeTools.pcmf_deRef(attributes.getValue("sourceFld"));
String xTargetFld = KeTools.pcmf_deRef(attributes.getValue("targetFld"));
String xFld = KeTools.pcmf_deRef(attributes.getValue("fields"));
CoSqlTable l_nTable = null;
CoSqlTable l_pTable = null;
if ((xDriver == null || xDriver.equals("")) && (xJdbcUrl == null || xJdbcUrl.equals("")))
{
if (l_hdl.pdm_act instanceof CoSqlTable)
{
l_pTable = (CoSqlTable) l_hdl.pdm_act;
l_nTable = new CoSqlTable(l_pTable.pcmf_getCon(), xName, xFld, xKeyFld, "");
}
else
{
KeLog.pcmf_log("ug2t", "<sqlTableJoin> parent is no sqlTable, cannot get any connection info", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
}
}
else
{
l_nTable = new CoSqlTable(xDriver, xJdbcUrl, xName, xFld, xKeyFld, "");
}
l_pTable.pcmf_addJoin(l_nTable, xSourceFld, xTargetFld);
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_nTable);
l_hdl.pcmf_doExecStack(l_nTable, l_nTable, xName);
return (l_nTable);
};
};
final class UnXMLTAGsqlUiMap implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xFld = KeTools.pcmf_deRef(attributes.getValue("sourceFld"));
String xTargetO = KeTools.pcmf_deRef(attributes.getValue("tragetObject"));
String xTargetP = KeTools.pcmf_deRef(attributes.getValue("tragetPath"));
if (l_hdl.pdm_act instanceof CoSqlTable == false)
{
KeLog.pcmf_log("ug2t", "<sqlObjectMap> parent is no sqlTable, cannot set Map", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
}
CoSqlTable l_pTable = (CoSqlTable) l_hdl.pdm_act;
IKeValueContainer l_target = null;
if (xTargetO == null || xTargetO.equals(""))
l_target = (IKeValueContainer) l_hdl.pdm_appl.pcmf_getUnComponent().pcmf_getByPath(xTargetP);
else
l_target = (IKeValueContainer) KeRegisteredObject.pcmf_getObjByName(xTargetO);
if (l_target != null)
l_pTable.pcmf_setConnectedFieldValue(xFld, l_target);
else
KeLog.pcmf_log("ug2t", "<sqlObjectMap> sqlMap is not valid, target not found", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsqlTableUiMap implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xTargetO = KeTools.pcmf_deRef(attributes.getValue("tragetTable"));
String xTargetP = KeTools.pcmf_deRef(attributes.getValue("tragetTablePath"));
if (l_hdl.pdm_act instanceof CoSqlTable == false)
{
KeLog.pcmf_log("ug2t", "<sqlTableUiMap> parent is no sqlTable, cannot set Map", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
}
CoSqlTable l_pTable = (CoSqlTable) l_hdl.pdm_act;
IUnTable l_target = null;
if (xTargetO == null || xTargetO.equals(""))
l_target = (IUnTable) l_hdl.pdm_appl.pcmf_getUnComponent().pcmf_getByPath(xTargetP);
else
l_target = (IUnTable) KeRegisteredObject.pcmf_getObjByName(xTargetO);
if (l_target != null)
l_target.pcmf_setComplete(l_pTable.pcmf_getComplete());
else
KeLog.pcmf_log("ug2t", "<sqlTableUiMap> sqlMap is not valid, target not found", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGkey implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xAc = KeTools.pcmf_deRef(attributes.getValue("value"));
if ((xAc != null || xAc.equals("") == false) && l_hdl.pdm_act instanceof IUnKeyAccess)
((IUnKeyAccess) l_hdl.pdm_act).pcmf_setKeyAccess((int) xAc.charAt(0));
else
KeLog.pcmf_log("ug2t", "<key> can not set access-key in class: " + l_hdl.pdm_act.getClass().toString(), this, KeLog.MESSAGE);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetView implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
String xStd = KeTools.pcmf_deRef(attributes.getValue("stdImgObject"));
String xOp = KeTools.pcmf_deRef(attributes.getValue("openImgObject"));
String xCo = KeTools.pcmf_deRef(attributes.getValue("closeImgObject"));
String xFont = KeTools.pcmf_deRef(attributes.getValue("font"));
String xTpl = KeTools.pcmf_deRef(attributes.getValue("template"));
String xAtt = KeTools.pcmf_deRef(attributes.getValue("attach"));
String xTrans = KeTools.pcmf_deRef(attributes.getValue("transformerObj"));
String xTransCl = KeTools.pcmf_deRef(attributes.getValue("transformerClass"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xBg = KeTools.pcmf_deRef(attributes.getValue("bg"));
String xFg = KeTools.pcmf_deRef(attributes.getValue("fg"));
String xCss = KeTools.pcmf_deRef(attributes.getValue("css"));
IUnImage l_std = null;
IUnImage l_op = null;
IUnImage l_co = null;
UnFontDescriptor l_font = null;
IUnTransformer l_trans = null;
IKeView l_view = null;
boolean l_att = false;
if (xOrphan == null)
xOrphan = "false";
if (xClass != null && xClass.equals("") == false)
{
l_view = (IKeView) Class.forName(xClass).newInstance();
}
else if (xObj != null && xObj.equals("") == false)
{
l_view = (IKeView) KeRegisteredObject.pcmf_getObjByName(xObj);
}
else
{
if (xStd != null && xStd.equals("") == false)
l_std = (IUnImage) KeRegisteredObject.pcmf_getObjByName(xStd);
if (xOp != null && xOp.equals("") == false)
l_op = (IUnImage) KeRegisteredObject.pcmf_getObjByName(xOp);
if (xCo != null && xCo.equals("") == false)
l_co = (IUnImage) KeRegisteredObject.pcmf_getObjByName(xCo);
if (xFont != null && xFont.equals("") == false)
l_font = (UnFontDescriptor) KeRegisteredObject.pcmf_getObjByName(xFont);
if (xTrans != null && xTrans.equals("") == false)
l_trans = (IUnTransformer) KeRegisteredObject.pcmf_getObjByName(xTrans);
else if (xTransCl != null && xTransCl.equals("") == false)
l_trans = (IUnTransformer) Class.forName(xTransCl).newInstance();
l_view = new UnIconValueView(l_std, l_op, l_co, l_font, xTpl, l_trans);
if (xBg != null && xBg.equals("") == false)
((UnIconValueView) l_view).pcmf_setBg(xBg);
if (xFg != null && xFg.equals("") == false)
((UnIconValueView) l_view).pcmf_setFg(xFg);
if (xCss != null && xCss.equals("") == false)
((UnIconValueView) l_view).pcmf_setCss(xCss);
}
if (l_hdl.pdm_actMValue == null && xOrphan.equals("false"))
{
if (KeRegisteredObject.pcmf_isGlobal(l_hdl.pdm_act))
{
if (KeRegisteredObject.pcmf_isRegistered(l_view))
{
String l_name = KeRegisteredObject.pcmf_getObjName(l_view);
KeRegisteredObject.pcmf_unRegister(l_view);
KeRegisteredObject.pcmf_registerGlobal(l_name, l_view);
}
}
l_hdl.pdm_act.pcmf_setView(l_view);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
if (l_view instanceof UnIconValueView && xAtt != null && xAtt.equals("true"))
{
((UnIconValueView) l_view).pcmf_attachView();
l_att = true;
}
}
else if (l_hdl.pdm_actMValue instanceof IKeViewable && xOrphan.equals("false"))
{
if (KeRegisteredObject.pcmf_isGlobal(l_hdl.pdm_actMValue))
{
if (KeRegisteredObject.pcmf_isRegistered(l_view))
{
String l_name = KeRegisteredObject.pcmf_getObjName(l_view);
KeRegisteredObject.pcmf_unRegister(l_view);
KeRegisteredObject.pcmf_registerGlobal(l_name, l_view);
}
}
((IKeViewable) l_hdl.pdm_actMValue).pcmf_setView(l_view);
if (l_view instanceof UnIconValueView && (xAtt == null || xAtt.equals("true")))
{
((UnIconValueView) l_view).pcmf_attachView();
l_att = true;
}
l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue, l_hdl.pdm_actMValue, l_hdl.pdm_name);
}
else if (xOrphan.equals("false"))
{
KeLog.pcmf_log("ug2t", "<view> can not set view in this node", this, KeLog.ERROR);
}
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false && l_view instanceof IKeAttachable)
{
((KeRegisteredObject) l_view).pcmf_reRegister(xReg);
if ((xAtt == null || xAtt.equals("true")) && !l_att)
((IKeAttachable) l_view).pcmf_attachExtern();
}
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetGrid implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xPos = KeTools.pcmf_deRef(attributes.getValue("x"));
String yPos = KeTools.pcmf_deRef(attributes.getValue("y"));
String xDebug = KeTools.pcmf_deRef(attributes.getValue("debug"));
if (l_hdl.pdm_page instanceof de.ug2t.channel.ho.server.generic.HoSrvGenericPage)
((de.ug2t.channel.ho.server.generic.HoSrvGenericPage) l_hdl.pdm_page).pcmf_setGrid(Integer.parseInt(xPos), Integer.parseInt(yPos),
xDebug.equals("true") ? true : false);
else
KeLog.pcmf_log("ug2t", "<setGrid> permitted in page-tag only", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetOption implements IUnSAXAppFactHandler
{
public static boolean pcm_staticInit = false;
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xObj = KeTools.pcmf_deRef(attributes.getValue("testobj"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xOp = KeTools.pcmf_deRef(attributes.getValue("op"));
String xStatic = KeTools.pcmf_deRef(attributes.getValue("static"));
l_hdl.pdm_optionNr++;
if (xObj != null && xValue != null)
{
Object l_obj = KeRegisteredObject.pcmf_getObjByName(xObj);
if (xOp == null || xOp.equals("eq"))
{
if (l_obj != null && !l_obj.toString().equals(xValue))
{
l_hdl.pdm_optional = false;
l_hdl.pdm_optionFalseNr = l_hdl.pdm_optionNr;
}
}
else
{
if (l_obj != null && l_obj.toString().equals(xValue))
{
l_hdl.pdm_optional = false;
l_hdl.pdm_optionFalseNr = l_hdl.pdm_optionNr;
}
}
}
else if (xStatic != null && xStatic.equalsIgnoreCase("TRUE"))
{
if (UnXMLTAGsetOption.pcm_staticInit == false)
{
UnXMLTAGsetOption.pcm_staticInit = true;
l_hdl.pdm_myProducer.pdmf_clearCache();
}
else
{
l_hdl.pdm_optional = false;
l_hdl.pdm_optionFalseNr = l_hdl.pdm_optionNr;
}
}
else
KeLog.pcmf_log("ug2t", "<option> no values to compare for tag setting true", this, KeLog.DEBUG);
if (l_hdl.pdm_actMValue != null)
l_hdl.pdm_elements.push(l_hdl.pdm_actMValue);
else
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetForEach implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xTag = KeTools.pcmf_deRef(attributes.getValue("tag"));
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xUseRegExp = KeTools.pcmf_deRef(attributes.getValue("useRegExp"));
String xInclude = KeTools.pcmf_deRef(attributes.getValue("include"));
UnFeDescriptor l_desc = null;
if (xUseRegExp != null && xUseRegExp.equals("true"))
{
if (xTag != null)
l_desc = UnFeDescriptor.pcmf_createReTagDesc(xTag);
else if (xName != null)
l_desc = UnFeDescriptor.pcmf_createReNameDesc(xName);
}
else
{
if (xTag != null)
l_desc = UnFeDescriptor.pcmf_createTagDesc(xTag);
else if (xName != null)
l_desc = UnFeDescriptor.pcmf_createNameDesc(xName);
}
// @@
UnFEContainer l_fe = (UnFEContainer) l_hdl.pdm_forEachs.get(l_desc);
if (l_fe == null)
{
l_fe = new UnFEContainer();
l_hdl.pdm_forEachs.put(l_desc, l_fe);
};
l_fe.pcmf_pushInclude(xInclude);
l_hdl.pdm_feStack.push(l_desc);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
// @@
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGcomment implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetDefault implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xDefV = KeTools.pcmf_deRef(attributes.getValue("value"));
String xFg = KeTools.pcmf_deRef(attributes.getValue("fg"));
String xBg = KeTools.pcmf_deRef(attributes.getValue("bg"));
String xBorder = KeTools.pcmf_deRef(attributes.getValue("border"));
String xBorderCol = KeTools.pcmf_deRef(attributes.getValue("boColor"));
String xBorderWidth = KeTools.pcmf_deRef(attributes.getValue("boWidth"));
String xToolTip = KeTools.pcmf_deRef(attributes.getValue("toolTip"));
String xFontObj = KeTools.pcmf_deRef(attributes.getValue("fontObject"));
String xIcoObj = KeTools.pcmf_deRef(attributes.getValue("iconObject"));
String xDefO = KeTools.pcmf_deRef(attributes.getValue("object"));
if (xFg != null || xBg != null || xBorder != null || xBorderCol != null || xBorderWidth != null || xToolTip != null || xFontObj != null)
{
String l_bg = xBg;
String l_fg = xFg;
int l_border = IUnComponent.NO_BORDER;
if (xBorder != null && xBorder.equalsIgnoreCase("INSETS"))
l_border = IUnComponent.INSETS_BORDER;
else if (xBorder != null && xBorder.equalsIgnoreCase("OUTSETS"))
l_border = IUnComponent.OUTSETS_BORDER;
else if (xBorder != null && xBorder.equalsIgnoreCase("LINE"))
l_border = IUnComponent.LINE_BORDER;
String l_borderCol = xBorderCol == null ? "" : xBorderCol;
int l_boWidth = xBorderWidth != null ? Integer.parseInt(xBorderWidth) : 0;
String l_toolTip = xToolTip;
UnFontDescriptor l_font = null;
Object l_value = null;
if (xDefV != null)
l_value = xDefV;
else if (xDefO != null)
l_value = KeRegisteredObject.pcmf_getObjByName(xDefO);
if (xFontObj != null)
l_font = (UnFontDescriptor) KeRegisteredObject.pcmf_getObjByName(xFontObj);
IUnImage l_ico = null;
if (xIcoObj != null)
l_ico = (IUnImage) KeRegisteredObject.pcmf_getObjByName(xIcoObj);
UnDefaultProps l_props = new UnDefaultProps(l_value, l_fg, l_bg, l_border, l_borderCol, l_boWidth, l_font, l_toolTip, l_ico);
l_hdl.pdm_act.pcmf_setDefaultValue(l_props);
}
else if (xDefV != null)
l_hdl.pdm_act.pcmf_setDefaultValue(xDefV);
else if (xDefO != null)
l_hdl.pdm_act.pcmf_setDefaultValue(KeRegisteredObject.pcmf_getObjByName(xDefO));
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetValue implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xDefV = KeTools.pcmf_deRef(attributes.getValue("value"));
String xDefO = KeTools.pcmf_deRef(attributes.getValue("object"));
if (xDefV != null)
l_hdl.pdm_act.pcmf_setValue(xDefV);
else if (xDefO != null)
l_hdl.pdm_act.pcmf_setValue(KeRegisteredObject.pcmf_getObjByName(xDefO));
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGcursor implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xCursor = KeTools.pcmf_deRef(attributes.getValue("value"));
if (l_hdl.pdm_act instanceof IUnComponent)
((IUnComponent) l_hdl.pdm_act).pcmf_setCursor(xCursor.toUpperCase());
else
KeLog.pcmf_log("ug2t", "<cursor> parent is no UnComponent: class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]", this,
KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetPlLocal implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
((PlBasicComponentAggregat) KeRegisteredObject.pcmf_getObjByName(PlBasicComponentAggregat.MY_CURRENTPARSED_PLUGIN)).pcmf_addLocalObject(xName,
l_hdl.pdm_act);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetSpan implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xRow = KeTools.pcmf_deRef(attributes.getValue("row"));
String xCol = KeTools.pcmf_deRef(attributes.getValue("col"));
String xRowS = KeTools.pcmf_deRef(attributes.getValue("rowSpan"));
String xColS = KeTools.pcmf_deRef(attributes.getValue("colSpan"));
try
{
if (l_hdl.pdm_act instanceof IUnTable)
((IUnTable) l_hdl.pdm_act).pcmf_setSpan(Integer.parseInt(xRow), Integer.parseInt(xCol), Integer.parseInt(xRowS), Integer.parseInt(xColS));
else
KeLog.pcmf_log("ug2t", "<span> parent is no table: class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "<span> integer value expected", this, KeLog.ERROR);
}
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGdeleteColorSettings implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
((UnComponent) l_hdl.pdm_act).pcmf_resetColorSettings();
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetExtCss implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xCss = KeTools.pcmf_deRef(attributes.getValue("value"));
if (l_hdl.pdm_act instanceof IUnApplication)
l_hdl.pdm_appl.pcmf_setExternalCss(xCss);
else
l_hdl.pdm_page.pcmf_setExternalCss(xCss);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetAutoDelete implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xAutoDel = KeTools.pcmf_deRef(attributes.getValue("value"));
if (xAutoDel == null)
KeRegisteredObject.pcmf_setContextAutoDelete(KeRegisteredObject.AUTO_DELETE_EARLY);
else
{
if (xAutoDel.equalsIgnoreCase("disable"))
KeRegisteredObject.pcmf_setContextAutoDelete(KeRegisteredObject.AUTO_DELETE_DISABLED);
else if (xAutoDel.equalsIgnoreCase("early"))
KeRegisteredObject.pcmf_setContextAutoDelete(KeRegisteredObject.AUTO_DELETE_EARLY);
else if (xAutoDel.equalsIgnoreCase("late"))
KeRegisteredObject.pcmf_setContextAutoDelete(KeRegisteredObject.AUTO_DELETE_LATE);
}
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetCurrentFile implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xFile = attributes.getValue("value");
InputSource l_source = new InputSource("file:" + KeEnvironment.pcmf_buildPath(xFile));
l_source.setEncoding(KeEnvironment.pcmf_getCharacterSet());
l_hdl.pdm_sourceStack.push(l_hdl.pdm_myProducer.pem_mySource);
l_hdl.pdm_myProducer.pem_mySource = l_source;
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGinclude implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// @@
String xSource = KeTools.pcmf_deRef(attributes.getValue("file"));
UnApplicationFactory l_prod = new UnApplicationFactory(xSource, l_hdl);
l_hdl.pdm_myProducer.pdmf_beginSource(xSource);
l_prod.pcmf_parseRecursiv();
l_hdl.pdm_myProducer.pdmf_endSource();
// @@
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGtip implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xTip = KeTools.pcmf_deRef(attributes.getValue("tip"));
if (l_hdl.pdm_act instanceof UnComponent && xTip != null)
((UnComponent) l_hdl.pdm_act).pcmf_setToolTip(xTip);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGcolor implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xBg = KeTools.pcmf_deRef(attributes.getValue("bg"));
String xFg = KeTools.pcmf_deRef(attributes.getValue("fg"));
if (l_hdl.pdm_act instanceof HoGenericTreeNode)
{
IKeView l_view = l_hdl.pdm_act.pcmf_getView();
if (l_view instanceof UnIconValueView)
{
if (xFg != null && !xFg.equals(""))
((UnIconValueView) l_view).pcmf_setFg(xFg);
if (xBg != null && !xBg.equals(""))
((UnIconValueView) l_view).pcmf_setBg(xBg);
}
else if (l_view == null)
{
UnIconValueView l_nview = new UnIconValueView();
l_hdl.pdm_act.pcmf_setView(l_nview);
if (xFg != null && !xFg.equals(""))
l_nview.pcmf_setFg(xFg);
if (xBg != null && !xBg.equals(""))
l_nview.pcmf_setBg(xBg);
}
else
KeLog.pcmf_log("ug2t", "<color> cannot set color in : class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
}
else if (l_hdl.pdm_act instanceof UnComponent)
{
if (xBg != null && !xBg.equals(""))
((UnComponent) l_hdl.pdm_act).pcmf_setBgColor(xBg);
if (xFg != null && !xFg.equals(""))
((UnComponent) l_hdl.pdm_act).pcmf_setFgColor(xFg);
}
else
KeLog.pcmf_log("ug2t", "<color> cannot set color in : class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGaddInfo implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
Object l_obj = null;
if (xClass != null)
l_obj = Class.forName(xClass).newInstance();
else if (xObj != null)
l_obj = KeRegisteredObject.pcmf_getObjByName(xObj);
else
l_obj = xValue;
l_hdl.pdm_act.pcmf_setAdditionalInfo(l_obj);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGaddProd implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xTag = KeTools.pcmf_deRef(attributes.getValue("tag"));
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
IUnSAXAppFactHandler l_prod = (IUnSAXAppFactHandler) Class.forName(xClass).newInstance();
l_hdl.pcmf_addProducer(xTag, l_prod);
l_hdl.pcmf_doExecStack(l_hdl.pdm_appl, l_hdl.pdm_appl.pcmf_getUnComponent(), l_hdl.pdm_name);
return (l_hdl.pdm_appl);
};
};
final class UnXMLTAGtext implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xInline = KeTools.pcmf_deRef(attributes.getValue("forceInline"));
String xDyn = KeTools.pcmf_deRef(attributes.getValue("dynamic"));
String xAlign = KeTools.pcmf_deRef(attributes.getValue("align"));
String xWrap = KeTools.pcmf_deRef(attributes.getValue("wrap"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnLabel l_if = l_hdl.pdm_objFact.pcmf_createTextPlugin(l_hdl.pdm_AppType, xName, xValue, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xAlign != null)
{
if (xAlign.equalsIgnoreCase("CENTER"))
l_if.pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_CENTER);
else if (xAlign.equalsIgnoreCase("EAST"))
l_if.pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_EAST);
else if (xAlign.equalsIgnoreCase("WEST"))
l_if.pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_WEST);
}
if (xInline != null && xInline.equalsIgnoreCase("true"))
l_if.pcmf_forceInline(true);
if (xDyn != null && xDyn.equalsIgnoreCase("false"))
l_if.pcmf_setDynamic(false);
if (l_if instanceof MuGenericLabel)
{
if (xWrap != null && xWrap.equals("false"))
((MuGenericLabel) l_if).pcmf_setWrap(false);
}
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGaPopup implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xHOffs = KeTools.pcmf_deRef(attributes.getValue("hOffset"));
String xVOffs = KeTools.pcmf_deRef(attributes.getValue("vOffset"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnAnchoredPopUp l_if = l_hdl.pdm_objFact.pcmf_createAPopupPlugin(l_hdl.pdm_AppType, xName, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (xHOffs != null)
l_if.pcmf_setPopUpHorizontalOffset(Integer.parseInt(xHOffs));
if (xVOffs != null)
l_if.pcmf_setPopUpVerticalOffset(Integer.parseInt(xVOffs));
if (xValue != null)
l_if.pcmf_setValue(xValue);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGhtmlaPopup implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xHOffs = KeTools.pcmf_deRef(attributes.getValue("hOffset"));
String xVOffs = KeTools.pcmf_deRef(attributes.getValue("vOffset"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnAnchoredPopUp l_if = l_hdl.pdm_objFact.pcmf_createAPopupPlugin(l_hdl.pdm_AppType, xName, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (xHOffs != null)
l_if.pcmf_setPopUpHorizontalOffset(Integer.parseInt(xHOffs));
if (xVOffs != null)
l_if.pcmf_setPopUpVerticalOffset(Integer.parseInt(xVOffs));
if (xValue != null)
l_if.pcmf_setValue(xValue);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
// Html file parsen - nur wenn kein cached run
// @@
l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
l_hdl.endElement("", "htmlGui", "htmlGui");
// @@
return (l_if);
};
};
final class UnXMLTAGhidden implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
// Element erzeugen und in Parent einfgen
IUnLabel l_if = l_hdl.pdm_objFact.pcmf_createText(l_hdl.pdm_AppType, xName, xValue, l_hdl.pdm_appl);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_if.pcmf_getUnComponent().pcmf_setView(new UnNullView());
l_if.pcmf_setFixedSize(0, 0, UnFixedSize.FIX_SIZE);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGfiller implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xX = KeTools.pcmf_deRef(attributes.getValue("xFill"));
String xY = KeTools.pcmf_deRef(attributes.getValue("yFill"));
// Element erzeugen und in Parent einfgen
IUnLabel l_if = l_hdl.pdm_objFact.pcmf_createText(l_hdl.pdm_AppType, "myfi", "", l_hdl.pdm_appl);
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode("myfi", l_if.pcmf_getUnComponent());
int xFill = 100;
int yFill = 100;
if (xX != null && xX.equals("false"))
xFill = 0;
if (xY != null && xY.equals("false"))
yFill = 0;
l_if.pcmf_setTakeMaxSpace(true);
if (l_hdl.pdm_act instanceof IUnLayouted)
((IUnLayouted) l_hdl.pdm_act).pcmf_setWeights(l_if.pcmf_getUnComponent(), xFill, yFill);
else
KeLog.pcmf_log("ug2t", "<filler> cannot be inserted here, parent object is no layoutable container (tag is ignored): class [" + l_hdl.pdm_act.getClass()
+ "]" + ", name [" + l_hdl.pdm_name + "]", this, KeLog.MESSAGE);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), "myfi");
return (l_if);
};
};
final class UnXMLTAGline implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xLen = KeTools.pcmf_deRef(attributes.getValue("len"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnSeparator l_if = l_hdl.pdm_objFact.pcmf_createLinePlugin(l_hdl.pdm_AppType, xName, xLen == null ? 0 : Integer.parseInt(xLen), l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGspinner implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnSpinner l_if = l_hdl.pdm_objFact.pcmf_createSpinnerPlugin(l_hdl.pdm_AppType, xName, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xSubm != null && xSubm.equals("true"))
l_if.pcmf_getUnComponent().pcmf_enableSubmit();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGfileChooser implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xUpload = KeTools.pcmf_deRef(attributes.getValue("uploadReadFile"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnFileChooser l_if = l_hdl.pdm_objFact.pcmf_createFileChooserPlugin(l_hdl.pdm_AppType, xName, xValue, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("true"))
l_if.pcmf_getUnComponent().pcmf_enableSubmit();
if (xUpload != null && xUpload.equals("true"))
l_if.pcmf_setUploadReadFile(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGimage implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xIco = KeTools.pcmf_deRef(attributes.getValue("icon"));
String xAttach = KeTools.pcmf_deRef(attributes.getValue("attach"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnImage l_if = l_hdl.pdm_objFact.pcmf_createImagePlugin(l_hdl.pdm_AppType, xName, xValue, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
{
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (xAttach == null || xAttach.equals("true"))
l_if.pcmf_attachImage();
}
if (xIco != null && xIco.equals("true") && l_hdl.pdm_act instanceof IUnIconView)
((IUnIconView) l_hdl.pdm_act).pcmf_setIcon(l_if);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGdrawPane implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xWi = KeTools.pcmf_deRef(attributes.getValue("width"));
String xHi = KeTools.pcmf_deRef(attributes.getValue("height"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xPainter = KeTools.pcmf_deRef(attributes.getValue("painter"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnDrawPane l_if = l_hdl.pdm_objFact.pcmf_createDrawPanePlugin(l_hdl.pdm_AppType, xName, Integer.parseInt(xWi), Integer.parseInt(xHi), l_hdl.pdm_appl,
xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xPainter != null)
{
((IUnPainter) Class.forName(xPainter).newInstance()).pcmf_paint(l_if);
l_if.pcmf_commitDrawPane();
}
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGssWidget implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xWi = KeTools.pcmf_deRef(attributes.getValue("width"));
String xHi = KeTools.pcmf_deRef(attributes.getValue("height"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
if (xHi == null)
xHi = "30";
if (xWi == null)
xWi = "100";
// Element erzeugen und in Parent einfgen
IUnSnapShotComponent l_if = l_hdl.pdm_objFact.pcmf_createSnapShotPlugin(l_hdl.pdm_AppType, xName, Integer.parseInt(xWi), Integer.parseInt(xHi),
l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xClass != null)
{
l_if.pcmf_setSnapShotRoot((Component) Class.forName(xClass).newInstance());
l_if.pcmf_commitWidget();
}
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGsplitPane implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xSplit = KeTools.pcmf_deRef(attributes.getValue("split"));
String xDivPos = KeTools.pcmf_deRef(attributes.getValue("divPos"));
String xDivWi = KeTools.pcmf_deRef(attributes.getValue("divWidth"));
String xDivWiA = KeTools.pcmf_deRef(attributes.getValue("divWidthAbs"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnSplitPane l_if = l_hdl.pdm_objFact.pcmf_createSplitPanePlugin(l_hdl.pdm_AppType, xName, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xSplit != null && xSplit.equals("H"))
l_if.pcmf_setSplitMode(IUnSplitPane.HSPLIT);
if (xDivPos != null)
l_if.pcmf_setSplitPercent(Integer.parseInt(xDivPos));
if (xDivWi != null)
l_if.pcmf_setSliderPercent(Integer.parseInt(xDivWi));
if (xDivWiA != null)
l_if.pcmf_setSliderAbs(Integer.parseInt(xDivWiA));
if (xSubm != null && xSubm.equals("true"))
l_if.pcmf_getUnComponent().pcmf_enableSubmit();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGbgimage implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xUrl = KeTools.pcmf_deRef(attributes.getValue("url"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
if (xValue == null)
xValue = "";
if (xUrl != null && xUrl.trim().equals("") == false)
xValue = xUrl;
IUnImage l_if = null;
if (xObj != null && xObj.trim().equals("") == false)
l_if = (IUnImage) KeRegisteredObject.pcmf_getObjByName(xObj);
else
l_if = l_hdl.pdm_objFact.pcmf_createImage(l_hdl.pdm_AppType, xName, xValue, l_hdl.pdm_appl);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (l_hdl.pdm_act instanceof IUnPanel)
((IUnPanel) l_hdl.pdm_act).pcmf_setBgImage(l_if);
else
KeLog.pcmf_log("ug2t", "<bgimage> cannot insert background picture in: class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]",
this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGwdgBorder implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xStyle = KeTools.pcmf_deRef(attributes.getValue("style"));
String xColor = KeTools.pcmf_deRef(attributes.getValue("boColor"));
String xWidth = KeTools.pcmf_deRef(attributes.getValue("width"));
if (xWidth == null)
xWidth = "1";
if (xColor == null)
xColor = "gray";
// Element erzeugen und in Parent einfgen
if (xStyle != null && xStyle.equalsIgnoreCase("INSETS"))
((UnComponent) l_hdl.pdm_act).pcmf_setBorder(IUnComponent.INSETS_BORDER, xColor, Integer.parseInt(xWidth));
else if (xStyle != null && xStyle.equalsIgnoreCase("OUTSETS"))
((UnComponent) l_hdl.pdm_act).pcmf_setBorder(IUnComponent.OUTSETS_BORDER, xColor, Integer.parseInt(xWidth));
else if (xStyle != null && xStyle.equalsIgnoreCase("LINE"))
((UnComponent) l_hdl.pdm_act).pcmf_setBorder(IUnComponent.LINE_BORDER, xColor, Integer.parseInt(xWidth));
else
((UnComponent) l_hdl.pdm_act).pcmf_setBorder(IUnComponent.NO_BORDER, xColor, Integer.parseInt(xWidth));
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGcssClass implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
// Element erzeugen und in Parent einfgen
if (xValue != null)
((UnComponent) l_hdl.pdm_act).pcmf_setCssClass(xValue);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGtabIdx implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
// Element erzeugen und in Parent einfgen
if (xValue != null && xValue.trim().equals("") == false && l_hdl.pdm_act instanceof MuGenericComponent)
((MuGenericComponent) l_hdl.pdm_act).pcmf_setTabIdx(Integer.parseInt(xValue));
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGtakeMax implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
// Element erzeugen und in Parent einfgen
if (xValue != null)
((UnComponent) l_hdl.pdm_act).pcmf_setTakeMaxSpace(xValue == null || xValue.equals("true") ? true : false);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGlayout implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
// Element erzeugen und in Parent einfgen
if (xValue != null)
{
if (l_hdl.pdm_act instanceof IUnLayouted)
{
if (xValue.equalsIgnoreCase("GRIDBAG"))
((IUnLayouted) l_hdl.pdm_act).pcmf_setCommonLayout(IUnLayouted.LAYOUT_GRIDBAG);
else if (xValue.equalsIgnoreCase("FLOW"))
((IUnLayouted) l_hdl.pdm_act).pcmf_setCommonLayout(IUnLayouted.LAYOUT_FLOW);
else if (xValue.equalsIgnoreCase("ABSOLUTE"))
((IUnLayouted) l_hdl.pdm_act).pcmf_setCommonLayout(IUnLayouted.LAYOUT_ABSOLUTE);
}
else
KeLog.pcmf_log("ug2t", "<commonLayout> parent is no IUnLayouted: class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]", this,
KeLog.ERROR);
}
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGicon implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("object"));
String xPath = KeTools.pcmf_deRef(attributes.getValue("url"));
if (xName != null && xName.equals("") == false)
{
if (l_hdl.pdm_act instanceof IUnIconView)
((IUnIconView) l_hdl.pdm_act).pcmf_setIcon((IUnImage) KeRegisteredObject.pcmf_getObjByName(xName));
else
KeLog.pcmf_log("ug2t", "<icon> can not set icon in:" + l_hdl.pdm_act.getClass(), this, KeLog.ERROR);
}
else if (xPath != null && xPath.equals("") == false)
{
if (l_hdl.pdm_act instanceof IUnIconView)
{
IUnImage l_if = l_hdl.pdm_objFact.pcmf_createImage(l_hdl.pdm_AppType, "icon", xPath, l_hdl.pdm_appl);
((IUnIconView) l_hdl.pdm_act).pcmf_setIcon(l_if);
}
else
KeLog.pcmf_log("ug2t", "<icon> can not set icon in: class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
}
else
KeLog.pcmf_log("ug2t", "<icon> can not set icon in: class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsetHtmlLOM implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("object"));
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xInsets = KeTools.pcmf_deRef(attributes.getValue("insets"));
IMuGenericLayoutManager l_if = null;
if (l_hdl.pdm_AppType == UnComponentFactory.MARKUP)
{
if (xName != null && xName.equals("") == false)
l_if = (IMuGenericLayoutManager) KeRegisteredObject.pcmf_getObjByName(xName);
else if (xClass != null && xClass.equals("") == false)
l_if = (IMuGenericLayoutManager) Class.forName(xClass).newInstance();
if (l_if != null)
{
if (l_hdl.pdm_act instanceof MuGenericContainer)
{
((MuGenericContainer) l_hdl.pdm_act).pcmf_setLayoutManager(l_if);
if (xInsets != null && xInsets.equals("") == false)
l_if.pcmf_setInsets(Integer.parseInt(xInsets));
}
else
{
KeLog.pcmf_log("ug2t", "<htmlLOM> cannot set layout-manager in: class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]", this,
KeLog.ERROR);
}
}
else
KeLog.pcmf_log("ug2t", "<htmlLOM> html layout-manager not found: class[" + xClass + "] object[" + xName + "]", this, KeLog.ERROR);
}
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGcomboBox implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xString = KeTools.pcmf_deRef(attributes.getValue("entry"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
if (xValue == null)
xValue = "";
if (xString == null)
xString = "";
// Element erzeugen und in Parent einfgen
IUnComboBox l_if = l_hdl.pdm_objFact.pcmf_createComboBoxPlugin(l_hdl.pdm_AppType, xName, xValue, xString, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("true"))
l_if.pcmf_getUnComponent().pcmf_enableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_if.pcmf_getUnComponent().pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGlistBox implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xString = KeTools.pcmf_deRef(attributes.getValue("entry"));
String xSize = KeTools.pcmf_deRef(attributes.getValue("size"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
if (xValue == null)
xValue = "";
if (xString == null)
xString = "";
// Element erzeugen und in Parent einfgen
IUnListBox l_if = l_hdl.pdm_objFact.pcmf_createListBoxPlugin(l_hdl.pdm_AppType, xName, xValue, xString, Integer.parseInt(xSize), l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("true"))
l_if.pcmf_getUnComponent().pcmf_enableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_if.pcmf_getUnComponent().pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGradio implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xString = KeTools.pcmf_deRef(attributes.getValue("entry"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xNL = KeTools.pcmf_deRef(attributes.getValue("layout"));
String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnRadioPanel l_if = null;
if (xString == null)
xString = xValue;
// Element erzeugen und in Parent einfgen
if (xNL != null && xNL.equals("false"))
l_if = l_hdl.pdm_objFact.pcmf_createRadioButtonsPlugin(l_hdl.pdm_AppType, xName, xValue, xString, true, l_hdl.pdm_appl, xFBlock);
else
l_if = l_hdl.pdm_objFact.pcmf_createRadioButtonsPlugin(l_hdl.pdm_AppType, xName, xValue, xString, false, l_hdl.pdm_appl, xFBlock);
if (l_if instanceof IUnPanel)
{
if (xScr != null && xScr.equals("false"))
((IUnPanel) l_if).pcmf_setScroll(false);
};
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("true"))
l_if.pcmf_getUnComponent().pcmf_enableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_if.pcmf_getUnComponent().pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGsingleRadio implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xGroup = KeTools.pcmf_deRef(attributes.getValue("group"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xLabel = KeTools.pcmf_deRef(attributes.getValue("label"));
String xString = KeTools.pcmf_deRef(attributes.getValue("entry"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xWrap = KeTools.pcmf_deRef(attributes.getValue("wrap"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnRadioButton l_if = null;
if (xValue == null && xString == null)
xValue = xString = xLabel;
else if (xString == null && xLabel == null)
xString = xValue;
else if (xString == null)
xString = xLabel;
// Element erzeugen und in Parent einfgen
l_if = l_hdl.pdm_objFact.pcmf_createSingleRadioButtonsPlugin(l_hdl.pdm_AppType, xName, xValue, xString, xGroup, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("true"))
l_if.pcmf_getUnComponent().pcmf_enableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_if.pcmf_getUnComponent().pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (l_if instanceof MuGenericRadioButton)
{
if (xWrap != null && xWrap.equals("false"))
((MuGenericRadioButton) l_if).pcmf_setWrap(false);
}
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGscripting implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xType = KeTools.pcmf_deRef(attributes.getValue("type"));
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xSynced = KeTools.pcmf_deRef(attributes.getValue("synchronized"));
l_hdl.pdmf_startCDataRecording();
IUnScriptIntegrator l_script = (IUnScriptIntegrator) Class.forName(xClass).newInstance();
if (xSynced != null && xSynced.equals("true"))
l_script.pcmf_setSynced(true);
if (xType.equals(IUnScriptIntegrator.LISTENER))
((UnComponent) l_hdl.pdm_act).pcmf_addListener(l_script);
else if (xType.equals(IUnScriptIntegrator.PRE_FCT))
((UnComponent) l_hdl.pdm_act).pcmf_addPreFct(l_script);
else if (xType.equals(IUnScriptIntegrator.POST_FCT))
((UnComponent) l_hdl.pdm_act).pcmf_addPostFct(l_script);
else if (xType.equals(IUnScriptIntegrator.EXEC))
((IUnApplication) l_hdl.pdm_act).pcmf_setInitFct(l_script);
else if (xType.equals(IUnScriptIntegrator.MAPPED))
l_hdl.pdm_appl.pcmf_addMappingListener(l_script);
else if (xType.equals(IUnScriptIntegrator.INDIRECT))
((UnComponent) l_hdl.pdm_act).pcmf_addIndirectListener(l_script);
l_script.pcmf_setType(xType);
l_hdl.pdm_elements.push(l_script);
l_hdl.pdm_names.push(xType);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGinlinePlugin implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xRegister = KeTools.pcmf_deRef(attributes.getValue("register"));
l_hdl.pdmf_startCDataRecording();
l_hdl.pdm_elements.push(xRegister);
l_hdl.pdm_names.push(xName);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsrvListener implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
IUnGuiEventListener l_listen = null;
try
{
if (xClass != null && xClass.equals("") == false)
{
l_listen = (IUnGuiEventListener) Class.forName(xClass).newInstance();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
KeRegisteredObject.pcmf_register(xReg, l_listen);
}
else if (xObj != null && xObj.equals("") == false)
l_listen = (IUnGuiEventListener) KeRegisteredObject.pcmf_getObjByName(xObj);
if (l_listen == null)
{
KeLog.pcmf_log("ug2t", "<srvListener> tag requires a valid class or a valid obj attribute: class[" + xClass + "] object[" + xObj + "] in : class ["
+ l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act, l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
((UnComponent) l_hdl.pdm_act).pcmf_addListener(l_listen);
}
catch (Throwable e)
{
KeLog.pcmf_log("ug2t", "<srvListener> class: " + xClass + " for listener could not be found: class [" + l_hdl.pdm_act.getClass() + "]" + ", name ["
+ l_hdl.pdm_name + "]", this, KeLog.ERROR);
}
l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act, l_hdl.pdm_name);
return (l_hdl.pdm_appl);
};
};
final class UnXMLTAGmapListener implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
IUnMappingEventListener l_listen = null;
try
{
if (xClass != null && xClass.equals("") == false)
{
l_listen = (IUnMappingEventListener) Class.forName(xClass).newInstance();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
KeRegisteredObject.pcmf_register(xReg, l_listen);
}
else if (xObj != null && xObj.equals("") == false)
l_listen = (IUnMappingEventListener) KeRegisteredObject.pcmf_getObjByName(xObj);
if (l_listen == null)
{
KeLog.pcmf_log("ug2t", "<mapListener> tag requires a valid class or a valid obj attribute: class[" + xClass + "] object[" + xObj + "]: in class ["
+ l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act, l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
l_hdl.pdm_appl.pcmf_addMappingListener(l_listen);
}
catch (Throwable e)
{
KeLog.pcmf_log("ug2t", "<mapListener> class: " + xClass + " for listener could not be found: class [" + l_hdl.pdm_act.getClass() + "]" + ", name ["
+ l_hdl.pdm_name + "]", this, KeLog.ERROR);
}
l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act, l_hdl.pdm_name);
return (l_hdl.pdm_appl);
};
};
final class UnXMLTAGpcListener implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
IKePropertyChangeListener l_listen = null;
try
{
if (xClass != null && xClass.equals("") == false)
{
l_listen = (IKePropertyChangeListener) Class.forName(xClass).newInstance();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
KeRegisteredObject.pcmf_register(xReg, l_listen);
}
else if (xObj != null && xObj.equals("") == false)
l_listen = (IKePropertyChangeListener) KeRegisteredObject.pcmf_getObjByName(xObj);
if (l_listen == null)
{
KeLog.pcmf_log("ug2t", "<pcListener> tag requires a valid class or a valid obj attribute: class[" + xClass + "] object[" + xObj + "] in: class ["
+ l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]", this, KeLog.ERROR);
l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act, l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
l_hdl.pdm_act.pcmf_addPropertyChangedListener(l_listen);
}
catch (Throwable e)
{
KeLog.pcmf_log("ug2t", "<pcListener> class: " + xClass + " for listener could not be found: class [" + l_hdl.pdm_act.getClass() + "]" + ", name ["
+ l_hdl.pdm_name + "]", this, KeLog.ERROR);
}
l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act, l_hdl.pdm_name);
return (l_hdl.pdm_appl);
};
};
final class UnXMLTAGsrvListenerStmt implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
String xMethod = KeTools.pcmf_deRef(attributes.getValue("method"));
String xParam = KeTools.pcmf_deRef(attributes.getValue("parameter"));
if (xParam != null && xParam.equals(""))
xParam = null;
IUnGuiEventListener l_listen = new UnExpressionListener(xObj, xMethod, xParam);
((UnComponent) l_hdl.pdm_act).pcmf_addListener(l_listen);
l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act, l_hdl.pdm_name);
return (l_hdl.pdm_appl);
};
};
final class UnXMLTAGxScript implements IUnSAXAppFactHandler
{
// @@
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xFile = KeTools.pcmf_deRef(attributes.getValue("file"));
String xBind = KeTools.pcmf_deRef(attributes.getValue("bind"));
String xExec = KeTools.pcmf_deRef(attributes.getValue("exec"));
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
ScXmlScript l_script = null;
l_hdl.pdm_optionNr++;
l_hdl.pdm_optional = false;
l_hdl.pdm_optionFalseNr = l_hdl.pdm_optionNr;
if (xFile.equals("THIS"))
{
// @@
if (l_hdl.pdm_myProducer.pem_mySource.getByteStream() != null)
{
if (l_hdl.pdm_myProducer.pem_mySource.getByteStream().available() > 0)
{
KeLog.pcmf_log("ug2t", "<xScript> embedded xScripts are not supported", this, KeLog.ERROR);
l_hdl.pcmf_doExecStack(l_hdl.pdm_appl, l_hdl.pdm_appl.pcmf_getUnComponent(), l_hdl.pdm_name);
return (l_hdl.pdm_appl);
}
l_hdl.pdm_myProducer.pem_mySource.getByteStream().reset();
byte l_byte[] = new byte[l_hdl.pdm_myProducer.pem_mySource.getByteStream().available()];
l_hdl.pdm_myProducer.pem_mySource.getByteStream().read(l_byte);
l_script = new ScXmlScript(l_byte);
}
else
l_script = new ScXmlScript(l_hdl.pdm_myProducer.pem_mySource.getSystemId().replaceFirst("file:", ""));
// @@
}
else
{
// @@
l_script = new ScXmlScript(xFile);
// @@
}
if (xBind != null)
l_hdl.pdm_appl.pcmf_getContext().put(xBind, l_script);
if (xExec != null)
l_script.pcmf_execProc(xExec);
l_hdl.pcmf_doExecStack(l_hdl.pdm_appl, l_hdl.pdm_appl.pcmf_getUnComponent(), l_hdl.pdm_name);
return (l_hdl.pdm_appl);
};
};
final class UnXMLTAGCB implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xString = KeTools.pcmf_deRef(attributes.getValue("label"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xWrap = KeTools.pcmf_deRef(attributes.getValue("wrap"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
if (xValue == null)
xValue = IUnCheckBox.NOTCHECKED;
IUnCheckBox l_but = l_hdl.pdm_objFact.pcmf_createCheckBoxPlugin(l_hdl.pdm_AppType, xValue, xString, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_but.pcmf_getUnComponent());
else
l_but.pcmf_getUnComponent().pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("true"))
l_but.pcmf_getUnComponent().pcmf_enableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_but.pcmf_getUnComponent().pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_but.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (l_but instanceof MuGenericCheckBox)
{
if (xWrap != null && xWrap.equals("false"))
((MuGenericCheckBox) l_but).pcmf_setWrap(false);
}
l_hdl.pcmf_doExecStack(l_but, l_but.pcmf_getUnComponent(), xName);
return (l_but);
};
};
final class UnXMLTAGCallBack implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xParam = KeTools.pcmf_deRef(attributes.getValue("dataId"));
if (l_hdl.pdm_act instanceof UnComponent)
{
ACoDataGetter l_cb = null;
if (xClass == null)
l_cb = (ACoDataGetter) KeRegisteredObject.pcmf_getObjByName(xObj);
else
l_cb = (ACoDataGetter) Class.forName(xClass).newInstance();
((UnComponent) l_hdl.pdm_act).pcmf_setDataGetter(l_cb, xParam, true);
((UnComponent) l_hdl.pdm_act).pcmf_selfRefresh();
}
else
KeLog.pcmf_log("ug2t", "<dataCallback> current object is no UnComponent: class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name + "]",
this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_appl);
}
}
final class UnXMLTAGentry implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
Object l_ret = null;
ACoDataGetter l_cb = null;
int l_id = 0;
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xString = KeTools.pcmf_deRef(attributes.getValue("entry"));
String xCallb = KeTools.pcmf_deRef(attributes.getValue("callback"));
String xMItem = KeTools.pcmf_deRef(attributes.getValue("mfct_class"));
String xMOItem = KeTools.pcmf_deRef(attributes.getValue("mfct_obj"));
if (xCallb != null && xCallb.equals("") == false)
{
l_cb = (ACoDataGetter) KeRegisteredObject.pcmf_getObjByName(xCallb);
xString = xValue = l_cb.pcmf_getString(l_id++);
};
if (l_hdl.pdm_act instanceof IUnListComponent)
{
HoGenericTreeNode l_gobj = null;
if (xString == null)
xString = xValue;
do
{
if (KeTools.pcmf_isObjReference(xString) == false)
{
l_gobj = new HoGenericTreeNode(xString);
l_gobj.pcmf_setValue(xString);
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xString, l_gobj);
((IUnListComponent) l_hdl.pdm_act).pcmf_addValue(xValue, "~" + l_gobj.pcmf_getRemName());
}
else
((IUnListComponent) l_hdl.pdm_act).pcmf_addValue(xValue, xString);
try
{
if (l_cb != null)
xString = xValue = l_cb.pcmf_getString(l_id++);
}
catch (Exception e)
{
l_cb = null;
};
}
while (l_cb != null);
if (l_gobj != null)
l_hdl.pcmf_doExecStack(l_gobj, l_gobj, xValue);
else
l_hdl.pcmf_doExecStack(l_hdl.pdm_appl, l_hdl.pdm_appl.pcmf_getUnComponent(), l_hdl.pdm_name);
l_ret = l_hdl.pdm_appl;
}
else if (l_hdl.pdm_act instanceof IUnSlider)
{
if (xString == null)
xString = xValue;
do
{
((IUnSlider) l_hdl.pdm_act).pcmf_addValueItem(xValue, xString);
try
{
if (l_cb != null)
xString = xValue = l_cb.pcmf_getString(l_id++);
}
catch (Exception e)
{
l_cb = null;
};
}
while (l_cb != null);
l_hdl.pcmf_doExecStack(l_hdl.pdm_appl, l_hdl.pdm_appl.pcmf_getUnComponent(), l_hdl.pdm_name);
l_ret = l_hdl.pdm_appl;
}
else if (l_hdl.pdm_act instanceof IUnRadioPanel)
{
KeTreeNode l_gobj = null;
if (xString == null)
xString = xValue;
do
{
l_gobj = ((IUnRadioPanel) l_hdl.pdm_act).pcmf_addValue(xValue, xString);
try
{
if (l_cb != null)
xString = xValue = l_cb.pcmf_getString(l_id++);
}
catch (Exception e)
{
l_cb = null;
};
}
while (l_cb != null);
l_hdl.pcmf_doExecStack(l_gobj, l_gobj, xValue);
l_ret = l_hdl.pdm_appl;
}
else if (l_hdl.pdm_act instanceof IUnTable)
{
if (xValue == null || l_cb != null)
xValue = "^";
StringTokenizer l_tok = null;
ArrayList l_vect = null;
String l_el = null;
do
{
l_tok = new StringTokenizer(xString, xValue, false);
l_vect = new ArrayList();
l_el = null;
while (l_tok.hasMoreElements())
{
l_el = (String) l_tok.nextElement();
l_el = KeTools.pcmf_deRef(l_el);
l_el = l_el.replace(xValue.charAt(0), '');
l_vect.add(l_el);
};
((IUnTable) l_hdl.pdm_act).pcmf_addRow(l_vect);
try
{
if (l_cb != null)
xString = l_cb.pcmf_getString(l_id++);
}
catch (Exception e)
{
l_cb = null;
};
}
while (l_cb != null);
l_hdl.pcmf_doExecStack(l_hdl.pdm_appl, l_hdl.pdm_appl.pcmf_getUnComponent(), l_hdl.pdm_name);
l_ret = l_hdl.pdm_appl;
}
else
{
HoGenericTreeNode l_gobj = null;
if (xString == null)
xString = xValue;
do
{
if (xMItem != null && xMItem.equals("") == false)
{
Object l_ex = Class.forName(xMItem).newInstance();
if (l_ex instanceof IUnGuiEventListener)
l_gobj = new UnMenuFunction(xString, (IUnGuiEventListener) l_ex);
else
l_gobj = new UnMenuFunction(xString, (IKeExecutable) l_ex);
}
else if (xMOItem != null && xMOItem.equals("") == false)
{
Object l_ex = KeRegisteredObject.pcmf_getObjByName(xMOItem);
if (l_ex instanceof IUnGuiEventListener)
l_gobj = new UnMenuFunction(xString, (IUnGuiEventListener) l_ex);
else
l_gobj = new UnMenuFunction(xString, (IKeExecutable) l_ex);
}
else
l_gobj = new UnMenuFunction(xValue, (IKeExecutable) null);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_gobj.pcmf_reRegister(xReg);
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xValue, l_gobj);
l_gobj.pcmf_setValue(xString);
try
{
if (l_cb != null)
xString = xValue = l_cb.pcmf_getString(l_id++);
}
catch (Exception e)
{
l_cb = null;
};
}
while (l_cb != null);
l_hdl.pcmf_doExecStack(l_gobj, l_gobj, xValue);
l_ret = l_gobj;
};
return (l_ret);
};
};
final class UnXMLTAGref implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xOName = KeTools.pcmf_deRef(attributes.getValue("object"));
String xRef = KeTools.pcmf_deRef(attributes.getValue("ref"));
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
UnComponent l_obj = null;
if (xOName != null && xOName.equals("") == false)
l_obj = (UnComponent) KeRegisteredObject.pcmf_getObjByName(xOName);
else
l_obj = (UnComponent) l_hdl.pdm_appl.pcmf_getUnComponent().pcmf_getByPath(xRef);
if (l_obj != null)
{
if (l_obj instanceof AHoSrvGenericComponent)
l_obj = ((AHoSrvGenericComponent) l_obj).pcmf_buildRefObj();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_obj.pcmf_reRegister(xReg);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_obj);
else
l_obj.pcmf_setGlobal(true);
l_hdl.pcmf_doExecStack(l_obj, l_obj, xName);
return (l_obj);
}
else
{
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
KeLog.pcmf_log("ug2t", "<objRef> no valid path: " + xRef, this, KeLog.ERROR);
return (l_hdl.pdm_appl);
}
};
};
final class UnXMLTAGrefObj implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
UnComponent l_obj = (UnComponent) KeRegisteredObject.pcmf_getObjByName(xObj);
if (l_obj != null)
{
if (l_obj.pcmf_getParentNode() != null && l_obj instanceof AHoSrvGenericComponent)
l_obj = ((AHoSrvGenericComponent) l_obj).pcmf_buildRefObj();
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName == null || xName.trim().equals("") ? l_obj.pcmf_getName() : xName, l_obj);
l_hdl.pcmf_doExecStack(l_obj, l_obj, l_obj.pcmf_getName());
return (l_obj);
}
else
{
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
KeLog.pcmf_log("ug2t", "<refObj> no valid object in repository: " + xObj, this, KeLog.ERROR);
return (l_hdl.pdm_appl);
}
};
};
final class UnXMLTAGeditor implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xMime = KeTools.pcmf_deRef(attributes.getValue("mime"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xValid = KeTools.pcmf_deRef(attributes.getValue("valid"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnTextArea l_if = l_hdl.pdm_objFact.pcmf_createEditorPlugin(l_hdl.pdm_AppType, xName, xValue, xMime, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("true"))
l_if.pcmf_getUnComponent().pcmf_enableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_if.pcmf_getUnComponent().pcmf_disable();
if (xValid != null && xValid.equals("") == false)
l_if.pcmf_setInputFilter(xValid);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGprogressBar implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xMin = KeTools.pcmf_deRef(attributes.getValue("min"));
String xMax = KeTools.pcmf_deRef(attributes.getValue("max"));
String xProgress = KeTools.pcmf_deRef(attributes.getValue("progress"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
int l_min = 0;
int l_max = 100;
int l_progress = 0;
if (xMin != null)
l_min = Integer.parseInt(xMin);
if (xMax != null)
l_max = Integer.parseInt(xMax);
if (xProgress != null)
l_progress = Integer.parseInt(xProgress);
if (xValue == null)
xValue = Integer.toString(l_progress);
// Element erzeugen und in Parent einfgen
IUnProgressBar l_if = l_hdl.pdm_objFact.pcmf_createProgressBarPlugin(l_hdl.pdm_AppType, xName, xValue, l_min, l_max, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
// Submit setzen
l_if.pcmf_setProgress(l_progress);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGHBox implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xBorderL = KeTools.pcmf_deRef(attributes.getValue("borderLeft"));
String xBorderR = KeTools.pcmf_deRef(attributes.getValue("borderRight"));
String xBorderT = KeTools.pcmf_deRef(attributes.getValue("borderTop"));
String xBorderB = KeTools.pcmf_deRef(attributes.getValue("borderBottom"));
String xAlign = KeTools.pcmf_deRef(attributes.getValue("align"));
String xGap = KeTools.pcmf_deRef(attributes.getValue("gap"));
String xMargin = KeTools.pcmf_deRef(attributes.getValue("margin"));
String xPadding = KeTools.pcmf_deRef(attributes.getValue("padding"));
String xType = KeTools.pcmf_deRef(attributes.getValue("type"));
// String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnBox l_if = l_hdl.pdm_objFact.pcmf_createBoxPlugin(l_hdl.pdm_AppType, xName, IUnBox.HBOX, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xType != null && xType.equalsIgnoreCase("SIMPLE"))
l_if.pcmf_setBoxType(IUnBox.SIMPLE);
else if (xType != null && xType.equalsIgnoreCase("SINGLE"))
l_if.pcmf_setBoxType(IUnBox.SINGLE);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (xBorderL != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.LEFT, xBorderL);
if (xBorderR != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.RIGHT, xBorderR);
if (xBorderT != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.TOP, xBorderT);
if (xBorderB != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.BOTTOM, xBorderB);
if (xAlign != null)
l_if.pcmf_setBoxAlign(xAlign);
if (xGap != null)
l_if.pcmf_setGap(Integer.parseInt(xGap));
if (xMargin != null)
IUnBox.BoxHelper.pcmf_setBoxMargin(l_if, xMargin);
if (xPadding != null)
IUnBox.BoxHelper.pcmf_setBoxPadding(l_if, xPadding);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGVBox implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xBorderL = KeTools.pcmf_deRef(attributes.getValue("borderLeft"));
String xBorderR = KeTools.pcmf_deRef(attributes.getValue("borderRight"));
String xBorderT = KeTools.pcmf_deRef(attributes.getValue("borderTop"));
String xBorderB = KeTools.pcmf_deRef(attributes.getValue("borderBottom"));
String xAlign = KeTools.pcmf_deRef(attributes.getValue("align"));
String xGap = KeTools.pcmf_deRef(attributes.getValue("gap"));
String xMargin = KeTools.pcmf_deRef(attributes.getValue("margin"));
String xPadding = KeTools.pcmf_deRef(attributes.getValue("padding"));
String xType = KeTools.pcmf_deRef(attributes.getValue("type"));
// String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnBox l_if = l_hdl.pdm_objFact.pcmf_createBoxPlugin(l_hdl.pdm_AppType, xName, IUnBox.VBOX, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xType != null && xType.equalsIgnoreCase("SIMPLE"))
l_if.pcmf_setBoxType(IUnBox.SIMPLE);
else if (xType != null && xType.equalsIgnoreCase("SINGLE"))
l_if.pcmf_setBoxType(IUnBox.SINGLE);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (xBorderL != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.LEFT, xBorderL);
if (xBorderR != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.RIGHT, xBorderR);
if (xBorderT != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.TOP, xBorderT);
if (xBorderB != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.BOTTOM, xBorderB);
if (xAlign != null)
l_if.pcmf_setBoxAlign(xAlign);
if (xGap != null)
l_if.pcmf_setGap(Integer.parseInt(xGap));
if (xMargin != null)
IUnBox.BoxHelper.pcmf_setBoxMargin(l_if, xMargin);
if (xPadding != null)
IUnBox.BoxHelper.pcmf_setBoxPadding(l_if, xPadding);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGBox implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xBorderL = KeTools.pcmf_deRef(attributes.getValue("borderLeft"));
String xBorderR = KeTools.pcmf_deRef(attributes.getValue("borderRight"));
String xBorderT = KeTools.pcmf_deRef(attributes.getValue("borderTop"));
String xBorderB = KeTools.pcmf_deRef(attributes.getValue("borderBottom"));
String xAlign = KeTools.pcmf_deRef(attributes.getValue("align"));
String xMargin = KeTools.pcmf_deRef(attributes.getValue("margin"));
String xPadding = KeTools.pcmf_deRef(attributes.getValue("padding"));
// String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnBox l_if = l_hdl.pdm_objFact.pcmf_createBoxPlugin(l_hdl.pdm_AppType, xName, IUnBox.HBOX, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
l_if.pcmf_setBoxType(IUnBox.SINGLE);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (xBorderL != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.LEFT, xBorderL);
if (xBorderR != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.RIGHT, xBorderR);
if (xBorderT != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.TOP, xBorderT);
if (xBorderB != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.BOTTOM, xBorderB);
if (xAlign != null)
l_if.pcmf_setBoxAlign(xAlign);
if (xMargin != null)
IUnBox.BoxHelper.pcmf_setBoxMargin(l_if, xMargin);
if (xPadding != null)
IUnBox.BoxHelper.pcmf_setBoxPadding(l_if, xPadding);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGhtmlHBox implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xBorderL = KeTools.pcmf_deRef(attributes.getValue("borderLeft"));
String xBorderR = KeTools.pcmf_deRef(attributes.getValue("borderRight"));
String xBorderT = KeTools.pcmf_deRef(attributes.getValue("borderTop"));
String xBorderB = KeTools.pcmf_deRef(attributes.getValue("borderBottom"));
String xAlign = KeTools.pcmf_deRef(attributes.getValue("align"));
String xGap = KeTools.pcmf_deRef(attributes.getValue("gap"));
String xMargin = KeTools.pcmf_deRef(attributes.getValue("margin"));
String xPadding = KeTools.pcmf_deRef(attributes.getValue("padding"));
String xType = KeTools.pcmf_deRef(attributes.getValue("type"));
// String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnBox l_if = l_hdl.pdm_objFact.pcmf_createBoxPlugin(l_hdl.pdm_AppType, xName, IUnBox.HBOX, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xType != null && xType.equalsIgnoreCase("SIMPLE"))
l_if.pcmf_setBoxType(IUnBox.SIMPLE);
else if (xType != null && xType.equalsIgnoreCase("SINGLE"))
l_if.pcmf_setBoxType(IUnBox.SINGLE);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (xBorderL != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.LEFT, xBorderL);
if (xBorderR != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.RIGHT, xBorderR);
if (xBorderT != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.TOP, xBorderT);
if (xBorderB != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.BOTTOM, xBorderB);
if (xAlign != null)
l_if.pcmf_setBoxAlign(xAlign);
if (xGap != null)
l_if.pcmf_setGap(Integer.parseInt(xGap));
if (xMargin != null)
IUnBox.BoxHelper.pcmf_setBoxMargin(l_if, xMargin);
if (xPadding != null)
IUnBox.BoxHelper.pcmf_setBoxPadding(l_if, xPadding);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
// Html file parsen - nur wenn kein cached run
// @@
l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
l_hdl.endElement("", "htmlGui", "htmlGui");
// @@
return (l_if);
};
};
final class UnXMLTAGhtmlVBox implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xBorderL = KeTools.pcmf_deRef(attributes.getValue("borderLeft"));
String xBorderR = KeTools.pcmf_deRef(attributes.getValue("borderRight"));
String xBorderT = KeTools.pcmf_deRef(attributes.getValue("borderTop"));
String xBorderB = KeTools.pcmf_deRef(attributes.getValue("borderBottom"));
String xAlign = KeTools.pcmf_deRef(attributes.getValue("align"));
String xGap = KeTools.pcmf_deRef(attributes.getValue("gap"));
String xMargin = KeTools.pcmf_deRef(attributes.getValue("margin"));
String xPadding = KeTools.pcmf_deRef(attributes.getValue("padding"));
String xType = KeTools.pcmf_deRef(attributes.getValue("type"));
// String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnBox l_if = l_hdl.pdm_objFact.pcmf_createBoxPlugin(l_hdl.pdm_AppType, xName, IUnBox.VBOX, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xType != null && xType.equalsIgnoreCase("SIMPLE"))
l_if.pcmf_setBoxType(IUnBox.SIMPLE);
else if (xType != null && xType.equalsIgnoreCase("SINGLE"))
l_if.pcmf_setBoxType(IUnBox.SINGLE);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (xBorderL != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.LEFT, xBorderL);
if (xBorderR != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.RIGHT, xBorderR);
if (xBorderT != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.TOP, xBorderT);
if (xBorderB != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.BOTTOM, xBorderB);
if (xAlign != null)
l_if.pcmf_setBoxAlign(xAlign);
if (xGap != null)
l_if.pcmf_setGap(Integer.parseInt(xGap));
if (xMargin != null)
IUnBox.BoxHelper.pcmf_setBoxMargin(l_if, xMargin);
if (xPadding != null)
IUnBox.BoxHelper.pcmf_setBoxPadding(l_if, xPadding);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
// Html file parsen - nur wenn kein cached run
// @@
l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
l_hdl.endElement("", "htmlGui", "htmlGui");
// @@
return (l_if);
};
};
final class UnXMLTAGhtmlBox implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xBorderL = KeTools.pcmf_deRef(attributes.getValue("borderLeft"));
String xBorderR = KeTools.pcmf_deRef(attributes.getValue("borderRight"));
String xBorderT = KeTools.pcmf_deRef(attributes.getValue("borderTop"));
String xBorderB = KeTools.pcmf_deRef(attributes.getValue("borderBottom"));
String xAlign = KeTools.pcmf_deRef(attributes.getValue("align"));
String xMargin = KeTools.pcmf_deRef(attributes.getValue("margin"));
String xPadding = KeTools.pcmf_deRef(attributes.getValue("padding"));
// String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnBox l_if = l_hdl.pdm_objFact.pcmf_createBoxPlugin(l_hdl.pdm_AppType, xName, IUnBox.HBOX, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
l_if.pcmf_setBoxType(IUnBox.SINGLE);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (xBorderL != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.LEFT, xBorderL);
if (xBorderR != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.RIGHT, xBorderR);
if (xBorderT != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.TOP, xBorderT);
if (xBorderB != null)
IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.BOTTOM, xBorderB);
if (xAlign != null)
l_if.pcmf_setBoxAlign(xAlign);
if (xMargin != null)
IUnBox.BoxHelper.pcmf_setBoxMargin(l_if, xMargin);
if (xPadding != null)
IUnBox.BoxHelper.pcmf_setBoxPadding(l_if, xPadding);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
// Html file parsen - nur wenn kein cached run
// @@
l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
l_hdl.endElement("", "htmlGui", "htmlGui");
// @@
return (l_if);
};
};
final class UnXMLTAGFlex implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xF = KeTools.pcmf_deRef(attributes.getValue("flex"));
if (l_hdl.pdm_act instanceof UnComponent && l_hdl.pdm_act.pcmf_getParentNode() instanceof IUnBox)
{
int ftype = IUnBox.BOX_CONSTRAINT_NONE;
if (xF != null)
{
if (xF.equalsIgnoreCase("FX"))
ftype = IUnBox.BOX_CONSTRAINT_FLEXFILLX;
else if (xF.equalsIgnoreCase("FY"))
ftype = IUnBox.BOX_CONSTRAINT_FLEXFILLY;
else if (xF.equalsIgnoreCase("FXY"))
ftype = IUnBox.BOX_CONSTRAINT_FLEXFILLXY;
else if (xF.equalsIgnoreCase("F"))
ftype = IUnBox.BOX_CONSTRAINT_FLEX;
}
((IUnBox) l_hdl.pdm_act.pcmf_getParentNode()).pcmf_setContraint((UnComponent) l_hdl.pdm_act, ftype);
}
else
KeLog.pcmf_log("ug2t", "<flex> cannot set flex here current object is no box: class [" + l_hdl.pdm_act.getClass() + "]" + ", name [" + l_hdl.pdm_name
+ "]", this, KeLog.ERROR);
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGtextBox implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xCols = KeTools.pcmf_deRef(attributes.getValue("cols"));
String xRows = KeTools.pcmf_deRef(attributes.getValue("rows"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xValid = KeTools.pcmf_deRef(attributes.getValue("valid"));
String xDefault = KeTools.pcmf_deRef(attributes.getValue("default"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
IUnTextArea l_if = l_hdl.pdm_objFact.pcmf_createTextBoxPlugin(l_hdl.pdm_AppType, xName, Integer.parseInt(xCols), Integer.parseInt(xRows), xValue,
l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("true"))
l_if.pcmf_getUnComponent().pcmf_enableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_if.pcmf_getUnComponent().pcmf_disable();
if (xValid != null && xValid.equals("") == false)
l_if.pcmf_setInputFilter(xValid);
if (xDefault != null)
l_if.pcmf_getUnComponent().pcmf_setDefaultValue(xDefault);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGtable implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
IUnTable l_if = null;
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xRows = KeTools.pcmf_deRef(attributes.getValue("rows"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xSel = KeTools.pcmf_deRef(attributes.getValue("selectable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xMulti = KeTools.pcmf_deRef(attributes.getValue("multi"));
String xLock = KeTools.pcmf_deRef(attributes.getValue("lockColumn"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
boolean l_bxSel = false;
if (xSel != null && xSel.equals("true"))
l_bxSel = true;
// Element erzeugen und in Parent einfgen
if (xRows == null || xRows.equals(""))
l_if = l_hdl.pdm_objFact.pcmf_createTablePlugin(l_hdl.pdm_AppType, xName, null, l_bxSel, l_hdl.pdm_appl, xFBlock);
else
{
Collection l_rows = (Collection) KeRegisteredObject.pcmf_getObjByName(xRows);
l_if = l_hdl.pdm_objFact.pcmf_createTablePlugin(l_hdl.pdm_AppType, xName, l_rows, l_bxSel, l_hdl.pdm_appl, xFBlock);
};
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("true"))
l_if.pcmf_getUnComponent().pcmf_enableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_if.pcmf_getUnComponent().pcmf_disable();
if (xLock != null && xLock.equals("") == false)
l_if.pcmf_lockColumn(Integer.parseInt(xLock), true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (l_if instanceof IUnMultiSelectComponent && xMulti != null && xMulti.equals("true"))
((IUnMultiSelectComponent) l_if).pcmf_setMultiSelection(true);
if (l_if instanceof MuGenericTable && l_hdl.pdm_appl instanceof MuGenericApplication)
((MuGenericTable) l_if).pcmf_setPartialRenderLineLimit(((MuGenericApplication) l_hdl.pdm_appl).pcmf_getPartialRenderLineLimit());
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGtreeView implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
IUnTreeView l_if = null;
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xRoot = KeTools.pcmf_deRef(attributes.getValue("root"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xMulti = KeTools.pcmf_deRef(attributes.getValue("multi"));
String xEdit = KeTools.pcmf_deRef(attributes.getValue("edit"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
if (xRoot == null || xRoot.equals(""))
l_if = l_hdl.pdm_objFact.pcmf_createTreeViewPlugin(l_hdl.pdm_AppType, xName, null, l_hdl.pdm_appl, xFBlock);
else
l_if = l_hdl.pdm_objFact.pcmf_createTreeViewPlugin(l_hdl.pdm_AppType, xName, (KeTreeNode) KeRegisteredObject.pcmf_getObjByName(xRoot), l_hdl.pdm_appl,
xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("false"))
l_if.pcmf_getUnComponent().pcmf_disableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_if.pcmf_getUnComponent().pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (l_if instanceof IUnMultiSelectComponent && xMulti != null && xMulti.equals("true"))
((IUnMultiSelectComponent) l_if).pcmf_setMultiSelection(true);
if (xEdit != null && xEdit.equals("false"))
l_if.pcmf_setEditable(false);
if (l_if instanceof MuGenericTreeView && l_hdl.pdm_appl instanceof MuGenericApplication)
((MuGenericTreeView) l_if).pcmf_setPartialRenderLineLimit(((MuGenericApplication) l_hdl.pdm_appl).pcmf_getPartialRenderLineLimit());
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGmenu implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
IUnMenu l_if = null;
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xRoot = KeTools.pcmf_deRef(attributes.getValue("root"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xWidth = KeTools.pcmf_deRef(attributes.getValue("width"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
if (xRoot == null)
l_if = l_hdl.pdm_objFact.pcmf_createMenuPlugin(l_hdl.pdm_AppType, xName, null, l_hdl.pdm_appl, xFBlock);
else
l_if = l_hdl.pdm_objFact.pcmf_createMenuPlugin(l_hdl.pdm_AppType, xName, (KeTreeNode) KeRegisteredObject.pcmf_getObjByName(xRoot), l_hdl.pdm_appl,
xFBlock);
if (xWidth != null && xWidth.equals("") == false)
l_if.pcmf_setMenuWidth(Integer.parseInt(xWidth));
if (l_hdl.pdm_act == l_hdl.pdm_appl.pcmf_getUnComponent())
l_hdl.pdm_appl.pcmf_setMainMenu(l_if);
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
// Submit setzen
if (xSubm != null && xSubm.equals("false"))
l_if.pcmf_getUnComponent().pcmf_disableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_if.pcmf_getUnComponent().pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGctxMenu implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
IUnMenu l_if = null;
// Attribute auslesen
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xRoot = KeTools.pcmf_deRef(attributes.getValue("root"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xDiab = KeTools.pcmf_deRef(attributes.getValue("disable"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
// Element erzeugen und in Parent einfgen
if (xRoot == null)
l_if = l_hdl.pdm_objFact.pcmf_createCtxMenuPlugin(l_hdl.pdm_AppType, xName, null, l_hdl.pdm_appl, xFBlock);
else
l_if = l_hdl.pdm_objFact.pcmf_createCtxMenuPlugin(l_hdl.pdm_AppType, xName, (KeTreeNode) KeRegisteredObject.pcmf_getObjByName(xRoot), l_hdl.pdm_appl,
xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if.pcmf_getUnComponent());
else
l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
// Submit setzen
if (xSubm != null && xSubm.equals("false"))
l_if.pcmf_getUnComponent().pcmf_disableSubmit();
// Disable Setzen setzen
if (xDiab != null && xDiab.equals("true"))
l_if.pcmf_getUnComponent().pcmf_disable();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
return (l_if);
};
};
final class UnXMLTAGborder implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xNL = KeTools.pcmf_deRef(attributes.getValue("layout"));
String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
String xColor = KeTools.pcmf_deRef(attributes.getValue("boColor"));
String xStyle = KeTools.pcmf_deRef(attributes.getValue("style"));
String xWidth = KeTools.pcmf_deRef(attributes.getValue("width"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnBorder l_border = null;
if (xNL != null && xNL.equals("false"))
l_border = l_hdl.pdm_objFact.pcmf_createBorderPlugin(l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl, xFBlock);
else
l_border = l_hdl.pdm_objFact.pcmf_createBorderPlugin(l_hdl.pdm_AppType, xName, false, l_hdl.pdm_appl, xFBlock);
if (l_border instanceof IUnPanel)
{
if (xScr != null && xScr.equals("false"))
((IUnPanel) l_border).pcmf_setScroll(false);
};
if (xColor != null && xColor.equals("") == false)
l_border.pcmf_setBoColor(xColor);
if (xWidth != null && xWidth.equals("") == false)
l_border.pcmf_setBorderLine(Integer.parseInt(xWidth));
if (xStyle != null && xStyle.equalsIgnoreCase("INSETS"))
l_border.pcmf_setBoStyle(IUnComponent.INSETS_BORDER);
else if (xStyle != null && xStyle.equalsIgnoreCase("OUTSETS"))
l_border.pcmf_setBoStyle(IUnComponent.OUTSETS_BORDER);
else if (xStyle != null && xStyle.equalsIgnoreCase("LINE"))
l_border.pcmf_setBoStyle(IUnComponent.LINE_BORDER);
else if (xStyle != null && xStyle.equalsIgnoreCase("NONE"))
l_border.pcmf_setBoStyle(IUnComponent.NO_BORDER);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_border.pcmf_getUnComponent());
else
l_border.pcmf_getUnComponent().pcmf_setGlobal(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_border.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_border, l_border.pcmf_getUnComponent(), xName);
return (l_border);
};
};
final class UnXMLTAGdialog implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xNL = KeTools.pcmf_deRef(attributes.getValue("layout"));
String xRs = KeTools.pcmf_deRef(attributes.getValue("resizable"));
String xDeco = KeTools.pcmf_deRef(attributes.getValue("deco"));
String xActive = KeTools.pcmf_deRef(attributes.getValue("active"));
String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xGenRs = KeTools.pcmf_deRef(attributes.getValue("genReshapeEvents"));
String xModal = KeTools.pcmf_deRef(attributes.getValue("modal"));
String xParent = KeTools.pcmf_deRef(attributes.getValue("parent"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnDialog l_dialog = null;
if (xNL != null && xNL.equals("false"))
l_dialog = l_hdl.pdm_objFact.pcmf_createDialogPlugin(l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl, xFBlock);
else
l_dialog = l_hdl.pdm_objFact.pcmf_createDialogPlugin(l_hdl.pdm_AppType, xName, false, l_hdl.pdm_appl, xFBlock);
if (l_dialog instanceof IUnPanel)
{
if (xScr != null && xScr.equals("false"))
((IUnPanel) l_dialog).pcmf_setScroll(false);
};
if (xOrphan == null || xOrphan.equals("false"))
{
if (xParent != null && !xParent.equals(""))
((KeTreeNode) KeRegisteredObject.pcmf_getObjByName(xParent)).pcmf_addNode(xName, l_dialog.pcmf_getUnComponent());
else
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_dialog.pcmf_getUnComponent());
}
else
l_dialog.pcmf_getUnComponent().pcmf_setGlobal(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_dialog.pcmf_getUnComponent().pcmf_reRegister(xReg);
if (xRs != null && xRs.equals("false"))
l_dialog.pcmf_setResizable(false);
if (xDeco != null && xDeco.equals("false"))
l_dialog.pcmf_setDecoration(false);
if (xModal != null && xModal.equals("true"))
l_dialog.pcmf_setModal(true);
l_dialog.pcmf_getUnComponent().pcmf_enableSubmit();
if (xSubm != null && xSubm.equals("false"))
l_dialog.pcmf_getUnComponent().pcmf_disableSubmit();
if (xGenRs != null && xGenRs.equals("true"))
l_dialog.pcmf_setGenerateReshapeEvents(true);
if (xActive != null && xActive.equals("true"))
l_dialog.pcmf_displayDialog();
l_hdl.pcmf_doExecStack(l_dialog, l_dialog.pcmf_getUnComponent(), xName);
return (l_dialog);
};
};
final class UnXMLTAGform implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xNL = KeTools.pcmf_deRef(attributes.getValue("layout"));
String xIFr = KeTools.pcmf_deRef(attributes.getValue("iFrame"));
String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
String xLazy = KeTools.pcmf_deRef(attributes.getValue("lazy"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnForm l_form = null;
if (xIFr == null || xIFr.equals("false"))
{
if (xNL != null && xNL.equals("false"))
l_form = l_hdl.pdm_objFact.pcmf_createFormPlugin(l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl, xFBlock);
else
l_form = l_hdl.pdm_objFact.pcmf_createFormPlugin(l_hdl.pdm_AppType, xName, false, l_hdl.pdm_appl, xFBlock);
}
else
{
if (xNL != null && xNL.equals("false"))
l_form = l_hdl.pdm_objFact.pcmf_createIForm(l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl);
else
l_form = l_hdl.pdm_objFact.pcmf_createIForm(l_hdl.pdm_AppType, xName, false, l_hdl.pdm_appl);
}
if (l_form instanceof IUnPanel)
{
if (xScr != null && xScr.equals("false"))
((IUnPanel) l_form).pcmf_setScroll(false);
};
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_form.pcmf_getUnComponent());
else
l_form.pcmf_getUnComponent().pcmf_setGlobal(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_form.pcmf_getUnComponent().pcmf_reRegister(xReg);
// @@
l_hdl.pcmf_doExecStack(l_form, l_form.pcmf_getUnComponent(), xName);
return (l_form);
};
};
final class UnXMLTAGhtmlPane implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnHtmlPane l_form = null;
l_form = l_hdl.pdm_objFact.pcmf_createHtmlPanePlugin(l_hdl.pdm_AppType, xName, "", l_hdl.pdm_appl, xFBlock);
l_hdl.pdmf_startCDataRecording();
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_form.pcmf_getUnComponent());
else
l_form.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xScr != null && xScr.equals("true"))
l_form.pcmf_setScroll(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_form.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_form, l_form.pcmf_getUnComponent(), xName);
return (l_form);
};
};
final class UnXMLTAGtoolBox implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnToolBox l_toolBox = l_hdl.pdm_objFact.pcmf_createToolBoxPlugin(l_hdl.pdm_AppType, xName, l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_toolBox.pcmf_getUnComponent());
else
l_toolBox.pcmf_getUnComponent().pcmf_setGlobal(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_toolBox.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_toolBox, l_toolBox.pcmf_getUnComponent(), xName);
return (l_toolBox);
};
};
final class UnXMLTAGtabPane implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xSubm = KeTools.pcmf_deRef(attributes.getValue("submit"));
String xTD = KeTools.pcmf_deRef(attributes.getValue("tabsBottom"));
String xFBlock = KeTools.pcmf_deRef(attributes.getValue("factoryDesc"));
if (xFBlock != null && xFBlock.trim().equals(""))
xFBlock = null;
IUnTabbedPane l_pane = l_hdl.pdm_objFact.pcmf_createTabPanePlugin(l_hdl.pdm_AppType, xName, (xTD != null && xTD.equals("true")) ? true : false,
l_hdl.pdm_appl, xFBlock);
if (xOrphan == null || xOrphan.equals("false"))
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_pane.pcmf_getUnComponent());
else
l_pane.pcmf_getUnComponent().pcmf_setGlobal(true);
if (xSubm != null && xSubm.equals("true"))
l_pane.pcmf_getUnComponent().pcmf_enableSubmit();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_pane.pcmf_getUnComponent().pcmf_reRegister(xReg);
l_hdl.pcmf_doExecStack(l_pane, l_pane.pcmf_getUnComponent(), xName);
return (l_pane);
};
};
final class UnXMLTAGmodelTpl implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
IMoValueContainer l_if = null;
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xCtx = KeTools.pcmf_deRef(attributes.getValue("objctx"));
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xCtx != null && xCtx.equalsIgnoreCase("GLOBAL"))
{
Object l_obj = KeRegisteredObject.pcmf_getGlobalObjByName(xReg);
if (l_obj != null)
{
l_if = (IMoValueContainer) l_obj;
((UnComponent) l_hdl.pdm_act).pcmf_setModelTpl(l_if);
l_hdl.pcmf_doExecStack(l_if, l_if, xName);
return (l_if);
}
}
if (xClass == null)
l_if = new MoLwValueTree();
else
l_if = (IMoValueContainer) Class.forName(xClass).newInstance();
l_if.pcmf_setMyTemplate(xName);
((UnComponent) l_hdl.pdm_act).pcmf_setModelTpl(l_if);
if (xReg != null && xReg.equals("") == false)
{
if (xCtx != null && xCtx.equalsIgnoreCase("GLOBAL"))
{
if (KeRegisteredObject.pcmf_getGlobalObjByName(xReg) == null)
{
KeRegisteredObject.pcmf_unRegister(l_if);
KeRegisteredObject.pcmf_registerGlobal(xReg, l_if);
}
}
else
KeRegisteredObject.pcmf_reRegister(xReg, l_if);
}
l_hdl.pcmf_doExecStack(l_if, l_if, l_hdl.pdm_name);
return (l_if);
};
};
final class UnXMLTAGmodel implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
IMoValue l_if = null;
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
if (xClass == null)
l_if = new MoLwValueTree();
else
l_if = (IMoValue) Class.forName(xClass).newInstance();
((UnComponent) l_hdl.pdm_act).pcmf_setModel(l_if);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
{
if (l_if instanceof KeRegisteredObject)
((KeRegisteredObject) l_if).pcmf_reRegister(xReg);
else
KeRegisteredObject.pcmf_reRegister(xReg, l_if);
}
l_hdl.pcmf_doExecStack(l_if, l_if, l_hdl.pdm_name);
return (l_if);
};
};
final class UnXMLTAGcontainer implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
KeTreeNode l_if = null;
if (l_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT)
l_if = new HoGenericTreeNode("container");
else
l_if = new KeTreeNode("container", null);
// l_if.pcmf_setOwnership(true);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
((KeRegisteredObject) l_if).pcmf_reRegister(xReg);
((KeTreeNode) l_hdl.pdm_act).pcmf_addNode("container", l_if);
l_hdl.pcmf_doExecStack(l_if, l_if, l_hdl.pdm_name);
return (l_if);
};
};
final class UnXMLTAGstdSingleValue implements IUnSAXAppFactHandler
{
protected static String pdm_singleValue = "de.ug2t.model.values.MoSingleValue";
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
pdm_singleValue = xClass;
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGsingleValue implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xValue = KeTools.pcmf_deRef(attributes.getValue("value"));
String xMan = KeTools.pcmf_deRef(attributes.getValue("man"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xCtx = KeTools.pcmf_deRef(attributes.getValue("objctx"));
String xToUITr = KeTools.pcmf_deRef(attributes.getValue("toUITransformerObj"));
String xFrUITr = KeTools.pcmf_deRef(attributes.getValue("fromUITransformerObj"));
String xToUITrC = KeTools.pcmf_deRef(attributes.getValue("toUITransformerClass"));
String xFrUITrC = KeTools.pcmf_deRef(attributes.getValue("fromUITransformerClass"));
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
IMoSingleValue l_if = null;
if (xOrphan == null || xOrphan.equals(""))
xOrphan = "false";
if (xClass == null)
xClass = UnXMLTAGstdSingleValue.pdm_singleValue;
if (xCtx != null && xCtx.equalsIgnoreCase("GLOBAL"))
{
Object l_obj = KeRegisteredObject.pcmf_getGlobalObjByName(xReg);
if (l_obj != null)
{
l_if = (IMoSingleValue) l_obj;
if (xOrphan.equals("false"))
{
if (l_hdl.pdm_actMValue instanceof IMoValueContainer)
{
if (xOrphan == null || xOrphan.equals("false"))
{
((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_addValue(xName, l_if);
if (xMan != null && xMan.equals("true"))
{
MoChildDescriptor l_desc = new MoChildDescriptor();
l_desc.setPem_minInst(1);
((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_addDesc(xName, l_desc);
}
}
}
else
KeLog.pcmf_log(l_hdl.pdm_appl.pcmf_getUnComponent().toString(), "<singleValue> can not insert items in MoSingleValue", this, KeLog.FATAL);
}
l_hdl.pcmf_doExecStack(l_if, l_if, xName);
return (l_if);
}
}
if (xClass == null)
l_if = new MoSingleValue();
else
l_if = (IMoSingleValue) Class.forName(xClass).newInstance();
if (xReg != null && xReg.equals("") == false)
{
if (xCtx != null && xCtx.equalsIgnoreCase("GLOBAL"))
{
if (KeRegisteredObject.pcmf_getGlobalObjByName(xReg) == null)
{
KeRegisteredObject.pcmf_unRegister(l_if);
KeRegisteredObject.pcmf_registerGlobal(xReg, l_if);
}
}
else
KeRegisteredObject.pcmf_reRegister(xReg, l_if);
}
l_if.pcmf_setMyTemplate(xName);
if (l_if instanceof KeTreeElement)
{
KeTreeElement l_el = (KeTreeElement) l_if;
l_el.pcmf_setName(xName);
if (xOrphan.equals("true"))
l_el.pcmf_setEarlyAutoDelete(false);
};
if (l_hdl.pdm_actMValue == null && xOrphan.equals("false"))
l_if.pcmf_setUiMap((UnComponent) l_hdl.pdm_act);
if (xValue != null)
{
l_if.pcmf_setValue(xValue);
l_if.pcmf_validate();
}
if (xToUITr != null && xToUITr.equals("") == false)
{
IUnTransformer l_trans = (IUnTransformer) KeRegisteredObject.pcmf_getObjByName(xToUITr);
l_if.pcmf_setToUITransformer(l_trans);
}
else if (xToUITrC != null && xToUITrC.equals("") == false)
{
IUnTransformer l_trans = (IUnTransformer) Class.forName(xToUITrC).newInstance();
l_if.pcmf_setToUITransformer(l_trans);
}
if (xFrUITr != null && xFrUITr.equals("") == false)
{
IUnTransformer l_trans = (IUnTransformer) KeRegisteredObject.pcmf_getObjByName(xFrUITr);
l_if.pcmf_setFromUITransformer(l_trans);
}
else if (xFrUITrC != null && xFrUITrC.equals("") == false)
{
IUnTransformer l_trans = (IUnTransformer) Class.forName(xFrUITrC).newInstance();
l_if.pcmf_setFromUITransformer(l_trans);
}
if (xOrphan.equals("false"))
{
if (l_hdl.pdm_actMValue instanceof IMoValueContainer)
{
if (xOrphan == null || xOrphan.equals("false"))
{
((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_addValue(xName, l_if);
if (xMan != null && xMan.equals("true"))
{
MoChildDescriptor l_desc = new MoChildDescriptor();
l_desc.setPem_minInst(1);
((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_addDesc(xName, l_desc);
}
}
}
else
KeLog.pcmf_log(l_hdl.pdm_appl.pcmf_getUnComponent().toString(), "<singleValue> can not insert items in MoSingleValue", this, KeLog.FATAL);
}
l_hdl.pcmf_doExecStack(l_if, l_if, xName);
return (l_if);
};
};
final class UnXMLTAGvalueReference implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
String xMan = KeTools.pcmf_deRef(attributes.getValue("man"));
String xMap = KeTools.pcmf_deRef(attributes.getValue("map2Ui"));
Object l_ref = KeRegisteredObject.pcmf_getObjByName(xObj);
if (l_ref instanceof IMoValue)
{
if (l_hdl.pdm_actMValue == null)
((UnComponent) l_hdl.pdm_act).pcmf_setModel((IMoValue) l_ref);
else if (l_hdl.pdm_actMValue instanceof IMoValueContainer)
{
if (l_hdl.pdm_actMValue != l_ref)
((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_addValue(xName, (IMoValue) l_ref);
else
((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_addValue(xName, ((IMoValue) l_ref).pcmf_cloneModelValue(true, true));
MoChildDescriptor l_desc = new MoChildDescriptor();
l_desc.setPem_isReference(true);
if (xMap == null || xMap.equals("false"))
l_desc.setPem_mapWithParent2Ui(false);
else
l_desc.setPem_mapWithParent2Ui(true);;
if (xMan != null && xMan.equals("true"))
l_desc.setPem_minInst(1);
((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_addDesc(xName, l_desc);
}
else
KeLog.pcmf_log(l_hdl.pdm_appl.pcmf_getUnComponent().toString(), "<modelValRef> can not insert items in MoSingleValue", this, KeLog.FATAL);
}
else
KeLog.pcmf_log(l_hdl.pdm_appl.pcmf_getUnComponent().toString(), "<modelValRef> object does not implement IMoValue: " + xObj, this, KeLog.FATAL);
l_hdl.pcmf_doExecStack(l_ref, l_ref, xName);
return (l_ref);
};
};
final class UnXMLTAGvalueRtReference implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
String xMan = KeTools.pcmf_deRef(attributes.getValue("man"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xMap = KeTools.pcmf_deRef(attributes.getValue("map2Ui"));
Object l_ref = new MoLazyValueReference(xObj);
if (l_hdl.pdm_actMValue == null)
((UnComponent) l_hdl.pdm_act).pcmf_setModel((IMoValue) l_ref);
else if (l_hdl.pdm_actMValue instanceof IMoValueContainer)
{
if (xOrphan == null || xOrphan.equals("false"))
{
((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_addValue(xName, (IMoValue) l_ref);
MoChildDescriptor l_desc = new MoChildDescriptor();
l_desc.setPem_isReference(true);
if (xMap == null || xMap.equals("false"))
l_desc.setPem_mapWithParent2Ui(false);
else
l_desc.setPem_mapWithParent2Ui(true);;
if (xMan != null && xMan.equals("true"))
l_desc.setPem_minInst(1);
((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_addDesc(xName, l_desc);
}
}
else
KeLog.pcmf_log(l_hdl.pdm_appl.pcmf_getUnComponent().toString(), "<modelValRtRef> can not insert items in MoSingleValue", this, KeLog.FATAL);
l_hdl.pcmf_doExecStack(l_ref, l_ref, xName);
return (l_ref);
};
};
final class UnXMLTAGmultipleValue implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xMan = KeTools.pcmf_deRef(attributes.getValue("man"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xCtx = KeTools.pcmf_deRef(attributes.getValue("objctx"));
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xOrphan == null || xOrphan.equals(""))
xOrphan = "false";
IMoValueContainer l_if = null;
if (xCtx != null && xCtx.equalsIgnoreCase("GLOBAL"))
{
Object l_obj = KeRegisteredObject.pcmf_getGlobalObjByName(xReg);
if (l_obj != null)
{
l_if = (IMoValueContainer) l_obj;
if (xOrphan.equals("false"))
{
if (l_hdl.pdm_actMValue == null)
l_if.pcmf_setUiMap((UnComponent) l_hdl.pdm_act);
if (l_hdl.pdm_actMValue instanceof IMoValueContainer)
{
if (xOrphan == null || xOrphan.equals("false"))
{
((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_addValue(xName, l_if);
if (xMan != null && xMan.equals("true"))
{
MoChildDescriptor l_desc = new MoChildDescriptor();
l_desc.setPem_minInst(1);
((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_addDesc(xName, l_desc);
}
}
}
else
KeLog.pcmf_log(l_hdl.pdm_appl.pcmf_getUnComponent().toString(), "<multipleValue> can not insert items in MoSingleValue", this, KeLog.FATAL);
}
l_hdl.pcmf_doExecStack(l_if, l_if, xName);
return (l_if);
}
}
if (xClass == null)
l_if = new MoLwValueTree();
else
l_if = (IMoValueContainer) Class.forName(xClass).newInstance();
if (xReg != null && xReg.equals("") == false)
{
if (xCtx != null && xCtx.equalsIgnoreCase("GLOBAL"))
{
if (KeRegisteredObject.pcmf_getGlobalObjByName(xReg) == null)
{
KeRegisteredObject.pcmf_unRegister(l_if);
KeRegisteredObject.pcmf_registerGlobal(xReg, l_if);
}
}
else
KeRegisteredObject.pcmf_reRegister(xReg, l_if);
}
if (l_if instanceof KeTreeElement)
{
KeTreeElement l_el = (KeTreeElement) l_if;
l_el.pcmf_setName(xName);
};
if (l_if instanceof KeRegisteredObject && xOrphan.equals("true"))
((KeRegisteredObject) l_if).pcmf_setEarlyAutoDelete(false);
l_if.pcmf_setMyTemplate(xName);
if (xOrphan.equals("false"))
{
if (l_hdl.pdm_actMValue == null)
l_if.pcmf_setUiMap((UnComponent) l_hdl.pdm_act);
if (l_hdl.pdm_actMValue instanceof IMoValueContainer)
{
if (xOrphan == null || xOrphan.equals("false"))
{
((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_addValue(xName, l_if);
if (xMan != null && xMan.equals("true"))
{
MoChildDescriptor l_desc = new MoChildDescriptor();
l_desc.setPem_minInst(1);
((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_addDesc(xName, l_desc);
}
}
}
else
KeLog.pcmf_log(l_hdl.pdm_appl.pcmf_getUnComponent().toString(), "<multipleValue> can not insert items in MoSingleValue", this, KeLog.FATAL);
}
l_hdl.pcmf_doExecStack(l_if, l_if, xName);
return (l_if);
};
};
final class UnXMLTAGtransformer implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
String xOrphan = KeTools.pcmf_deRef(attributes.getValue("orphan"));
String xAttach = KeTools.pcmf_deRef(attributes.getValue("attach"));
IUnTransformer l_if = null;
if (xOrphan != null && xOrphan.equals(""))
{
if (xClass == null)
{
l_if = (IUnTransformer) KeRegisteredObject.pcmf_getObjByName(xObj);
l_hdl.pdm_actMValue.pcmf_setTransformer(l_if);
}
else
{
l_if = (IUnTransformer) Class.forName(xClass).newInstance();
l_hdl.pdm_actMValue.pcmf_setTransformer(l_if);
}
}
else
{
if (xClass == null)
l_if = (IUnTransformer) KeRegisteredObject.pcmf_getObjByName(xObj);
else
l_if = (IUnTransformer) Class.forName(xClass).newInstance();
}
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
{
KeRegisteredObject.pcmf_register(xReg, l_if);
if (l_if instanceof IKeAttachable && (xAttach == null || xAttach.equals("true")))
((IKeAttachable) l_if).pcmf_attachExtern();
}
l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue, l_hdl.pdm_actMValue, l_hdl.pdm_name);
return (l_hdl.pdm_actMValue);
};
};
final class UnXMLTAGobserver implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
if (xClass == null)
{
l_hdl.pdm_actMValue.pcmf_addObserver((IMoObserver) KeRegisteredObject.pcmf_getObjByName(xObj));
}
else
l_hdl.pdm_actMValue.pcmf_addObserver((IMoObserver) Class.forName(xClass).newInstance());
l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue, l_hdl.pdm_actMValue, l_hdl.pdm_name);
return (l_hdl.pdm_actMValue);
};
};
final class UnXMLTAGvalidator implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
if (xClass == null)
{
l_hdl.pdm_actMValue.pcmf_setValidator((IUnValidator) KeRegisteredObject.pcmf_getObjByName(xObj));
}
else
l_hdl.pdm_actMValue.pcmf_setValidator((IUnValidator) Class.forName(xClass).newInstance());
l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue, l_hdl.pdm_actMValue, l_hdl.pdm_name);
return (l_hdl.pdm_actMValue);
};
};
final class UnXMLTAGuiMap implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
String xPath = KeTools.pcmf_deRef(attributes.getValue("path"));
String xRelPath = KeTools.pcmf_deRef(attributes.getValue("relPath"));
if (xPath != null)
l_hdl.pdm_actMValue.pcmf_setUiMap((UnComponent) l_hdl.pdm_appl.pcmf_getUnComponent().pcmf_getByPath(xPath));
else if (xObj != null)
l_hdl.pdm_actMValue.pcmf_setUiMap((UnComponent) KeRegisteredObject.pcmf_getObjByName(xObj));
else if (xRelPath != null)
l_hdl.pdm_actMValue.pcmf_setUiMap((UnComponent) ((KeTreeNode) l_hdl.pdm_act).pcmf_getByPath(xRelPath));
else
l_hdl.pdm_actMValue.pcmf_setUiMap((UnComponent) Class.forName(xClass).newInstance());
l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue, l_hdl.pdm_actMValue, l_hdl.pdm_name);
return (l_hdl.pdm_actMValue);
};
};
final class UnXMLTAGuiErrorGW implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
if (xClass == null)
{
l_hdl.pdm_actMValue.pcmf_setUiErrorGW((IMoMappingErrorHandler) KeRegisteredObject.pcmf_getObjByName(xObj));
}
else
l_hdl.pdm_actMValue.pcmf_setUiErrorGW((IMoMappingErrorHandler) Class.forName(xClass).newInstance());
l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue, l_hdl.pdm_actMValue, l_hdl.pdm_name);
return (l_hdl.pdm_actMValue);
};
};
final class UnXMLTAGreader implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
if (xClass == null)
{
l_hdl.pdm_actMValue.pcmf_setReader((IMoReader) KeRegisteredObject.pcmf_getObjByName(xObj));
}
else
l_hdl.pdm_actMValue.pcmf_setReader((IMoReader) Class.forName(xClass).newInstance());
l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue, l_hdl.pdm_actMValue, l_hdl.pdm_name);
return (l_hdl.pdm_actMValue);
};
};
final class UnXMLTAGwriter implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
if (xClass == null)
{
l_hdl.pdm_actMValue.pcmf_setWriter((IMoWriter) KeRegisteredObject.pcmf_getObjByName(xObj));
}
else
l_hdl.pdm_actMValue.pcmf_setWriter((IMoWriter) Class.forName(xClass).newInstance());
l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue, l_hdl.pdm_actMValue, l_hdl.pdm_name);
return (l_hdl.pdm_actMValue);
};
};
final class UnXMLTAGappInit implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClass = KeTools.pcmf_deRef(attributes.getValue("class"));
String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
try
{
if (xClass == null)
l_hdl.pdm_appl.pcmf_setInitFct((IKeExecutable) KeRegisteredObject.pcmf_getObjByName(xObj));
else
{
Object l_obj = null;
l_obj = Class.forName(xClass).newInstance();
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
KeRegisteredObject.pcmf_register(xReg, l_obj);
l_hdl.pdm_appl.pcmf_setInitFct((IKeExecutable) l_obj);
}
}
catch (Throwable e)
{
KeLog.pcmf_log("ug2t", "<appInit> no valid application Init class or object specified", this, KeLog.ERROR);
}
l_hdl.pdm_elements.push(l_hdl.pdm_act);
l_hdl.pdm_names.push(l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGtreeLoader implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClassModel = KeTools.pcmf_deRef(attributes.getValue("modelClass"));
String xClassRenderer = KeTools.pcmf_deRef(attributes.getValue("rendererClass"));
String xObjRenderer = KeTools.pcmf_deRef(attributes.getValue("rendererObject"));
String xPostFctClass = KeTools.pcmf_deRef(attributes.getValue("postFctClass"));
String xPostFctObject = KeTools.pcmf_deRef(attributes.getValue("postFctObject"));
TreeModel l_model = null;
if (xClassModel != null)
l_model = (TreeModel) Class.forName(xClassModel).newInstance();
IUnTreeItemRenderer l_renderer = null;
if (xClassRenderer != null)
l_renderer = (IUnTreeItemRenderer) Class.forName(xClassRenderer).newInstance();
else if (xObjRenderer != null)
l_renderer = (IUnTreeItemRenderer) KeRegisteredObject.pcmf_getObjByName(xObjRenderer);
UnTreeViewLoader l_loader = new UnTreeViewLoader(l_model, (IUnTreeView) l_hdl.pdm_act, l_renderer);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_loader.pcmf_reRegister(xReg);
if (xPostFctClass != null || xPostFctObject != null)
{
IKeExecutable l_exec = null;
if (xPostFctClass != null)
l_exec = (IKeExecutable) Class.forName(xPostFctClass).newInstance();
else if (xPostFctObject != null)
l_exec = (IKeExecutable) KeRegisteredObject.pcmf_getObjByName(xPostFctObject);
l_loader.pcmf_setPostFct(l_exec);
}
l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act, l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGlistLoader implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClassModel = KeTools.pcmf_deRef(attributes.getValue("modelClass"));
String xClassRenderer = KeTools.pcmf_deRef(attributes.getValue("rendererClass"));
String xObjRenderer = KeTools.pcmf_deRef(attributes.getValue("rendererObject"));
String xPostFctClass = KeTools.pcmf_deRef(attributes.getValue("postFctClass"));
String xPostFctObject = KeTools.pcmf_deRef(attributes.getValue("postFctObject"));
ListModel l_model = null;
if (xClassModel != null)
l_model = (ListModel) Class.forName(xClassModel).newInstance();
IUnListItemRenderer l_renderer = null;
if (xClassRenderer != null)
l_renderer = (IUnListItemRenderer) Class.forName(xClassRenderer).newInstance();
else if (xObjRenderer != null)
l_renderer = (IUnListItemRenderer) KeRegisteredObject.pcmf_getObjByName(xObjRenderer);
UnListLoader l_loader = new UnListLoader(l_model, (IUnListComponent) l_hdl.pdm_act, l_renderer);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_loader.pcmf_reRegister(xReg);
if (xPostFctClass != null || xPostFctObject != null)
{
IKeExecutable l_exec = null;
if (xPostFctClass != null)
l_exec = (IKeExecutable) Class.forName(xPostFctClass).newInstance();
else if (xPostFctObject != null)
l_exec = (IKeExecutable) KeRegisteredObject.pcmf_getObjByName(xPostFctObject);
l_loader.pcmf_setPostFct(l_exec);
}
l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act, l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
final class UnXMLTAGtableLoader implements IUnSAXAppFactHandler
{
public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl, String qName, Attributes attributes) throws Exception
{
String xClassModel = KeTools.pcmf_deRef(attributes.getValue("modelClass"));
String xClassRenderer = KeTools.pcmf_deRef(attributes.getValue("rendererClass"));
String xObjRenderer = KeTools.pcmf_deRef(attributes.getValue("rendererObject"));
String xPostFctClass = KeTools.pcmf_deRef(attributes.getValue("postFctClass"));
String xPostFctObject = KeTools.pcmf_deRef(attributes.getValue("postFctObject"));
TableModel l_model = null;
if (xClassModel != null)
l_model = (TableModel) Class.forName(xClassModel).newInstance();
IUnTableItemRenderer l_renderer = null;
if (xClassRenderer != null)
l_renderer = (IUnTableItemRenderer) Class.forName(xClassRenderer).newInstance();
else if (xObjRenderer != null)
l_renderer = (IUnTableItemRenderer) KeRegisteredObject.pcmf_getObjByName(xObjRenderer);
UnTableLoader l_loader = new UnTableLoader(l_model, (IUnTable) l_hdl.pdm_act, l_renderer);
String xReg = KeTools.pcmf_deRef(attributes.getValue("register"));
if (xReg != null && xReg.equals("") == false)
l_loader.pcmf_reRegister(xReg);
if (xPostFctClass != null || xPostFctObject != null)
{
IKeExecutable l_exec = null;
if (xPostFctClass != null)
l_exec = (IKeExecutable) Class.forName(xPostFctClass).newInstance();
else if (xPostFctObject != null)
l_exec = (IKeExecutable) KeRegisteredObject.pcmf_getObjByName(xPostFctObject);
l_loader.pcmf_setPostFct(l_exec);
}
l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act, l_hdl.pdm_name);
return (l_hdl.pdm_act);
};
};
// =============================================
/**
* @author Dirk
*
* date: 15.03.2004 project: WiSer-Framework
*
* <p>
* UnApplicationFactory covers all routines to parse an application's
* XML-description
* </p>
*/
public final class UnApplicationFactory implements IKeProducer
{
private XMLReader pem_xmlReader = new Piccolo();
static private UnApplFactSAXHandler pem_staticHandler = new UnApplFactSAXHandler();
private UnApplFactSAXHandler pem_handler = UnApplicationFactory.pem_staticHandler;
private ArrayList pem_parseCacheSwing = null;
private ArrayList pem_parseCacheHTML = null;
private boolean pem_cachedRun = false;
private boolean pem_cacheRun = false;
private String pem_source = null;
private UnComponentFactory pem_objFact = null;
private IHoSession pem_session = null;
protected InputSource pem_mySource = null;
private boolean pem_useCache = true;
private boolean pem_clearCache = false;
private boolean pem_clearStatics = false;
static private boolean pem_standAlone = false;
protected void pdmf_clearCache()
{
this.pem_clearCache = true;
}
protected void pdmf_clearStatics()
{
this.pem_clearStatics = true;
}
protected void pdmf_beginSource(String xSource)
{
try
{
AttributesImpl l_attr = new AttributesImpl();
l_attr.addAttribute(null, null, "value", "", xSource);
this.pem_handler.startElement("", "INT_SCF", "INT_SCF", l_attr);
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error switching to source: " + xSource, this, KeLog.ERROR);
}
}
protected void pdmf_endSource()
{
try
{
this.pem_handler.endElement("", "INT_SCF", "INT_SCF");
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "error ending source", this, KeLog.ERROR);
}
}
public void pcmf_useNonStaticHandler(boolean xUse)
{
if (xUse)
this.pem_handler = new UnApplFactSAXHandler();
else
this.pem_handler = UnApplicationFactory.pem_staticHandler;
pem_xmlReader.setContentHandler(pem_handler);
}
public static boolean pcmf_isStandAlone()
{
return (pem_standAlone);
}
public static void pcmf_setStandAloneMode(boolean xMode)
{
pem_standAlone = xMode;
if (pem_standAlone)
{
KeLog.pcmf_log("ug2t", "startup in STAND-ALONE mode", null, KeLog.MESSAGE);
}
else
KeLog.pcmf_log("ug2t", "startup in C/S mode", null, KeLog.MESSAGE);
}
public void pcmf_setTerminateOnError(boolean xTerm)
{
this.pem_handler.pcmf_setTerminateOnError(xTerm);
}
protected final class UnInThreadProducer1 extends KeNameSpaceThread
{
private Object pem_obj = null;
private String pem_threadName = null;
private Object pem_res = null;
private IHoSession pem_session = null;
public UnInThreadProducer1(Object xParamter, String xThreadName, IHoSession xSess)
{
super(xThreadName);
this.pem_obj = xParamter;
this.pem_threadName = xThreadName;
KeRegisteredObject.pcmf_deleteContext(xThreadName);
this.pem_session = xSess;
};
public void run()
{
try
{
KeRegisteredObject.pcmf_register(IHoSession.SESSION_NAME, pem_session);
this.pem_res = UnApplicationFactory.this.pcmf_produce(this.pem_obj);
}
catch (Exception e)
{
KeLog.pcmf_logException("ug2t", this, e);
}
}
public String pcmf_getName()
{
return (this.pem_threadName);
}
public Object pcmf_getObj()
{
try
{
while (this.isAlive())
{
if (pem_session != null && Thread.holdsLock(this.pem_session))
this.pem_session.wait(100);
else
Thread.sleep(100);
}
}
catch (Exception e)
{
KeLog.pcmf_logException("ug2t", this, e);
}
return (this.pem_res);
}
}
protected final class UnInThreadProducer2 extends KeNameSpaceThread
{
private Object pem_obj = null;
private String pem_threadName = null;
private Object pem_res = null;
private KeTreeNode pem_root = null;
private IUnApplication pem_appl = null;
private int pem_type = 0;
private IHoSession pem_session = null;
public UnInThreadProducer2(int xType, Object xParamter, KeTreeNode xRoot, IUnApplication xAppl, String xThreadName, IHoSession xSess)
{
super(xThreadName);
this.pem_obj = xParamter;
this.pem_threadName = xThreadName;
KeRegisteredObject.pcmf_deleteContext(xThreadName);
this.pem_type = xType;
this.pem_appl = xAppl;
this.pem_root = xRoot;
this.pem_session = xSess;
};
public void run()
{
try
{
if (this.pem_type == UnComponentFactory.HALFOBJECT)
KeRegisteredObject.pcmf_register(IHoSession.SESSION_NAME, pem_session);
synchronized (pem_root)
{
this.pem_res = UnApplicationFactory.this.pcmf_produceFromString(pem_type, pem_obj, pem_root, pem_appl);
}
}
catch (Exception e)
{
KeLog.pcmf_logException("ug2t", this, e);
}
}
public String pcmf_getName()
{
return (this.pem_threadName);
}
public Object pcmf_getObj()
{
try
{
while (this.isAlive())
{
if (pem_session != null && Thread.holdsLock(this.pem_session))
this.pem_session.wait(100);
else
Thread.sleep(100);
}
}
catch (Exception e)
{
KeLog.pcmf_logException("ug2t", this, e);
}
return (this.pem_res);
}
}
public UnApplicationFactory(String xSource, UnComponentFactory xObjFact)
{
pem_xmlReader.setContentHandler(pem_handler);
this.pem_source = xSource;
this.pem_objFact = xObjFact;
this.pem_session = (IHoSession) KeRegisteredObject.pcmf_getObjByName(IHoSession.SESSION_NAME);
return;
};
public UnApplicationFactory(String xSource, UnApplFactSAXHandler xHandler)
{
pem_xmlReader.setContentHandler(xHandler);
this.pem_source = xSource;
this.pem_objFact = xHandler.pdm_objFact;
this.pem_session = (IHoSession) KeRegisteredObject.pcmf_getObjByName(IHoSession.SESSION_NAME);
return;
};
public UnApplicationFactory(String xSource, UnComponentFactory xObjFact, boolean xUseCache)
{
pem_xmlReader.setContentHandler(pem_handler);
this.pem_source = xSource;
this.pem_objFact = xObjFact;
this.pem_session = (IHoSession) KeRegisteredObject.pcmf_getObjByName(IHoSession.SESSION_NAME);
this.pem_useCache = xUseCache;
return;
};
protected final void pcmf_parseRecursiv() throws Exception
{
synchronized (pem_handler)
{
pem_xmlReader.parse(KeEnvironment.pcmf_buildPath(this.pem_source));
};
return;
};
// @@
public final Object pcmf_produce(Object xParamter) throws Exception
{
Object l_res = null;
synchronized (pem_handler)
{
try
{
int l_type = ((Integer) xParamter).intValue();
// @@
this.pem_session = (IHoSession) KeRegisteredObject.pcmf_getObjByName(IHoSession.SESSION_NAME);
// @@
if (l_type == UnComponentFactory.MARKUP)
{
MuGenericTemplateKit l_myKit = (MuGenericTemplateKit) KeRegisteredObject.pcmf_getObjByName(MuGenericTemplateKit.TEMPLATE_KIT_NAME);
if (l_myKit == null)
{
this.pem_objFact.pcmf_resetPluginStatics();
pem_handler.pcmf_init(l_type, this.pem_objFact, this);
}
else
{
l_myKit.getPem_fact().pcmf_resetPluginStatics();
pem_handler.pcmf_init(l_type, l_myKit.getPem_fact(), this);
}
}
else
{
this.pem_objFact.pcmf_resetPluginStatics();
pem_handler.pcmf_init(l_type, this.pem_objFact, this);
}
this.pem_mySource = new InputSource("file:" + KeEnvironment.pcmf_buildPath(this.pem_source));
this.pem_mySource.setEncoding(KeEnvironment.pcmf_getCharacterSet());
if (this.pem_parseCacheHTML == null && this.pem_handler.pdm_AppType == UnComponentFactory.MARKUP)
{
// @@
KeLog.pcmf_log("ug2t", "produce web application from scratch (parse configuration nodes from file)", this, KeLog.MESSAGE);
// @@
pem_xmlReader.parse(this.pem_mySource);
// @@
}
else if (this.pem_parseCacheSwing == null
&& (this.pem_handler.pdm_AppType == UnComponentFactory.HALFOBJECT || this.pem_handler.pdm_AppType == UnComponentFactory.MIXED))
{
// @@
KeLog.pcmf_log("ug2t", "produce swing application from scratch (parse configuration nodes from file)", this, KeLog.MESSAGE);
// @@
pem_xmlReader.parse(this.pem_mySource);
// @
}
else
{
// @@
}
l_res = pem_handler.pcmf_getAppl();
// @@
IUnApplication l_appl = this.pem_handler.pcmf_getAppl();
if (l_appl != null)
{
final UnComponent l_active = l_appl.pcmf_getActive();
if (l_active != null)
this.pem_handler.pcmf_getAppl().pcmf_setActive(l_active.pcmf_getName());
}
}
catch (SAXParseException se)
{
KeLog.pcmf_log("ug2t", "SAX parser Exception at [line: " + se.getLineNumber() + "] [col: " + se.getColumnNumber() + "] [file: "
+ KeEnvironment.pcmf_buildPath(this.pem_source) + "]", this, KeLog.FATAL);
// @@
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "unexpected exception during XML parsing", this, KeLog.FATAL);
// @@
pem_handler.pcmf_exit();
throw (e);
}
pem_handler.pcmf_exit();
return (l_res);
}
};
public final IUnPage pcmf_produceHtmlPage(int xType, String xTitle, String xFile, IUnApplication xAppl) throws Exception
{
KeTreeNode l_pnode = new KeTreeNode();
l_pnode.pcmf_setEarlyAutoDelete(true);
String l_pageDef = "<htmlPage orphan='true' active='false' name='" + xTitle + "' scroll='false' layout='true' external='true' htmlTpl='" + xFile + "'/>";
Object l_res = this.pcmf_produceFromString(xType, l_pageDef, l_pnode, xAppl);
return ((IUnPage) l_res);
}
public final IUnForm pcmf_produceHtmlForm(int xType, String xName, boolean xScroll, String xFile, IUnApplication xAppl) throws Exception
{
KeTreeNode l_pnode = new KeTreeNode();
l_pnode.pcmf_setEarlyAutoDelete(true);
String l_pageDef = "<htmlForm orphan='true' name='" + xName + "' scroll='" + (xScroll ? "true" : "false") + "' layout='true' external='true' htmlTpl='"
+ xFile + "'/>";
Object l_res = this.pcmf_produceFromString(xType, l_pageDef, l_pnode, xAppl);
return ((IUnForm) l_res);
}
public final void pcmf_produceHtmlGui(int xType, String xFile, UnComponent xParent, IUnApplication xAppl) throws Exception
{
String l_pageDef = "<htmlGui external='true' htmlTpl='" + xFile + "'/>";
this.pcmf_produceFromString(xType, l_pageDef, xParent, xAppl);
return;
}
public final Object pcmf_produceFromString(int xType, Object xParamter, KeTreeNode xRoot, IUnApplication xAppl) throws Exception
{
Object l_res = null;
synchronized (pem_handler)
{
try
{
this.pem_session = (IHoSession) KeRegisteredObject.pcmf_getObjByName(IHoSession.SESSION_NAME);
// @@
if (xType == UnComponentFactory.MARKUP)
{
MuGenericTemplateKit l_myKit = (MuGenericTemplateKit) KeRegisteredObject.pcmf_getObjByName(MuGenericTemplateKit.TEMPLATE_KIT_NAME);
if (l_myKit == null)
pem_handler.pcmf_init(xType, this.pem_objFact, xAppl, xRoot, this);
else
pem_handler.pcmf_init(xType, l_myKit.getPem_fact(), xAppl, xRoot, this);
}
else
pem_handler.pcmf_init(xType, this.pem_objFact, xAppl, xRoot, this);
ByteArrayInputStream l_sourcestream = new ByteArrayInputStream(xParamter.toString().getBytes());
this.pem_mySource = new InputSource(l_sourcestream);
this.pem_mySource.setEncoding(KeEnvironment.pcmf_getCharacterSet());
pem_xmlReader.parse(this.pem_mySource);
l_sourcestream.close();
l_res = xRoot;
// @@
// Aktive Seite nochmal setzten, damit alle Menues etc komplett
// aufgebaut
// sind
IUnApplication l_appl = this.pem_handler.pcmf_getAppl();
if (l_appl != null)
{
final UnComponent l_active = l_appl.pcmf_getActive();
if (l_active != null)
this.pem_handler.pcmf_getAppl().pcmf_setActive(l_active.pcmf_getName());
}
}
catch (SAXParseException se)
{
KeLog.pcmf_log("ug2t", "SAX parser Exception at [line: " + se.getLineNumber() + "] [col: " + se.getColumnNumber() + "] [String:\n"
+ xParamter.toString() + "\n]", this, KeLog.FATAL);
// @@
pem_handler.pcmf_exit();
throw (se);
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "unexpected exception during XML parsing", this, KeLog.FATAL);
// @@
pem_handler.pcmf_exit();
throw (e);
}
pem_handler.pcmf_exit();
return (l_res);
}
};
public final Object pcmf_produceWidgetsFromFile(int xType, String xFile, IUnApplication xAppl) throws Exception
{
Object l_res = null;
KeTreeNode l_node = new KeTreeNode("", null);
l_node.pcmf_setEarlyAutoDelete(true);
synchronized (pem_handler)
{
try
{
this.pem_session = (IHoSession) KeRegisteredObject.pcmf_getObjByName(IHoSession.SESSION_NAME);
// @@
if (xType == UnComponentFactory.MARKUP)
{
MuGenericTemplateKit l_myKit = (MuGenericTemplateKit) KeRegisteredObject.pcmf_getObjByName(MuGenericTemplateKit.TEMPLATE_KIT_NAME);
if (l_myKit == null)
pem_handler.pcmf_init(xType, this.pem_objFact, xAppl, l_node, this);
else
pem_handler.pcmf_init(xType, l_myKit.getPem_fact(), xAppl, l_node, this);
}
else
pem_handler.pcmf_init(xType, this.pem_objFact, xAppl, l_node, this);
if (xFile == null)
this.pem_mySource = new InputSource("file:" + KeEnvironment.pcmf_buildPath(this.pem_source));
else
this.pem_mySource = new InputSource("file:" + KeEnvironment.pcmf_buildPath(xFile));
this.pem_mySource.setEncoding(KeEnvironment.pcmf_getCharacterSet());
pem_xmlReader.parse(this.pem_mySource);
l_res = l_node.pcmf_getElementAt(0);
l_node.pcmf_removeNode((KeTreeNode) l_res);
// @@
// Aktive Seite nochmal setzten, damit alle Menues etc komplett
// aufgebaut
// sind
IUnApplication l_appl = this.pem_handler.pcmf_getAppl();
if (l_appl != null)
{
final UnComponent l_active = l_appl.pcmf_getActive();
if (l_active != null)
this.pem_handler.pcmf_getAppl().pcmf_setActive(l_active.pcmf_getName());
}
}
catch (SAXParseException se)
{
KeLog.pcmf_log("ug2t", "SAX parser Exception at [line: " + se.getLineNumber() + "] [col: " + se.getColumnNumber() + "] [file: "
+ KeEnvironment.pcmf_buildPath(this.pem_source) + "]", this, KeLog.FATAL);
// @@
pem_handler.pcmf_exit();
throw (se);
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "unexpected exception during XML parsing", this, KeLog.FATAL);
// @@
pem_handler.pcmf_exit();
throw (e);
}
pem_handler.pcmf_exit();
return (l_res);
}
};
public final Object pcmf_produceWidgetsFromString(int xType, String xString, IUnApplication xAppl) throws Exception
{
Object l_res = null;
KeTreeNode l_node = new KeTreeNode("", null);
l_node.pcmf_setEarlyAutoDelete(true);
synchronized (pem_handler)
{
try
{
this.pem_session = (IHoSession) KeRegisteredObject.pcmf_getObjByName(IHoSession.SESSION_NAME);
// @@
if (xType == UnComponentFactory.MARKUP)
{
MuGenericTemplateKit l_myKit = (MuGenericTemplateKit) KeRegisteredObject.pcmf_getObjByName(MuGenericTemplateKit.TEMPLATE_KIT_NAME);
if (l_myKit == null)
pem_handler.pcmf_init(xType, this.pem_objFact, xAppl, l_node, this);
else
pem_handler.pcmf_init(xType, l_myKit.getPem_fact(), xAppl, l_node, this);
}
else
pem_handler.pcmf_init(xType, this.pem_objFact, xAppl, l_node, this);
ByteArrayInputStream l_sourcestream = new ByteArrayInputStream(xString.getBytes());
this.pem_mySource = new InputSource(l_sourcestream);
this.pem_mySource.setEncoding(KeEnvironment.pcmf_getCharacterSet());
pem_xmlReader.parse(this.pem_mySource);
l_sourcestream.close();
l_res = l_node.pcmf_getElementAt(0);
l_node.pcmf_removeNode((KeTreeNode) l_res);
// @@
// Aktive Seite nochmal setzten, damit alle Menues etc komplett
// aufgebaut
// sind
IUnApplication l_appl = this.pem_handler.pcmf_getAppl();
if (l_appl != null)
{
final UnComponent l_active = l_appl.pcmf_getActive();
if (l_active != null)
this.pem_handler.pcmf_getAppl().pcmf_setActive(l_active.pcmf_getName());
}
}
catch (SAXParseException se)
{
KeLog.pcmf_log("ug2t", "SAX parser Exception at [line: " + se.getLineNumber() + "] [col: " + se.getColumnNumber() + "] [String:\n" + xString + "\n]",
this, KeLog.FATAL);
// @@
pem_handler.pcmf_exit();
throw (se);
}
catch (Exception e)
{
KeLog.pcmf_log("ug2t", "unexpected exception during XML parsing", this, KeLog.FATAL);
// @@
pem_handler.pcmf_exit();
throw (e);
}
pem_handler.pcmf_exit();
return (l_res);
}
};
public final Object pcmf_produceInOwnThread(Object xParamter, String xThreadName)
{
UnInThreadProducer1 l_th = new UnInThreadProducer1(xParamter, xThreadName, this.pem_session);
l_th.start();
return (l_th.pcmf_getObj());
};
public final Object pcmf_produceFromStringInOwnThread(int xType, Object xParamter, KeTreeNode xRoot, IUnApplication xAppl, String xThreadName)
{
UnInThreadProducer2 l_th = new UnInThreadProducer2(xType, xParamter, xRoot, xAppl, xThreadName, this.pem_session);
l_th.start();
return (l_th.pcmf_getObj());
};
}
|