00001: // @@
00002: // @@
00003: /*
00004: * Wi.Ser Framework
00005: *
00006: * Version: 1.8.1, 20-September-2007
00007: * Copyright (C) 2005 Dirk von der Weiden <dvdw@imail.de>
00008: *
00009: * This library is free software; you can redistribute it and/or
00010: * modify it under the terms of the GNU Lesser General Public
00011: * License as published by the Free Software Foundation; either
00012: * version 2 of the License, or (at your option) any later version.
00013: *
00014: * This library is distributed in the hope that it will be useful,
00015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00017: * Lesser General Public License for more details.
00018: *
00019: * You should have received a copy of the GNU Lesser General Public
00020: * License along with this library located in LGPL.txt in the
00021: * license directory; if not, write to the
00022: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00023: * Boston, MA 02111-1307, USA.
00024: *
00025: * If this agreement does not cover your requirements, please contact us
00026: * via email to get detailed information about the commercial license
00027: * or our service offerings!
00028: *
00029: */
00030: // @@
00031: package de.ug2t.unifiedGui;
00032:
00033: import java.awt.*;
00034: import java.io.*;
00035: import java.util.*;
00036: import java.util.regex.*;
00037:
00038: import javax.servlet.*;
00039: import javax.swing.*;
00040: import javax.swing.table.*;
00041: import javax.swing.text.*;
00042: import javax.swing.text.html.*;
00043: import javax.swing.text.html.HTML.*;
00044: import javax.swing.text.html.HTMLEditorKit.*;
00045: import javax.swing.tree.*;
00046:
00047: import org.xml.sax.*;
00048: import org.xml.sax.helpers.*;
00049:
00050: import com.bluecast.xml.*;
00051:
00052: import de.ug2t.channel.ho.*;
00053: import de.ug2t.channel.ho.server.generic.*;
00054: import de.ug2t.channel.ho.session.*;
00055: import de.ug2t.channel.markup.generic.*;
00056: import de.ug2t.connector.*;
00057: import de.ug2t.kernel.*;
00058: import de.ug2t.model.*;
00059: import de.ug2t.model.persistence.*;
00060: import de.ug2t.model.values.*;
00061: import de.ug2t.unifiedGui.cellRenderer.*;
00062: import de.ug2t.unifiedGui.interfaces.*;
00063: import de.ug2t.unifiedGui.listener.*;
00064: import de.ug2t.unifiedGui.loader.*;
00065: import de.ug2t.unifiedGui.plugins.*;
00066: import de.ug2t.unifiedGui.scripting.*;
00067: import de.ug2t.unifiedGui.service.*;
00068: import de.ug2t.unifiedGui.transformer.*;
00069: import de.ug2t.unifiedGui.validator.*;
00070: import de.ug2t.unifiedGui.views.*;
00071: import de.ug2t.xmlScript.*;
00072:
00073: // Html parser
00074: final class UnHtmlEditorKit extends HTMLEditorKit {
00075: public Parser pcmf_getHtmlParser() {
00076: return (this .getParser());
00077: }
00078: }
00079:
00080: final class UnHtmlCssStyles {
00081: private String pem_style = null;
00082:
00083: private String pem_background = null;
00084: private String pem_foreground = null;
00085: private String pem_width = null;
00086: private String pem_height = null;
00087: private String pem_sl_top = null;
00088: private String pem_sl_left = null;
00089: private String pem_sl_width = null;
00090: private String pem_sl_height = null;
00091: private String pem_valign = null;
00092: private String pem_halign = null;
00093: private String pem_font = null;
00094: private String pem_fontSize = null;
00095: private String pem_fontWeight = null;
00096: private String pem_border = null;
00097: private String pem_borderWidth = null;
00098: private String pem_borderColor = null;
00099: private String pem_visibility = null;
00100: private String pem_sfill_x = null;
00101: private String pem_sfill_y = null;
00102: private String pem_sweight_x = null;
00103: private String pem_sweight_y = null;
00104: private String pem_scroll = null;
00105: private String pem_s_layout = null;
00106: private String pem_delDefCol = null;
00107: private String pem_padding = null;
00108: private String pem_margin = null;
00109: private String pem_borderT = null;
00110: private String pem_borderB = null;
00111: private String pem_borderL = null;
00112: private String pem_borderR = null;
00113:
00114: protected String pdmf_convertAlign(String xHAlign, String xVAlign) {
00115: if (xHAlign == null)
00116: xHAlign = "center";
00117: if (xVAlign == null)
00118: xVAlign = "middle";
00119:
00120: if (xHAlign.equalsIgnoreCase("left")) {
00121: if (xVAlign.equalsIgnoreCase("top"))
00122: return ("NORTHWEST");
00123: else if (xVAlign.equalsIgnoreCase("middle"))
00124: return ("WEST");
00125: else if (xVAlign.equalsIgnoreCase("bottom"))
00126: return ("SOUTHWEST");
00127: } else if (xHAlign.equalsIgnoreCase("right")) {
00128: if (xVAlign.equalsIgnoreCase("top"))
00129: return ("NORTHEAST");
00130: else if (xVAlign.equalsIgnoreCase("middle"))
00131: return ("EAST");
00132: else if (xVAlign.equalsIgnoreCase("bottom"))
00133: return ("SOUTHEAST");
00134: } else if (xHAlign.equalsIgnoreCase("center")) {
00135: if (xVAlign.equalsIgnoreCase("top"))
00136: return ("NORTH");
00137: else if (xVAlign.equalsIgnoreCase("middle"))
00138: return ("CENTER");
00139: else if (xVAlign.equalsIgnoreCase("bottom"))
00140: return ("SOUTH");
00141: }
00142:
00143: return ("CENTER");
00144: }
00145:
00146: /**
00147: * @return Returns the align.
00148: */
00149: public String pcmf_getAlign() {
00150: return (this
00151: .pdmf_convertAlign(this .pem_halign, this .pem_valign));
00152: }
00153:
00154: /**
00155: * @return Returns the background.
00156: */
00157: public String pcmf_getBackground() {
00158: return pem_background;
00159: }
00160:
00161: /**
00162: * @return Returns the margin.
00163: */
00164: public String pcmf_getMargin() {
00165: return pem_margin;
00166: }
00167:
00168: /**
00169: * @return Returns the padding.
00170: */
00171: public String pcmf_getPadding() {
00172: return pem_padding;
00173: }
00174:
00175: /**
00176: * @return Returns the right border.
00177: */
00178: public String pcmf_getBorderR() {
00179: return pem_borderR;
00180: }
00181:
00182: /**
00183: * @return Returns the bottom border.
00184: */
00185: public String pcmf_getBorderB() {
00186: return pem_borderB;
00187: }
00188:
00189: /**
00190: * @return Returns the left border.
00191: */
00192: public String pcmf_getBorderL() {
00193: return pem_borderL;
00194: }
00195:
00196: /**
00197: * @return Returns the top border.
00198: */
00199: public String pcmf_getBorderT() {
00200: return pem_borderT;
00201: }
00202:
00203: /**
00204: * @return Returns the visibility.
00205: */
00206: public String pcmf_getVisibility() {
00207: return this .pem_visibility;
00208: }
00209:
00210: /**
00211: * @return Returns the font.
00212: */
00213: public String pcmf_getFont() {
00214: return pem_font;
00215: }
00216:
00217: /**
00218: * @return Returns the fontSize.
00219: */
00220: public String pcmf_getFontSize() {
00221: return pem_fontSize;
00222: }
00223:
00224: /**
00225: * @return Returns the fontWeight.
00226: */
00227: public String pcmf_getFontWeight() {
00228: return pem_fontWeight;
00229: }
00230:
00231: /**
00232: * @return Returns the foreground.
00233: */
00234: public String pcmf_getForeground() {
00235: return pem_foreground;
00236: }
00237:
00238: /**
00239: * @return Returns the height.
00240: */
00241: public String pcmf_getHeight() {
00242: return pem_height;
00243: }
00244:
00245: /**
00246: * @return Returns the sl_left.
00247: */
00248: public String pcmf_getSl_left() {
00249: return pem_sl_left;
00250: }
00251:
00252: /**
00253: * @return Returns the s_layout.
00254: */
00255: public String pcmf_getS_layout() {
00256: return pem_s_layout;
00257: }
00258:
00259: /**
00260: * @return Returns the sl_top.
00261: */
00262: public String pcmf_getSl_top() {
00263: return pem_sl_top;
00264: }
00265:
00266: /**
00267: * @return Returns the sl_width.
00268: */
00269: public String pcmf_getSl_width() {
00270: return pem_sl_width;
00271: }
00272:
00273: /**
00274: * @return Returns the sl_height.
00275: */
00276: public String pcmf_getSl_height() {
00277: return pem_sl_height;
00278: }
00279:
00280: /**
00281: * @return Returns the width.
00282: */
00283: public String pcmf_getWidth() {
00284: return pem_width;
00285: }
00286:
00287: /**
00288: * @return Returns the border.
00289: */
00290: public String pcmf_getBorder() {
00291: return pem_border;
00292: }
00293:
00294: /**
00295: * @return Returns the border width.
00296: */
00297: public String pcmf_getBorderWidth() {
00298: return pem_borderWidth;
00299: }
00300:
00301: /**
00302: * @return Returns the border color.
00303: */
00304: public String pcmf_getBorderColor() {
00305: return pem_borderColor;
00306: }
00307:
00308: /**
00309: * @return Returns the fill x direction.
00310: */
00311: public String pcmf_getSFill_x() {
00312: return (this .pem_sfill_x);
00313: }
00314:
00315: /**
00316: * @return Returns the fill y direction.
00317: */
00318: public String pcmf_getSFill_y() {
00319: return (this .pem_sfill_y);
00320: }
00321:
00322: /**
00323: * @return Returns the weights x direction.
00324: */
00325: public String pcmf_getSWeight_x() {
00326: return (this .pem_sweight_x);
00327: }
00328:
00329: /**
00330: * @return Returns the weights y direction.
00331: */
00332: public String pcmf_getSWeight_y() {
00333: return (this .pem_sweight_y);
00334: }
00335:
00336: public boolean pcmf_getDelDefCol() {
00337: if (this .pem_delDefCol != null
00338: && this .pem_delDefCol.equalsIgnoreCase("true"))
00339: return (true);
00340: else
00341: return (false);
00342: }
00343:
00344: public String pcmf_getScroll() {
00345: if (this .pem_scroll != null
00346: && (this .pem_scroll.equalsIgnoreCase("auto") || this .pem_scroll
00347: .equalsIgnoreCase("scroll")))
00348: return ("true");
00349: else
00350: return ("false");
00351: }
00352:
00353: public UnHtmlCssStyles(String xStyle) {
00354: if (xStyle == null)
00355: return;
00356:
00357: this .pem_style = KeTools.pcmf_stringSubst(xStyle, "px", "");
00358: this .pem_style = this .pem_style.toUpperCase();
00359:
00360: this .pem_width = this .pdmf_getValue("width");
00361: this .pem_height = this .pdmf_getValue("height");
00362:
00363: this .pem_sl_left = this .pdmf_getValue("swingGridX");
00364: this .pem_sl_top = this .pdmf_getValue("swingGridY");
00365: this .pem_sl_width = this .pdmf_getValue("swingGridWidth");
00366: this .pem_sl_height = this .pdmf_getValue("swingGridHeight");
00367: this .pem_sfill_x = this .pdmf_getValue("swingFillX");
00368: this .pem_sfill_y = this .pdmf_getValue("swingFillY");
00369: this .pem_sweight_x = this .pdmf_getValue("swingWeightX");
00370: this .pem_sweight_y = this .pdmf_getValue("swingWeightY");
00371:
00372: this .pem_background = this .pdmf_getValue("background-color");
00373: this .pem_foreground = this .pdmf_getValue("color");
00374: this .pem_valign = this .pdmf_getValue("vertical-align");
00375: this .pem_halign = this .pdmf_getValue("text-align");
00376: this .pem_font = this .pdmf_getValue("font-familiy");
00377: this .pem_fontSize = this .pdmf_getValue("font-size");
00378: this .pem_fontWeight = this .pdmf_getValue("font-weight");
00379:
00380: this .pem_border = this .pdmf_getValue("border");
00381: this .pem_borderWidth = this .pdmf_getValue("border-width");
00382: this .pem_borderColor = this .pdmf_getValue("border-color");
00383:
00384: this .pem_visibility = this .pdmf_getValue("visibility");
00385: this .pem_scroll = this .pdmf_getValue("overflow");
00386: this .pem_s_layout = this .pdmf_getValue("swingLayout");
00387: this .pem_delDefCol = this .pdmf_getValue("useCssColor");
00388:
00389: this .pem_padding = this .pdmf_getValue("padding");
00390: this .pem_margin = this .pdmf_getValue("margin");
00391: this .pem_borderT = this .pdmf_getValue("border-top");
00392: this .pem_borderB = this .pdmf_getValue("border-bottom");
00393: this .pem_borderL = this .pdmf_getValue("border-left");
00394: this .pem_borderR = this .pdmf_getValue("border-right");
00395: }
00396:
00397: protected String pdmf_getValue(String xKey) {
00398: String l_key = xKey.toUpperCase();
00399:
00400: int l_begin = this .pem_style.indexOf(l_key);
00401: if (l_begin != 0) {
00402: xKey = " " + l_key;
00403:
00404: l_begin = this .pem_style.indexOf(xKey);
00405: if (l_begin == -1) {
00406: xKey = ";" + l_key;
00407: l_begin = this .pem_style.indexOf(xKey);
00408: if (l_begin == -1)
00409: return (null);
00410: }
00411: }
00412: int l_end = this .pem_style.indexOf(";", l_begin + 1);
00413: if (l_end == -1)
00414: l_end = this .pem_style.length();
00415:
00416: String l_match = this .pem_style.substring(l_begin);
00417: l_match = l_match.substring(0, l_match.indexOf(":"));
00418:
00419: if (l_match.trim().equalsIgnoreCase(xKey.trim()) == false)
00420: return (null);
00421:
00422: String l_style = this .pem_style.substring(l_begin + 1, l_end);
00423: l_begin = l_style.indexOf(":");
00424: l_style = l_style.substring(l_begin + 1, l_style.length());
00425:
00426: return (l_style);
00427: }
00428: }
00429:
00430: final class UnHtmlParserCallback extends ParserCallback {
00431: final class UnHtmlTagStackElement {
00432: public Tag pcm_current = null;
00433: public int pcm_startPos = 0;
00434: public AttributeSet pcm_attributes = null;
00435: public boolean pcm_inRecursion = false;
00436: }
00437:
00438: private String pem_lastText = "";
00439: private boolean pem_inRecursion = false;
00440: private String pem_html = null;
00441: private int pem_prevPos = 0;
00442:
00443: private int pem_bodyStart = 0;
00444: private int pem_bodyEnd = 0;
00445:
00446: private Tag pem_current = null;
00447: private AttributeSet pem_currentAttr = null;
00448: private String pem_cName = null;
00449: private String pem_cType = null;
00450: private boolean pem_filterBody = true;
00451: private boolean pem_recordBodyStart = false;
00452:
00453: private static final String CONVERT_TYPED = "TYPED";
00454: private static final String CONVERT_UNTYPED = "UNTYPED";
00455: private static final String CONVERT_DISABLED = "DISABLED";
00456:
00457: private String pem_conversionMode = CONVERT_TYPED;
00458: private Stack pem_conversions = new Stack();
00459:
00460: private Stack pem_tagStack = new Stack();
00461:
00462: private UnApplFactSAXHandler pem_hdl = null;
00463:
00464: public UnHtmlParserCallback(String xHtml,
00465: UnApplFactSAXHandler l_hdl, boolean xFilterBody) {
00466: this .pem_html = xHtml;
00467: this .pem_hdl = l_hdl;
00468: this .pem_filterBody = xFilterBody;
00469: this .pem_conversions.push(CONVERT_TYPED);
00470: }
00471:
00472: private boolean pemf_handleRecursive(Tag t, AttributeSet a) {
00473: return (t.equals(Tag.DIV)
00474: && a.getAttribute(HTML.Attribute.TYPE) != null
00475: && (a.getAttribute(HTML.Attribute.TYPE).toString()
00476: .equalsIgnoreCase("label") == false && a
00477: .getAttribute(HTML.Attribute.TYPE).toString()
00478: .equalsIgnoreCase("html") == false)
00479: || t instanceof HTML.UnknownTag
00480: && ((HTML.UnknownTag) t).toString().equalsIgnoreCase(
00481: "button") || (t.equals(Tag.A) && a
00482: .getAttribute(HTML.Attribute.HREF) == null));
00483: }
00484:
00485: private boolean pemf_isConvertable() {
00486: if (this .pem_current != null
00487: && (this .pem_current.equals(Tag.INPUT)
00488: || this .pem_current.equals(Tag.SELECT)
00489: || this .pem_current.equals(Tag.IMG)
00490: || this .pem_current instanceof HTML.UnknownTag
00491: && ((HTML.UnknownTag) pem_current).toString()
00492: .equalsIgnoreCase("button")
00493: || (this .pem_current.equals(Tag.A) && this .pem_currentAttr
00494: .getAttribute(HTML.Attribute.HREF) == null)
00495: || (this .pem_current.equals(Tag.DIV) || this .pem_current
00496: .equals(Tag.SPAN))
00497: && this .pem_cType != null || this .pem_current
00498: .equals(Tag.TEXTAREA)))
00499:
00500: return (true);
00501: else
00502: return (false);
00503:
00504: }
00505:
00506: private void pemf_buildHtmlTplString(String xName, int xCPos,
00507: int xSPos) {
00508: int l_s1Pos = xSPos;
00509: int l_s2Pos = this .pem_html.indexOf(">", xCPos) + 1;
00510:
00511: char l_subst[] = new char[l_s2Pos - l_s1Pos];
00512: char l_var[] = ("{" + xName + "}").toCharArray();
00513: System.arraycopy(l_var, 0, l_subst, 0, l_var.length);
00514:
00515: this .pem_html = KeTools.pcmf_stringSingleSubst(this .pem_html,
00516: this .pem_html.substring(l_s1Pos, l_s2Pos), String
00517: .valueOf(l_subst));
00518: }
00519:
00520: public String pcmf_getHtmlTpl() {
00521: if (this .pem_filterBody)
00522: return (this .pem_html.substring(pem_bodyStart, pem_bodyEnd)
00523: .replace((char) 0, ' '));
00524: else
00525: return (this .pem_html.replace((char) 0, ' '));
00526: }
00527:
00528: public void flush() throws BadLocationException {
00529: super .flush();
00530: }
00531:
00532: public void handleComment(char[] data, int pos) {
00533: if (this .pem_inRecursion) {
00534: super .handleComment(data, pos);
00535: return;
00536: }
00537:
00538: String l_unknown = String.valueOf(data).trim();
00539: if (l_unknown.startsWith("@cmd:")) {
00540: l_unknown = KeTools.pcmf_stringSingleSubst(l_unknown,
00541: "@cmd:", "");
00542: if (l_unknown != null) {
00543: if (l_unknown.equalsIgnoreCase("convert_typed_begin")) {
00544: this .pem_conversionMode = CONVERT_TYPED;
00545: this .pem_conversions.push(this .pem_conversionMode);
00546: } else if (l_unknown
00547: .equalsIgnoreCase("convert_untyped_begin")) {
00548: this .pem_conversionMode = CONVERT_UNTYPED;
00549: this .pem_conversions.push(this .pem_conversionMode);
00550: } else if (l_unknown
00551: .equalsIgnoreCase("convert_disabled_begin")) {
00552: this .pem_conversionMode = CONVERT_DISABLED;
00553: this .pem_conversions.push(this .pem_conversionMode);
00554: } else if (l_unknown
00555: .equalsIgnoreCase("convert_typed_end")) {
00556: if (this .pem_conversions.pop() != CONVERT_TYPED)
00557: KeLog.pcmf_log("ug2t",
00558: "conversion tags stack missmatch"
00559: + this .pem_current, this ,
00560: KeLog.FATAL);
00561:
00562: this .pem_conversionMode = (String) this .pem_conversions
00563: .peek();
00564: } else if (l_unknown
00565: .equalsIgnoreCase("convert_untyped_end")) {
00566: if (this .pem_conversions.pop() != CONVERT_UNTYPED)
00567: KeLog.pcmf_log("ug2t",
00568: "conversion tags stack missmatch"
00569: + this .pem_current, this ,
00570: KeLog.FATAL);
00571:
00572: this .pem_conversionMode = (String) this .pem_conversions
00573: .peek();
00574: } else if (l_unknown
00575: .equalsIgnoreCase("convert_disabled_end")) {
00576: if (this .pem_conversions.pop() != CONVERT_DISABLED)
00577: KeLog.pcmf_log("ug2t",
00578: "conversion tags stack missmatch"
00579: + this .pem_current, this ,
00580: KeLog.FATAL);
00581:
00582: this .pem_conversionMode = (String) this .pem_conversions
00583: .peek();
00584: }
00585: }
00586: } else if (l_unknown.startsWith("@html_include:")) {
00587: try {
00588: l_unknown = KeTools.pcmf_stringSingleSubst(l_unknown,
00589: "@html_include:", "");
00590:
00591: AttributesImpl l_attr = new AttributesImpl();
00592:
00593: l_attr.addAttribute(null, null, "htmlTpl", "",
00594: l_unknown);
00595: l_attr.addAttribute(null, null, "external", "", "true");
00596:
00597: this .pem_hdl.startElement(this .pem_html, "htmlGui",
00598: "htmlGui", l_attr);
00599: this .pem_hdl.endElement(this .pem_html, "htmlGui",
00600: "htmlGui");
00601: } catch (Exception e) {
00602: KeLog.pcmf_log("ug2t", "error including html file:"
00603: + l_unknown, this , KeLog.FATAL);
00604: }
00605: } else if (l_unknown.startsWith("@xml_include:")) {
00606: try {
00607: l_unknown = KeTools.pcmf_stringSingleSubst(l_unknown,
00608: "@xml_include:", "");
00609:
00610: AttributesImpl l_attr = new AttributesImpl();
00611:
00612: l_attr.addAttribute(null, null, "file", "", l_unknown);
00613:
00614: this .pem_hdl.startElement(this .pem_html, "include",
00615: "include", l_attr);
00616: this .pem_hdl.endElement(this .pem_html, "include",
00617: "include");
00618: } catch (Exception e) {
00619: KeLog.pcmf_log("ug2t", "error including xml file:"
00620: + l_unknown, this , KeLog.FATAL);
00621: }
00622: } else if (l_unknown.startsWith("@xscript_include:")) {
00623: try {
00624: l_unknown = KeTools.pcmf_stringSingleSubst(l_unknown,
00625: "@xscript_include:", "");
00626:
00627: AttributesImpl l_attr = new AttributesImpl();
00628:
00629: ArrayList l_tok = KeTools.pcmf_stringTokens(l_unknown,
00630: ":");
00631: l_attr.addAttribute(null, null, "file", "", l_tok
00632: .get(0).toString());
00633: l_attr.addAttribute(null, null, "exec", "", l_tok
00634: .get(1).toString());
00635:
00636: this .pem_hdl.startElement(this .pem_html, "xScript",
00637: "xScript", l_attr);
00638: this .pem_hdl.endElement(this .pem_html, "xScript",
00639: "xScript");
00640: } catch (Exception e) {
00641: KeLog.pcmf_log("ug2t",
00642: "error including xml script file:" + l_unknown,
00643: this , KeLog.FATAL);
00644: }
00645: } else if (l_unknown.startsWith("@javaclass:")) {
00646: try {
00647: l_unknown = KeTools.pcmf_stringSingleSubst(l_unknown,
00648: "@javaclass:", "");
00649:
00650: AttributesImpl l_attr = new AttributesImpl();
00651:
00652: l_attr.addAttribute(null, null, "class", "", l_unknown);
00653:
00654: this .pem_hdl.startElement(this .pem_html, "java",
00655: "java", l_attr);
00656: this .pem_hdl.endElement(this .pem_html, "java", "java");
00657: } catch (Exception e) {
00658: KeLog.pcmf_log("ug2t",
00659: "error including executing java class:"
00660: + l_unknown, this , KeLog.FATAL);
00661: }
00662: } else if (l_unknown.startsWith("@javaobject:")) {
00663: try {
00664: l_unknown = KeTools.pcmf_stringSingleSubst(l_unknown,
00665: "@javaclass:", "");
00666:
00667: AttributesImpl l_attr = new AttributesImpl();
00668:
00669: l_attr
00670: .addAttribute(null, null, "object", "",
00671: l_unknown);
00672:
00673: this .pem_hdl.startElement(this .pem_html, "java",
00674: "java", l_attr);
00675: this .pem_hdl.endElement(this .pem_html, "java", "java");
00676: } catch (Exception e) {
00677: KeLog.pcmf_log("ug2t",
00678: "error including executing java class:"
00679: + l_unknown, this , KeLog.FATAL);
00680: }
00681: }
00682:
00683: if (this .pemf_isConvertable()) {
00684: char l_subst[] = new char[pos - this .pem_prevPos];
00685: char l_var[] = ("{" + this .pem_cName + "}").toCharArray();
00686: System.arraycopy(l_var, 0, l_subst, 0, l_var.length);
00687:
00688: this .pem_html = KeTools.pcmf_stringSingleSubst(
00689: this .pem_html, this .pem_html.substring(
00690: this .pem_prevPos, pos), String
00691: .valueOf(l_subst));
00692: this .pem_current = null;
00693: }
00694:
00695: super .handleComment(data, pos);
00696: }
00697:
00698: public void handleEndOfLineString(String eol) {
00699: super .handleEndOfLineString(eol);
00700: }
00701:
00702: public void handleEndTag(Tag t, int pos) {
00703: // body rausschneiden
00704: if (t.equals(Tag.BODY))
00705: this .pem_bodyEnd = pos;
00706:
00707: if (this .pem_inRecursion == false) {
00708: if (this .pemf_isConvertable()) {
00709: try {
00710: char l_subst[] = new char[pos - this .pem_prevPos];
00711: char l_var[] = ("{" + this .pem_cName + "}")
00712: .toCharArray();
00713: System
00714: .arraycopy(l_var, 0, l_subst, 0,
00715: l_var.length);
00716:
00717: this .pem_html = KeTools.pcmf_stringSingleSubst(
00718: this .pem_html, this .pem_html.substring(
00719: this .pem_prevPos, pos), String
00720: .valueOf(l_subst));
00721: this .pem_current = null;
00722: } catch (Exception e) {
00723: KeLog.pcmf_log("ug2t",
00724: "error converting html stream, Tag:"
00725: + t.toString() + ", position: "
00726: + pos + " ,streamed so far: "
00727: + this .pem_html.substring(0, pos),
00728: this , KeLog.FATAL);
00729: }
00730: }
00731:
00732: // Closing Tags
00733: try {
00734: if (t.equals(Tag.SPAN) || t.equals(Tag.DIV)) {
00735: if (this .pem_hdl.pdm_act instanceof IUnLabel) {
00736: AttributesImpl l_attr = new AttributesImpl();
00737:
00738: l_attr.addAttribute(null, null, "value", "",
00739: this .pem_lastText);
00740:
00741: this .pem_hdl.startElement(this .pem_html,
00742: "value", "value", l_attr);
00743: this .pem_hdl.endElement(this .pem_html, "value",
00744: "value");
00745:
00746: this .pem_hdl.endElement(this .pem_html, "label",
00747: "label");
00748: } else if (this .pem_hdl.pdm_act instanceof MuGenericRaw
00749: && this .pem_hdl.pdm_AppType == UnComponentFactory.MARKUP) {
00750: AttributesImpl l_attr = new AttributesImpl();
00751:
00752: l_attr.addAttribute(null, null, "value", "",
00753: this .pem_lastText);
00754: this .pem_hdl.startElement(this .pem_html,
00755: "value", "value", l_attr);
00756: this .pem_hdl.endElement(this .pem_html, "value",
00757: "value");
00758:
00759: this .pem_hdl.endElement(this .pem_html, "html",
00760: "html");
00761: } else if (this .pem_conversionMode == CONVERT_UNTYPED)
00762: this .pem_hdl.endElement(this .pem_html,
00763: "hidden", "hidden");
00764: } else if (t.equals(Tag.OPTION)) {
00765: if (this .pem_conversionMode == CONVERT_TYPED) {
00766: AttributesImpl l_attr = new AttributesImpl();
00767:
00768: l_attr.addAttribute(null, null, "value", "",
00769: this .pem_lastText);
00770: l_attr.addAttribute(null, null, "entry", "",
00771: this .pem_lastText);
00772:
00773: this .pem_hdl.startElement(this .pem_html,
00774: "entry", "entry", l_attr);
00775: this
00776: .pemf_setStdProps(((UnHtmlTagStackElement) pem_tagStack
00777: .peek()).pcm_attributes);
00778: this .pem_hdl.endElement(this .pem_html, "entry",
00779: "entry");
00780:
00781: if (((UnHtmlTagStackElement) pem_tagStack
00782: .peek()).pcm_attributes
00783: .getAttribute(HTML.Attribute.SELECTED) != null) {
00784: l_attr = new AttributesImpl();
00785: l_attr.addAttribute(null, null, "value",
00786: "", this .pem_lastText);
00787: this .pem_hdl.startElement(this .pem_html,
00788: "value", "value", l_attr);
00789: this .pem_hdl.endElement(this .pem_html,
00790: "value", "value");
00791: }
00792: } else if (this .pem_conversionMode == CONVERT_UNTYPED) {
00793: if (((UnHtmlTagStackElement) pem_tagStack
00794: .peek()).pcm_attributes
00795: .getAttribute(HTML.Attribute.SELECTED) != null) {
00796: AttributesImpl l_attr = new AttributesImpl();
00797: l_attr.addAttribute(null, null, "value",
00798: "", this .pem_lastText);
00799: this .pem_hdl.startElement(this .pem_html,
00800: "value", "value", l_attr);
00801: this .pem_hdl.endElement(this .pem_html,
00802: "value", "value");
00803: }
00804: }
00805: } else if (t.equals(Tag.SELECT)) {
00806: if (this .pem_conversionMode == CONVERT_TYPED) {
00807: if (this .pem_hdl.pdm_act instanceof IUnListBox)
00808: this .pem_hdl.endElement(this .pem_html,
00809: "listBox", "listBox");
00810: else
00811: this .pem_hdl.endElement(this .pem_html,
00812: "comboBox", "comboBox");
00813: } else if (this .pem_conversionMode == CONVERT_UNTYPED)
00814: this .pem_hdl.endElement(this .pem_html,
00815: "hidden", "hidden");
00816: }
00817: if (t.equals(Tag.TEXTAREA)) {
00818: if (this .pem_conversionMode == CONVERT_TYPED) {
00819: AttributesImpl l_attr = new AttributesImpl();
00820:
00821: l_attr.addAttribute(null, null, "value", "",
00822: this .pem_lastText);
00823:
00824: this .pem_hdl.startElement(this .pem_html,
00825: "value", "value", l_attr);
00826: this .pem_hdl.endElement(this .pem_html, "value",
00827: "value");
00828:
00829: this .pem_hdl.endElement(this .pem_html,
00830: "textBox", "textBox");
00831: }
00832: if (this .pem_conversionMode == CONVERT_UNTYPED) {
00833: AttributesImpl l_attr = new AttributesImpl();
00834:
00835: l_attr.addAttribute(null, null, "value", "",
00836: this .pem_lastText);
00837:
00838: this .pem_hdl.startElement(this .pem_html,
00839: "value", "value", l_attr);
00840: this .pem_hdl.endElement(this .pem_html, "value",
00841: "value");
00842:
00843: this .pem_hdl.endElement(this .pem_html,
00844: "hidden", "hidden");
00845: }
00846: }
00847: } catch (Exception e) {
00848: KeLog.pcmf_log("ug2t", "error closing html tag: "
00849: + t.toString(), this , KeLog.ERROR);
00850: }
00851: }
00852: ;
00853:
00854: UnHtmlTagStackElement l_tagEl = (UnHtmlTagStackElement) this .pem_tagStack
00855: .pop();
00856:
00857: if (this .pem_inRecursion == false
00858: && this .pem_conversionMode == CONVERT_TYPED) {
00859: this .pem_current = l_tagEl.pcm_current;
00860: this .pem_currentAttr = l_tagEl.pcm_attributes;
00861:
00862: this .pem_prevPos = l_tagEl.pcm_startPos;
00863:
00864: this .pem_cName = (String) l_tagEl.pcm_attributes
00865: .getAttribute(HTML.Attribute.NAME);
00866: this .pem_cType = (String) l_tagEl.pcm_attributes
00867: .getAttribute(HTML.Attribute.TYPE);
00868: }
00869:
00870: if (l_tagEl.pcm_inRecursion
00871: && this .pemf_handleRecursive(l_tagEl.pcm_current,
00872: l_tagEl.pcm_attributes)) {
00873: this .pem_inRecursion = false;
00874:
00875: String l_type = (String) l_tagEl.pcm_attributes
00876: .getAttribute(HTML.Attribute.TYPE);
00877: String l_id = (String) l_tagEl.pcm_attributes
00878: .getAttribute(HTML.Attribute.ID);
00879:
00880: try {
00881: String l_name = (String) l_tagEl.pcm_attributes
00882: .getAttribute(HTML.Attribute.NAME);
00883: String l_fdesc = null;
00884:
00885: if (l_name != null) {
00886: ArrayList l_toks = KeTools.pcmf_stringTokens(
00887: l_name, ".");
00888: if (l_toks.size() > 1)
00889: l_fdesc = l_toks.get(1).toString();
00890: } else
00891: l_name = l_id;
00892:
00893: if (l_name == null)
00894: KeLog.pcmf_log("ug2t",
00895: "tag does not have a name or id: "
00896: + l_tagEl.pcm_current.toString(),
00897: this , KeLog.FATAL);
00898:
00899: if (l_tagEl.pcm_current.equals(Tag.DIV)) {
00900: if (l_type.equalsIgnoreCase("form")) {
00901: AttributesImpl l_attr = new AttributesImpl();
00902: l_attr.addAttribute(null, null, "name", "",
00903: l_name);
00904:
00905: if (l_fdesc != null)
00906: l_attr.addAttribute(null, null,
00907: "factoryDesc", "", l_fdesc);
00908:
00909: int l_startPos = this .pem_html.indexOf(">",
00910: l_tagEl.pcm_startPos) + 1;
00911:
00912: String l_style = (String) l_tagEl.pcm_attributes
00913: .getAttribute(HTML.Attribute.STYLE);
00914: if (l_style == null)
00915: l_style = "";
00916:
00917: UnHtmlCssStyles l_styles = new UnHtmlCssStyles(
00918: l_style);
00919:
00920: l_attr.addAttribute(null, null, "register", "",
00921: l_id != null ? l_id : l_name);
00922: l_attr.addAttribute(null, null, "htmlTpl", "",
00923: this .pem_html
00924: .substring(l_startPos, pos));
00925: l_attr.addAttribute(null, null, "scroll", "",
00926: l_styles.pcmf_getScroll());
00927:
00928: String l_cont = (String) l_tagEl.pcm_attributes
00929: .getAttribute(HTML.Attribute.CONTENT);
00930: if (l_cont != null
00931: && l_cont.equalsIgnoreCase("variable"))
00932: l_attr.addAttribute(null, null,
00933: "handleVar", "", "true");
00934:
00935: this .pem_hdl.startElement(this .pem_html,
00936: "htmlForm", "htmlForm", l_attr);
00937: this .pemf_setStdProps(l_tagEl.pcm_attributes);
00938: this .pem_hdl.endElement(this .pem_html,
00939: "htmlForm", "htmlForm");
00940:
00941: this .pemf_buildHtmlTplString(l_name, pos,
00942: l_tagEl.pcm_startPos);
00943: } else if (l_type.equalsIgnoreCase("tabbedpane")) {
00944: AttributesImpl l_attr = new AttributesImpl();
00945: l_attr.addAttribute(null, null, "name", "",
00946: l_name);
00947:
00948: if (l_fdesc != null)
00949: l_attr.addAttribute(null, null,
00950: "factoryDesc", "", l_fdesc);
00951:
00952: int l_startPos = this .pem_html.indexOf(">",
00953: l_tagEl.pcm_startPos) + 1;
00954:
00955: l_attr.addAttribute(null, null, "register", "",
00956: l_id != null ? l_id : l_name);
00957: l_attr.addAttribute(null, null, "htmlTpl", "",
00958: this .pem_html
00959: .substring(l_startPos, pos));
00960:
00961: this .pem_hdl.startElement(this .pem_html,
00962: "htmlTabPane", "htmlTabPane", l_attr);
00963: this .pemf_setStdProps(l_tagEl.pcm_attributes);
00964: this .pem_hdl.endElement(this .pem_html,
00965: "htmlTabPane", "htmlTabPane");
00966:
00967: this .pemf_buildHtmlTplString(l_name, pos,
00968: l_tagEl.pcm_startPos);
00969: } else if (l_type.equalsIgnoreCase("apopup")) {
00970: AttributesImpl l_attr = new AttributesImpl();
00971: l_attr.addAttribute(null, null, "name", "",
00972: l_name);
00973:
00974: if (l_fdesc != null)
00975: l_attr.addAttribute(null, null,
00976: "factoryDesc", "", l_fdesc);
00977:
00978: int l_startPos = this .pem_html.indexOf(">",
00979: l_tagEl.pcm_startPos) + 1;
00980:
00981: l_attr.addAttribute(null, null, "register", "",
00982: l_id != null ? l_id : l_name);
00983: l_attr.addAttribute(null, null, "htmlTpl", "",
00984: this .pem_html
00985: .substring(l_startPos, pos));
00986:
00987: this .pem_hdl.startElement(this .pem_html,
00988: "htmlAPopup", "htmlAPopup", l_attr);
00989: this .pemf_setStdProps(l_tagEl.pcm_attributes);
00990: this .pem_hdl.endElement(this .pem_html,
00991: "htmlAPopup", "htmlAPopup");
00992:
00993: this .pemf_buildHtmlTplString(l_name, pos,
00994: l_tagEl.pcm_startPos);
00995: } else if (l_type.equalsIgnoreCase("splitpane")) {
00996: AttributesImpl l_attr = new AttributesImpl();
00997: l_attr.addAttribute(null, null, "name", "",
00998: l_name);
00999:
01000: if (l_fdesc != null)
01001: l_attr.addAttribute(null, null,
01002: "factoryDesc", "", l_fdesc);
01003:
01004: int l_startPos = this .pem_html.indexOf(">",
01005: l_tagEl.pcm_startPos) + 1;
01006:
01007: l_attr.addAttribute(null, null, "register", "",
01008: l_id != null ? l_id : l_name);
01009: l_attr.addAttribute(null, null, "htmlTpl", "",
01010: this .pem_html
01011: .substring(l_startPos, pos));
01012:
01013: this .pem_hdl.startElement(this .pem_html,
01014: "htmlSplitPane", "htmlSplitPane",
01015: l_attr);
01016: this .pemf_setStdProps(l_tagEl.pcm_attributes);
01017: this .pem_hdl.endElement(this .pem_html,
01018: "htmlSplitPane", "htmlSplitPane");
01019:
01020: this .pemf_buildHtmlTplString(l_name, pos,
01021: l_tagEl.pcm_startPos);
01022: } else if (l_type.equalsIgnoreCase("hbox")) {
01023: AttributesImpl l_attr = new AttributesImpl();
01024: l_attr.addAttribute(null, null, "name", "",
01025: l_name);
01026:
01027: if (l_fdesc != null)
01028: l_attr.addAttribute(null, null,
01029: "factoryDesc", "", l_fdesc);
01030:
01031: int l_startPos = this .pem_html.indexOf(">",
01032: l_tagEl.pcm_startPos) + 1;
01033:
01034: String spacing = (String) l_tagEl.pcm_attributes
01035: .getAttribute(HTML.Attribute.CELLSPACING);
01036: if (spacing != null)
01037: l_attr.addAttribute(null, null, "gap", "",
01038: "spacing");
01039:
01040: this .pemf_setBoxAttributes(l_attr, l_tagEl);
01041:
01042: l_attr.addAttribute(null, null, "register", "",
01043: l_id != null ? l_id : l_name);
01044: l_attr.addAttribute(null, null, "htmlTpl", "",
01045: this .pem_html
01046: .substring(l_startPos, pos));
01047:
01048: this .pem_hdl.startElement(this .pem_html,
01049: "htmlhbox", "htmlhbox", l_attr);
01050: this .pemf_setStdProps(l_tagEl.pcm_attributes);
01051: this .pem_hdl.endElement(this .pem_html,
01052: "htmlhbox", "htmlhbox");
01053:
01054: this .pemf_buildHtmlTplString(l_name, pos,
01055: l_tagEl.pcm_startPos);
01056: } else if (l_type.equalsIgnoreCase("vbox")) {
01057: AttributesImpl l_attr = new AttributesImpl();
01058: l_attr.addAttribute(null, null, "name", "",
01059: l_name);
01060:
01061: if (l_fdesc != null)
01062: l_attr.addAttribute(null, null,
01063: "factoryDesc", "", l_fdesc);
01064:
01065: int l_startPos = this .pem_html.indexOf(">",
01066: l_tagEl.pcm_startPos) + 1;
01067:
01068: String spacing = (String) l_tagEl.pcm_attributes
01069: .getAttribute(HTML.Attribute.CELLSPACING);
01070: if (spacing != null)
01071: l_attr.addAttribute(null, null, "gap", "",
01072: "spacing");
01073:
01074: this .pemf_setBoxAttributes(l_attr, l_tagEl);
01075:
01076: l_attr.addAttribute(null, null, "register", "",
01077: l_id != null ? l_id : l_name);
01078: l_attr.addAttribute(null, null, "htmlTpl", "",
01079: this .pem_html
01080: .substring(l_startPos, pos));
01081:
01082: this .pem_hdl.startElement(this .pem_html,
01083: "htmlvbox", "htmlvbox", l_attr);
01084: this .pemf_setStdProps(l_tagEl.pcm_attributes);
01085: this .pem_hdl.endElement(this .pem_html,
01086: "htmlvbox", "htmlvbox");
01087:
01088: this .pemf_buildHtmlTplString(l_name, pos,
01089: l_tagEl.pcm_startPos);
01090: } else if (l_type.equalsIgnoreCase("box")) {
01091: AttributesImpl l_attr = new AttributesImpl();
01092: l_attr.addAttribute(null, null, "name", "",
01093: l_name);
01094:
01095: if (l_fdesc != null)
01096: l_attr.addAttribute(null, null,
01097: "factoryDesc", "", l_fdesc);
01098:
01099: int l_startPos = this .pem_html.indexOf(">",
01100: l_tagEl.pcm_startPos) + 1;
01101:
01102: this .pemf_setBoxAttributes(l_attr, l_tagEl);
01103:
01104: l_attr.addAttribute(null, null, "register", "",
01105: l_id != null ? l_id : l_name);
01106: l_attr.addAttribute(null, null, "htmlTpl", "",
01107: this .pem_html
01108: .substring(l_startPos, pos));
01109:
01110: this .pem_hdl.startElement(this .pem_html,
01111: "htmlbox", "htmlbox", l_attr);
01112: this .pemf_setStdProps(l_tagEl.pcm_attributes);
01113: this .pem_hdl.endElement(this .pem_html,
01114: "htmlbox", "htmlbox");
01115:
01116: this .pemf_buildHtmlTplString(l_name, pos,
01117: l_tagEl.pcm_startPos);
01118: }
01119: } else if (l_tagEl.pcm_current.equals(Tag.A)) {
01120: if (this .pem_conversionMode == CONVERT_DISABLED)
01121: this .pem_current = null;
01122: else if (this .pem_conversionMode == CONVERT_UNTYPED) {
01123: this .pem_current = null;
01124: this .pemf_createHidden(l_name, "", l_id, true);
01125: } else {
01126: AttributesImpl l_attr = new AttributesImpl();
01127: l_attr.addAttribute(null, null, "name", "",
01128: l_name);
01129:
01130: if (l_fdesc != null)
01131: l_attr.addAttribute(null, null,
01132: "factoryDesc", "", l_fdesc);
01133:
01134: int l_startPos = this .pem_html.indexOf(">",
01135: l_tagEl.pcm_startPos) + 1;
01136:
01137: l_attr.addAttribute(null, null, "register", "",
01138: l_id != null ? l_id : l_name);
01139: l_attr.addAttribute(null, null, "htmlTpl", "",
01140: this .pem_html
01141: .substring(l_startPos, pos));
01142: l_attr.addAttribute(null, null, "value", "",
01143: this .pem_lastText);
01144:
01145: this .pem_hdl.startElement(this .pem_html,
01146: "htmlLink", "htmlLink", l_attr);
01147: this .pemf_setStdProps(l_tagEl.pcm_attributes);
01148: this .pem_hdl.endElement(this .pem_html,
01149: "htmlLink", "htmlLink");
01150:
01151: this .pemf_buildHtmlTplString(l_name, pos,
01152: l_tagEl.pcm_startPos);
01153: }
01154: } else if (l_tagEl.pcm_current instanceof HTML.UnknownTag
01155: && ((HTML.UnknownTag) l_tagEl.pcm_current)
01156: .toString().equalsIgnoreCase("button")) {
01157: if (this .pem_conversionMode == CONVERT_DISABLED)
01158: this .pem_current = null;
01159: else if (this .pem_conversionMode == CONVERT_UNTYPED) {
01160: this .pem_current = null;
01161: this .pemf_createHidden(l_name, "", l_id, true);
01162: } else {
01163: AttributesImpl l_attr = new AttributesImpl();
01164: l_attr.addAttribute(null, null, "name", "",
01165: l_name);
01166:
01167: if (l_fdesc != null)
01168: l_attr.addAttribute(null, null,
01169: "factoryDesc", "", l_fdesc);
01170:
01171: int l_startPos = this .pem_html.indexOf(">",
01172: l_tagEl.pcm_startPos) + 1;
01173:
01174: l_attr.addAttribute(null, null, "register", "",
01175: l_id != null ? l_id : l_name);
01176: l_attr.addAttribute(null, null, "htmlTpl", "",
01177: this .pem_html
01178: .substring(l_startPos, pos));
01179: l_attr.addAttribute(null, null, "value", "",
01180: this .pem_lastText);
01181:
01182: this .pem_hdl.startElement(this .pem_html,
01183: "htmlButton", "htmlButton", l_attr);
01184: this .pemf_setStdProps(l_tagEl.pcm_attributes);
01185: this .pem_hdl.endElement(this .pem_html,
01186: "htmlButton", "htmlButton");
01187:
01188: this .pemf_buildHtmlTplString(l_name, pos,
01189: l_tagEl.pcm_startPos);
01190: }
01191: }
01192: } catch (Exception e) {
01193: KeLog.pcmf_log("ug2t",
01194: "error processing recursive html tag: "
01195: + l_type, this , KeLog.ERROR);
01196: KeLog.pcmf_logException("ug2t", this , e);
01197: }
01198: }
01199:
01200: super .handleEndTag(t, pos);
01201: }
01202:
01203: private void pemf_setBoxAttributes(AttributesImpl xAttr,
01204: UnHtmlTagStackElement xTagEl) {
01205: String l_style = (String) xTagEl.pcm_attributes
01206: .getAttribute(HTML.Attribute.STYLE);
01207: UnHtmlCssStyles l_styles = new UnHtmlCssStyles(l_style);
01208:
01209: String l_pad = l_styles.pcmf_getPadding();
01210: String l_marg = l_styles.pcmf_getMargin();
01211: String l_bt = l_styles.pcmf_getBorderT();
01212: String l_br = l_styles.pcmf_getBorderR();
01213: String l_bl = l_styles.pcmf_getBorderL();
01214: String l_bb = l_styles.pcmf_getBorderB();
01215:
01216: if (l_pad != null)
01217: xAttr.addAttribute(null, null, "padding", "", l_pad);
01218: if (l_marg != null)
01219: xAttr.addAttribute(null, null, "margin", "", l_marg);
01220: if (l_bt != null)
01221: xAttr.addAttribute(null, null, "borderTop", "", l_bt);
01222: if (l_br != null)
01223: xAttr.addAttribute(null, null, "borderRight", "", l_br);
01224: if (l_bl != null)
01225: xAttr.addAttribute(null, null, "borderLeft", "", l_bl);
01226: if (l_bb != null)
01227: xAttr.addAttribute(null, null, "borderBottom", "", l_bb);
01228: }
01229:
01230: public void handleError(String errorMsg, int pos) {
01231: super .handleError(errorMsg, pos);
01232: }
01233:
01234: public void handleSimpleTag(Tag t, MutableAttributeSet a, int pos) {
01235: if (this .pem_recordBodyStart) {
01236: this .pem_recordBodyStart = false;
01237: this .pem_bodyStart = pos;
01238: }
01239:
01240: if (t.equals(HTML.Tag.LINK)) {
01241: if ("text/css".equalsIgnoreCase((String) a
01242: .getAttribute(HTML.Attribute.TYPE))
01243: && "stylesheet".equalsIgnoreCase((String) a
01244: .getAttribute(HTML.Attribute.REL))) {
01245: String l_css = (String) a
01246: .getAttribute(HTML.Attribute.HREF);
01247: if (l_css != null) {
01248: try {
01249: AttributesImpl l_attr = new AttributesImpl();
01250: l_attr.addAttribute(null, null, "value", "",
01251: l_css);
01252: this .pem_hdl.startElement(this .pem_html,
01253: "extCss", "extCss", l_attr);
01254: this .pem_hdl.endElement(this .pem_html,
01255: "extCss", "extCss");
01256: } catch (Exception e) {
01257: KeLog.pcmf_log("ug2t",
01258: "error setting external css: " + l_css,
01259: this , KeLog.ERROR);
01260: }
01261: }
01262: ;
01263: }
01264: }
01265:
01266: if (t instanceof HTML.UnknownTag) {
01267: if (this .pem_html.charAt(pos + 1) == '/')
01268: this .handleEndTag(t, pos);
01269: else
01270: this .handleStartTag(t, a, pos);
01271:
01272: return;
01273: }
01274:
01275: if (this .pem_inRecursion) {
01276: super .handleSimpleTag(t, a, pos);
01277: return;
01278: }
01279:
01280: if (this .pemf_isConvertable()) {
01281: try {
01282: char l_subst[] = new char[pos - this .pem_prevPos];
01283: char l_var[] = ("{" + this .pem_cName + "}")
01284: .toCharArray();
01285: System.arraycopy(l_var, 0, l_subst, 0, l_var.length);
01286:
01287: this .pem_html = KeTools.pcmf_stringSingleSubst(
01288: this .pem_html, this .pem_html.substring(
01289: this .pem_prevPos, pos), String
01290: .valueOf(l_subst));
01291: this .pem_current = null;
01292: } catch (Exception e) {
01293: KeLog.pcmf_log("ug2t",
01294: "error converting html stream, Tag:"
01295: + t.toString() + ", position: " + pos
01296: + " ,streamed so far: "
01297: + this .pem_html.substring(0, pos),
01298: this , KeLog.FATAL);
01299: }
01300: }
01301:
01302: if (t.equals(Tag.IMG) || t.equals(Tag.INPUT)) {
01303: this .pem_prevPos = pos;
01304: this .pem_current = t;
01305: this .pem_currentAttr = a.copyAttributes();
01306:
01307: this .pem_cName = (String) a
01308: .getAttribute(HTML.Attribute.NAME);
01309: this .pem_cType = (String) a
01310: .getAttribute(HTML.Attribute.TYPE);
01311: String l_value = (String) a
01312: .getAttribute(HTML.Attribute.VALUE);
01313: String l_id = (String) a.getAttribute(HTML.Attribute.ID);
01314:
01315: String l_name = this .pem_cName;
01316: String l_fdesc = null;
01317:
01318: if (l_name != null) {
01319: ArrayList l_toks = KeTools.pcmf_stringTokens(l_name,
01320: ".");
01321: if (l_toks.size() > 1)
01322: l_fdesc = l_toks.get(1).toString();
01323: } else {
01324: l_name = l_id;
01325: this .pem_cName = l_id;
01326: }
01327:
01328: if (l_name == null
01329: && this .pem_conversionMode != CONVERT_DISABLED)
01330: KeLog.pcmf_log("ug2t",
01331: "tag does not have a name or id: "
01332: + this .pem_current, this , KeLog.FATAL);
01333:
01334: if (t.equals(Tag.IMG)) {
01335: try {
01336: if (this .pem_conversionMode == CONVERT_DISABLED)
01337: this .pem_current = null;
01338: else if (this .pem_conversionMode == CONVERT_UNTYPED) {
01339: this .pem_current = null;
01340: this .pemf_createHidden(l_name, l_value, l_id,
01341: true);
01342: } else {
01343: AttributesImpl l_attr = new AttributesImpl();
01344: l_attr.addAttribute(null, null, "name", "",
01345: l_name);
01346:
01347: if (l_fdesc != null)
01348: l_attr.addAttribute(null, null,
01349: "factoryDesc", "", l_fdesc);
01350:
01351: l_attr.addAttribute(null, null, "register", "",
01352: l_id != null ? l_id : l_name);
01353:
01354: String l_src = (String) a
01355: .getAttribute(HTML.Attribute.SRC);
01356:
01357: if (l_src != null)
01358: l_attr.addAttribute(null, null, "value",
01359: "", l_src);
01360: else
01361: l_attr.addAttribute(null, null, "value",
01362: "", "");
01363:
01364: String l_data = (String) a
01365: .getAttribute(HTML.Attribute.TYPE);
01366: if (l_data != null
01367: && l_data.equalsIgnoreCase("icon")
01368: || this .pem_hdl.pdm_act instanceof IUnLink
01369: || this .pem_hdl.pdm_act instanceof IUnButton)
01370: l_attr.addAttribute(null, null, "icon", "",
01371: "true");
01372:
01373: this .pem_hdl.startElement(this .pem_html,
01374: "image", "image", l_attr);
01375: this .pemf_setStdProps(a);
01376: this .pem_hdl.endElement(this .pem_html, "image",
01377: "image");
01378: }
01379: } catch (Exception e) {
01380: KeLog
01381: .pcmf_log("ug2t",
01382: "error during widget creation from html: "
01383: + this .pem_cName, this ,
01384: KeLog.ERROR);
01385: KeLog.pcmf_logException("ug2t", this , e);
01386: }
01387: } else if (t.equals(Tag.INPUT)) {
01388: if (this .pem_conversionMode == CONVERT_DISABLED)
01389: this .pem_current = null;
01390: else if (this .pem_conversionMode == CONVERT_UNTYPED) {
01391: this .pem_current = null;
01392: this .pemf_createHidden(l_name, l_value, l_id, true);
01393: } else {
01394: if (this .pem_cType.equalsIgnoreCase("tree")) {
01395: try {
01396: AttributesImpl l_attr = new AttributesImpl();
01397: l_attr.addAttribute(null, null, "name", "",
01398: l_name);
01399:
01400: if (l_fdesc != null)
01401: l_attr.addAttribute(null, null,
01402: "factoryDesc", "", l_fdesc);
01403:
01404: l_attr.addAttribute(null, null, "register",
01405: "", l_id != null ? l_id : l_name);
01406:
01407: this .pem_hdl.startElement(this .pem_html,
01408: "tree", "tree", l_attr);
01409: this .pemf_setStdProps(a);
01410: this .pem_hdl.endElement(this .pem_html,
01411: "tree", "tree");
01412: } catch (Exception e) {
01413: KeLog.pcmf_log("ug2t",
01414: "error during widget creation from html: "
01415: + this .pem_cName, this ,
01416: KeLog.ERROR);
01417: KeLog.pcmf_logException("ug2t", this , e);
01418: }
01419: } else if (this .pem_cType.equalsIgnoreCase("table")) {
01420: try {
01421: AttributesImpl l_attr = new AttributesImpl();
01422: l_attr.addAttribute(null, null, "name", "",
01423: l_name);
01424:
01425: if (l_fdesc != null)
01426: l_attr.addAttribute(null, null,
01427: "factoryDesc", "", l_fdesc);
01428:
01429: l_attr.addAttribute(null, null, "register",
01430: "", l_id != null ? l_id : l_name);
01431:
01432: this .pem_hdl.startElement(this .pem_html,
01433: "table", "table", l_attr);
01434: this .pemf_setStdProps(a);
01435: this .pem_hdl.endElement(this .pem_html,
01436: "table", "table");
01437: } catch (Exception e) {
01438: KeLog.pcmf_log("ug2t",
01439: "error during widget creation from html: "
01440: + this .pem_cName, this ,
01441: KeLog.ERROR);
01442: KeLog.pcmf_logException("ug2t", this , e);
01443: }
01444: } else if (this .pem_cType
01445: .equalsIgnoreCase("slider")) {
01446: try {
01447: AttributesImpl l_attr = new AttributesImpl();
01448: l_attr.addAttribute(null, null, "name", "",
01449: l_name);
01450:
01451: if (l_fdesc != null)
01452: l_attr.addAttribute(null, null,
01453: "factoryDesc", "", l_fdesc);
01454:
01455: l_attr.addAttribute(null, null, "register",
01456: "", l_id != null ? l_id : l_name);
01457:
01458: this .pem_hdl.startElement(this .pem_html,
01459: "slider", "slider", l_attr);
01460: this .pemf_setStdProps(a);
01461: this .pem_hdl.endElement(this .pem_html,
01462: "slider", "slider");
01463: } catch (Exception e) {
01464: KeLog.pcmf_log("ug2t",
01465: "error during widget creation from html: "
01466: + this .pem_cName, this ,
01467: KeLog.ERROR);
01468: KeLog.pcmf_logException("ug2t", this , e);
01469: }
01470: } else if (this .pem_cType
01471: .equalsIgnoreCase("hidden"))
01472: this .pemf_createHidden(l_name, l_value, l_id,
01473: true);
01474: else if (this .pem_cType
01475: .equalsIgnoreCase("drawpane")) {
01476: try {
01477: AttributesImpl l_attr = new AttributesImpl();
01478: l_attr.addAttribute(null, null, "name", "",
01479: l_name);
01480:
01481: if (l_fdesc != null)
01482: l_attr.addAttribute(null, null,
01483: "factoryDesc", "", l_fdesc);
01484:
01485: l_attr.addAttribute(null, null, "register",
01486: "", l_id != null ? l_id : l_name);
01487:
01488: l_attr.addAttribute(null, null, "width",
01489: "", a.getAttribute(
01490: HTML.Attribute.WIDTH)
01491: .toString());
01492: l_attr.addAttribute(null, null, "height",
01493: "", a.getAttribute(
01494: HTML.Attribute.HEIGHT)
01495: .toString());
01496:
01497: this .pem_hdl.startElement(this .pem_html,
01498: "drawPane", "drawPane", l_attr);
01499: this .pemf_setStdProps(a);
01500: this .pem_hdl.endElement(this .pem_html,
01501: "drawPane", "drawPane");
01502: } catch (Exception e) {
01503: KeLog.pcmf_log("ug2t",
01504: "error during widget creation from html: "
01505: + this .pem_cName, this ,
01506: KeLog.ERROR);
01507: KeLog.pcmf_logException("ug2t", this , e);
01508: }
01509: } else if (this .pem_cType.equalsIgnoreCase("menu")) {
01510: try {
01511: AttributesImpl l_attr = new AttributesImpl();
01512: l_attr.addAttribute(null, null, "name", "",
01513: l_name);
01514:
01515: if (l_fdesc != null)
01516: l_attr.addAttribute(null, null,
01517: "factoryDesc", "", l_fdesc);
01518:
01519: l_attr.addAttribute(null, null, "register",
01520: "", l_id != null ? l_id : l_name);
01521:
01522: this .pem_hdl.startElement(this .pem_html,
01523: "menu", "menu", l_attr);
01524: this .pemf_setStdProps(a);
01525: this .pem_hdl.endElement(this .pem_html,
01526: "menu", "menu");
01527: } catch (Exception e) {
01528: KeLog.pcmf_log("ug2t",
01529: "error during widget creation from html: "
01530: + this .pem_cName, this ,
01531: KeLog.ERROR);
01532: KeLog.pcmf_logException("ug2t", this , e);
01533: }
01534: } else if (this .pem_cType
01535: .equalsIgnoreCase("ctxmenu")) {
01536: try {
01537: AttributesImpl l_attr = new AttributesImpl();
01538: l_attr.addAttribute(null, null, "name", "",
01539: l_name);
01540:
01541: if (l_fdesc != null)
01542: l_attr.addAttribute(null, null,
01543: "factoryDesc", "", l_fdesc);
01544:
01545: l_attr.addAttribute(null, null, "register",
01546: "", l_id != null ? l_id : l_name);
01547:
01548: this .pem_hdl.startElement(this .pem_html,
01549: "ctxMenu", "ctxMenu", l_attr);
01550: this .pemf_setStdProps(a);
01551: this .pem_hdl.endElement(this .pem_html,
01552: "ctxMenu", "ctxMenu");
01553: } catch (Exception e) {
01554: KeLog.pcmf_log("ug2t",
01555: "error during widget creation from html: "
01556: + this .pem_cName, this ,
01557: KeLog.ERROR);
01558: KeLog.pcmf_logException("ug2t", this , e);
01559: }
01560: } else if (this .pem_cType
01561: .equalsIgnoreCase("progressBar")) {
01562: try {
01563: AttributesImpl l_attr = new AttributesImpl();
01564: l_attr.addAttribute(null, null, "name", "",
01565: l_name);
01566:
01567: if (l_fdesc != null)
01568: l_attr.addAttribute(null, null,
01569: "factoryDesc", "", l_fdesc);
01570:
01571: l_attr.addAttribute(null, null, "register",
01572: "", l_id != null ? l_id : l_name);
01573: if (l_value != null)
01574: l_attr.addAttribute(null, null,
01575: "value", "", l_value);
01576:
01577: this .pem_hdl.startElement(this .pem_html,
01578: "progressBar", "progressBar",
01579: l_attr);
01580: this .pemf_setStdProps(a);
01581: this .pem_hdl.endElement(this .pem_html,
01582: "progressBar", "progressBar");
01583: } catch (Exception e) {
01584: KeLog.pcmf_log("ug2t",
01585: "error during widget creation from html: "
01586: + this .pem_cName, this ,
01587: KeLog.ERROR);
01588: KeLog.pcmf_logException("ug2t", this , e);
01589: }
01590: } else if (this .pem_cType.equalsIgnoreCase("text")) {
01591: try {
01592: AttributesImpl l_attr = new AttributesImpl();
01593: l_attr.addAttribute(null, null, "name", "",
01594: l_name);
01595:
01596: if (l_fdesc != null)
01597: l_attr.addAttribute(null, null,
01598: "factoryDesc", "", l_fdesc);
01599:
01600: if (l_value != null)
01601: l_attr.addAttribute(null, null,
01602: "value", "", l_value);
01603: else
01604: l_attr.addAttribute(null, null,
01605: "value", "", "");
01606:
01607: // len,size
01608: String l_size = (String) a
01609: .getAttribute(HTML.Attribute.SIZE);
01610: String l_len = (String) a
01611: .getAttribute(HTML.Attribute.MAXLENGTH);
01612:
01613: String l_style = (String) a
01614: .getAttribute(HTML.Attribute.STYLE);
01615: if (l_style != null) {
01616: UnHtmlCssStyles l_styles = new UnHtmlCssStyles(
01617: l_style);
01618: String l_ta = l_styles
01619: .pdmf_getValue("text-align");
01620: if (l_ta != null) {
01621: String l_align = "CENTER";
01622: if (l_ta.equalsIgnoreCase("left"))
01623: l_align = "WEST";
01624: else if (l_ta
01625: .equalsIgnoreCase("right"))
01626: l_align = "EAST";
01627:
01628: l_attr.addAttribute(null, null,
01629: "textAlign", "", l_align);
01630: }
01631: }
01632:
01633: if (l_size != null)
01634: l_attr.addAttribute(null, null, "size",
01635: "", l_size);
01636: else
01637: l_attr.addAttribute(null, null, "size",
01638: "", "20");
01639:
01640: if (l_len != null)
01641: l_attr.addAttribute(null, null, "len",
01642: "", l_len);
01643: else
01644: l_attr.addAttribute(null, null, "len",
01645: "", "20");
01646:
01647: l_attr.addAttribute(null, null, "register",
01648: "", l_id != null ? l_id : l_name);
01649:
01650: this .pem_hdl.startElement(this .pem_html,
01651: "input", "input", l_attr);
01652: this .pemf_setStdProps(a);
01653: this .pem_hdl.endElement(this .pem_html,
01654: "input", "input");
01655: } catch (Exception e) {
01656: KeLog.pcmf_log("ug2t",
01657: "error during widget creation from html: "
01658: + this .pem_cName, this ,
01659: KeLog.ERROR);
01660: KeLog.pcmf_logException("ug2t", this , e);
01661: }
01662: } else if (this .pem_cType
01663: .equalsIgnoreCase("password")) {
01664: try {
01665: AttributesImpl l_attr = new AttributesImpl();
01666: l_attr.addAttribute(null, null, "name", "",
01667: l_name);
01668:
01669: if (l_fdesc != null)
01670: l_attr.addAttribute(null, null,
01671: "factoryDesc", "", l_fdesc);
01672:
01673: if (l_value != null)
01674: l_attr.addAttribute(null, null,
01675: "value", "", l_value);
01676: else
01677: l_attr.addAttribute(null, null,
01678: "value", "", "");
01679:
01680: // len,size
01681: String l_size = (String) a
01682: .getAttribute(HTML.Attribute.SIZE);
01683: String l_len = (String) a
01684: .getAttribute(HTML.Attribute.MAXLENGTH);
01685:
01686: if (l_size != null)
01687: l_attr.addAttribute(null, null, "size",
01688: "", l_size);
01689: if (l_len != null)
01690: l_attr.addAttribute(null, null, "len",
01691: "", l_len);
01692:
01693: l_attr.addAttribute(null, null, "pwd", "",
01694: "true");
01695: l_attr.addAttribute(null, null, "register",
01696: "", l_id != null ? l_id : l_name);
01697:
01698: this .pem_hdl.startElement(this .pem_html,
01699: "input", "input", l_attr);
01700: this .pemf_setStdProps(a);
01701: this .pem_hdl.endElement(this .pem_html,
01702: "input", "input");
01703: } catch (Exception e) {
01704: KeLog.pcmf_log("ug2t",
01705: "error during widget creation from html: "
01706: + this .pem_cName, this ,
01707: KeLog.ERROR);
01708: KeLog.pcmf_logException("ug2t", this , e);
01709: }
01710: } else if (this .pem_cType
01711: .equalsIgnoreCase("button")) {
01712: try {
01713: AttributesImpl l_attr = new AttributesImpl();
01714: l_attr.addAttribute(null, null, "name", "",
01715: l_name);
01716:
01717: if (l_fdesc != null)
01718: l_attr.addAttribute(null, null,
01719: "factoryDesc", "", l_fdesc);
01720:
01721: l_attr.addAttribute(null, null, "register",
01722: "", l_id != null ? l_id : l_name);
01723:
01724: if (l_value != null)
01725: l_attr.addAttribute(null, null,
01726: "value", "", l_value);
01727: else
01728: l_attr.addAttribute(null, null,
01729: "value", "", "");
01730:
01731: this .pem_hdl.startElement(this .pem_html,
01732: "button", "button", l_attr);
01733: this .pemf_setStdProps(a);
01734: this .pem_hdl.endElement(this .pem_html,
01735: "button", "button");
01736: } catch (Exception e) {
01737: KeLog.pcmf_log("ug2t",
01738: "error during widget creation from html: "
01739: + this .pem_cName, this ,
01740: KeLog.ERROR);
01741: KeLog.pcmf_logException("ug2t", this , e);
01742: }
01743: } else if (this .pem_cType.equalsIgnoreCase("radio")) {
01744: // Alpha Implementation - does not Work due to different radio
01745: // button behave patterns
01746: try {
01747: AttributesImpl l_attr = new AttributesImpl();
01748: l_attr.addAttribute(null, null, "name", "",
01749: l_name);
01750:
01751: if (l_fdesc != null)
01752: l_attr.addAttribute(null, null,
01753: "factoryDesc", "", l_fdesc);
01754:
01755: String l_group = l_name.substring(l_name
01756: .indexOf(":") + 1);
01757:
01758: l_attr.addAttribute(null, null, "register",
01759: "", l_id != null ? l_id : l_name);
01760: l_attr.addAttribute(null, null, "entry",
01761: "", "");
01762: l_attr.addAttribute(null, null, "group",
01763: "", l_group);
01764:
01765: String l_checked = (String) a
01766: .getAttribute(HTML.Attribute.CHECKED);
01767:
01768: if (l_value != null)
01769: l_attr.addAttribute(null, null,
01770: "value", "", l_value);
01771: else
01772: l_attr.addAttribute(null, null,
01773: "value", "", l_name);
01774:
01775: this .pem_hdl.startElement(this .pem_html,
01776: "singleRadio", "singleRadio",
01777: l_attr);
01778:
01779: l_attr = new AttributesImpl();
01780: if (l_checked != null)
01781: l_attr.addAttribute(null, null,
01782: "value", "",
01783: IUnRadioButton.CHECKED);
01784: else
01785: l_attr.addAttribute(null, null,
01786: "value", "",
01787: IUnRadioButton.NOTCHECKED);
01788:
01789: this .pem_hdl.startElement(this .pem_html,
01790: "value", "value", l_attr);
01791: this .pem_hdl.endElement(this .pem_html,
01792: "value", "value");
01793:
01794: this .pemf_setStdProps(a);
01795: this .pem_hdl.endElement(this .pem_html,
01796: "singleRadio", "singleRadio");
01797: } catch (Exception e) {
01798: KeLog.pcmf_log("ug2t",
01799: "error during widget creation from html: "
01800: + this .pem_cName, this ,
01801: KeLog.ERROR);
01802: KeLog.pcmf_logException("ug2t", this , e);
01803: }
01804: } else if (this .pem_cType
01805: .equalsIgnoreCase("radioPanel")) {
01806: // Alpha Implementation - does not Work due to different radio
01807: // button behave patterns
01808: try {
01809: AttributesImpl l_attr = new AttributesImpl();
01810: l_attr.addAttribute(null, null, "name", "",
01811: l_name);
01812:
01813: if (l_fdesc != null)
01814: l_attr.addAttribute(null, null,
01815: "factoryDesc", "", l_fdesc);
01816:
01817: l_attr.addAttribute(null, null, "register",
01818: "", l_id != null ? l_id : l_name);
01819: l_attr.addAttribute(null, null, "label",
01820: "", "");
01821:
01822: this .pem_hdl.startElement(this .pem_html,
01823: "radio", "radio", l_attr);
01824: this .pemf_setStdProps(a);
01825: this .pem_hdl.endElement(this .pem_html,
01826: "radio", "radio");
01827: } catch (Exception e) {
01828: KeLog.pcmf_log("ug2t",
01829: "error during widget creation from html: "
01830: + this .pem_cName, this ,
01831: KeLog.ERROR);
01832: KeLog.pcmf_logException("ug2t", this , e);
01833: }
01834: } else if (this .pem_cType
01835: .equalsIgnoreCase("checkbox")) {
01836: try {
01837: AttributesImpl l_attr = new AttributesImpl();
01838: l_attr.addAttribute(null, null, "name", "",
01839: l_name);
01840:
01841: if (l_fdesc != null)
01842: l_attr.addAttribute(null, null,
01843: "factoryDesc", "", l_fdesc);
01844:
01845: l_attr.addAttribute(null, null, "register",
01846: "", l_id != null ? l_id : l_name);
01847:
01848: String l_checked = (String) a
01849: .getAttribute(HTML.Attribute.CHECKED);
01850:
01851: if (l_checked != null)
01852: l_attr.addAttribute(null, null,
01853: "value", "",
01854: IUnCheckBox.CHECKED);
01855: else
01856: l_attr.addAttribute(null, null,
01857: "value", "",
01858: IUnCheckBox.NOTCHECKED);
01859:
01860: l_attr.addAttribute(null, null, "label",
01861: "", "");
01862:
01863: this .pem_hdl.startElement(this .pem_html,
01864: "checkBox", "checkBox", l_attr);
01865: this .pemf_setStdProps(a);
01866: this .pem_hdl.endElement(this .pem_html,
01867: "checkBox", "checkBox");
01868: } catch (Exception e) {
01869: KeLog.pcmf_log("ug2t",
01870: "error during widget creation from html: "
01871: + this .pem_cName, this ,
01872: KeLog.ERROR);
01873: KeLog.pcmf_logException("ug2t", this , e);
01874: }
01875: } else if (this .pem_cType.equalsIgnoreCase("link")) {
01876: try {
01877: AttributesImpl l_attr = new AttributesImpl();
01878: l_attr.addAttribute(null, null, "name", "",
01879: l_name);
01880:
01881: if (l_fdesc != null)
01882: l_attr.addAttribute(null, null,
01883: "factoryDesc", "", l_fdesc);
01884:
01885: l_attr.addAttribute(null, null, "register",
01886: "", l_id != null ? l_id : l_name);
01887:
01888: if (l_value != null)
01889: l_attr.addAttribute(null, null,
01890: "value", "", l_value);
01891: else
01892: l_attr.addAttribute(null, null,
01893: "value", "", "");
01894:
01895: this .pem_hdl.startElement(this .pem_html,
01896: "link", "link", l_attr);
01897: this .pemf_setStdProps(a);
01898: this .pem_hdl.endElement(this .pem_html,
01899: "link", "link");
01900: } catch (Exception e) {
01901: KeLog.pcmf_log("ug2t",
01902: "error during widget creation from html: "
01903: + this .pem_cName, this ,
01904: KeLog.ERROR);
01905: KeLog.pcmf_logException("ug2t", this , e);
01906: }
01907: } else if (this .pem_cType
01908: .equalsIgnoreCase("plugin")) {
01909: try {
01910: AttributesImpl l_attr = new AttributesImpl();
01911: l_attr.addAttribute(null, null, "name", "",
01912: l_name);
01913:
01914: if (l_fdesc != null)
01915: l_attr.addAttribute(null, null, "use",
01916: "", l_fdesc);
01917:
01918: l_attr.addAttribute(null, null, "register",
01919: "", l_id != null ? l_id : l_name);
01920:
01921: this .pem_hdl.startElement(this .pem_html,
01922: "plugin", "plugin", l_attr);
01923: this .pemf_setStdProps(a);
01924: this .pem_hdl.endElement(this .pem_html,
01925: "plugin", "plugin");
01926: } catch (Exception e) {
01927: KeLog.pcmf_log("ug2t",
01928: "error during widget creation from html: "
01929: + this .pem_cName, this ,
01930: KeLog.ERROR);
01931: KeLog.pcmf_logException("ug2t", this , e);
01932: }
01933: } else if (this .pem_cType.equalsIgnoreCase("raw")) {
01934: try {
01935: AttributesImpl l_attr = new AttributesImpl();
01936: l_attr.addAttribute(null, null, "name", "",
01937: l_name);
01938:
01939: if (l_fdesc != null)
01940: l_attr.addAttribute(null, null,
01941: "factoryDesc", "", l_fdesc);
01942:
01943: l_attr.addAttribute(null, null, "register",
01944: "", l_id != null ? l_id : l_name);
01945:
01946: if (l_value != null)
01947: l_attr.addAttribute(null, null, "html",
01948: "", l_value);
01949: else
01950: l_attr.addAttribute(null, null, "html",
01951: "", "");
01952:
01953: this .pem_hdl.startElement(this .pem_html,
01954: "html", "html", l_attr);
01955: this .pemf_setStdProps(a);
01956: this .pem_hdl.endElement(this .pem_html,
01957: "html", "html");
01958: } catch (Exception e) {
01959: KeLog.pcmf_log("ug2t",
01960: "error during widget creation from html: "
01961: + this .pem_cName, this ,
01962: KeLog.ERROR);
01963: KeLog.pcmf_logException("ug2t", this , e);
01964: }
01965: } else if (this .pem_cType.equalsIgnoreCase("label")) {
01966: try {
01967: AttributesImpl l_attr = new AttributesImpl();
01968: l_attr.addAttribute(null, null, "name", "",
01969: l_name);
01970:
01971: if (l_fdesc != null)
01972: l_attr.addAttribute(null, null,
01973: "factoryDesc", "", l_fdesc);
01974:
01975: l_attr.addAttribute(null, null, "register",
01976: "", l_id != null ? l_id : l_name);
01977:
01978: if (l_value != null)
01979: l_attr.addAttribute(null, null,
01980: "value", "", l_value);
01981: else
01982: l_attr.addAttribute(null, null,
01983: "value", "", "");
01984:
01985: this .pem_hdl.startElement(this .pem_html,
01986: "label", "label", l_attr);
01987: this .pemf_setStdProps(a);
01988: this .pem_hdl.endElement(this .pem_html,
01989: "label", "label");
01990: } catch (Exception e) {
01991: KeLog.pcmf_log("ug2t",
01992: "error during widget creation from html: "
01993: + this .pem_cName, this ,
01994: KeLog.ERROR);
01995: KeLog.pcmf_logException("ug2t", this , e);
01996: }
01997: }
01998: }
01999: }
02000: }
02001: super .handleSimpleTag(t, a, pos);
02002: }
02003:
02004: private void pemf_createHidden(String xName, String xValue,
02005: String xId, boolean xClose) {
02006: try {
02007: AttributesImpl l_attr = new AttributesImpl();
02008: l_attr.addAttribute(null, null, "name", "", xName);
02009:
02010: l_attr.addAttribute(null, null, "register", "",
02011: xId != null ? xId : xName);
02012:
02013: if (xValue != null && xValue.startsWith("{$") == false
02014: && xValue.endsWith("}") == false)
02015: l_attr.addAttribute(null, null, "value", "", xValue);
02016: else
02017: l_attr.addAttribute(null, null, "value", "", "");
02018:
02019: this .pem_hdl.startElement(this .pem_html, "hidden",
02020: "hidden", l_attr);
02021:
02022: if (xClose)
02023: this .pem_hdl.endElement(this .pem_html, "hidden",
02024: "hidden");
02025: } catch (Exception e) {
02026: KeLog.pcmf_log("ug2t",
02027: "error during widget creation from html: "
02028: + this .pem_cName, this , KeLog.ERROR);
02029: KeLog.pcmf_logException("ug2t", this , e);
02030: }
02031: }
02032:
02033: private void pemf_setStdProps(AttributeSet xA) throws Exception {
02034: String l_width = (String) xA.getAttribute(HTML.Attribute.WIDTH);
02035: String l_height = (String) xA
02036: .getAttribute(HTML.Attribute.HEIGHT);
02037: String l_align = (String) xA.getAttribute(HTML.Attribute.ALIGN);
02038: String l_valign = (String) xA
02039: .getAttribute(HTML.Attribute.VALIGN);
02040: String l_color = (String) xA.getAttribute(HTML.Attribute.COLOR);
02041: String l_bgColor = (String) xA
02042: .getAttribute(HTML.Attribute.BGCOLOR);
02043: String l_style = (String) xA.getAttribute(HTML.Attribute.STYLE);
02044: String l_class = (String) xA.getAttribute(HTML.Attribute.CLASS);
02045: String l_title = (String) xA.getAttribute(HTML.Attribute.TITLE);
02046:
02047: String l_include = (String) xA
02048: .getAttribute(HTML.Attribute.DATA);
02049: if (l_include == null)
02050: l_include = (String) xA.getAttribute(HTML.Attribute.CODE);
02051:
02052: String l_font = null;
02053: String l_fSize = null;
02054: String l_fWeight = null;
02055:
02056: if (l_bgColor == null)
02057: l_bgColor = (String) xA
02058: .getAttribute(HTML.Attribute.BACKGROUND);
02059:
02060: UnHtmlCssStyles l_styles = new UnHtmlCssStyles(l_style);
02061:
02062: String l_stop = l_styles.pcmf_getSl_top();
02063: String l_sleft = l_styles.pcmf_getSl_left();
02064: String l_swidth = l_styles.pcmf_getSl_width();
02065: String l_sheight = l_styles.pcmf_getSl_height();
02066: String l_visi = l_styles.pcmf_getVisibility();
02067: String l_layout = l_styles.pcmf_getS_layout();
02068:
02069: if (l_align == null && l_valign == null)
02070: l_align = l_styles.pcmf_getAlign();
02071: else
02072: l_align = l_styles.pdmf_convertAlign(l_align, l_valign);
02073:
02074: if (l_color == null)
02075: l_color = l_styles.pcmf_getForeground();
02076: if (l_bgColor == null)
02077: l_bgColor = l_styles.pcmf_getBackground();
02078: if (l_width == null)
02079: l_width = l_styles.pcmf_getWidth();
02080: else
02081: l_width = KeTools.pcmf_stringSingleSubst(l_width, "px", "");
02082:
02083: if (l_height == null)
02084: l_height = l_styles.pcmf_getHeight();
02085: else
02086: l_height = KeTools.pcmf_stringSingleSubst(l_height, "px",
02087: "");
02088:
02089: l_font = l_styles.pcmf_getFont();
02090: l_fSize = l_styles.pcmf_getFontSize();
02091: l_fWeight = l_styles.pcmf_getFontWeight();
02092:
02093: AttributesImpl l_attr = null;
02094:
02095: if (this .pem_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT) {
02096: if (this .pem_hdl.pdm_act instanceof IUnLayouted
02097: && l_layout != null) {
02098: l_attr = new AttributesImpl();
02099: l_attr.addAttribute(null, null, "value", "", l_layout);
02100:
02101: // position setzen
02102: this .pem_hdl.startElement(this .pem_html,
02103: "commonLayout", "commonLayout", l_attr);
02104: this .pem_hdl.endElement(this .pem_html, "commonLayout",
02105: "commonLayout");
02106: }
02107:
02108: if (this .pem_hdl.pdm_act.pcmf_getParentNode() instanceof IUnPanel) {
02109: l_attr = new AttributesImpl();
02110: l_attr.addAttribute(null, null, "x", "",
02111: l_sleft != null ? l_sleft : "0");
02112: l_attr.addAttribute(null, null, "y", "",
02113: l_stop != null ? l_stop : "0");
02114: l_attr.addAttribute(null, null, "height", "",
02115: l_sheight != null ? l_sheight : "1");
02116: l_attr.addAttribute(null, null, "width", "",
02117: l_swidth != null ? l_swidth : "1");
02118: l_attr.addAttribute(null, null, "align", "", l_align);
02119:
02120: // position setzen
02121: this .pem_hdl.startElement(this .pem_html, "position",
02122: "position", l_attr);
02123: this .pem_hdl.endElement(this .pem_html, "position",
02124: "position");
02125: }
02126: ;
02127: }
02128:
02129: if (l_width != null || l_height != null) {
02130: if (this .pem_hdl.pdm_act.pcmf_getParentNode() instanceof IUnLayouted) {
02131: l_attr = new AttributesImpl();
02132: l_attr.addAttribute(null, null, "hFill", "",
02133: l_width != null ? "false" : "true");
02134: l_attr.addAttribute(null, null, "vFill", "",
02135: l_height != null ? "false" : "true");
02136:
02137: this .pem_hdl.startElement(this .pem_html, "fill",
02138: "fill", l_attr);
02139: this .pem_hdl.endElement(this .pem_html, "fill", "fill");
02140: }
02141:
02142: l_attr = new AttributesImpl();
02143: l_attr.addAttribute(null, null, "height", "",
02144: l_height != null ? l_height : "-1");
02145: l_attr.addAttribute(null, null, "width", "",
02146: l_width != null ? l_width : "-1");
02147:
02148: this .pem_hdl.startElement(this .pem_html, "fixedSize",
02149: "fixedSize", l_attr);
02150: this .pem_hdl.endElement(this .pem_html, "fixedSize",
02151: "fixedSize");
02152: }
02153:
02154: // swing only values
02155: String l_sweightx = l_styles.pcmf_getSWeight_x();
02156: String l_sweighty = l_styles.pcmf_getSWeight_y();
02157: String l_sfillx = l_styles.pcmf_getSFill_x();
02158: String l_sfilly = l_styles.pcmf_getSFill_y();
02159:
02160: if (l_sweighty != null || l_sweightx != null) {
02161: l_attr = new AttributesImpl();
02162: l_attr.addAttribute(null, null, "weightX", "", l_sweightx);
02163: l_attr.addAttribute(null, null, "weightY", "", l_sweighty);
02164:
02165: this .pem_hdl.startElement(this .pem_html, "weights",
02166: "weights", l_attr);
02167: this .pem_hdl
02168: .endElement(this .pem_html, "weights", "weights");
02169: }
02170:
02171: if (l_sfilly != null || l_sfillx != null) {
02172: l_attr = new AttributesImpl();
02173: l_attr.addAttribute(null, null, "hFill", "", l_sfillx);
02174: l_attr.addAttribute(null, null, "vFill", "", l_sfilly);
02175:
02176: this .pem_hdl.startElement(this .pem_html, "fill", "fill",
02177: l_attr);
02178: this .pem_hdl.endElement(this .pem_html, "fill", "fill");
02179: }
02180:
02181: // visibility
02182: if (l_visi != null && l_visi.equalsIgnoreCase("hidden")) {
02183: l_attr = new AttributesImpl();
02184: l_attr.addAttribute(null, null, "value", "", "true");
02185:
02186: this .pem_hdl.startElement(this .pem_html, "hide", "hide",
02187: l_attr);
02188: this .pem_hdl.endElement(this .pem_html, "hide", "hide");
02189: }
02190:
02191: // border
02192: String l_border = l_styles.pcmf_getBorder();
02193: if (l_border != null) {
02194: if (l_border.equalsIgnoreCase("solid"))
02195: l_border = "LINE";
02196: else if (l_border.equalsIgnoreCase("outset"))
02197: l_border = "OUTSETS";
02198: else if (l_border.equalsIgnoreCase("inset"))
02199: l_border = "INSETS";
02200: else if (l_border.equalsIgnoreCase("none"))
02201: l_border = "NONE";
02202: else
02203: l_border = "LINE";
02204:
02205: l_attr = new AttributesImpl();
02206: l_attr.addAttribute(null, null, "style", "", l_border);
02207: l_attr.addAttribute(null, null, "width", "", l_styles
02208: .pcmf_getBorderWidth());
02209: l_attr.addAttribute(null, null, "color", "", l_styles
02210: .pcmf_getBorderColor());
02211:
02212: this .pem_hdl.startElement(this .pem_html, "wdgBorder",
02213: "wdgBorder", l_attr);
02214: this .pem_hdl.endElement(this .pem_html, "wdgBorder",
02215: "wdgBorder");
02216: }
02217:
02218: // toolTip
02219: if (l_title != null) {
02220: l_attr = new AttributesImpl();
02221: l_attr.addAttribute(null, null, "tip", "", l_title);
02222:
02223: this .pem_hdl.startElement(this .pem_html, "toolTip",
02224: "toolTip", l_attr);
02225: this .pem_hdl
02226: .endElement(this .pem_html, "toolTip", "toolTip");
02227: }
02228:
02229: // cssClass setzen
02230: if (l_class != null) {
02231: l_attr = new AttributesImpl();
02232: l_attr.addAttribute(null, null, "value", "", l_class);
02233:
02234: this .pem_hdl.startElement(this .pem_html, "cssClass",
02235: "cssClass", l_attr);
02236: this .pem_hdl.endElement(this .pem_html, "cssClass",
02237: "cssClass");
02238: }
02239:
02240: // farbe setzen
02241: if (l_color != null || l_bgColor != null) {
02242: l_attr = new AttributesImpl();
02243: if (l_color != null)
02244: l_attr.addAttribute(null, null, "fg", "", l_color);
02245:
02246: if (l_bgColor != null)
02247: l_attr.addAttribute(null, null, "bg", "", l_bgColor);
02248:
02249: this .pem_hdl.startElement(this .pem_html, "color", "color",
02250: l_attr);
02251: this .pem_hdl.endElement(this .pem_html, "color", "color");
02252: }
02253:
02254: boolean l_useCssColors = l_styles.pcmf_getDelDefCol();
02255: if (l_useCssColors == true) {
02256: l_attr = new AttributesImpl();
02257:
02258: this .pem_hdl.startElement(this .pem_html, "deleteColors",
02259: "deleteColors", l_attr);
02260: this .pem_hdl.endElement(this .pem_html, "deleteColors",
02261: "deleteColors");
02262: }
02263:
02264: // font setzen
02265: if (l_font != null) {
02266: l_attr = new AttributesImpl();
02267: if (l_font != null)
02268: l_attr.addAttribute(null, null, "name", "", l_font);
02269:
02270: if (l_fSize != null)
02271: l_attr.addAttribute(null, null, "size", "", l_fSize);
02272:
02273: if (l_fWeight != null)
02274: l_attr.addAttribute(null, null, "style", "", l_fWeight);
02275:
02276: this .pem_hdl.startElement(this .pem_html, "font", "font",
02277: l_attr);
02278: this .pem_hdl.endElement(this .pem_html, "font", "font");
02279: }
02280:
02281: // includen
02282: if (l_include != null) {
02283: l_include = KeTools.pcmf_stringSubst(l_include, " ", "");
02284:
02285: if (l_include.startsWith("javaclass:")) {
02286: l_include = KeTools.pcmf_stringSingleSubst(l_include,
02287: "javaclass:", "");
02288:
02289: l_attr = new AttributesImpl();
02290: l_attr.addAttribute(null, null, "class", "", l_include);
02291:
02292: this .pem_hdl.startElement(this .pem_html, "java",
02293: "java", l_attr);
02294: this .pem_hdl.endElement(this .pem_html, "java", "java");
02295: } else if (l_include.startsWith("javaobject:")) {
02296: l_include = KeTools.pcmf_stringSingleSubst(l_include,
02297: "javaobject:", "");
02298:
02299: l_attr = new AttributesImpl();
02300: l_attr
02301: .addAttribute(null, null, "object", "",
02302: l_include);
02303:
02304: this .pem_hdl.startElement(this .pem_html, "java",
02305: "java", l_attr);
02306: this .pem_hdl.endElement(this .pem_html, "java", "java");
02307: } else if (l_include.startsWith("xml:")) {
02308: l_include = KeTools.pcmf_stringSingleSubst(l_include,
02309: "xml:", "");
02310:
02311: l_attr = new AttributesImpl();
02312: l_attr.addAttribute(null, null, "file", "", l_include);
02313:
02314: this .pem_hdl.startElement(this .pem_html, "include",
02315: "include", l_attr);
02316: this .pem_hdl.endElement(this .pem_html, "include",
02317: "include");
02318: } else if (l_include.startsWith("submit:")) {
02319: l_include = KeTools.pcmf_stringSingleSubst(l_include,
02320: "submit:", "");
02321:
02322: l_attr = new AttributesImpl();
02323: l_attr.addAttribute(null, null, "value", "", l_include);
02324:
02325: this .pem_hdl.startElement(this .pem_html, "submitEvent",
02326: "submitEvent", l_attr);
02327: this .pem_hdl.endElement(this .pem_html, "submitEvent",
02328: "submitEvent");
02329: } else if (l_include.startsWith("eventonchange:")) {
02330: l_include = KeTools.pcmf_stringSingleSubst(l_include,
02331: "eventOnChange:", "");
02332:
02333: l_attr = new AttributesImpl();
02334: l_attr.addAttribute(null, null, "value", "", l_include);
02335:
02336: this .pem_hdl.startElement(this .pem_html,
02337: "eventOnChange", "eventOnChange", l_attr);
02338: this .pem_hdl.endElement(this .pem_html, "eventOnChange",
02339: "eventOnChange");
02340: } else if (l_include.startsWith("disable:")) {
02341: l_include = KeTools.pcmf_stringSingleSubst(l_include,
02342: "disable:", "");
02343:
02344: l_attr = new AttributesImpl();
02345: l_attr.addAttribute(null, null, "value", "", l_include);
02346:
02347: this .pem_hdl.startElement(this .pem_html, "disable",
02348: "disable", l_attr);
02349: this .pem_hdl.endElement(this .pem_html, "disable",
02350: "disable");
02351: } else if (l_include.startsWith("readonly:")) {
02352: l_include = KeTools.pcmf_stringSingleSubst(l_include,
02353: "readonly:", "");
02354:
02355: l_attr = new AttributesImpl();
02356: l_attr.addAttribute(null, null, "value", "", l_include);
02357:
02358: this .pem_hdl.startElement(this .pem_html, "readOnly",
02359: "readOnly", l_attr);
02360: this .pem_hdl.endElement(this .pem_html, "readOnly",
02361: "readOnly");
02362: } else if (l_include.startsWith("hide:")) {
02363: l_include = KeTools.pcmf_stringSingleSubst(l_include,
02364: "hide:", "");
02365:
02366: l_attr = new AttributesImpl();
02367: l_attr.addAttribute(null, null, "value", "", l_include);
02368:
02369: this .pem_hdl.startElement(this .pem_html, "hide",
02370: "hide", l_attr);
02371: this .pem_hdl.endElement(this .pem_html, "hide", "hide");
02372: } else if (l_include.startsWith("listenerclass:")) {
02373: l_attr = new AttributesImpl();
02374: l_attr.addAttribute(null, null, "value", "", "true");
02375:
02376: this .pem_hdl.startElement(this .pem_html, "submitEvent",
02377: "submitEvent", l_attr);
02378: this .pem_hdl.endElement(this .pem_html, "submitEvent",
02379: "submitEvent");
02380:
02381: l_include = KeTools.pcmf_stringSingleSubst(l_include,
02382: "listenerclass:", "");
02383:
02384: l_attr = new AttributesImpl();
02385: l_attr.addAttribute(null, null, "class", "", l_include);
02386:
02387: this .pem_hdl.startElement(this .pem_html, "srvListener",
02388: "srvListener", l_attr);
02389: this .pem_hdl.endElement(this .pem_html, "srvListener",
02390: "srvListener");
02391: } else if (l_include.startsWith("listenerobject:")) {
02392: l_attr = new AttributesImpl();
02393: l_attr.addAttribute(null, null, "value", "", "true");
02394:
02395: this .pem_hdl.startElement(this .pem_html, "submitEvent",
02396: "submitEvent", l_attr);
02397: this .pem_hdl.endElement(this .pem_html, "submitEvent",
02398: "submitEvent");
02399:
02400: l_include = KeTools.pcmf_stringSingleSubst(l_include,
02401: "listenerobject:", "");
02402:
02403: l_attr = new AttributesImpl();
02404: l_attr
02405: .addAttribute(null, null, "object", "",
02406: l_include);
02407:
02408: this .pem_hdl.startElement(this .pem_html, "srvListener",
02409: "srvListener", l_attr);
02410: this .pem_hdl.endElement(this .pem_html, "srvListener",
02411: "srvListener");
02412: } else if (l_include.startsWith("listenerstatement:")) {
02413: l_attr = new AttributesImpl();
02414: l_attr.addAttribute(null, null, "value", "", "true");
02415:
02416: this .pem_hdl.startElement(this .pem_html, "submitEvent",
02417: "submitEvent", l_attr);
02418: this .pem_hdl.endElement(this .pem_html, "submitEvent",
02419: "submitEvent");
02420:
02421: l_include = KeTools.pcmf_stringSingleSubst(l_include,
02422: "listenerstatement:", "");
02423:
02424: l_attr = new AttributesImpl();
02425:
02426: ArrayList l_list = KeTools.pcmf_stringTokens(l_include,
02427: ".", 3);
02428:
02429: l_attr.addAttribute(null, null, "object", "", l_list
02430: .get(0).toString());
02431: l_attr.addAttribute(null, null, "method", "", l_list
02432: .get(1).toString());
02433: l_attr.addAttribute(null, null, "parameter", "", l_list
02434: .get(2).toString());
02435:
02436: this .pem_hdl.startElement(this .pem_html,
02437: "srvStmtListener", "srvStmtListener", l_attr);
02438: this .pem_hdl.endElement(this .pem_html,
02439: "srvStmtListener", "srvStmtListener");
02440: }
02441: }
02442:
02443: return;
02444: }
02445:
02446: public void handleStartTag(Tag t, MutableAttributeSet a, int pos) {
02447: if (this .pem_recordBodyStart) {
02448: this .pem_recordBodyStart = false;
02449: this .pem_bodyStart = pos;
02450: }
02451:
02452: UnHtmlTagStackElement l_tagEl = new UnHtmlTagStackElement();
02453: l_tagEl.pcm_current = t;
02454: l_tagEl.pcm_startPos = pos;
02455: l_tagEl.pcm_attributes = a.copyAttributes();
02456:
02457: this .pem_tagStack.push(l_tagEl);
02458:
02459: if (t.equals(Tag.A) || t.equals(Tag.TEXTAREA)
02460: || t.equals(Tag.SELECT))
02461: this .pem_lastText = "";
02462:
02463: if (this .pem_inRecursion) {
02464: super .handleStartTag(t, a, pos);
02465: return;
02466: }
02467:
02468: if (this .pemf_handleRecursive(t, a)) {
02469: l_tagEl.pcm_inRecursion = true;
02470: this .pem_inRecursion = true;
02471: return;
02472: }
02473: ;
02474:
02475: if (t.equals(Tag.BODY)) {
02476: this .pem_recordBodyStart = true;
02477:
02478: try {
02479: this .pemf_setStdProps(a);
02480: } catch (Exception e) {
02481: KeLog.pcmf_log("ug2t",
02482: "error during widget creation from html: page",
02483: this , KeLog.ERROR);
02484: }
02485: }
02486:
02487: if (this .pemf_isConvertable()) {
02488: try {
02489: char l_subst[] = new char[pos - this .pem_prevPos];
02490: char l_var[] = ("{" + this .pem_cName + "}")
02491: .toCharArray();
02492: System.arraycopy(l_var, 0, l_subst, 0, l_var.length);
02493:
02494: this .pem_html = KeTools.pcmf_stringSingleSubst(
02495: this .pem_html, this .pem_html.substring(
02496: this .pem_prevPos, pos), String
02497: .valueOf(l_subst));
02498: this .pem_current = null;
02499: } catch (Exception e) {
02500: KeLog.pcmf_log("ug2t",
02501: "error converting html stream, Tag:"
02502: + t.toString() + ", position: " + pos
02503: + " ,streamed so far: "
02504: + this .pem_html.substring(0, pos),
02505: this , KeLog.FATAL);
02506: }
02507: }
02508:
02509: String l_type = (String) a.getAttribute(HTML.Attribute.TYPE);
02510: String l_id = (String) a.getAttribute(HTML.Attribute.ID);
02511:
02512: if (t.equals(Tag.SELECT)
02513: || t.equals(Tag.TEXTAREA)
02514: || (t.equals(Tag.SPAN) || t.equals(Tag.DIV))
02515: && l_type != null
02516: && (l_type.equalsIgnoreCase("label") || l_type
02517: .equalsIgnoreCase("html"))) {
02518: this .pem_cName = (String) a
02519: .getAttribute(HTML.Attribute.NAME);
02520: this .pem_cType = l_type;
02521: String l_value = (String) a
02522: .getAttribute(HTML.Attribute.VALUE);
02523:
02524: // type in folgender form
02525: // tree.factDesc
02526: String l_name = this .pem_cName;
02527: String l_fdesc = null;
02528:
02529: if (l_name != null) {
02530: ArrayList l_toks = KeTools.pcmf_stringTokens(l_name,
02531: ".");
02532: if (l_toks.size() > 1)
02533: l_fdesc = l_toks.get(1).toString();
02534: } else {
02535: l_name = l_id;
02536: this .pem_cName = l_id;
02537: }
02538:
02539: if (l_name == null
02540: && this .pem_conversionMode != CONVERT_DISABLED)
02541: KeLog.pcmf_log("ug2t",
02542: "tag does not have a name or id: "
02543: + this .pem_current, this , KeLog.FATAL);
02544:
02545: if (this .pem_conversionMode == CONVERT_DISABLED)
02546: this .pem_current = null;
02547: else if (this .pem_conversionMode == CONVERT_UNTYPED) {
02548: this .pem_current = null;
02549: this .pemf_createHidden(l_name, l_value, l_id, false);
02550: } else {
02551: if (l_type != null && l_type.equalsIgnoreCase("label")) {
02552: try {
02553: AttributesImpl l_attr = new AttributesImpl();
02554: l_attr.addAttribute(null, null, "name", "",
02555: l_name);
02556:
02557: if (l_fdesc != null)
02558: l_attr.addAttribute(null, null,
02559: "factoryDesc", "", l_fdesc);
02560:
02561: l_attr
02562: .addAttribute(null, null, "value", "",
02563: "");
02564: l_attr.addAttribute(null, null, "register", "",
02565: l_id != null ? l_id : l_name);
02566:
02567: this .pem_hdl.startElement(this .pem_html,
02568: "label", "label", l_attr);
02569: this .pemf_setStdProps(l_tagEl.pcm_attributes);
02570: } catch (Exception e) {
02571: KeLog.pcmf_log("ug2t",
02572: "error during widget creation from html: "
02573: + this .pem_cName, this ,
02574: KeLog.ERROR);
02575: KeLog.pcmf_logException("ug2t", this , e);
02576: }
02577: } else if (l_type != null
02578: && l_type.equalsIgnoreCase("html")
02579: && this .pem_hdl.pdm_AppType == UnComponentFactory.MARKUP) {
02580: try {
02581: AttributesImpl l_attr = new AttributesImpl();
02582: l_attr.addAttribute(null, null, "name", "",
02583: l_name);
02584:
02585: if (l_fdesc != null)
02586: l_attr.addAttribute(null, null,
02587: "factoryDesc", "", l_fdesc);
02588:
02589: l_attr.addAttribute(null, null, "html", "", "");
02590: l_attr.addAttribute(null, null, "register", "",
02591: l_id != null ? l_id : l_name);
02592:
02593: this .pem_hdl.startElement(this .pem_html,
02594: "html", "html", l_attr);
02595: this .pemf_setStdProps(l_tagEl.pcm_attributes);
02596: } catch (Exception e) {
02597: KeLog.pcmf_log("ug2t",
02598: "error during widget creation from html: "
02599: + this .pem_cName, this ,
02600: KeLog.ERROR);
02601: KeLog.pcmf_logException("ug2t", this , e);
02602: }
02603: } else if (t.equals(Tag.SELECT)) {
02604: try {
02605: AttributesImpl l_attr = new AttributesImpl();
02606: l_attr.addAttribute(null, null, "name", "",
02607: l_name);
02608:
02609: if (l_fdesc != null)
02610: l_attr.addAttribute(null, null,
02611: "factoryDesc", "", l_fdesc);
02612:
02613: l_attr.addAttribute(null, null, "register", "",
02614: l_name);
02615:
02616: String l_size = (String) a
02617: .getAttribute(HTML.Attribute.SIZE);
02618: if (l_size == null)
02619: l_size = "0";
02620:
02621: if (l_size.equals("1")) {
02622: this .pem_hdl.startElement(this .pem_html,
02623: "comboBox", "comboBox", l_attr);
02624: this .pemf_setStdProps(a);
02625: } else {
02626: l_attr.addAttribute(null, null, "size", "",
02627: l_size);
02628:
02629: this .pem_hdl.startElement(this .pem_html,
02630: "listBox", "listBox", l_attr);
02631: this .pemf_setStdProps(a);
02632: }
02633: } catch (Exception e) {
02634: KeLog.pcmf_log("ug2t",
02635: "error during widget creation from html: "
02636: + this .pem_cName, this ,
02637: KeLog.ERROR);
02638: KeLog.pcmf_logException("ug2t", this , e);
02639: }
02640: } else if (t.equals(Tag.TEXTAREA)) {
02641: try {
02642: AttributesImpl l_attr = new AttributesImpl();
02643: l_attr.addAttribute(null, null, "name", "",
02644: l_name);
02645:
02646: if (l_fdesc != null)
02647: l_attr.addAttribute(null, null,
02648: "factoryDesc", "", l_fdesc);
02649:
02650: l_attr.addAttribute(null, null, "register", "",
02651: l_name);
02652:
02653: if (l_value != null)
02654: l_attr.addAttribute(null, null, "value",
02655: "", l_value);
02656: else
02657: l_attr.addAttribute(null, null, "value",
02658: "", "");
02659:
02660: String l_cols = (String) a
02661: .getAttribute(HTML.Attribute.COLS);
02662: String l_rows = (String) a
02663: .getAttribute(HTML.Attribute.ROWS);
02664:
02665: if (l_cols == null)
02666: l_cols = "20";
02667: if (l_rows == null)
02668: l_rows = "4";
02669:
02670: l_attr.addAttribute(null, null, "cols", "",
02671: l_cols);
02672: l_attr.addAttribute(null, null, "rows", "",
02673: l_rows);
02674:
02675: this .pem_hdl.startElement(this .pem_html,
02676: "textBox", "textBox", l_attr);
02677: this .pemf_setStdProps(a);
02678: } catch (Exception e) {
02679: KeLog.pcmf_log("ug2t",
02680: "error during widget creation from html: "
02681: + this .pem_cName, this ,
02682: KeLog.ERROR);
02683: KeLog.pcmf_logException("ug2t", this , e);
02684: }
02685: }
02686: }
02687: }
02688:
02689: super .handleStartTag(t, a, pos);
02690: }
02691:
02692: public void handleText(char[] data, int pos) {
02693: if (this .pem_recordBodyStart) {
02694: this .pem_recordBodyStart = false;
02695: this .pem_bodyStart = pos;
02696: }
02697:
02698: this .pem_lastText = String.valueOf(data);
02699:
02700: if (this .pem_lastText.startsWith("{$")
02701: && this .pem_lastText.endsWith("}"))
02702: this .pem_lastText = "";
02703:
02704: if (this .pem_inRecursion) {
02705: super .handleText(data, pos);
02706: return;
02707: }
02708:
02709: if (this .pemf_isConvertable()) {
02710: try {
02711: char l_subst[] = new char[pos - this .pem_prevPos];
02712: char l_var[] = ("{" + this .pem_cName + "}")
02713: .toCharArray();
02714: System.arraycopy(l_var, 0, l_subst, 0, l_var.length);
02715:
02716: this .pem_html = KeTools.pcmf_stringSingleSubst(
02717: this .pem_html, this .pem_html.substring(
02718: this .pem_prevPos, pos), String
02719: .valueOf(l_subst));
02720: this .pem_current = null;
02721: } catch (Exception e) {
02722: KeLog.pcmf_log("ug2t",
02723: "error converting html stream, Text:"
02724: + new String(data) + ", position: "
02725: + pos + " ,streamed so far: "
02726: + this .pem_html.substring(0, pos),
02727: this , KeLog.FATAL);
02728: }
02729: }
02730:
02731: super .handleText(data, pos);
02732: }
02733: }
02734:
02735: // Html parser Ende
02736:
02737: // @@
02738:
02739: class UnFeDescriptor {
02740: // Methode equals oder getHash damit HashMap gleichartige findet
02741: // Nur noch ein String und eine Kennung
02742:
02743: protected String pdm_xCmpVal = null;
02744: protected Pattern pdm_pattern = null;
02745: protected int pdm_mode = FE_DESC_TAG;
02746:
02747: public static final int FE_DESC_TAG = 0;
02748: public static final int FE_DESC_NAME = 1;
02749:
02750: public static UnFeDescriptor pcmf_createTagDesc(String xTag) {
02751: UnFeDescriptor l_desc = new UnFeDescriptor();
02752: l_desc.pdm_xCmpVal = xTag;
02753: l_desc.pdm_mode = FE_DESC_TAG;
02754:
02755: return (l_desc);
02756: }
02757:
02758: public static UnFeDescriptor pcmf_createReTagDesc(String xReTag) {
02759: UnFeDescriptor l_desc = new UnFeDescriptor();
02760: try {
02761: l_desc.pdm_xCmpVal = xReTag;
02762: l_desc.pdm_pattern = Pattern.compile(xReTag);
02763: l_desc.pdm_mode = FE_DESC_TAG;
02764: } catch (Exception e) {
02765: KeLog.pcmf_log("ug2t",
02766: "<forEach> invalid regular expression: " + xReTag,
02767: null, KeLog.ERROR);
02768: }
02769:
02770: return (l_desc);
02771: }
02772:
02773: public static UnFeDescriptor pcmf_createNameDesc(String xName) {
02774: UnFeDescriptor l_desc = new UnFeDescriptor();
02775: l_desc.pdm_xCmpVal = xName;
02776: l_desc.pdm_mode = FE_DESC_NAME;
02777:
02778: return (l_desc);
02779: }
02780:
02781: public static UnFeDescriptor pcmf_createReNameDesc(String xReName) {
02782: UnFeDescriptor l_desc = new UnFeDescriptor();
02783: try {
02784: l_desc.pdm_xCmpVal = xReName;
02785: l_desc.pdm_pattern = Pattern.compile(xReName);
02786: l_desc.pdm_mode = FE_DESC_NAME;
02787: } catch (Exception e) {
02788: KeLog.pcmf_log("ug2t",
02789: "<forEach> invalid regular expression: " + xReName,
02790: null, KeLog.ERROR);
02791: }
02792:
02793: return (l_desc);
02794: }
02795:
02796: public int pcmf_getFEMode() {
02797: return (pdm_mode);
02798: }
02799:
02800: public boolean pcmf_evaluateName(String xValue) {
02801: if (xValue == null)
02802: return (false);
02803:
02804: if (this .pdm_pattern != null)
02805: return (this .pdm_pattern.matcher(xValue).matches());
02806: else
02807: return (this .pdm_xCmpVal.equals(xValue));
02808: }
02809:
02810: public boolean pcmf_evaluateTag(String xValue) {
02811: if (xValue == null)
02812: return (false);
02813:
02814: if (this .pdm_pattern != null)
02815: return (this .pdm_pattern.matcher(xValue).matches());
02816: else
02817: return (this .pdm_xCmpVal.equals(xValue));
02818: }
02819:
02820: public String toString() {
02821: return (this .pdm_xCmpVal);
02822: }
02823:
02824: public boolean equals(Object xCmp) {
02825: if (this .pdm_mode == FE_DESC_NAME)
02826: return (this .pcmf_evaluateName(xCmp.toString()));
02827: else
02828: return (this .pcmf_evaluateTag(xCmp.toString()));
02829: }
02830: }
02831:
02832: final class UnFEContainer {
02833: private Stack pem_includes = new Stack();
02834:
02835: public final void pcmf_pushInclude(String xInclude) {
02836: this .pem_includes.push(xInclude);
02837: }
02838:
02839: public final void pcmf_popInclude() {
02840: this .pem_includes.pop();
02841: }
02842:
02843: public final void pcmf_doInclude(UnApplFactSAXHandler l_hdl) {
02844: // @@
02845:
02846: Iterator l_it = this .pem_includes.iterator();
02847:
02848: String xSource = null;
02849: UnApplicationFactory l_prod = null;
02850:
02851: while (l_it.hasNext()) {
02852: try {
02853: xSource = KeTools.pcmf_deRef((String) l_it.next());
02854:
02855: l_prod = new UnApplicationFactory(xSource, l_hdl);
02856: l_prod.pcmf_parseRecursiv();
02857: } catch (Exception e) {
02858: KeLog.pcmf_log("ug2t",
02859: "<include> error during file include "
02860: + xSource, this , KeLog.ERROR);
02861: }
02862: ;
02863: }
02864: ;
02865:
02866: // @@
02867:
02868: };
02869: };
02870:
02871: final class UnXMLTAGapp implements IUnSAXAppFactHandler {
02872: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
02873: String qName, Attributes attributes) throws Exception {
02874: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
02875: String xRootUrl = KeTools.pcmf_deRef(attributes
02876: .getValue("rootURL"));
02877: String xProtocol = KeTools.pcmf_deRef(attributes
02878: .getValue("protocol"));
02879: String xPort = KeTools.pcmf_deRef(attributes.getValue("port"));
02880: String xDomain = KeTools.pcmf_deRef(attributes
02881: .getValue("domain"));
02882: String xMDI = KeTools.pcmf_deRef(attributes.getValue("mdi"));
02883: String xAwHi = KeTools
02884: .pcmf_deRef(attributes.getValue("height"));
02885: String xAwWi = KeTools.pcmf_deRef(attributes.getValue("width"));
02886: String xLf = KeTools.pcmf_deRef(attributes.getValue("plaf"));
02887: String xCss = KeTools.pcmf_deRef(attributes.getValue("extCss"));
02888: String xGenRs = KeTools.pcmf_deRef(attributes
02889: .getValue("genReshapeEvents"));
02890: String xAs = KeTools
02891: .pcmf_deRef(attributes.getValue("autoShow"));
02892: String xSubm = KeTools
02893: .pcmf_deRef(attributes.getValue("submit"));
02894: String xBubble = KeTools.pcmf_deRef(attributes
02895: .getValue("bubble"));
02896: String xCache = KeTools.pcmf_deRef(attributes
02897: .getValue("renderCache"));
02898: String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
02899:
02900: String xServiceClass = KeTools.pcmf_deRef(attributes
02901: .getValue("serviceClass"));
02902: String xServiceObject = KeTools.pcmf_deRef(attributes
02903: .getValue("serviceObject"));
02904:
02905: String xServicePoll = KeTools.pcmf_deRef(attributes
02906: .getValue("servicePoll"));
02907:
02908: String xFBlock = KeTools.pcmf_deRef(attributes
02909: .getValue("factoryDesc"));
02910:
02911: ServletConfig l_config = ((ServletConfig) KeRegisteredObject
02912: .pcmf_getObjByName(UnBasicServlet.SERVLET_CONFIG));
02913: if (l_config != null) {
02914: if (xPort == null) {
02915: String l_port = l_config.getInitParameter("port");
02916: if (l_port != null)
02917: xPort = l_port;
02918: }
02919: if (xDomain == null) {
02920: String l_domain = l_config.getInitParameter("domain");
02921: if (l_domain != null && !l_domain.equals("READFROMURL"))
02922: xDomain = l_domain;
02923: }
02924: if (xRootUrl == null) {
02925: String l_ru = l_config.getInitParameter("rootURL");
02926: if (l_ru != null)
02927: xRootUrl = l_ru;
02928: }
02929: if (xProtocol == null) {
02930: String l_pc = l_config.getInitParameter("protocol");
02931: if (l_pc != null)
02932: xProtocol = l_pc;
02933: }
02934: }
02935:
02936: if (xFBlock != null && xFBlock.trim().equals(""))
02937: xFBlock = null;
02938: if (xPort == null)
02939: xPort = "8080";
02940:
02941: IUnApplication l_appl = null;
02942:
02943: if (xLf != null) {
02944: if (xMDI != null && xMDI.equalsIgnoreCase("true"))
02945: l_appl = l_hdl.pdm_objFact.pcmf_createApplPlugin(
02946: l_hdl.pdm_AppType, xName, Integer
02947: .parseInt(xPort), true, xLf, xFBlock);
02948: else
02949: l_appl = l_hdl.pdm_objFact.pcmf_createApplPlugin(
02950: l_hdl.pdm_AppType, xName, Integer
02951: .parseInt(xPort), false, xLf, xFBlock);
02952: } else {
02953: if (xMDI != null && xMDI.equalsIgnoreCase("true"))
02954: l_appl = l_hdl.pdm_objFact.pcmf_createApplPlugin(
02955: l_hdl.pdm_AppType, xName, Integer
02956: .parseInt(xPort), true, xFBlock);
02957: else
02958: l_appl = l_hdl.pdm_objFact.pcmf_createApplPlugin(
02959: l_hdl.pdm_AppType, xName, Integer
02960: .parseInt(xPort), false, xFBlock);
02961: }
02962:
02963: if (xBubble != null && xBubble.equalsIgnoreCase("false"))
02964: l_appl.pcmf_setEventBubbling(false);
02965:
02966: if (xServiceObject != null || xServiceClass != null) {
02967: if (xServicePoll == null)
02968: xServicePoll = "2000";
02969:
02970: int l_spoll = Integer.parseInt(xServicePoll);
02971: if (xServiceObject != null)
02972: l_appl.pcmf_setService(
02973: (IKeExecutable) KeRegisteredObject
02974: .pcmf_getObjByName(xServiceObject),
02975: l_spoll, l_spoll);
02976: else
02977: l_appl.pcmf_setService((IKeExecutable) Class.forName(
02978: xServiceClass).newInstance(), l_spoll, l_spoll);
02979: }
02980:
02981: if (l_config != null) {
02982: if (l_appl instanceof MuGenericApplication)
02983: ((MuGenericApplication) l_appl)
02984: .pcmf_setRedirect(l_config
02985: .getInitParameter("REDIRECT_ON_EXIT"));
02986: }
02987:
02988: if (l_hdl.pdm_mixed)
02989: ((HoSrvGenericApplication) l_appl).pcmf_setMixedMode(true);
02990:
02991: if (xDomain != null)
02992: l_appl.pcmf_setHostName(xDomain);
02993: if (xRootUrl != null)
02994: l_appl.pcmf_setRootUrl(xRootUrl);
02995: if (xProtocol != null)
02996: l_appl.pcmf_setProtocol(xProtocol);
02997:
02998: l_hdl.pdm_appl = l_appl;
02999:
03000: if (l_appl instanceof MuGenericApplication)
03001: ((MuGenericApplication) l_appl)
03002: .pcmf_setTemplateKit((MuGenericTemplateKit) KeRegisteredObject
03003: .pcmf_getObjByName(MuGenericTemplateKit.TEMPLATE_KIT_NAME));
03004: else
03005: l_appl.pcmf_setComponentFactory(l_hdl.pdm_objFact);
03006:
03007: if (xAwHi != null && xAwWi != null)
03008: l_appl.pcmf_setApplWinSize(Integer.parseInt(xAwWi), Integer
03009: .parseInt(xAwHi));
03010:
03011: if (xCss != null && xCss.equals("") == false)
03012: l_appl.pcmf_setExternalCss(xCss);
03013:
03014: l_appl.pcmf_getUnComponent().pcmf_enableSubmit();
03015: if (xSubm != null && xSubm.equals("false"))
03016: l_appl.pcmf_getUnComponent().pcmf_disableSubmit();
03017:
03018: if (xGenRs != null && xGenRs.equals("true"))
03019: l_appl.pcmf_setGenerateReshapeEvents(true);
03020:
03021: if (xAs != null && xAs.equals("false")
03022: && l_appl instanceof HoSrvGenericApplication)
03023: ((HoSrvGenericApplication) l_appl).pcmf_setAutoShow(false);
03024:
03025: // @@
03026:
03027: l_hdl.pcmf_doExecStack(l_appl, l_appl.pcmf_getUnComponent(),
03028: xName);
03029:
03030: return (l_appl);
03031: };
03032: };
03033:
03034: final class UnXMLTAGnavHdl implements IUnSAXAppFactHandler {
03035: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03036: String qName, Attributes attributes) throws Exception {
03037: if (l_hdl.pdm_appl instanceof MuGenericApplication) {
03038: String xClass = KeTools.pcmf_deRef(attributes
03039: .getValue("class"));
03040: String xObj = KeTools.pcmf_deRef(attributes
03041: .getValue("object"));
03042:
03043: try {
03044: IUnGuiEventListener l_listen = null;
03045:
03046: if (xClass != null && xClass.equals("") == false)
03047: l_listen = (IUnGuiEventListener) Class.forName(
03048: xClass).newInstance();
03049: else if (xObj != null && xObj.equals("") == false)
03050: l_listen = (IUnGuiEventListener) KeRegisteredObject
03051: .pcmf_getObjByName(xObj);
03052:
03053: if (l_listen == null)
03054: KeLog
03055: .pcmf_log(
03056: "ug2t",
03057: "<navigationErrorHandler> navigation errorhandling attributes require a valid class or a valid obj attribute: class["
03058: + xClass
03059: + "] object["
03060: + xObj + "]", this ,
03061: KeLog.ERROR);
03062: else
03063: ((MuGenericApplication) l_hdl.pdm_appl)
03064: .pcmf_setNavigationErrorHandler(l_listen);
03065: } catch (Exception e) {
03066: KeLog.pcmf_log("ug2t",
03067: "<navigationErrorHandler> class: " + xClass
03068: + " for listener could not be found",
03069: this , KeLog.ERROR);
03070: }
03071: }
03072:
03073: l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act,
03074: l_hdl.pdm_name);
03075:
03076: return (l_hdl.pdm_appl);
03077: };
03078: };
03079:
03080: final class UnXMLTAGpage implements IUnSAXAppFactHandler {
03081: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03082: String qName, Attributes attributes) throws Exception {
03083: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
03084: String xActive = KeTools.pcmf_deRef(attributes
03085: .getValue("active"));
03086: String xOrphan = KeTools.pcmf_deRef(attributes
03087: .getValue("orphan"));
03088: String xNL = KeTools.pcmf_deRef(attributes.getValue("layout"));
03089: String xSubm = KeTools
03090: .pcmf_deRef(attributes.getValue("submit"));
03091: String xGenRs = KeTools.pcmf_deRef(attributes
03092: .getValue("genReshapeEvents"));
03093: String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
03094: String xMown = KeTools.pcmf_deRef(attributes
03095: .getValue("ownMenu"));
03096: String xMdiDecCol = KeTools.pcmf_deRef(attributes
03097: .getValue("htmlDecoColor"));
03098: String xCss = KeTools.pcmf_deRef(attributes.getValue("extCss"));
03099:
03100: String xFBlock = KeTools.pcmf_deRef(attributes
03101: .getValue("factoryDesc"));
03102: if (xFBlock != null && xFBlock.trim().equals(""))
03103: xFBlock = null;
03104:
03105: IUnPage l_page = null;
03106:
03107: if (xNL != null && xNL.equals("false"))
03108: l_page = l_hdl.pdm_objFact.pcmf_createGuiPagePlugin(
03109: l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl,
03110: xFBlock);
03111: else
03112: l_page = l_hdl.pdm_objFact.pcmf_createGuiPagePlugin(
03113: l_hdl.pdm_AppType, xName, false, l_hdl.pdm_appl,
03114: xFBlock);
03115:
03116: if (xCss != null && xCss.equals("") == false)
03117: l_page.pcmf_setExternalCss(xCss);
03118:
03119: if (l_hdl.pdm_appl.pcmf_isMDI()) {
03120: l_page.pcmf_getUnComponent().pcmf_setGlobal(true);
03121: if (l_hdl.pdm_appl.pcmf_getApplType() == UnComponentFactory.MARKUP
03122: && xMdiDecCol != null
03123: && l_page instanceof MuGenericPage)
03124: ((MuGenericPage) l_page).pcmf_getDeco()
03125: .pcmf_getUnComponent().pcmf_setBgColor(
03126: xMdiDecCol);
03127: }
03128:
03129: if (l_page instanceof IUnPanel) {
03130: if (xScr != null && xScr.equals("false"))
03131: ((IUnPanel) l_page).pcmf_setScroll(false);
03132: }
03133: ;
03134:
03135: if (xMown != null && xMown.equals("true"))
03136: l_page.pcmf_ownsMenu(true);
03137:
03138: String xReg = KeTools.pcmf_deRef(attributes
03139: .getValue("register"));
03140: if (xReg != null && xReg.equals("") == false)
03141: l_page.pcmf_getUnComponent().pcmf_reRegister(xReg);
03142:
03143: l_page.pcmf_getUnComponent().pcmf_enableSubmit();
03144: if (xSubm != null && xSubm.equals("false"))
03145: l_page.pcmf_getUnComponent().pcmf_disableSubmit();
03146:
03147: if (xGenRs != null && xGenRs.equals("true"))
03148: l_page.pcmf_setGenerateReshapeEvents(true);
03149:
03150: if (xOrphan == null || xOrphan.equals("false"))
03151: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_page
03152: .pcmf_getUnComponent());
03153: else
03154: l_page.pcmf_getUnComponent().pcmf_setGlobal(true);
03155:
03156: l_page.pcmf_setPostFct(false);
03157: l_page.pcmf_setPreFct(false);
03158:
03159: if (xActive != null && xActive.equals("true"))
03160: l_hdl.pdm_appl.pcmf_setActive(xName);
03161:
03162: l_hdl.pdm_page = l_page;
03163:
03164: l_hdl.pcmf_doExecStack(l_page, l_page.pcmf_getUnComponent(),
03165: xName);
03166:
03167: return (l_page);
03168: };
03169: };
03170:
03171: // Erzeugt eine Seite aus einem Html file (Html parser)
03172: final class UnXMLTAGhtmlPage implements IUnSAXAppFactHandler {
03173: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03174: String qName, Attributes attributes) throws Exception {
03175: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
03176: String xActive = KeTools.pcmf_deRef(attributes
03177: .getValue("active"));
03178: String xOrphan = KeTools.pcmf_deRef(attributes
03179: .getValue("orphan"));
03180: String xNL = KeTools.pcmf_deRef(attributes.getValue("layout"));
03181: String xSubm = KeTools
03182: .pcmf_deRef(attributes.getValue("submit"));
03183: String xGenRs = KeTools.pcmf_deRef(attributes
03184: .getValue("genReshapeEvents"));
03185: String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
03186: String xMown = KeTools.pcmf_deRef(attributes
03187: .getValue("ownMenu"));
03188: String xMdiDecCol = KeTools.pcmf_deRef(attributes
03189: .getValue("htmlDecoColor"));
03190: String xHandleVar = KeTools.pcmf_deRef(attributes
03191: .getValue("handleVar"));
03192: String xCharSet = KeTools.pcmf_deRef(attributes
03193: .getValue("characterSet"));
03194:
03195: String xHtmlFile = KeTools.pcmf_deRef(attributes
03196: .getValue("htmlTpl"));
03197: String xExt = KeTools.pcmf_deRef(attributes
03198: .getValue("external"));
03199:
03200: String xFBlock = KeTools.pcmf_deRef(attributes
03201: .getValue("factoryDesc"));
03202: if (xFBlock != null && xFBlock.trim().equals(""))
03203: xFBlock = null;
03204:
03205: IUnPage l_page = null;
03206:
03207: if (xNL != null && xNL.equals("false"))
03208: l_page = l_hdl.pdm_objFact.pcmf_createGuiPagePlugin(
03209: l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl,
03210: xFBlock);
03211: else
03212: l_page = l_hdl.pdm_objFact.pcmf_createGuiPagePlugin(
03213: l_hdl.pdm_AppType, xName, false, l_hdl.pdm_appl,
03214: xFBlock);
03215:
03216: if (l_hdl.pdm_appl.pcmf_isMDI()) {
03217: l_page.pcmf_getUnComponent().pcmf_setGlobal(true);
03218: if (l_hdl.pdm_appl.pcmf_getApplType() == UnComponentFactory.MARKUP
03219: && xMdiDecCol != null
03220: && l_page instanceof MuGenericPage)
03221: ((MuGenericPage) l_page).pcmf_getDeco()
03222: .pcmf_getUnComponent().pcmf_setBgColor(
03223: xMdiDecCol);
03224: }
03225:
03226: if (l_page instanceof IUnPanel) {
03227: if (xScr != null && xScr.equals("false"))
03228: ((IUnPanel) l_page).pcmf_setScroll(false);
03229: }
03230: ;
03231:
03232: if (xMown != null && xMown.equals("true"))
03233: l_page.pcmf_ownsMenu(true);
03234:
03235: String xReg = KeTools.pcmf_deRef(attributes
03236: .getValue("register"));
03237: if (xReg != null && xReg.equals("") == false)
03238: l_page.pcmf_getUnComponent().pcmf_reRegister(xReg);
03239:
03240: l_page.pcmf_getUnComponent().pcmf_enableSubmit();
03241: if (xSubm != null && xSubm.equals("false"))
03242: l_page.pcmf_getUnComponent().pcmf_disableSubmit();
03243:
03244: if (xGenRs != null && xGenRs.equals("true"))
03245: l_page.pcmf_setGenerateReshapeEvents(true);
03246:
03247: if (xOrphan == null || xOrphan.equals("false"))
03248: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_page
03249: .pcmf_getUnComponent());
03250: else
03251: l_page.pcmf_getUnComponent().pcmf_setGlobal(true);
03252:
03253: l_page.pcmf_setPostFct(false);
03254: l_page.pcmf_setPreFct(false);
03255:
03256: if (xActive != null && xActive.equals("true"))
03257: l_hdl.pdm_appl.pcmf_setActive(xName);
03258:
03259: l_hdl.pdm_page = l_page;
03260: l_hdl.pcmf_doExecStack(l_page, l_page.pcmf_getUnComponent(),
03261: xName);
03262:
03263: // Html file parsen - nur wenn kein cached run
03264:
03265: // @@
03266: String l_html = null;
03267: if (xExt != null && xExt.equals("true")) {
03268: CoTextFileGetter l_tfg = new CoTextFileGetter();
03269: if (xCharSet != null)
03270: l_tfg.pcmf_setCharacterSet(xCharSet);
03271:
03272: l_html = l_tfg.pcmf_getString(xHtmlFile);
03273: l_tfg.pcmf_delete();
03274: } else
03275: l_html = xHtmlFile;
03276:
03277: if (l_html != null) {
03278: UnHtmlParserCallback l_cb = new UnHtmlParserCallback(
03279: l_html, l_hdl, true);
03280: HTMLEditorKit.Parser l_parser = new UnHtmlEditorKit()
03281: .pcmf_getHtmlParser();
03282: l_parser.parse(new StringReader(l_html), l_cb, false);
03283:
03284: AttributesImpl l_attr = new AttributesImpl();
03285: l_attr.addAttribute(null, null, "name", "", xName);
03286: l_attr.addAttribute(null, null, "htmlTpl", "", l_cb
03287: .pcmf_getHtmlTpl());
03288: l_attr.addAttribute(null, null, "orphan", "", "true");
03289: l_attr.addAttribute(null, null, "asLayoutManager", "",
03290: "true");
03291: l_attr
03292: .addAttribute(null, null, "handleVar", "",
03293: xHandleVar);
03294: l_hdl.startElement("", "tplSec", "tplSec", l_attr);
03295: l_hdl.endElement("", "tplSec", "tplSec");
03296: } else
03297: l_hdl.pdmf_startCDataRecording();
03298:
03299: // @@
03300:
03301: return (l_page);
03302: };
03303: };
03304:
03305: final class UnXMLTAGhtmlForm implements IUnSAXAppFactHandler {
03306: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03307: String qName, Attributes attributes) throws Exception {
03308: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
03309: String xOrphan = KeTools.pcmf_deRef(attributes
03310: .getValue("orphan"));
03311: String xNL = KeTools.pcmf_deRef(attributes.getValue("layout"));
03312: String xIFr = KeTools.pcmf_deRef(attributes.getValue("iFrame"));
03313: String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
03314: String xLazy = KeTools.pcmf_deRef(attributes.getValue("lazy"));
03315: String xHtmlFile = KeTools.pcmf_deRef(attributes
03316: .getValue("htmlTpl"));
03317: String xExt = KeTools.pcmf_deRef(attributes
03318: .getValue("external"));
03319: String xHandleVar = KeTools.pcmf_deRef(attributes
03320: .getValue("handleVar"));
03321: String xCharSet = KeTools.pcmf_deRef(attributes
03322: .getValue("characterSet"));
03323:
03324: String xFBlock = KeTools.pcmf_deRef(attributes
03325: .getValue("factoryDesc"));
03326: if (xFBlock != null && xFBlock.trim().equals(""))
03327: xFBlock = null;
03328:
03329: IUnForm l_form = null;
03330:
03331: if (xIFr == null || xIFr.equals("false")) {
03332: if (xNL != null && xNL.equals("false"))
03333: l_form = l_hdl.pdm_objFact.pcmf_createFormPlugin(
03334: l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl,
03335: xFBlock);
03336: else
03337: l_form = l_hdl.pdm_objFact.pcmf_createFormPlugin(
03338: l_hdl.pdm_AppType, xName, false,
03339: l_hdl.pdm_appl, xFBlock);
03340: } else {
03341: if (xNL != null && xNL.equals("false"))
03342: l_form = l_hdl.pdm_objFact.pcmf_createIForm(
03343: l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl);
03344: else
03345: l_form = l_hdl.pdm_objFact
03346: .pcmf_createIForm(l_hdl.pdm_AppType, xName,
03347: false, l_hdl.pdm_appl);
03348: }
03349:
03350: if (l_form instanceof IUnPanel) {
03351: if (xScr != null && xScr.equals("false"))
03352: ((IUnPanel) l_form).pcmf_setScroll(false);
03353: }
03354: ;
03355:
03356: if (xOrphan == null || xOrphan.equals("false"))
03357: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_form
03358: .pcmf_getUnComponent());
03359: else
03360: l_form.pcmf_getUnComponent().pcmf_setGlobal(true);
03361:
03362: String xReg = KeTools.pcmf_deRef(attributes
03363: .getValue("register"));
03364: if (xReg != null && xReg.equals("") == false)
03365: l_form.pcmf_getUnComponent().pcmf_reRegister("html" + xReg);
03366:
03367: // @@
03368:
03369: l_hdl.pcmf_doExecStack(l_form, l_form.pcmf_getUnComponent(),
03370: xName);
03371:
03372: // Html file parsen - nur wenn kein cached run
03373:
03374: // @@
03375: String l_html = null;
03376: if (xExt != null && xExt.equals("true")) {
03377: CoTextFileGetter l_tfg = new CoTextFileGetter();
03378: if (xCharSet != null)
03379: l_tfg.pcmf_setCharacterSet(xCharSet);
03380:
03381: l_html = l_tfg.pcmf_getString(xHtmlFile);
03382: l_tfg.pcmf_delete();
03383: } else
03384: l_html = xHtmlFile;
03385:
03386: if (l_html != null) {
03387: UnHtmlParserCallback l_cb = new UnHtmlParserCallback(
03388: l_html, l_hdl, false);
03389: HTMLEditorKit.Parser l_parser = new UnHtmlEditorKit()
03390: .pcmf_getHtmlParser();
03391: l_parser.parse(new StringReader(l_html), l_cb, false);
03392:
03393: AttributesImpl l_attr = new AttributesImpl();
03394: l_attr.addAttribute(null, null, "name", "", xName);
03395: l_attr.addAttribute(null, null, "htmlTpl", "", l_cb
03396: .pcmf_getHtmlTpl());
03397: l_attr.addAttribute(null, null, "orphan", "", "true");
03398: l_attr.addAttribute(null, null, "asLayoutManager", "",
03399: "true");
03400: l_attr
03401: .addAttribute(null, null, "handleVar", "",
03402: xHandleVar);
03403:
03404: l_hdl.startElement("", "tplSec", "tplSec", l_attr);
03405: l_hdl.endElement("", "tplSec", "tplSec");
03406: } else
03407: l_hdl.pdmf_startCDataRecording();
03408: // @@
03409:
03410: return (l_form);
03411: };
03412: };
03413:
03414: final class UnXMLTAGhtmlLink implements IUnSAXAppFactHandler {
03415: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03416: String qName, Attributes attributes) throws Exception {
03417: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
03418: String xValue = KeTools
03419: .pcmf_deRef(attributes.getValue("value"));
03420: String xSubm = KeTools
03421: .pcmf_deRef(attributes.getValue("submit"));
03422: String xDiab = KeTools.pcmf_deRef(attributes
03423: .getValue("disable"));
03424: String xOrphan = KeTools.pcmf_deRef(attributes
03425: .getValue("orphan"));
03426:
03427: String xFBlock = KeTools.pcmf_deRef(attributes
03428: .getValue("factoryDesc"));
03429: if (xFBlock != null && xFBlock.trim().equals(""))
03430: xFBlock = null;
03431:
03432: IUnLink l_but = l_hdl.pdm_objFact.pcmf_createLinkPlugin(
03433: l_hdl.pdm_AppType, xValue != null ? xValue : xName,
03434: l_hdl.pdm_appl, xFBlock);
03435: if (xOrphan == null || xOrphan.equals("false"))
03436: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_but
03437: .pcmf_getUnComponent());
03438: else
03439: l_but.pcmf_setGlobal(true);
03440: // Submit setzen
03441: if (xSubm != null && xSubm.equals("false"))
03442: l_but.pcmf_disableSubmit();
03443: // Disable Setzen setzen
03444: if (xDiab != null && xDiab.equals("true"))
03445: l_but.pcmf_getUnComponent().pcmf_disable();
03446:
03447: String xReg = KeTools.pcmf_deRef(attributes
03448: .getValue("register"));
03449: if (xReg != null && xReg.equals("") == false)
03450: l_but.pcmf_getUnComponent().pcmf_reRegister(xReg);
03451:
03452: l_hdl.pcmf_doExecStack(l_but, l_but, xName);
03453:
03454: // Html file parsen - nur wenn kein cached run
03455:
03456: // @@
03457:
03458: l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
03459: l_hdl.endElement("", "htmlGui", "htmlGui");
03460:
03461: // @@
03462:
03463: return (l_but);
03464: };
03465: };
03466:
03467: final class UnXMLTAGhtmlButton implements IUnSAXAppFactHandler {
03468: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03469: String qName, Attributes attributes) throws Exception {
03470: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
03471: String xValue = KeTools
03472: .pcmf_deRef(attributes.getValue("value"));
03473: String xSubm = KeTools
03474: .pcmf_deRef(attributes.getValue("submit"));
03475: String xDiab = KeTools.pcmf_deRef(attributes
03476: .getValue("disable"));
03477: String xOrphan = KeTools.pcmf_deRef(attributes
03478: .getValue("orphan"));
03479:
03480: String xFBlock = KeTools.pcmf_deRef(attributes
03481: .getValue("factoryDesc"));
03482: if (xFBlock != null && xFBlock.trim().equals(""))
03483: xFBlock = null;
03484:
03485: IUnButton l_but = l_hdl.pdm_objFact.pcmf_createButtonPlugin(
03486: l_hdl.pdm_AppType, xValue != null ? xValue : xName,
03487: l_hdl.pdm_appl, xFBlock);
03488: if (xOrphan == null || xOrphan.equals("false"))
03489: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_but
03490: .pcmf_getUnComponent());
03491: else
03492: l_but.pcmf_setGlobal(true);
03493: // Submit setzen
03494: if (xSubm != null && xSubm.equals("false"))
03495: l_but.pcmf_disableSubmit();
03496: // Disable Setzen setzen
03497: if (xDiab != null && xDiab.equals("true"))
03498: l_but.pcmf_getUnComponent().pcmf_disable();
03499:
03500: String xReg = KeTools.pcmf_deRef(attributes
03501: .getValue("register"));
03502: if (xReg != null && xReg.equals("") == false)
03503: l_but.pcmf_getUnComponent().pcmf_reRegister(xReg);
03504:
03505: l_hdl.pcmf_doExecStack(l_but, l_but, xName);
03506:
03507: // Html file parsen - nur wenn kein cached run
03508:
03509: // @@
03510:
03511: l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
03512: l_hdl.endElement("", "htmlGui", "htmlGui");
03513:
03514: // @@
03515:
03516: return (l_but);
03517: };
03518: };
03519:
03520: final class UnXMLTAGhtmlSplitPane implements IUnSAXAppFactHandler {
03521: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03522: String qName, Attributes attributes) throws Exception {
03523: // Attribute auslesen
03524: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
03525: String xOrphan = KeTools.pcmf_deRef(attributes
03526: .getValue("orphan"));
03527: String xSplit = KeTools
03528: .pcmf_deRef(attributes.getValue("split"));
03529: String xDivPos = KeTools.pcmf_deRef(attributes
03530: .getValue("divPos"));
03531: String xDivWi = KeTools.pcmf_deRef(attributes
03532: .getValue("divWidth"));
03533: String xDivWiA = KeTools.pcmf_deRef(attributes
03534: .getValue("divWidthAbs"));
03535: String xSubm = KeTools
03536: .pcmf_deRef(attributes.getValue("submit"));
03537: // String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
03538: // String xExt = KeTools.pcmf_deRef(attributes.getValue("external"));
03539:
03540: String xFBlock = KeTools.pcmf_deRef(attributes
03541: .getValue("factoryDesc"));
03542: if (xFBlock != null && xFBlock.trim().equals(""))
03543: xFBlock = null;
03544:
03545: // Element erzeugen und in Parent einfügen
03546: IUnSplitPane l_if = l_hdl.pdm_objFact
03547: .pcmf_createSplitPanePlugin(l_hdl.pdm_AppType, xName,
03548: l_hdl.pdm_appl, xFBlock);
03549: if (xOrphan == null || xOrphan.equals("false"))
03550: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
03551: .pcmf_getUnComponent());
03552: else
03553: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
03554:
03555: if (xSplit != null && xSplit.equals("H"))
03556: l_if.pcmf_setSplitMode(IUnSplitPane.HSPLIT);
03557:
03558: if (xDivPos != null)
03559: l_if.pcmf_setSplitPercent(Integer.parseInt(xDivPos));
03560:
03561: if (xDivWi != null)
03562: l_if.pcmf_setSliderPercent(Integer.parseInt(xDivWi));
03563:
03564: if (xDivWiA != null)
03565: l_if.pcmf_setSliderAbs(Integer.parseInt(xDivWiA));
03566:
03567: if (xSubm != null && xSubm.equals("true"))
03568: l_if.pcmf_getUnComponent().pcmf_enableSubmit();
03569:
03570: String xReg = KeTools.pcmf_deRef(attributes
03571: .getValue("register"));
03572: if (xReg != null && xReg.equals("") == false)
03573: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
03574:
03575: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
03576:
03577: // Html file parsen - nur wenn kein cached run
03578:
03579: // @@
03580:
03581: l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
03582: l_hdl.endElement("", "htmlGui", "htmlGui");
03583:
03584: // @@
03585:
03586: return (l_if);
03587: };
03588: };
03589:
03590: final class UnXMLTAGhtmlTabPane implements IUnSAXAppFactHandler {
03591: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03592: String qName, Attributes attributes) throws Exception {
03593: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
03594: String xOrphan = KeTools.pcmf_deRef(attributes
03595: .getValue("orphan"));
03596: String xSubm = KeTools
03597: .pcmf_deRef(attributes.getValue("submit"));
03598: String xTD = KeTools.pcmf_deRef(attributes
03599: .getValue("tabsBottom"));
03600: // String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
03601: // String xExt = KeTools.pcmf_deRef(attributes.getValue("external"));
03602:
03603: String xFBlock = KeTools.pcmf_deRef(attributes
03604: .getValue("factoryDesc"));
03605: if (xFBlock != null && xFBlock.trim().equals(""))
03606: xFBlock = null;
03607:
03608: IUnTabbedPane l_pane = l_hdl.pdm_objFact
03609: .pcmf_createTabPanePlugin(l_hdl.pdm_AppType, xName,
03610: (xTD != null && xTD.equals("true")) ? true
03611: : false, l_hdl.pdm_appl, xFBlock);
03612:
03613: if (xOrphan == null || xOrphan.equals("false"))
03614: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_pane
03615: .pcmf_getUnComponent());
03616: else
03617: l_pane.pcmf_getUnComponent().pcmf_setGlobal(true);
03618:
03619: if (xSubm != null && xSubm.equals("true"))
03620: l_pane.pcmf_getUnComponent().pcmf_enableSubmit();
03621:
03622: String xReg = KeTools.pcmf_deRef(attributes
03623: .getValue("register"));
03624: if (xReg != null && xReg.equals("") == false)
03625: l_pane.pcmf_getUnComponent().pcmf_reRegister(xReg);
03626:
03627: l_hdl.pcmf_doExecStack(l_pane, l_pane.pcmf_getUnComponent(),
03628: xName);
03629:
03630: // Html file parsen - nur wenn kein cached run
03631:
03632: // @@
03633:
03634: l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
03635: l_hdl.endElement("", "htmlGui", "htmlGui");
03636:
03637: // @@
03638:
03639: return (l_pane);
03640: };
03641: };
03642:
03643: final class UnXMLTAGhtmlGui implements IUnSAXAppFactHandler {
03644: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03645: String qName, Attributes attributes) throws Exception {
03646: String xHtmlFile = KeTools.pcmf_deRef(attributes
03647: .getValue("htmlTpl"));
03648: String xExt = KeTools.pcmf_deRef(attributes
03649: .getValue("external"));
03650: String xCharSet = KeTools.pcmf_deRef(attributes
03651: .getValue("characterSet"));
03652:
03653: // Html file parsen - nur wenn kein cached run
03654:
03655: // @@
03656: String l_html = null;
03657: if (xExt != null && xExt.equals("true")) {
03658: CoTextFileGetter l_tfg = new CoTextFileGetter();
03659: if (xCharSet != null)
03660: l_tfg.pcmf_setCharacterSet(xCharSet);
03661:
03662: l_html = l_tfg.pcmf_getString(xHtmlFile);
03663: l_tfg.pcmf_delete();
03664: } else
03665: l_html = xHtmlFile;
03666:
03667: UnHtmlParserCallback l_cb = new UnHtmlParserCallback(l_html,
03668: l_hdl, false);
03669: HTMLEditorKit.Parser l_parser = new UnHtmlEditorKit()
03670: .pcmf_getHtmlParser();
03671: l_parser.parse(new StringReader(l_html), l_cb, false);
03672:
03673: // @@
03674:
03675: l_hdl.pdm_elements.push(l_hdl.pdm_act);
03676: l_hdl.pdm_names.push(l_hdl.pdm_name);
03677:
03678: return (l_hdl.pdm_act);
03679: };
03680: };
03681:
03682: final class UnXMLTAGpageTempl implements IUnSAXAppFactHandler {
03683: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03684: String qName, Attributes attributes) throws Exception {
03685: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
03686: String xActive = KeTools.pcmf_deRef(attributes
03687: .getValue("active"));
03688: String xOrphan = KeTools.pcmf_deRef(attributes
03689: .getValue("orphan"));
03690:
03691: String xFBlock = KeTools.pcmf_deRef(attributes
03692: .getValue("factoryDesc"));
03693: if (xFBlock != null && xFBlock.trim().equals(""))
03694: xFBlock = null;
03695:
03696: IUnPage l_page = l_hdl.pdm_objFact
03697: .pcmf_createGuiPageFromTplPlugin(l_hdl.pdm_AppType,
03698: xName, l_hdl.pdm_appl, xFBlock);
03699: if (l_hdl.pdm_appl.pcmf_isMDI())
03700: l_page.pcmf_getUnComponent().pcmf_setGlobal(true);
03701:
03702: if (xOrphan == null || xOrphan.equals("false"))
03703: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_page
03704: .pcmf_getUnComponent());
03705: else
03706: l_page.pcmf_getUnComponent().pcmf_setGlobal(true);
03707:
03708: if (xActive != null && xActive.equals("true"))
03709: l_hdl.pdm_appl.pcmf_setActive(xName);
03710:
03711: String xReg = KeTools.pcmf_deRef(attributes
03712: .getValue("register"));
03713: if (xReg != null && xReg.equals("") == false)
03714: l_page.pcmf_getUnComponent().pcmf_reRegister(xReg);
03715:
03716: l_hdl.pdm_page = l_page;
03717:
03718: l_hdl.pcmf_doExecStack(l_page, l_page.pcmf_getUnComponent(),
03719: xName);
03720:
03721: return (l_page);
03722: };
03723: };
03724:
03725: final class UnXMLTAGhtmlTplSec implements IUnSAXAppFactHandler {
03726: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03727: String qName, Attributes attributes) throws Exception {
03728: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
03729: String xHtml = KeTools.pcmf_deRef(attributes
03730: .getValue("htmlTpl"));
03731: String xExt = KeTools.pcmf_deRef(attributes
03732: .getValue("external"));
03733: String xOrphan = KeTools.pcmf_deRef(attributes
03734: .getValue("orphan"));
03735: String xSetLayoutMgmt = KeTools.pcmf_deRef(attributes
03736: .getValue("asLayoutManager"));
03737: String xHandleVar = KeTools.pcmf_deRef(attributes
03738: .getValue("handleVar"));
03739:
03740: String xFBlock = KeTools.pcmf_deRef(attributes
03741: .getValue("factoryDesc"));
03742: if (xFBlock != null && xFBlock.trim().equals(""))
03743: xFBlock = null;
03744:
03745: boolean l_ext = (xExt != null && xExt.equals("true") ? true
03746: : false);
03747:
03748: MuGenericTemplateSection l_tpl = l_hdl.pdm_objFact
03749: .pcmf_createMuTplSectionPlugin(l_hdl.pdm_AppType,
03750: xName, xHtml, l_ext, l_hdl.pdm_appl, xFBlock);
03751:
03752: if (l_tpl != null) {
03753: if (xHandleVar != null && xHandleVar.equals("true"))
03754: l_tpl.pcmf_setHandleVariables(true);
03755:
03756: String xReg = KeTools.pcmf_deRef(attributes
03757: .getValue("register"));
03758: if (xReg != null && xReg.equals("") == false)
03759: l_tpl.pcmf_reRegister(xReg);
03760:
03761: xName = Integer.toString(l_tpl.hashCode());
03762:
03763: if ((xOrphan == null || xOrphan.equals("false"))
03764: && (xSetLayoutMgmt == null || xSetLayoutMgmt
03765: .equals("false")))
03766: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_tpl);
03767:
03768: if (xSetLayoutMgmt != null && xSetLayoutMgmt.equals("true")
03769: && l_hdl.pdm_act instanceof MuGenericContainer)
03770: ((MuGenericContainer) l_hdl.pdm_act)
03771: .pcmf_setLayoutManager(l_tpl);
03772:
03773: l_hdl.pcmf_doExecStack(l_tpl, l_tpl, xName);
03774:
03775: return (l_tpl);
03776: } else {
03777: IUnForm l_form = l_hdl.pdm_objFact.pcmf_createFormPlugin(
03778: l_hdl.pdm_AppType, xName, false, l_hdl.pdm_appl,
03779: xFBlock);
03780: l_hdl.pcmf_doExecStack(l_form, l_form, xName);
03781: return (l_hdl.pdm_act);
03782: }
03783: };
03784: };
03785:
03786: final class UnXMLTAGhtml implements IUnSAXAppFactHandler {
03787: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03788: String qName, Attributes attributes) throws Exception {
03789: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
03790:
03791: String xFBlock = KeTools.pcmf_deRef(attributes
03792: .getValue("factoryDesc"));
03793: if (xFBlock != null && xFBlock.trim().equals(""))
03794: xFBlock = null;
03795:
03796: MuGenericRaw l_raw = l_hdl.pdm_objFact.pcmf_createMuRawPlugin(
03797: l_hdl.pdm_AppType, xName, "", l_hdl.pdm_appl, xFBlock);
03798: l_hdl.pdmf_startCDataRecording();
03799:
03800: if (l_raw != null) {
03801: String xReg = KeTools.pcmf_deRef(attributes
03802: .getValue("register"));
03803: if (xReg != null && xReg.equals("") == false)
03804: l_raw.pcmf_reRegister(xReg);
03805:
03806: if (xName == null)
03807: xName = Integer.toString(l_raw.hashCode());
03808:
03809: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_raw);
03810:
03811: l_hdl.pcmf_doExecStack(l_raw, l_raw, xName);
03812:
03813: return (l_raw);
03814: } else {
03815: l_hdl.pdm_elements.push(l_hdl.pdm_act);
03816: l_hdl.pdm_names.push(l_hdl.pdm_name);
03817:
03818: return (l_hdl.pdm_act);
03819: }
03820: };
03821: };
03822:
03823: final class UnXMLTAGpluginComponentReference implements
03824: IUnSAXAppFactHandler {
03825: public Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03826: String qName, Attributes attributes) throws Exception {
03827: PlBasicComponentAggregat l_pl = ((PlBasicComponentAggregat) KeRegisteredObject
03828: .pcmf_getObjByName(PlBasicComponentAggregat.MY_CURRENTPARSED_PLUGIN));
03829: String l_lName = KeTools.pcmf_deRef(attributes
03830: .getValue("object"));
03831:
03832: KeTreeNode l_comp = (KeTreeNode) l_pl
03833: .pcmf_getLocalByName(l_lName);
03834:
03835: l_hdl.pcmf_doExecStack(l_comp, l_comp, l_comp.pcmf_getName());
03836:
03837: return (l_hdl.pcmf_getActNode());
03838: }
03839: }
03840:
03841: final class UnXMLTAGinpField implements IUnSAXAppFactHandler {
03842: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03843: String qName, Attributes attributes) throws Exception {
03844: // Attribute auslesen
03845: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
03846: String xValue = KeTools
03847: .pcmf_deRef(attributes.getValue("value"));
03848: String xLen = KeTools.pcmf_deRef(attributes.getValue("len"));
03849: String xSize = KeTools.pcmf_deRef(attributes.getValue("size"));
03850: String xSubm = KeTools
03851: .pcmf_deRef(attributes.getValue("submit"));
03852: String xDiab = KeTools.pcmf_deRef(attributes
03853: .getValue("disable"));
03854: String xOrphan = KeTools.pcmf_deRef(attributes
03855: .getValue("orphan"));
03856: String xisPwd = KeTools.pcmf_deRef(attributes.getValue("pwd"));
03857: String xTAlign = KeTools.pcmf_deRef(attributes
03858: .getValue("textAlign"));
03859: String xValid = KeTools
03860: .pcmf_deRef(attributes.getValue("valid"));
03861: String xDefault = KeTools.pcmf_deRef(attributes
03862: .getValue("default"));
03863:
03864: String xFBlock = KeTools.pcmf_deRef(attributes
03865: .getValue("factoryDesc"));
03866: if (xFBlock != null && xFBlock.trim().equals(""))
03867: xFBlock = null;
03868:
03869: if (xisPwd == null)
03870: xisPwd = "false";
03871:
03872: // Element erzeugen und in Parent einfügen
03873: IUnInputField l_if = l_hdl.pdm_objFact
03874: .pcmf_createInputFieldPlugin(l_hdl.pdm_AppType, xName,
03875: Integer.parseInt(xSize),
03876: Integer.parseInt(xLen), xValue, xisPwd
03877: .equals("true") ? true : false,
03878: l_hdl.pdm_appl, xFBlock);
03879: if (xOrphan == null || xOrphan.equals("false"))
03880: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
03881: .pcmf_getUnComponent());
03882: else
03883: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
03884:
03885: if (xTAlign != null && xTAlign.equals("EAST"))
03886: l_if.pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_EAST);
03887: else if (xTAlign != null && xTAlign.equals("CENTER"))
03888: l_if.pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_CENTER);
03889:
03890: // Submit setzen
03891: if (xSubm != null && xSubm.equals("true"))
03892: l_if.pcmf_getUnComponent().pcmf_enableSubmit();
03893: // Disable Setzen setzen
03894: if (xDiab != null && xDiab.equals("true"))
03895: l_if.pcmf_getUnComponent().pcmf_disable();
03896:
03897: if (xValid != null && xValid.equals("") == false)
03898: l_if.pcmf_setInputFilter(xValid);
03899:
03900: if (xDefault != null)
03901: l_if.pcmf_getUnComponent().pcmf_setDefaultValue(xDefault);
03902:
03903: String xReg = KeTools.pcmf_deRef(attributes
03904: .getValue("register"));
03905: if (xReg != null && xReg.equals("") == false)
03906: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
03907:
03908: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
03909:
03910: return (l_if);
03911: };
03912: };
03913:
03914: final class UnXMLTAGlink implements IUnSAXAppFactHandler {
03915: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03916: String qName, Attributes attributes) throws Exception {
03917: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
03918: String xValue = KeTools
03919: .pcmf_deRef(attributes.getValue("value"));
03920: String xSubm = KeTools
03921: .pcmf_deRef(attributes.getValue("submit"));
03922: String xDiab = KeTools.pcmf_deRef(attributes
03923: .getValue("disable"));
03924: String xOrphan = KeTools.pcmf_deRef(attributes
03925: .getValue("orphan"));
03926: String xWrap = KeTools.pcmf_deRef(attributes.getValue("wrap"));
03927: String xAlign = KeTools
03928: .pcmf_deRef(attributes.getValue("align"));
03929:
03930: String xFBlock = KeTools.pcmf_deRef(attributes
03931: .getValue("factoryDesc"));
03932: if (xFBlock != null && xFBlock.trim().equals(""))
03933: xFBlock = null;
03934:
03935: IUnLink l_but = l_hdl.pdm_objFact.pcmf_createLinkPlugin(
03936: l_hdl.pdm_AppType, xValue != null ? xValue : xName,
03937: l_hdl.pdm_appl, xFBlock);
03938: if (xOrphan == null || xOrphan.equals("false"))
03939: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_but
03940: .pcmf_getUnComponent());
03941: else
03942: l_but.pcmf_setGlobal(true);
03943:
03944: if (xAlign != null) {
03945: if (xAlign.equalsIgnoreCase("CENTER"))
03946: l_but
03947: .pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_CENTER);
03948: else if (xAlign.equalsIgnoreCase("EAST"))
03949: l_but.pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_EAST);
03950: else if (xAlign.equalsIgnoreCase("WEST"))
03951: l_but.pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_WEST);
03952: }
03953:
03954: // Submit setzen
03955: if (xSubm != null && xSubm.equals("false"))
03956: l_but.pcmf_disableSubmit();
03957: // Disable Setzen setzen
03958: if (xDiab != null && xDiab.equals("true"))
03959: l_but.pcmf_getUnComponent().pcmf_disable();
03960:
03961: if (l_but instanceof MuGenericLink) {
03962: if (xWrap != null && xWrap.equals("false"))
03963: ((MuGenericLink) l_but).pcmf_setWrap(false);
03964: }
03965:
03966: String xReg = KeTools.pcmf_deRef(attributes
03967: .getValue("register"));
03968: if (xReg != null && xReg.equals("") == false)
03969: l_but.pcmf_getUnComponent().pcmf_reRegister(xReg);
03970:
03971: l_hdl.pcmf_doExecStack(l_but, l_but, xName);
03972:
03973: return (l_but);
03974: };
03975: };
03976:
03977: final class UnXMLTAGroLink implements IUnSAXAppFactHandler {
03978: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
03979: String qName, Attributes attributes) throws Exception {
03980: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
03981: String xValue = KeTools
03982: .pcmf_deRef(attributes.getValue("value"));
03983: String xSubm = KeTools
03984: .pcmf_deRef(attributes.getValue("submit"));
03985: String xDiab = KeTools.pcmf_deRef(attributes
03986: .getValue("disable"));
03987: String xOrphan = KeTools.pcmf_deRef(attributes
03988: .getValue("orphan"));
03989:
03990: String xFBlock = KeTools.pcmf_deRef(attributes
03991: .getValue("factoryDesc"));
03992: if (xFBlock != null && xFBlock.trim().equals(""))
03993: xFBlock = null;
03994:
03995: IUnLink l_but = l_hdl.pdm_objFact.pcmf_createRoLinkPlugin(
03996: l_hdl.pdm_AppType, xValue != null
03997: && xValue.trim().equals("") == false ? xValue
03998: : xName, l_hdl.pdm_appl, xFBlock);
03999: if (xOrphan == null || xOrphan.equals("false"))
04000: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_but
04001: .pcmf_getUnComponent());
04002: else
04003: l_but.pcmf_setGlobal(true);
04004: // Submit setzen
04005: if (xSubm != null && xSubm.equals("false"))
04006: l_but.pcmf_disableSubmit();
04007: // Disable Setzen setzen
04008: if (xDiab != null && xDiab.equals("true"))
04009: l_but.pcmf_getUnComponent().pcmf_disable();
04010:
04011: String xReg = KeTools.pcmf_deRef(attributes
04012: .getValue("register"));
04013: if (xReg != null && xReg.equals("") == false)
04014: l_but.pcmf_getUnComponent().pcmf_reRegister(xReg);
04015:
04016: l_hdl.pcmf_doExecStack(l_but, l_but, xName);
04017:
04018: return (l_but);
04019: };
04020: };
04021:
04022: final class UnXMLTAGbut implements IUnSAXAppFactHandler {
04023: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04024: String qName, Attributes attributes) throws Exception {
04025: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
04026: String xValue = KeTools
04027: .pcmf_deRef(attributes.getValue("value"));
04028: String xSubm = KeTools
04029: .pcmf_deRef(attributes.getValue("submit"));
04030: String xDiab = KeTools.pcmf_deRef(attributes
04031: .getValue("disable"));
04032: String xOrphan = KeTools.pcmf_deRef(attributes
04033: .getValue("orphan"));
04034:
04035: String xFBlock = KeTools.pcmf_deRef(attributes
04036: .getValue("factoryDesc"));
04037: if (xFBlock != null && xFBlock.trim().equals(""))
04038: xFBlock = null;
04039:
04040: IUnButton l_but = l_hdl.pdm_objFact.pcmf_createButtonPlugin(
04041: l_hdl.pdm_AppType, xValue != null ? xValue : xName,
04042: l_hdl.pdm_appl, xFBlock);
04043: if (xOrphan == null || xOrphan.equals("false"))
04044: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_but
04045: .pcmf_getUnComponent());
04046: else
04047: l_but.pcmf_getUnComponent().pcmf_setGlobal(true);
04048: // Submit setzen
04049: if (xSubm != null && xSubm.equals("false"))
04050: l_but.pcmf_getUnComponent().pcmf_disableSubmit();
04051: // Disable Setzen setzen
04052: if (xDiab != null && xDiab.equals("true"))
04053: l_but.pcmf_getUnComponent().pcmf_disable();
04054:
04055: String xReg = KeTools.pcmf_deRef(attributes
04056: .getValue("register"));
04057: if (xReg != null && xReg.equals("") == false)
04058: l_but.pcmf_getUnComponent().pcmf_reRegister(xReg);
04059:
04060: l_hdl.pcmf_doExecStack(l_but, l_but.pcmf_getUnComponent(),
04061: xName);
04062:
04063: return (l_but);
04064: };
04065: };
04066:
04067: final class UnXMLTAGslider implements IUnSAXAppFactHandler {
04068: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04069: String qName, Attributes attributes) throws Exception {
04070: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
04071: String xSubm = KeTools
04072: .pcmf_deRef(attributes.getValue("submit"));
04073: String xDiab = KeTools.pcmf_deRef(attributes
04074: .getValue("disable"));
04075: String xOrphan = KeTools.pcmf_deRef(attributes
04076: .getValue("orphan"));
04077: String xDirection = KeTools.pcmf_deRef(attributes
04078: .getValue("direction"));
04079: String xMin = KeTools.pcmf_deRef(attributes.getValue("min"));
04080: String xMax = KeTools.pcmf_deRef(attributes.getValue("max"));
04081: String xSteps = KeTools
04082: .pcmf_deRef(attributes.getValue("steps"));
04083: String xValue = KeTools
04084: .pcmf_deRef(attributes.getValue("value"));
04085:
04086: String xFBlock = KeTools.pcmf_deRef(attributes
04087: .getValue("factoryDesc"));
04088: if (xFBlock != null && xFBlock.trim().equals(""))
04089: xFBlock = null;
04090:
04091: int l_dir = IUnSlider.SLIDE_HORIZONTAL;
04092:
04093: if (xDirection != null
04094: && xDirection.toUpperCase().equals("VERTICAL"))
04095: l_dir = IUnSlider.SLIDE_VERTICAL;
04096:
04097: IUnSlider l_sl = l_hdl.pdm_objFact.pcmf_createSliderPlugin(
04098: l_hdl.pdm_AppType, xName, l_dir, l_hdl.pdm_appl,
04099: xFBlock);
04100: if (xOrphan == null || xOrphan.equals("false"))
04101: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_sl
04102: .pcmf_getUnComponent());
04103: else
04104: l_sl.pcmf_getUnComponent().pcmf_setGlobal(true);
04105:
04106: if (xSubm != null && xSubm.equals("true"))
04107: l_sl.pcmf_getUnComponent().pcmf_enableSubmit();
04108:
04109: if (xDiab != null && xDiab.equals("true"))
04110: l_sl.pcmf_getUnComponent().pcmf_disable();
04111:
04112: String xReg = KeTools.pcmf_deRef(attributes
04113: .getValue("register"));
04114: if (xReg != null && xReg.equals("") == false)
04115: l_sl.pcmf_getUnComponent().pcmf_reRegister(xReg);
04116:
04117: int l_min = 0;
04118: int l_max = 100;
04119: int l_step = 0;
04120:
04121: if (xMin != null && xMin.trim().equals("") == false)
04122: l_min = Integer.parseInt(xMin);
04123: if (xMax != null && xMax.trim().equals("") == false)
04124: l_max = Integer.parseInt(xMax);
04125: if (xSteps != null && xSteps.trim().equals("") == false)
04126: l_step = Integer.parseInt(xSteps);
04127:
04128: l_sl.pcmf_setRange(l_min, l_max, l_step);
04129: if (xValue != null)
04130: l_sl.pcmf_getUnComponent().pcmf_setValue(xValue);
04131:
04132: l_hdl.pcmf_doExecStack(l_sl, l_sl.pcmf_getUnComponent(), xName);
04133:
04134: return (l_sl);
04135: };
04136: };
04137:
04138: final class UnXMLTAGoptDlg implements IUnSAXAppFactHandler {
04139: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04140: String qName, Attributes attributes) throws Exception {
04141: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
04142: String xSubm = KeTools
04143: .pcmf_deRef(attributes.getValue("submit"));
04144: String xDiab = KeTools.pcmf_deRef(attributes
04145: .getValue("disable"));
04146: String xOrphan = KeTools.pcmf_deRef(attributes
04147: .getValue("orphan"));
04148: String xParent = KeTools.pcmf_deRef(attributes
04149: .getValue("parent"));
04150:
04151: String xActive = KeTools.pcmf_deRef(attributes
04152: .getValue("active"));
04153: String xType = KeTools.pcmf_deRef(attributes.getValue("type"));
04154: String xMessage = KeTools.pcmf_deRef(attributes
04155: .getValue("message"));
04156:
04157: String xFBlock = KeTools.pcmf_deRef(attributes
04158: .getValue("factoryDesc"));
04159: if (xFBlock != null && xFBlock.trim().equals(""))
04160: xFBlock = null;
04161:
04162: IUnOptionDialog l_dlg = l_hdl.pdm_objFact
04163: .pcmf_createOptDlgPlugin(l_hdl.pdm_AppType, xName,
04164: l_hdl.pdm_appl, xFBlock);
04165: if (xOrphan == null || xOrphan.equals("false")) {
04166: if (xParent != null && !xParent.equals(""))
04167: ((KeTreeNode) KeRegisteredObject
04168: .pcmf_getObjByName(xParent)).pcmf_addNode(
04169: xName, l_dlg.pcmf_getUnComponent());
04170: else
04171: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_dlg
04172: .pcmf_getUnComponent());
04173: } else
04174: l_dlg.pcmf_getUnComponent().pcmf_setGlobal(true);
04175: // Submit setzen
04176: if (xSubm != null && xSubm.equals("false"))
04177: l_dlg.pcmf_getUnComponent().pcmf_disableSubmit();
04178: else
04179: l_dlg.pcmf_getUnComponent().pcmf_enableSubmit();
04180:
04181: // Disable Setzen setzen
04182: if (xDiab != null && xDiab.equals("true"))
04183: l_dlg.pcmf_getUnComponent().pcmf_disable();
04184:
04185: String xReg = KeTools.pcmf_deRef(attributes
04186: .getValue("register"));
04187: if (xReg != null && xReg.equals("") == false)
04188: l_dlg.pcmf_getUnComponent().pcmf_reRegister(xReg);
04189:
04190: if (xActive != null && xActive.equals("true")) {
04191: if (xType.equalsIgnoreCase("alert"))
04192: l_dlg.pcmf_showAlert(xMessage);
04193: else if (xType.equalsIgnoreCase("message"))
04194: l_dlg.pcmf_showOption(xMessage);
04195: else
04196: l_dlg.pcmf_showTextInput(xMessage);
04197: }
04198:
04199: l_hdl.pcmf_doExecStack(l_dlg, l_dlg.pcmf_getUnComponent(),
04200: xName);
04201:
04202: return (l_dlg);
04203: };
04204: };
04205:
04206: final class UnXMLTAGplugin implements IUnSAXAppFactHandler {
04207: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04208: String qName, Attributes attributes) throws Exception {
04209: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
04210: String xPlName = KeTools.pcmf_deRef(attributes.getValue("use"));
04211: String xSubm = KeTools
04212: .pcmf_deRef(attributes.getValue("submit"));
04213: String xDiab = KeTools.pcmf_deRef(attributes
04214: .getValue("disable"));
04215: String xOrphan = KeTools.pcmf_deRef(attributes
04216: .getValue("orphan"));
04217:
04218: PlBasicComponentAggregat l_agg = (PlBasicComponentAggregat) l_hdl.pdm_objFact
04219: .pcmf_createAggregatedPlugin(xPlName,
04220: l_hdl.pdm_AppType, l_hdl.pdm_appl, attributes);
04221: UnComponent l_gobj = l_agg.pcmf_getPluginObject();
04222:
04223: if (xOrphan == null || xOrphan.equals("false"))
04224: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_gobj);
04225: else
04226: l_gobj.pcmf_setGlobal(true);
04227: // Submit setzen
04228: if (xSubm != null && xSubm.equals("false"))
04229: l_gobj.pcmf_disableSubmit();
04230: // Disable Setzen setzen
04231: if (xDiab != null && xDiab.equals("true"))
04232: l_gobj.pcmf_disable();
04233:
04234: String xReg = KeTools.pcmf_deRef(attributes
04235: .getValue("register"));
04236: if (xReg != null && xReg.equals("") == false) {
04237: l_gobj.pcmf_reRegister(xReg);
04238: l_agg.pcmf_reRegister("AGGREGATED_PLUGIN_" + xReg);
04239: }
04240:
04241: l_hdl.pcmf_doExecStack(l_gobj, l_gobj, xName);
04242:
04243: return (l_gobj);
04244: };
04245: };
04246:
04247: final class UnXMLTAGpluginObj implements IUnSAXAppFactHandler {
04248: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04249: String qName, Attributes attributes) throws Exception {
04250: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
04251: String xPlName = KeTools.pcmf_deRef(attributes.getValue("use"));
04252: String xSubm = KeTools
04253: .pcmf_deRef(attributes.getValue("submit"));
04254: String xDiab = KeTools.pcmf_deRef(attributes
04255: .getValue("disable"));
04256: String xOrphan = KeTools.pcmf_deRef(attributes
04257: .getValue("orphan"));
04258:
04259: UnComponent l_gobj = l_hdl.pdm_objFact.pcmf_createPlugin(
04260: xPlName, l_hdl.pdm_AppType, xName, l_hdl.pdm_appl,
04261: attributes);
04262: if (xOrphan == null || xOrphan.equals("false"))
04263: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_gobj);
04264: else
04265: l_gobj.pcmf_setGlobal(true);
04266: // Submit setzen
04267: if (xSubm != null && xSubm.equals("false"))
04268: l_gobj.pcmf_disableSubmit();
04269: // Disable Setzen setzen
04270: if (xDiab != null && xDiab.equals("true"))
04271: l_gobj.pcmf_disable();
04272:
04273: String xReg = KeTools.pcmf_deRef(attributes
04274: .getValue("register"));
04275: if (xReg != null && xReg.equals("") == false)
04276: l_gobj.pcmf_reRegister(xReg);
04277:
04278: l_hdl.pcmf_doExecStack(l_gobj, l_gobj, xName);
04279:
04280: return (l_gobj);
04281: };
04282: };
04283:
04284: final class UnXMLTAGevChannel implements IUnSAXAppFactHandler {
04285: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04286: String qName, Attributes attributes) throws Exception {
04287: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
04288: String xSubm = KeTools
04289: .pcmf_deRef(attributes.getValue("submit"));
04290: String xOrphan = KeTools.pcmf_deRef(attributes
04291: .getValue("orphan"));
04292: String xType = KeTools.pcmf_deRef(attributes.getValue("type"));
04293: String xKey = KeTools.pcmf_deRef(attributes.getValue("key"));
04294: String xRc = KeTools.pcmf_deRef(attributes.getValue("receive"));
04295: String xRf = KeTools.pcmf_deRef(attributes
04296: .getValue("parent_refresh"));
04297:
04298: String xFBlock = KeTools.pcmf_deRef(attributes
04299: .getValue("factoryDesc"));
04300: if (xFBlock != null && xFBlock.trim().equals(""))
04301: xFBlock = null;
04302:
04303: if (xKey != null && xType == null)
04304: xType = "KEYACTION";
04305:
04306: int i = 0;
04307: for (i = 0; i < IUnEventChannel.EVENTs.length; i++)
04308: if (xType.equals(IUnEventChannel.EVENTs[i]))
04309: break;
04310:
04311: if (i >= IUnEventChannel.EVENTs.length)
04312: KeLog.pcmf_log("ug2t",
04313: "<eventChannel> uncorrect event type to channel: "
04314: + xType, this , KeLog.ERROR);
04315:
04316: IUnEventChannel l_ev = null;
04317:
04318: if (xKey != null && xKey.equals("") == false)
04319: l_ev = l_hdl.pdm_objFact.pcmf_createEvChannelPlugin(
04320: l_hdl.pdm_AppType, xName, xKey, l_hdl.pdm_appl,
04321: xFBlock);
04322: else
04323: l_ev = l_hdl.pdm_objFact.pcmf_createEvChannelPlugin(
04324: l_hdl.pdm_AppType, xName, i, l_hdl.pdm_appl,
04325: xFBlock);
04326:
04327: if (xOrphan == null || xOrphan.equals("false"))
04328: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_ev
04329: .pcmf_getUnComponent());
04330: else
04331: l_ev.pcmf_getUnComponent().pcmf_setGlobal(true);
04332: // Submit setzen
04333: if (xSubm != null && xSubm.equals("true"))
04334: l_ev.pcmf_getUnComponent().pcmf_enableSubmit();
04335:
04336: String xReg = KeTools.pcmf_deRef(attributes
04337: .getValue("register"));
04338: if (xReg != null && xReg.equals("") == false)
04339: l_ev.pcmf_getUnComponent().pcmf_reRegister(xReg);
04340:
04341: if (xRc != null && xRc.equals("true"))
04342: l_ev.pcmf_receiveEvent();
04343:
04344: if (xRf != null && xRf.equals("true"))
04345: l_ev.pcmf_refreshParent();
04346:
04347: l_hdl.pcmf_doExecStack(l_ev, l_ev.pcmf_getUnComponent(), xName);
04348:
04349: return (l_ev);
04350: };
04351: };
04352:
04353: final class UnXMLTAGsetPosSwing implements IUnSAXAppFactHandler {
04354: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04355: String qName, Attributes attributes) throws Exception {
04356: String xPos = KeTools.pcmf_deRef(attributes.getValue("x"));
04357: String yPos = KeTools.pcmf_deRef(attributes.getValue("y"));
04358: String hi = KeTools.pcmf_deRef(attributes.getValue("height"));
04359: String wi = KeTools.pcmf_deRef(attributes.getValue("width"));
04360: String al = KeTools.pcmf_deRef(attributes.getValue("align"));
04361:
04362: if (l_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT) {
04363: int l_align = 0;
04364:
04365: if (al == null || al.trim().equals(""))
04366: l_align = java.awt.GridBagConstraints.WEST;
04367: else {
04368: try {
04369: l_align = java.awt.GridBagConstraints.class
04370: .getDeclaredField(al).getInt(null);
04371: } catch (Exception e) {
04372: KeLog.pcmf_log("ug2t",
04373: "<swingPos> no valid alignment", this ,
04374: KeLog.ERROR);
04375: }
04376: }
04377: if (l_hdl.pdm_act.pcmf_getParentNode() instanceof AHoSrvGenericContainer)
04378: ((de.ug2t.channel.ho.server.generic.AHoSrvGenericContainer) l_hdl.pdm_act
04379: .pcmf_getParentNode()).pcmf_setPosition(
04380: l_hdl.pdm_name, Integer.parseInt(xPos), Integer
04381: .parseInt(yPos), Integer.parseInt(wi),
04382: Integer.parseInt(hi), l_align);
04383: else
04384: KeLog
04385: .pcmf_log(
04386: "ug2t",
04387: "<swingPos> cannot set position due to invalid parent obj (no swing container)",
04388: this , KeLog.ERROR);
04389: }
04390: ;
04391: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04392: l_hdl.pdm_names.push(l_hdl.pdm_name);
04393:
04394: return (l_hdl.pdm_act);
04395: };
04396: };
04397:
04398: final class UnXMLTAGrenderCache implements IUnSAXAppFactHandler {
04399: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04400: String qName, Attributes attributes) throws Exception {
04401: String xCache = KeTools.pcmf_deRef(attributes
04402: .getValue("enable"));
04403:
04404: if (l_hdl.pdm_AppType == UnComponentFactory.MARKUP) {
04405: if (l_hdl.pdm_act instanceof UnComponent)
04406: l_hdl.pdm_act.pcmf_getView().pcmf_activateCache(
04407: xCache == null || xCache.equals("true"));
04408: else
04409: KeLog.pcmf_log("ug2t",
04410: "<renderCache> cannot set render cache, no html-widget: "
04411: + l_hdl.pdm_act.getClass(), this ,
04412: KeLog.ERROR);
04413: }
04414:
04415: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04416: l_hdl.pdm_names.push(l_hdl.pdm_name);
04417:
04418: return (l_hdl.pdm_act);
04419: };
04420: };
04421:
04422: final class UnXMLTAGhtmlColorSchema implements IUnSAXAppFactHandler {
04423: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04424: String qName, Attributes attributes) throws Exception {
04425: String xBUT = KeTools.pcmf_deRef(attributes.getValue("button"));
04426: String xPANEL = KeTools
04427: .pcmf_deRef(attributes.getValue("panel"));
04428: String xDEF = KeTools
04429: .pcmf_deRef(attributes.getValue("default"));
04430: String xFBOR = KeTools.pcmf_deRef(attributes
04431: .getValue("pageDeco"));
04432: String xDBOR = KeTools.pcmf_deRef(attributes
04433: .getValue("dialogDeco"));
04434:
04435: if (l_hdl.pdm_AppType == UnComponentFactory.MARKUP) {
04436: if (l_hdl.pdm_act instanceof MuGenericApplication) {
04437: MuGenericTemplateKit l_kit = ((MuGenericApplication) l_hdl.pdm_act)
04438: .pcmf_getTemplateKit();
04439: if (xBUT != null)
04440: l_kit.setBUT_BG(xBUT);
04441: if (xPANEL != null)
04442: l_kit.setPANEL_BG(xPANEL);
04443: if (xDEF != null)
04444: l_kit.setDEF_BG(xDEF);
04445: if (xFBOR != null)
04446: l_kit.setDEF_FBOR(xFBOR);
04447: if (xDBOR != null)
04448: l_kit.setDEF_DBOR(xDBOR);
04449: } else
04450: KeLog
04451: .pcmf_log(
04452: "ug2t",
04453: "<htmlColorSchema> color schema cant only be set in application tag",
04454: this , KeLog.ERROR);
04455: }
04456:
04457: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04458: l_hdl.pdm_names.push(l_hdl.pdm_name);
04459:
04460: return (l_hdl.pdm_act);
04461: };
04462: };
04463:
04464: final class UnXMLTAGsetSwingLayout implements IUnSAXAppFactHandler {
04465: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04466: String qName, Attributes attributes) throws Exception {
04467: String xTop = KeTools.pcmf_deRef(attributes.getValue("top"));
04468: String xLeft = KeTools.pcmf_deRef(attributes.getValue("left"));
04469: String xBut = KeTools.pcmf_deRef(attributes.getValue("bottom"));
04470: String xRi = KeTools.pcmf_deRef(attributes.getValue("right"));
04471: String weight = KeTools.pcmf_deRef(attributes
04472: .getValue("weights"));
04473:
04474: if (l_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT) {
04475: if (l_hdl.pdm_act instanceof AHoSrvGenericContainer) {
04476: int ins1 = 4;
04477: int ins2 = 4;
04478: int ins3 = 4;
04479: int ins4 = 4;
04480:
04481: if (xTop != null && xTop.equals("") == false)
04482: ins1 = Integer.parseInt(xTop);
04483: if (xLeft != null && xLeft.equals("") == false)
04484: ins2 = Integer.parseInt(xLeft);
04485: if (xBut != null && xBut.equals("") == false)
04486: ins3 = Integer.parseInt(xBut);
04487: if (xRi != null && xRi.equals("") == false)
04488: ins4 = Integer.parseInt(xRi);
04489:
04490: ((AHoSrvGenericContainer) l_hdl.pdm_act)
04491: .pcmf_setInsets(ins1, ins2, ins3, ins4);
04492:
04493: if (weight != null && weight.equals("false"))
04494: ((AHoSrvGenericContainer) l_hdl.pdm_act)
04495: .pcmf_setWeights(false);
04496: else
04497: ((AHoSrvGenericContainer) l_hdl.pdm_act)
04498: .pcmf_setWeights(true);
04499: } else
04500: KeLog
04501: .pcmf_log(
04502: "ug2t",
04503: "<swingLayout> cannot set layout-parameter due to invalid parent obj (no swing container): class ["
04504: + l_hdl.pdm_act.getClass()
04505: + "]"
04506: + ", name ["
04507: + l_hdl.pdm_name + "]", this ,
04508: KeLog.ERROR);
04509: }
04510: ;
04511: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04512: l_hdl.pdm_names.push(l_hdl.pdm_name);
04513:
04514: return (l_hdl.pdm_act);
04515: };
04516: };
04517:
04518: final class UnXMLTAGsetWeights implements IUnSAXAppFactHandler {
04519: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04520: String qName, Attributes attributes) throws Exception {
04521: String weightx = KeTools.pcmf_deRef(attributes
04522: .getValue("weightX"));
04523: String weighty = KeTools.pcmf_deRef(attributes
04524: .getValue("weightY"));
04525:
04526: if (l_hdl.pdm_act.pcmf_getParentNode() instanceof IUnLayouted) {
04527: int wx = 0;
04528: int wy = 0;
04529:
04530: if (weightx != null && weightx.equals("") == false)
04531: wx = Integer.parseInt(weightx);
04532: if (weighty != null && weighty.equals("") == false)
04533: wy = Integer.parseInt(weighty);
04534:
04535: ((IUnLayouted) l_hdl.pdm_act.pcmf_getParentNode())
04536: .pcmf_setWeights(l_hdl.pdm_name, wx, wy);
04537: } else
04538: KeLog
04539: .pcmf_log(
04540: "ug2t",
04541: "<weights> cannot set weights-parameter due to invalid parent obj (no container): class ["
04542: + l_hdl.pdm_act.getClass()
04543: + "]"
04544: + ", name [" + l_hdl.pdm_name + "]",
04545: this , KeLog.ERROR);
04546:
04547: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04548: l_hdl.pdm_names.push(l_hdl.pdm_name);
04549:
04550: return (l_hdl.pdm_act);
04551: };
04552: };
04553:
04554: final class UnXMLTAGsetFSize implements IUnSAXAppFactHandler {
04555: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04556: String qName, Attributes attributes) throws Exception {
04557: String wi = KeTools.pcmf_deRef(attributes.getValue("width"));
04558: String hi = KeTools.pcmf_deRef(attributes.getValue("height"));
04559: String type = KeTools.pcmf_deRef(attributes.getValue("type"));
04560:
04561: if (l_hdl.pdm_act instanceof UnComponent) {
04562: int wx = -1;
04563: int wy = -1;
04564: int itype = UnFixedSize.FIX_SIZE;
04565:
04566: if (type != null) {
04567: if (type.equals("MAX_SIZE"))
04568: itype = UnFixedSize.MAX_SIZE;
04569: else if (type.equals("MIN_SIZE"))
04570: itype = UnFixedSize.MIN_SIZE;
04571: else if (type.equals("PREF_SIZE"))
04572: itype = UnFixedSize.PREF_SIZE;
04573: else
04574: itype = UnFixedSize.FIX_SIZE;
04575: }
04576:
04577: if (wi != null && wi.equals("") == false)
04578: wx = Integer.parseInt(wi);
04579: if (hi != null && hi.equals("") == false)
04580: wy = Integer.parseInt(hi);
04581:
04582: if (wi == null && hi == null)
04583: ((UnComponent) l_hdl.pdm_act).pcmf_deleteFixedSize();
04584: else {
04585: ((UnComponent) l_hdl.pdm_act).pcmf_setFixedSize(wx, wy,
04586: itype);
04587: ((UnComponent) l_hdl.pdm_act)
04588: .pcmf_setTakeMaxSpace(false);
04589: }
04590: } else
04591: KeLog.pcmf_log("ug2t",
04592: "<fixedSize> cannot set fixed size current object is no gui-object: class ["
04593: + l_hdl.pdm_act.getClass() + "]"
04594: + ", name [" + l_hdl.pdm_name + "]", this ,
04595: KeLog.ERROR);
04596:
04597: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04598: l_hdl.pdm_names.push(l_hdl.pdm_name);
04599:
04600: return (l_hdl.pdm_act);
04601: };
04602: };
04603:
04604: final class UnXMLTAGevOc implements IUnSAXAppFactHandler {
04605: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04606: String qName, Attributes attributes) throws Exception {
04607: String val = KeTools.pcmf_deRef(attributes.getValue("value"));
04608:
04609: if (l_hdl.pdm_act instanceof UnComponent) {
04610: if (val != null && val.equals("false"))
04611: ((UnComponent) l_hdl.pdm_act)
04612: .pcmf_setEventOnChange(false);
04613: else
04614: ((UnComponent) l_hdl.pdm_act)
04615: .pcmf_setEventOnChange(true);
04616: } else
04617: KeLog
04618: .pcmf_log(
04619: "ug2t",
04620: "<eventOnChange> cannot set eventOnChange, current object is no gui-object: class ["
04621: + l_hdl.pdm_act.getClass()
04622: + "]"
04623: + ", name [" + l_hdl.pdm_name + "]",
04624: this , KeLog.ERROR);
04625:
04626: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04627: l_hdl.pdm_names.push(l_hdl.pdm_name);
04628:
04629: return (l_hdl.pdm_act);
04630: };
04631: };
04632:
04633: final class UnXMLTAGevPrio implements IUnSAXAppFactHandler {
04634: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04635: String qName, Attributes attributes) throws Exception {
04636: String val = KeTools.pcmf_deRef(attributes.getValue("value"));
04637:
04638: if (l_hdl.pdm_act instanceof UnComponent) {
04639: ((UnComponent) l_hdl.pdm_act).pcmf_setEventPrio(Integer
04640: .parseInt(val));
04641: } else
04642: KeLog.pcmf_log("ug2t",
04643: "<eventPrio> cannot set eventPrio, current object is no gui-object: class ["
04644: + l_hdl.pdm_act.getClass() + "]"
04645: + ", name [" + l_hdl.pdm_name + "]", this ,
04646: KeLog.ERROR);
04647:
04648: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04649: l_hdl.pdm_names.push(l_hdl.pdm_name);
04650:
04651: return (l_hdl.pdm_act);
04652: };
04653: };
04654:
04655: final class UnXMLTAGsubmit implements IUnSAXAppFactHandler {
04656: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04657: String qName, Attributes attributes) throws Exception {
04658: String val = KeTools.pcmf_deRef(attributes.getValue("value"));
04659:
04660: if (l_hdl.pdm_act instanceof UnComponent) {
04661: if (val != null && val.equals("false"))
04662: ((UnComponent) l_hdl.pdm_act).pcmf_disableSubmit();
04663: else
04664: ((UnComponent) l_hdl.pdm_act).pcmf_enableSubmit();
04665: } else
04666: KeLog.pcmf_log("ug2t",
04667: "<submitEvent> cannot set submit, current object is no gui-object: class ["
04668: + l_hdl.pdm_act.getClass() + "]"
04669: + ", name [" + l_hdl.pdm_name + "]", this ,
04670: KeLog.ERROR);
04671:
04672: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04673: l_hdl.pdm_names.push(l_hdl.pdm_name);
04674:
04675: return (l_hdl.pdm_act);
04676: };
04677: };
04678:
04679: final class UnXMLTAGsync implements IUnSAXAppFactHandler {
04680: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04681: String qName, Attributes attributes) throws Exception {
04682: String val = KeTools.pcmf_deRef(attributes.getValue("widget"));
04683:
04684: if (l_hdl.pdm_act instanceof UnComponent) {
04685: Object l_obj = KeRegisteredObject.pcmf_getObjByName(val);
04686: if (l_obj instanceof IUnSyncComponent)
04687: ((UnComponent) l_hdl.pdm_act)
04688: .pcmf_addSynced((IUnSyncComponent) l_obj);
04689: else
04690: KeLog.pcmf_log("ug2t",
04691: "<sync> object does not implement IUnSyncComponent: class ["
04692: + l_hdl.pdm_act.getClass() + "]"
04693: + ", name [" + l_hdl.pdm_name + "]",
04694: this , KeLog.ERROR);
04695: } else
04696: KeLog.pcmf_log("ug2t",
04697: "<sync> cannot add a syncable widget, current object is no gui-object: class ["
04698: + l_hdl.pdm_act.getClass() + "]"
04699: + ", name [" + l_hdl.pdm_name + "]", this ,
04700: KeLog.ERROR);
04701:
04702: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04703: l_hdl.pdm_names.push(l_hdl.pdm_name);
04704:
04705: return (l_hdl.pdm_act);
04706: };
04707: };
04708:
04709: final class UnXMLTAGsetInsets implements IUnSAXAppFactHandler {
04710: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04711: String qName, Attributes attributes) throws Exception {
04712: String xTop = KeTools.pcmf_deRef(attributes.getValue("top"));
04713: String xLeft = KeTools.pcmf_deRef(attributes.getValue("left"));
04714: String xBut = KeTools.pcmf_deRef(attributes.getValue("bottom"));
04715: String xRi = KeTools.pcmf_deRef(attributes.getValue("right"));
04716:
04717: if (l_hdl.pdm_act.pcmf_getParentNode() instanceof IUnLayouted) {
04718: int ins1 = 0;
04719: int ins2 = 0;
04720: int ins3 = 0;
04721: int ins4 = 0;
04722:
04723: if (xTop != null && xTop.equals("") == false)
04724: ins1 = Integer.parseInt(xTop);
04725: if (xLeft != null && xLeft.equals("") == false)
04726: ins2 = Integer.parseInt(xLeft);
04727: if (xBut != null && xBut.equals("") == false)
04728: ins3 = Integer.parseInt(xBut);
04729: if (xRi != null && xRi.equals("") == false)
04730: ins4 = Integer.parseInt(xRi);
04731:
04732: ((IUnLayouted) l_hdl.pdm_act.pcmf_getParentNode())
04733: .pcmf_setInsets(l_hdl.pdm_name, ins1, ins2, ins3,
04734: ins4);
04735: } else
04736: KeLog
04737: .pcmf_log(
04738: "ug2t",
04739: "<insets> cannot set insets-parameter due to invalid parent obj (no container): class ["
04740: + l_hdl.pdm_act.getClass()
04741: + "]"
04742: + ", name [" + l_hdl.pdm_name + "]",
04743: this , KeLog.ERROR);
04744:
04745: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04746: l_hdl.pdm_names.push(l_hdl.pdm_name);
04747:
04748: return (l_hdl.pdm_act);
04749: };
04750: };
04751:
04752: final class UnXMLTAGsetSwingWeights implements IUnSAXAppFactHandler {
04753: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04754: String qName, Attributes attributes) throws Exception {
04755: String weightx = KeTools.pcmf_deRef(attributes
04756: .getValue("weightX"));
04757: String weighty = KeTools.pcmf_deRef(attributes
04758: .getValue("weightY"));
04759:
04760: if (l_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT) {
04761: if (l_hdl.pdm_act.pcmf_getParentNode() instanceof AHoSrvGenericContainer) {
04762: int wx = 0;
04763: int wy = 0;
04764:
04765: if (weightx != null && weightx.equals("") == false)
04766: wx = Integer.parseInt(weightx);
04767: if (weighty != null && weighty.equals("") == false)
04768: wy = Integer.parseInt(weighty);
04769:
04770: ((AHoSrvGenericContainer) l_hdl.pdm_act
04771: .pcmf_getParentNode()).pcmf_setWeights(
04772: l_hdl.pdm_name, wx, wy);
04773: } else
04774: KeLog
04775: .pcmf_log(
04776: "ug2t",
04777: "<swingWeights> cannot set weights-parameter due to invalid parent obj (no swing container): class ["
04778: + l_hdl.pdm_act.getClass()
04779: + "]"
04780: + ", name ["
04781: + l_hdl.pdm_name + "]", this ,
04782: KeLog.ERROR);
04783: }
04784: ;
04785: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04786: l_hdl.pdm_names.push(l_hdl.pdm_name);
04787:
04788: return (l_hdl.pdm_act);
04789: };
04790: };
04791:
04792: final class UnXMLTAGsetSwingFill implements IUnSAXAppFactHandler {
04793: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04794: String qName, Attributes attributes) throws Exception {
04795: String hf = KeTools.pcmf_deRef(attributes.getValue("hFill"));
04796: String vf = KeTools.pcmf_deRef(attributes.getValue("vFill"));
04797:
04798: if (l_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT) {
04799: if (l_hdl.pdm_act.pcmf_getParentNode() instanceof AHoSrvGenericContainer) {
04800: ((AHoSrvGenericContainer) l_hdl.pdm_act
04801: .pcmf_getParentNode()).pcmf_setFill(
04802: l_hdl.pdm_name, (hf != null && hf
04803: .equals("true")) ? true : false,
04804: (vf != null && vf.equals("true")) ? true
04805: : false);
04806: } else
04807: KeLog
04808: .pcmf_log(
04809: "ug2t",
04810: "<swingFill> cannot set fill-parameter due to invalid parent obj (no swing container): class ["
04811: + l_hdl.pdm_act.getClass()
04812: + "]"
04813: + ", name ["
04814: + l_hdl.pdm_name + "]", this ,
04815: KeLog.ERROR);
04816: }
04817: ;
04818: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04819: l_hdl.pdm_names.push(l_hdl.pdm_name);
04820:
04821: return (l_hdl.pdm_act);
04822: };
04823: };
04824:
04825: final class UnXMLTAGsetLog implements IUnSAXAppFactHandler {
04826: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04827: String qName, Attributes attributes) throws Exception {
04828: String log = KeTools.pcmf_deRef(attributes.getValue("class"));
04829:
04830: KeLog.pcmf_setLogWriter((IKeLogWriter) Class.forName(log)
04831: .newInstance());
04832:
04833: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04834: l_hdl.pdm_names.push(l_hdl.pdm_name);
04835:
04836: return (l_hdl.pdm_act);
04837: };
04838: };
04839:
04840: final class UnXMLTAGsetFill implements IUnSAXAppFactHandler {
04841: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04842: String qName, Attributes attributes) throws Exception {
04843: String hf = KeTools.pcmf_deRef(attributes.getValue("hFill"));
04844: String vf = KeTools.pcmf_deRef(attributes.getValue("vFill"));
04845:
04846: if (l_hdl.pdm_act.pcmf_getParentNode() instanceof IUnLayouted) {
04847: ((IUnLayouted) l_hdl.pdm_act.pcmf_getParentNode())
04848: .pcmf_setFill(l_hdl.pdm_name, (hf != null && hf
04849: .equals("true")) ? true : false,
04850: (vf != null && vf.equals("true")) ? true
04851: : false);
04852: } else
04853: KeLog
04854: .pcmf_log(
04855: "ug2t",
04856: "<fill> cannot set fill-parameter due to invalid parent obj (no layoutable container): class ["
04857: + l_hdl.pdm_act.getClass()
04858: + "]"
04859: + ", name [" + l_hdl.pdm_name + "]",
04860: this , KeLog.ERROR);
04861:
04862: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04863: l_hdl.pdm_names.push(l_hdl.pdm_name);
04864:
04865: return (l_hdl.pdm_act);
04866: };
04867: };
04868:
04869: final class UnXMLTAGsetSwingInsets implements IUnSAXAppFactHandler {
04870: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04871: String qName, Attributes attributes) throws Exception {
04872: String xTop = KeTools.pcmf_deRef(attributes.getValue("top"));
04873: String xLeft = KeTools.pcmf_deRef(attributes.getValue("left"));
04874: String xBut = KeTools.pcmf_deRef(attributes.getValue("bottom"));
04875: String xRi = KeTools.pcmf_deRef(attributes.getValue("right"));
04876:
04877: if (l_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT) {
04878: if (l_hdl.pdm_act.pcmf_getParentNode() instanceof AHoSrvGenericContainer) {
04879: int ins1 = 0;
04880: int ins2 = 0;
04881: int ins3 = 0;
04882: int ins4 = 0;
04883:
04884: if (xTop != null && xTop.equals("") == false)
04885: ins1 = Integer.parseInt(xTop);
04886: if (xLeft != null && xLeft.equals("") == false)
04887: ins2 = Integer.parseInt(xLeft);
04888: if (xBut != null && xBut.equals("") == false)
04889: ins3 = Integer.parseInt(xBut);
04890: if (xRi != null && xRi.equals("") == false)
04891: ins4 = Integer.parseInt(xRi);
04892:
04893: ((AHoSrvGenericContainer) l_hdl.pdm_act
04894: .pcmf_getParentNode()).pcmf_setInsets(
04895: l_hdl.pdm_name, ins1, ins2, ins3, ins4);
04896: } else
04897: KeLog
04898: .pcmf_log(
04899: "ug2t",
04900: "<swingInsets> cannot set insets-parameter due to invalid parent obj (no swing container): class ["
04901: + l_hdl.pdm_act.getClass()
04902: + "]"
04903: + ", name ["
04904: + l_hdl.pdm_name + "]", this ,
04905: KeLog.ERROR);
04906: }
04907: ;
04908: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04909: l_hdl.pdm_names.push(l_hdl.pdm_name);
04910:
04911: return (l_hdl.pdm_act);
04912: };
04913: };
04914:
04915: final class UnXMLTAGsetPSizeSwing implements IUnSAXAppFactHandler {
04916: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04917: String qName, Attributes attributes) throws Exception {
04918: String hi = KeTools.pcmf_deRef(attributes.getValue("height"));
04919: String wi = KeTools.pcmf_deRef(attributes.getValue("width"));
04920:
04921: if (l_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT) {
04922: if (l_hdl.pdm_act instanceof AHoSrvGenericContainer)
04923: ((de.ug2t.channel.ho.server.generic.AHoSrvGenericContainer) l_hdl.pdm_act)
04924: .pcmf_setPSize(Integer.parseInt(wi), Integer
04925: .parseInt(hi));
04926: else
04927: KeLog.pcmf_log("ug2t",
04928: "<swingPSize> cannot set pane-size (no swing container): class ["
04929: + l_hdl.pdm_act.getClass() + "]"
04930: + ", name [" + l_hdl.pdm_name + "]",
04931: this , KeLog.ERROR);
04932: }
04933: ;
04934: l_hdl.pdm_elements.push(l_hdl.pdm_act);
04935: l_hdl.pdm_names.push(l_hdl.pdm_name);
04936:
04937: return (l_hdl.pdm_act);
04938: };
04939: };
04940:
04941: final class UnXMLTAGsetFont implements IUnSAXAppFactHandler {
04942: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
04943: String qName, Attributes attributes) throws Exception {
04944: String fName = KeTools.pcmf_deRef(attributes.getValue("name"));
04945: String fSize = KeTools.pcmf_deRef(attributes.getValue("size"));
04946: String fStyle = KeTools
04947: .pcmf_deRef(attributes.getValue("style"));
04948: String xOrphan = KeTools.pcmf_deRef(attributes
04949: .getValue("orphan"));
04950: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
04951: String xAttach = KeTools.pcmf_deRef(attributes
04952: .getValue("attach"));
04953:
04954: try {
04955: if (fSize == null)
04956: fSize = "-1";
04957:
04958: if (fName == null)
04959: fName = "Arial";
04960:
04961: if (fStyle == null)
04962: fStyle = Integer.toString(Font.PLAIN);
04963: else {
04964: if (fStyle.equals("italic"))
04965: fStyle = Integer.toString(Font.ITALIC);
04966: else if (fStyle.equals("bold"))
04967: fStyle = Integer.toString(Font.BOLD);
04968: else if (fStyle.equals("normal"))
04969: fStyle = Integer.toString(Font.PLAIN);
04970: }
04971:
04972: UnFontDescriptor l_font = null;
04973:
04974: if (xObj == null || xObj.equals(""))
04975: l_font = new UnFontDescriptor(fName, Integer
04976: .parseInt(fSize), Integer.parseInt(fStyle));
04977: else
04978: l_font = (UnFontDescriptor) KeRegisteredObject
04979: .pcmf_getObjByName(xObj);
04980:
04981: if (xOrphan == null || xOrphan.equals("false")) {
04982: if (l_hdl.pdm_act instanceof HoGenericTreeNode) {
04983: IKeView l_view = l_hdl.pdm_act.pcmf_getView();
04984: if (l_view instanceof UnIconValueView)
04985: ((UnIconValueView) l_view).pcmf_setFont(l_font);
04986: else
04987: l_hdl.pdm_act.pcmf_setView(new UnIconValueView(
04988: null, null, null, l_font, null, null));
04989: } else
04990: ((UnComponent) l_hdl.pdm_act).pcmf_setFont(l_font);
04991: }
04992:
04993: String xReg = KeTools.pcmf_deRef(attributes
04994: .getValue("register"));
04995: if (xReg != null && xReg.equals("") == false) {
04996: l_font.pcmf_reRegister(xReg);
04997: if (xAttach == null || xAttach.equals("true"))
04998: l_font.pcmf_attachFont();
04999: }
05000: String xRegG = KeTools.pcmf_deRef(attributes
05001: .getValue("registerGlobal"));
05002: if (xRegG != null && xRegG.equals("") == false) {
05003: l_font.pcmf_unRegister();
05004: l_font.pcmf_registerGlobal(xRegG);
05005: }
05006: } catch (Exception e) {
05007: KeLog.pcmf_log("ug2t", "<font> error setting font: class ["
05008: + l_hdl.pdm_act.getClass() + "]" + ", name ["
05009: + l_hdl.pdm_name + "]", this , KeLog.ERROR);
05010: }
05011:
05012: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05013: l_hdl.pdm_names.push(l_hdl.pdm_name);
05014:
05015: return (l_hdl.pdm_act);
05016: };
05017: };
05018:
05019: final class UnXMLTAGsetPos implements IUnSAXAppFactHandler {
05020: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05021: String qName, Attributes attributes) throws Exception {
05022: String xPos = KeTools.pcmf_deRef(attributes.getValue("x"));
05023: String yPos = KeTools.pcmf_deRef(attributes.getValue("y"));
05024: String hi = KeTools.pcmf_deRef(attributes.getValue("height"));
05025: String wi = KeTools.pcmf_deRef(attributes.getValue("width"));
05026: String al = KeTools.pcmf_deRef(attributes.getValue("align"));
05027:
05028: if (wi == null)
05029: wi = "1";
05030: if (hi == null)
05031: hi = "1";
05032:
05033: Object l_parent = l_hdl.pdm_act.pcmf_getParentNode();
05034: if (l_parent instanceof IUnPanel)
05035: ((IUnPanel) l_parent).pcmf_setGuiObjPosition(
05036: l_hdl.pdm_name, Integer.parseInt(xPos), Integer
05037: .parseInt(yPos), Integer.parseInt(wi),
05038: Integer.parseInt(hi), al == null
05039: || al.trim().equals("") ? "WEST" : al);
05040: else if (l_parent instanceof IUnApplication)
05041: ((IUnApplication) l_parent).pcmf_setGuiObjPosition(
05042: l_hdl.pdm_name, Integer.parseInt(xPos), Integer
05043: .parseInt(yPos), Integer.parseInt(wi),
05044: Integer.parseInt(hi), al == null
05045: || al.trim().equals("") ? "WEST" : al);
05046: else if (l_hdl.pdm_act instanceof IUnPage && l_parent == null)
05047: ((IUnPage) l_hdl.pdm_act).pcmf_setInnerPosition(Integer
05048: .parseInt(xPos), Integer.parseInt(yPos), Integer
05049: .parseInt(wi), Integer.parseInt(hi));
05050: else
05051: KeLog
05052: .pcmf_log(
05053: "ug2t",
05054: "<position> cannot set position, parent object is no container or application (tag is ignored): class ["
05055: + l_hdl.pdm_act.getClass()
05056: + "]"
05057: + ", name [" + l_hdl.pdm_name + "]",
05058: this , KeLog.MESSAGE);
05059:
05060: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05061: l_hdl.pdm_names.push(l_hdl.pdm_name);
05062:
05063: return (l_hdl.pdm_act);
05064: };
05065: };
05066:
05067: final class UnXMLTAGjava implements IUnSAXAppFactHandler {
05068: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05069: String qName, Attributes attributes) throws Exception {
05070: String xClass = KeTools
05071: .pcmf_deRef(attributes.getValue("class"));
05072: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
05073:
05074: if (xObj != null)
05075: ((IKeExecutable) KeRegisteredObject.pcmf_getObjByName(xObj))
05076: .pcmf_execObj(l_hdl.pdm_act);
05077: else if (xClass != null)
05078: ((IKeExecutable) Class.forName(xClass).newInstance())
05079: .pcmf_execObj(l_hdl.pdm_act);
05080: else
05081: KeLog.pcmf_log("ug2t",
05082: "<configure> no valid object or class defined",
05083: this , KeLog.MESSAGE);
05084:
05085: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05086: l_hdl.pdm_names.push(l_hdl.pdm_name);
05087:
05088: return (l_hdl.pdm_act);
05089: };
05090: };
05091:
05092: final class UnXMLTAGpreFct implements IUnSAXAppFactHandler {
05093: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05094: String qName, Attributes attributes) throws Exception {
05095: String xClass = KeTools
05096: .pcmf_deRef(attributes.getValue("class"));
05097: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
05098:
05099: IUnPreDisplayFunction l_fct = null;
05100:
05101: if (xObj != null)
05102: l_fct = (IUnPreDisplayFunction) KeRegisteredObject
05103: .pcmf_getObjByName(xObj);
05104: else if (xClass != null)
05105: l_fct = ((IUnPreDisplayFunction) Class.forName(xClass)
05106: .newInstance());
05107: else
05108: KeLog.pcmf_log("ug2t",
05109: "<configure> no valid object or class defined",
05110: this , KeLog.MESSAGE);
05111:
05112: if (l_fct != null) {
05113: if (l_hdl.pdm_page != null)
05114: l_hdl.pdm_page.pcmf_setPreFct(true);
05115:
05116: ((UnComponent) l_hdl.pdm_act).pcmf_setPreFct(true);
05117: ((UnComponent) l_hdl.pdm_act).pcmf_addPreFct(l_fct);
05118: }
05119:
05120: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05121: l_hdl.pdm_names.push(l_hdl.pdm_name);
05122:
05123: return (l_hdl.pdm_act);
05124: };
05125: };
05126:
05127: final class UnXMLTAGpostFct implements IUnSAXAppFactHandler {
05128: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05129: String qName, Attributes attributes) throws Exception {
05130: String xClass = KeTools
05131: .pcmf_deRef(attributes.getValue("class"));
05132: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
05133:
05134: IUnPostDisplayFunction l_fct = null;
05135:
05136: if (xObj != null)
05137: l_fct = (IUnPostDisplayFunction) KeRegisteredObject
05138: .pcmf_getObjByName(xObj);
05139: else if (xClass != null)
05140: l_fct = ((IUnPostDisplayFunction) Class.forName(xClass)
05141: .newInstance());
05142: else
05143: KeLog.pcmf_log("ug2t",
05144: "<configure> no valid object or class defined",
05145: this , KeLog.MESSAGE);
05146:
05147: if (l_fct != null) {
05148: if (l_hdl.pdm_page != null)
05149: l_hdl.pdm_page.pcmf_setPostFct(true);
05150:
05151: ((UnComponent) l_hdl.pdm_act).pcmf_setPostFct(true);
05152: ((UnComponent) l_hdl.pdm_act).pcmf_addPostFct(l_fct);
05153: }
05154:
05155: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05156: l_hdl.pdm_names.push(l_hdl.pdm_name);
05157:
05158: return (l_hdl.pdm_act);
05159: };
05160: };
05161:
05162: final class UnXMLTAGdisable implements IUnSAXAppFactHandler {
05163: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05164: String qName, Attributes attributes) throws Exception {
05165: String xDis = KeTools.pcmf_deRef(attributes.getValue("value"));
05166:
05167: if (xDis == null || xDis.equals("true"))
05168: ((KeTreeNode) l_hdl.pdm_act).pcmf_disable();
05169: else
05170: ((KeTreeNode) l_hdl.pdm_act).pcmf_enable();
05171:
05172: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05173: l_hdl.pdm_names.push(l_hdl.pdm_name);
05174:
05175: return (l_hdl.pdm_act);
05176: };
05177: };
05178:
05179: final class UnXMLTAGhide implements IUnSAXAppFactHandler {
05180: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05181: String qName, Attributes attributes) throws Exception {
05182: String xDis = KeTools.pcmf_deRef(attributes.getValue("value"));
05183:
05184: if (xDis == null || xDis.equals("true"))
05185: ((KeTreeNode) l_hdl.pdm_act).pcmf_hide();
05186: else
05187: ((KeTreeNode) l_hdl.pdm_act).pcmf_unhide();
05188:
05189: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05190: l_hdl.pdm_names.push(l_hdl.pdm_name);
05191:
05192: return (l_hdl.pdm_act);
05193: };
05194: };
05195:
05196: final class UnXMLTAGhideall implements IUnSAXAppFactHandler {
05197: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05198: String qName, Attributes attributes) throws Exception {
05199: String xDis = KeTools.pcmf_deRef(attributes.getValue("value"));
05200:
05201: if (xDis == null || xDis.equals("true"))
05202: ((KeTreeNode) l_hdl.pdm_act).pcmf_hideAll();
05203: else
05204: ((KeTreeNode) l_hdl.pdm_act).pcmf_unHideAll();
05205:
05206: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05207: l_hdl.pdm_names.push(l_hdl.pdm_name);
05208:
05209: return (l_hdl.pdm_act);
05210: };
05211: };
05212:
05213: final class UnXMLTAGrpons implements IUnSAXAppFactHandler {
05214: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05215: String qName, Attributes attributes) throws Exception {
05216: String xRp = KeTools.pcmf_deRef(attributes.getValue("value"));
05217:
05218: if (l_hdl.pdm_act instanceof MuGenericComponent) {
05219: if (xRp == null || xRp.equals("true"))
05220: ((MuGenericComponent) l_hdl.pdm_act)
05221: .pcmf_setNeedRepaintOnValueSet(true);
05222: else
05223: ((MuGenericComponent) l_hdl.pdm_act)
05224: .pcmf_setNeedRepaintOnValueSet(false);
05225: }
05226:
05227: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05228: l_hdl.pdm_names.push(l_hdl.pdm_name);
05229:
05230: return (l_hdl.pdm_act);
05231: };
05232: };
05233:
05234: final class UnXMLTAGrpg implements IUnSAXAppFactHandler {
05235: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05236: String qName, Attributes attributes) throws Exception {
05237: String xRp = KeTools.pcmf_deRef(attributes.getValue("value"));
05238:
05239: if (l_hdl.pdm_act instanceof MuGenericComponent) {
05240: if (xRp == null || xRp.equals("true"))
05241: ((MuGenericComponent) l_hdl.pdm_act)
05242: .pcmf_setNeedRepaint(true);
05243: else
05244: ((MuGenericComponent) l_hdl.pdm_act)
05245: .pcmf_setNeedRepaint(false);
05246: }
05247:
05248: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05249: l_hdl.pdm_names.push(l_hdl.pdm_name);
05250:
05251: return (l_hdl.pdm_act);
05252: };
05253: };
05254:
05255: final class UnXMLTAGreadonly implements IUnSAXAppFactHandler {
05256: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05257: String qName, Attributes attributes) throws Exception {
05258: String xDis = KeTools.pcmf_deRef(attributes.getValue("value"));
05259:
05260: if (l_hdl.pdm_act instanceof IUnInputComponent) {
05261: if (xDis == null || xDis.equals("true"))
05262: ((IUnInputComponent) l_hdl.pdm_act)
05263: .pcmf_setReadOnly(true);
05264: else
05265: ((IUnInputComponent) l_hdl.pdm_act)
05266: .pcmf_setReadOnly(false);
05267: } else
05268: KeLog.pcmf_log("ug2t",
05269: "<readOnly> can not set readonly on : class ["
05270: + l_hdl.pdm_act.getClass() + "]"
05271: + ", name [" + l_hdl.pdm_name + "]", this ,
05272: KeLog.ERROR);
05273:
05274: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05275: l_hdl.pdm_names.push(l_hdl.pdm_name);
05276:
05277: return (l_hdl.pdm_act);
05278: };
05279: };
05280:
05281: final class UnXMLTAGautoEcho implements IUnSAXAppFactHandler {
05282: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05283: String qName, Attributes attributes) throws Exception {
05284: String xAe = KeTools.pcmf_deRef(attributes.getValue("value"));
05285:
05286: if (l_hdl.pdm_act instanceof AHoSrvGenericComponent) {
05287: if (xAe == null || xAe.equals("true"))
05288: ((AHoSrvGenericComponent) l_hdl.pdm_act)
05289: .pcmf_setAutoEcho(true);
05290: else
05291: ((AHoSrvGenericComponent) l_hdl.pdm_act)
05292: .pcmf_setAutoEcho(false);
05293: }
05294:
05295: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05296: l_hdl.pdm_names.push(l_hdl.pdm_name);
05297:
05298: return (l_hdl.pdm_act);
05299: };
05300: };
05301:
05302: final class UnXMLTAGeventlatency implements IUnSAXAppFactHandler {
05303: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05304: String qName, Attributes attributes) throws Exception {
05305: String xLat = KeTools.pcmf_deRef(attributes.getValue("value"));
05306:
05307: ((UnComponent) l_hdl.pdm_act)
05308: .pcmf_setIterativeEventLatency(Integer.parseInt(xLat));
05309:
05310: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05311: l_hdl.pdm_names.push(l_hdl.pdm_name);
05312:
05313: return (l_hdl.pdm_act);
05314: };
05315: };
05316:
05317: final class UnXMLTAGfocus implements IUnSAXAppFactHandler {
05318: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05319: String qName, Attributes attributes) throws Exception {
05320: if (l_hdl.pdm_act instanceof UnComponent)
05321: l_hdl.pdm_page
05322: .pcmf_setDefaultFocusWdg((UnComponent) l_hdl.pdm_act);
05323: else
05324: KeLog.pcmf_log("ug2t",
05325: "<focus> can not set focus on : class ["
05326: + l_hdl.pdm_act.getClass() + "]"
05327: + ", name [" + l_hdl.pdm_name + "]", this ,
05328: KeLog.ERROR);
05329:
05330: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05331: l_hdl.pdm_names.push(l_hdl.pdm_name);
05332:
05333: return (l_hdl.pdm_act);
05334: };
05335: };
05336:
05337: final class UnXMLTAGactive implements IUnSAXAppFactHandler {
05338: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05339: String qName, Attributes attributes) throws Exception {
05340: String xAc = KeTools.pcmf_deRef(attributes.getValue("page"));
05341:
05342: if (xAc != null && xAc.equals("") == false)
05343: l_hdl.pdm_appl.pcmf_setActive(xAc);
05344: else if (l_hdl.pdm_act instanceof IUnPage)
05345: l_hdl.pdm_appl.pcmf_setActive(l_hdl.pdm_act.pcmf_getName());
05346:
05347: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05348: l_hdl.pdm_names.push(l_hdl.pdm_name);
05349:
05350: return (l_hdl.pdm_act);
05351: };
05352: };
05353:
05354: final class UnXMLTAGmaximize implements IUnSAXAppFactHandler {
05355: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05356: String qName, Attributes attributes) throws Exception {
05357: String xAc = KeTools.pcmf_deRef(attributes.getValue("page"));
05358:
05359: if (xAc != null && xAc.equals("") == false)
05360: ((IUnPage) l_hdl.pdm_appl.pcmf_getUnComponent()
05361: .pcmf_getSubNode(xAc)).pcmf_maximize(true);
05362: else if (l_hdl.pdm_act instanceof IUnPage)
05363: ((IUnPage) l_hdl.pdm_act).pcmf_maximize(true);
05364:
05365: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05366: l_hdl.pdm_names.push(l_hdl.pdm_name);
05367:
05368: return (l_hdl.pdm_act);
05369: };
05370: };
05371:
05372: final class UnXMLTAGsetTab implements IUnSAXAppFactHandler {
05373: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05374: String qName, Attributes attributes) throws Exception {
05375: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
05376: String xIdx = KeTools.pcmf_deRef(attributes.getValue("tabIdx"));
05377:
05378: if (l_hdl.pdm_act instanceof IUnTabbedPane)
05379: ((IUnTabbedPane) l_hdl.pdm_act).pcmf_setTabComponent(
05380: Integer.parseInt(xIdx),
05381: (IUnComponent) KeRegisteredObject
05382: .pcmf_getObjByName(xObj));
05383: else
05384: KeLog.pcmf_log("ug2t",
05385: "<setTab> can not set tab component, parent is no tabbedPane: class ["
05386: + l_hdl.pdm_act.getClass() + "]"
05387: + ", name [" + l_hdl.pdm_name + "]", this ,
05388: KeLog.ERROR);
05389:
05390: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05391: l_hdl.pdm_names.push(l_hdl.pdm_name);
05392:
05393: return (l_hdl.pdm_act);
05394: };
05395: };
05396:
05397: final class UnXMLTAGregisterGlobal implements IUnSAXAppFactHandler {
05398: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05399: String qName, Attributes attributes) throws Exception {
05400: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
05401:
05402: if (xName != null || xName.equals("") == false) {
05403: l_hdl.pdm_act.pcmf_unRegister();
05404: l_hdl.pdm_act.pcmf_registerGlobal(xName);
05405: }
05406:
05407: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05408: l_hdl.pdm_names.push(l_hdl.pdm_name);
05409:
05410: return (l_hdl.pdm_act);
05411: };
05412: };
05413:
05414: final class UnXMLTAGregisterValue implements IUnSAXAppFactHandler {
05415: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05416: String qName, Attributes attributes) throws Exception {
05417: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
05418: String xValue = KeTools
05419: .pcmf_deRef(attributes.getValue("value"));
05420:
05421: if (xName != null || xName.equals("") == false)
05422: KeRegisteredObject.pcmf_register(xName,
05423: new KeStringWrapper(xValue));
05424:
05425: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05426: l_hdl.pdm_names.push(l_hdl.pdm_name);
05427:
05428: return (l_hdl.pdm_act);
05429: };
05430: };
05431:
05432: final class UnXMLTAGunregisterValue implements IUnSAXAppFactHandler {
05433: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05434: String qName, Attributes attributes) throws Exception {
05435: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
05436:
05437: if (xName != null || xName.equals("") == false)
05438: KeRegisteredObject.pcmf_unRegister(xName);
05439:
05440: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05441: l_hdl.pdm_names.push(l_hdl.pdm_name);
05442:
05443: return (l_hdl.pdm_act);
05444: };
05445: };
05446:
05447: final class UnXMLTAGsqlTableMapUI implements IUnSAXAppFactHandler {
05448: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05449: String qName, Attributes attributes) throws Exception {
05450: String xTable = KeTools
05451: .pcmf_deRef(attributes.getValue("table"));
05452: String xField = KeTools
05453: .pcmf_deRef(attributes.getValue("field"));
05454:
05455: CoSqlTable l_tab = (CoSqlTable) KeRegisteredObject
05456: .pcmf_getObjByName(xTable);
05457: if (l_tab != null)
05458: l_tab.pcmf_setConnectedField(xField, l_hdl.pdm_act);
05459: else
05460: KeLog.pcmf_log("ug2t", "<uiSqlMap> can not set table-map",
05461: this , KeLog.ERROR);
05462:
05463: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05464: l_hdl.pdm_names.push(l_hdl.pdm_name);
05465:
05466: return (l_hdl.pdm_act);
05467: };
05468: };
05469:
05470: final class UnXMLTAGsqlTableMapModel implements IUnSAXAppFactHandler {
05471: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05472: String qName, Attributes attributes) throws Exception {
05473: String xTable = KeTools
05474: .pcmf_deRef(attributes.getValue("table"));
05475: String xField = KeTools
05476: .pcmf_deRef(attributes.getValue("field"));
05477: String xModel = KeTools.pcmf_deRef(attributes
05478: .getValue("mvalue"));
05479:
05480: if (xModel == null || xModel.equals(""))
05481: xModel = xField;
05482:
05483: CoSqlTable l_tab = (CoSqlTable) KeRegisteredObject
05484: .pcmf_getObjByName(xTable);
05485: if (l_tab != null)
05486: l_tab
05487: .pcmf_setConnectedField(
05488: xField,
05489: (IMoSingleValue) ((IMoValueContainer) l_hdl.pdm_actMValue)
05490: .pcmf_getModelValue(xModel));
05491: else
05492: KeLog.pcmf_log("ug2t",
05493: "<sqlModelMap> can not set table-map", this ,
05494: KeLog.ERROR);
05495:
05496: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05497: l_hdl.pdm_names.push(l_hdl.pdm_name);
05498:
05499: return (l_hdl.pdm_act);
05500: };
05501: };
05502:
05503: final class UnXMLTAGsqlTable implements IUnSAXAppFactHandler {
05504: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05505: String qName, Attributes attributes) throws Exception {
05506: String xDriver = KeTools.pcmf_deRef(attributes
05507: .getValue("driver"));
05508: String xJdbcUrl = KeTools
05509: .pcmf_deRef(attributes.getValue("url"));
05510: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
05511: String xKeyFld = KeTools.pcmf_deRef(attributes
05512: .getValue("keyFld"));
05513: String xWhere = KeTools
05514: .pcmf_deRef(attributes.getValue("where"));
05515: String xFld = KeTools.pcmf_deRef(attributes.getValue("fields"));
05516: String xBc = KeTools
05517: .pcmf_deRef(attributes.getValue("blindCol"));
05518:
05519: CoSqlTable l_nTable = null;
05520:
05521: if ((xDriver == null || xDriver.equals(""))
05522: && (xJdbcUrl == null || xJdbcUrl.equals(""))) {
05523: if (l_hdl.pdm_act instanceof CoSqlTable) {
05524: CoSqlTable l_pTable = (CoSqlTable) l_hdl.pdm_act;
05525: l_nTable = new CoSqlTable(l_pTable.pcmf_getCon(),
05526: xName, xFld, xKeyFld, xWhere == null ? ""
05527: : xWhere);
05528: } else {
05529: KeLog
05530: .pcmf_log(
05531: "ug2t",
05532: "<sqlTable> parent is no sqlTable, cannot get any connection info",
05533: this , KeLog.ERROR);
05534: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05535: l_hdl.pdm_names.push(l_hdl.pdm_name);
05536:
05537: return (l_hdl.pdm_act);
05538: }
05539: } else {
05540: l_nTable = new CoSqlTable(xDriver, xJdbcUrl, xName, xFld,
05541: xKeyFld, xWhere == null ? "" : xWhere);
05542: }
05543:
05544: if (l_hdl.pdm_act instanceof IUnTable) {
05545: KeTable l_table = l_nTable.pcmf_getComplete();
05546:
05547: if (xBc != null)
05548: l_table.pcmf_removeCol(Integer.parseInt(xBc));
05549:
05550: if (((IUnTable) l_hdl.pdm_act).pcmf_getHeader() != null)
05551: ((IUnTable) l_hdl.pdm_act).pcmf_addRows(l_table
05552: .pcmf_getTableValues());
05553: else
05554: ((IUnTable) l_hdl.pdm_act).pcmf_setComplete(l_table);
05555: }
05556:
05557: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_nTable);
05558: l_hdl.pcmf_doExecStack(l_nTable, l_nTable, xName);
05559:
05560: return (l_nTable);
05561: };
05562: };
05563:
05564: final class UnXMLTAGsqlTableJoin implements IUnSAXAppFactHandler {
05565: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05566: String qName, Attributes attributes) throws Exception {
05567: String xDriver = KeTools.pcmf_deRef(attributes
05568: .getValue("driver"));
05569: String xJdbcUrl = KeTools
05570: .pcmf_deRef(attributes.getValue("url"));
05571: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
05572: String xKeyFld = KeTools.pcmf_deRef(attributes
05573: .getValue("keyFld"));
05574: String xSourceFld = KeTools.pcmf_deRef(attributes
05575: .getValue("sourceFld"));
05576: String xTargetFld = KeTools.pcmf_deRef(attributes
05577: .getValue("targetFld"));
05578: String xFld = KeTools.pcmf_deRef(attributes.getValue("fields"));
05579:
05580: CoSqlTable l_nTable = null;
05581: CoSqlTable l_pTable = null;
05582:
05583: if ((xDriver == null || xDriver.equals(""))
05584: && (xJdbcUrl == null || xJdbcUrl.equals(""))) {
05585: if (l_hdl.pdm_act instanceof CoSqlTable) {
05586: l_pTable = (CoSqlTable) l_hdl.pdm_act;
05587: l_nTable = new CoSqlTable(l_pTable.pcmf_getCon(),
05588: xName, xFld, xKeyFld, "");
05589: } else {
05590: KeLog
05591: .pcmf_log(
05592: "ug2t",
05593: "<sqlTableJoin> parent is no sqlTable, cannot get any connection info",
05594: this , KeLog.ERROR);
05595: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05596: l_hdl.pdm_names.push(l_hdl.pdm_name);
05597:
05598: return (l_hdl.pdm_act);
05599: }
05600: } else {
05601: l_nTable = new CoSqlTable(xDriver, xJdbcUrl, xName, xFld,
05602: xKeyFld, "");
05603: }
05604:
05605: l_pTable.pcmf_addJoin(l_nTable, xSourceFld, xTargetFld);
05606: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_nTable);
05607:
05608: l_hdl.pcmf_doExecStack(l_nTable, l_nTable, xName);
05609:
05610: return (l_nTable);
05611: };
05612: };
05613:
05614: final class UnXMLTAGsqlUiMap implements IUnSAXAppFactHandler {
05615: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05616: String qName, Attributes attributes) throws Exception {
05617: String xFld = KeTools.pcmf_deRef(attributes
05618: .getValue("sourceFld"));
05619: String xTargetO = KeTools.pcmf_deRef(attributes
05620: .getValue("tragetObject"));
05621: String xTargetP = KeTools.pcmf_deRef(attributes
05622: .getValue("tragetPath"));
05623:
05624: if (l_hdl.pdm_act instanceof CoSqlTable == false) {
05625: KeLog
05626: .pcmf_log(
05627: "ug2t",
05628: "<sqlObjectMap> parent is no sqlTable, cannot set Map",
05629: this , KeLog.ERROR);
05630: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05631: l_hdl.pdm_names.push(l_hdl.pdm_name);
05632:
05633: return (l_hdl.pdm_act);
05634: }
05635:
05636: CoSqlTable l_pTable = (CoSqlTable) l_hdl.pdm_act;
05637: IKeValueContainer l_target = null;
05638:
05639: if (xTargetO == null || xTargetO.equals(""))
05640: l_target = (IKeValueContainer) l_hdl.pdm_appl
05641: .pcmf_getUnComponent().pcmf_getByPath(xTargetP);
05642: else
05643: l_target = (IKeValueContainer) KeRegisteredObject
05644: .pcmf_getObjByName(xTargetO);
05645:
05646: if (l_target != null)
05647: l_pTable.pcmf_setConnectedFieldValue(xFld, l_target);
05648: else
05649: KeLog
05650: .pcmf_log(
05651: "ug2t",
05652: "<sqlObjectMap> sqlMap is not valid, target not found",
05653: this , KeLog.ERROR);
05654:
05655: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05656: l_hdl.pdm_names.push(l_hdl.pdm_name);
05657:
05658: return (l_hdl.pdm_act);
05659: };
05660: };
05661:
05662: final class UnXMLTAGsqlTableUiMap implements IUnSAXAppFactHandler {
05663: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05664: String qName, Attributes attributes) throws Exception {
05665: String xTargetO = KeTools.pcmf_deRef(attributes
05666: .getValue("tragetTable"));
05667: String xTargetP = KeTools.pcmf_deRef(attributes
05668: .getValue("tragetTablePath"));
05669:
05670: if (l_hdl.pdm_act instanceof CoSqlTable == false) {
05671: KeLog
05672: .pcmf_log(
05673: "ug2t",
05674: "<sqlTableUiMap> parent is no sqlTable, cannot set Map",
05675: this , KeLog.ERROR);
05676: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05677: l_hdl.pdm_names.push(l_hdl.pdm_name);
05678:
05679: return (l_hdl.pdm_act);
05680: }
05681: CoSqlTable l_pTable = (CoSqlTable) l_hdl.pdm_act;
05682: IUnTable l_target = null;
05683:
05684: if (xTargetO == null || xTargetO.equals(""))
05685: l_target = (IUnTable) l_hdl.pdm_appl.pcmf_getUnComponent()
05686: .pcmf_getByPath(xTargetP);
05687: else
05688: l_target = (IUnTable) KeRegisteredObject
05689: .pcmf_getObjByName(xTargetO);
05690:
05691: if (l_target != null)
05692: l_target.pcmf_setComplete(l_pTable.pcmf_getComplete());
05693: else
05694: KeLog
05695: .pcmf_log(
05696: "ug2t",
05697: "<sqlTableUiMap> sqlMap is not valid, target not found",
05698: this , KeLog.ERROR);
05699:
05700: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05701: l_hdl.pdm_names.push(l_hdl.pdm_name);
05702:
05703: return (l_hdl.pdm_act);
05704: };
05705: };
05706:
05707: final class UnXMLTAGkey implements IUnSAXAppFactHandler {
05708: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05709: String qName, Attributes attributes) throws Exception {
05710: String xAc = KeTools.pcmf_deRef(attributes.getValue("value"));
05711:
05712: if ((xAc != null || xAc.equals("") == false)
05713: && l_hdl.pdm_act instanceof IUnKeyAccess)
05714: ((IUnKeyAccess) l_hdl.pdm_act).pcmf_setKeyAccess((int) xAc
05715: .charAt(0));
05716: else
05717: KeLog.pcmf_log("ug2t",
05718: "<key> can not set access-key in class: "
05719: + l_hdl.pdm_act.getClass().toString(),
05720: this , KeLog.MESSAGE);
05721:
05722: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05723: l_hdl.pdm_names.push(l_hdl.pdm_name);
05724:
05725: return (l_hdl.pdm_act);
05726: };
05727: };
05728:
05729: final class UnXMLTAGsetView implements IUnSAXAppFactHandler {
05730: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05731: String qName, Attributes attributes) throws Exception {
05732: String xClass = KeTools
05733: .pcmf_deRef(attributes.getValue("class"));
05734: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
05735: String xStd = KeTools.pcmf_deRef(attributes
05736: .getValue("stdImgObject"));
05737: String xOp = KeTools.pcmf_deRef(attributes
05738: .getValue("openImgObject"));
05739: String xCo = KeTools.pcmf_deRef(attributes
05740: .getValue("closeImgObject"));
05741: String xFont = KeTools.pcmf_deRef(attributes.getValue("font"));
05742: String xTpl = KeTools.pcmf_deRef(attributes
05743: .getValue("template"));
05744: String xAtt = KeTools.pcmf_deRef(attributes.getValue("attach"));
05745: String xTrans = KeTools.pcmf_deRef(attributes
05746: .getValue("transformerObj"));
05747: String xTransCl = KeTools.pcmf_deRef(attributes
05748: .getValue("transformerClass"));
05749: String xOrphan = KeTools.pcmf_deRef(attributes
05750: .getValue("orphan"));
05751:
05752: String xBg = KeTools.pcmf_deRef(attributes.getValue("bg"));
05753: String xFg = KeTools.pcmf_deRef(attributes.getValue("fg"));
05754: String xCss = KeTools.pcmf_deRef(attributes.getValue("css"));
05755:
05756: IUnImage l_std = null;
05757: IUnImage l_op = null;
05758: IUnImage l_co = null;
05759: UnFontDescriptor l_font = null;
05760: IUnTransformer l_trans = null;
05761:
05762: IKeView l_view = null;
05763: boolean l_att = false;
05764:
05765: if (xOrphan == null)
05766: xOrphan = "false";
05767:
05768: if (xClass != null && xClass.equals("") == false) {
05769: l_view = (IKeView) Class.forName(xClass).newInstance();
05770: } else if (xObj != null && xObj.equals("") == false) {
05771: l_view = (IKeView) KeRegisteredObject
05772: .pcmf_getObjByName(xObj);
05773: } else {
05774: if (xStd != null && xStd.equals("") == false)
05775: l_std = (IUnImage) KeRegisteredObject
05776: .pcmf_getObjByName(xStd);
05777: if (xOp != null && xOp.equals("") == false)
05778: l_op = (IUnImage) KeRegisteredObject
05779: .pcmf_getObjByName(xOp);
05780: if (xCo != null && xCo.equals("") == false)
05781: l_co = (IUnImage) KeRegisteredObject
05782: .pcmf_getObjByName(xCo);
05783: if (xFont != null && xFont.equals("") == false)
05784: l_font = (UnFontDescriptor) KeRegisteredObject
05785: .pcmf_getObjByName(xFont);
05786: if (xTrans != null && xTrans.equals("") == false)
05787: l_trans = (IUnTransformer) KeRegisteredObject
05788: .pcmf_getObjByName(xTrans);
05789: else if (xTransCl != null && xTransCl.equals("") == false)
05790: l_trans = (IUnTransformer) Class.forName(xTransCl)
05791: .newInstance();
05792:
05793: l_view = new UnIconValueView(l_std, l_op, l_co, l_font,
05794: xTpl, l_trans);
05795: if (xBg != null && xBg.equals("") == false)
05796: ((UnIconValueView) l_view).pcmf_setBg(xBg);
05797: if (xFg != null && xFg.equals("") == false)
05798: ((UnIconValueView) l_view).pcmf_setFg(xFg);
05799: if (xCss != null && xCss.equals("") == false)
05800: ((UnIconValueView) l_view).pcmf_setCss(xCss);
05801: }
05802:
05803: if (l_hdl.pdm_actMValue == null && xOrphan.equals("false")) {
05804: if (KeRegisteredObject.pcmf_isGlobal(l_hdl.pdm_act)) {
05805: if (KeRegisteredObject.pcmf_isRegistered(l_view)) {
05806: String l_name = KeRegisteredObject
05807: .pcmf_getObjName(l_view);
05808: KeRegisteredObject.pcmf_unRegister(l_view);
05809: KeRegisteredObject.pcmf_registerGlobal(l_name,
05810: l_view);
05811: }
05812: }
05813:
05814: l_hdl.pdm_act.pcmf_setView(l_view);
05815: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05816: l_hdl.pdm_names.push(l_hdl.pdm_name);
05817:
05818: if (l_view instanceof UnIconValueView && xAtt != null
05819: && xAtt.equals("true")) {
05820: ((UnIconValueView) l_view).pcmf_attachView();
05821: l_att = true;
05822: }
05823: } else if (l_hdl.pdm_actMValue instanceof IKeViewable
05824: && xOrphan.equals("false")) {
05825: if (KeRegisteredObject.pcmf_isGlobal(l_hdl.pdm_actMValue)) {
05826: if (KeRegisteredObject.pcmf_isRegistered(l_view)) {
05827: String l_name = KeRegisteredObject
05828: .pcmf_getObjName(l_view);
05829: KeRegisteredObject.pcmf_unRegister(l_view);
05830: KeRegisteredObject.pcmf_registerGlobal(l_name,
05831: l_view);
05832: }
05833: }
05834: ((IKeViewable) l_hdl.pdm_actMValue).pcmf_setView(l_view);
05835: if (l_view instanceof UnIconValueView
05836: && (xAtt == null || xAtt.equals("true"))) {
05837: ((UnIconValueView) l_view).pcmf_attachView();
05838: l_att = true;
05839: }
05840:
05841: l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue,
05842: l_hdl.pdm_actMValue, l_hdl.pdm_name);
05843: } else if (xOrphan.equals("false")) {
05844: KeLog.pcmf_log("ug2t",
05845: "<view> can not set view in this node", this ,
05846: KeLog.ERROR);
05847: }
05848:
05849: String xReg = KeTools.pcmf_deRef(attributes
05850: .getValue("register"));
05851: if (xReg != null && xReg.equals("") == false
05852: && l_view instanceof IKeAttachable) {
05853: ((KeRegisteredObject) l_view).pcmf_reRegister(xReg);
05854: if ((xAtt == null || xAtt.equals("true")) && !l_att)
05855: ((IKeAttachable) l_view).pcmf_attachExtern();
05856: }
05857:
05858: return (l_hdl.pdm_act);
05859: };
05860: };
05861:
05862: final class UnXMLTAGsetGrid implements IUnSAXAppFactHandler {
05863: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05864: String qName, Attributes attributes) throws Exception {
05865: String xPos = KeTools.pcmf_deRef(attributes.getValue("x"));
05866: String yPos = KeTools.pcmf_deRef(attributes.getValue("y"));
05867: String xDebug = KeTools
05868: .pcmf_deRef(attributes.getValue("debug"));
05869:
05870: if (l_hdl.pdm_page instanceof de.ug2t.channel.ho.server.generic.HoSrvGenericPage)
05871: ((de.ug2t.channel.ho.server.generic.HoSrvGenericPage) l_hdl.pdm_page)
05872: .pcmf_setGrid(Integer.parseInt(xPos), Integer
05873: .parseInt(yPos),
05874: xDebug.equals("true") ? true : false);
05875: else
05876: KeLog.pcmf_log("ug2t",
05877: "<setGrid> permitted in page-tag only", this ,
05878: KeLog.ERROR);
05879:
05880: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05881: l_hdl.pdm_names.push(l_hdl.pdm_name);
05882:
05883: return (l_hdl.pdm_act);
05884: };
05885: };
05886:
05887: final class UnXMLTAGsetOption implements IUnSAXAppFactHandler {
05888: public static boolean pcm_staticInit = false;
05889:
05890: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05891: String qName, Attributes attributes) throws Exception {
05892: String xObj = KeTools
05893: .pcmf_deRef(attributes.getValue("testobj"));
05894: String xValue = KeTools
05895: .pcmf_deRef(attributes.getValue("value"));
05896: String xOp = KeTools.pcmf_deRef(attributes.getValue("op"));
05897: String xStatic = KeTools.pcmf_deRef(attributes
05898: .getValue("static"));
05899:
05900: l_hdl.pdm_optionNr++;
05901:
05902: if (xObj != null && xValue != null) {
05903: Object l_obj = KeRegisteredObject.pcmf_getObjByName(xObj);
05904: if (xOp == null || xOp.equals("eq")) {
05905: if (l_obj != null && !l_obj.toString().equals(xValue)) {
05906: l_hdl.pdm_optional = false;
05907: l_hdl.pdm_optionFalseNr = l_hdl.pdm_optionNr;
05908: }
05909: } else {
05910: if (l_obj != null && l_obj.toString().equals(xValue)) {
05911: l_hdl.pdm_optional = false;
05912: l_hdl.pdm_optionFalseNr = l_hdl.pdm_optionNr;
05913: }
05914: }
05915: } else if (xStatic != null && xStatic.equalsIgnoreCase("TRUE")) {
05916: if (UnXMLTAGsetOption.pcm_staticInit == false) {
05917: UnXMLTAGsetOption.pcm_staticInit = true;
05918: l_hdl.pdm_myProducer.pdmf_clearCache();
05919: } else {
05920: l_hdl.pdm_optional = false;
05921: l_hdl.pdm_optionFalseNr = l_hdl.pdm_optionNr;
05922: }
05923: } else
05924: KeLog
05925: .pcmf_log(
05926: "ug2t",
05927: "<option> no values to compare for tag setting true",
05928: this , KeLog.DEBUG);
05929:
05930: if (l_hdl.pdm_actMValue != null)
05931: l_hdl.pdm_elements.push(l_hdl.pdm_actMValue);
05932: else
05933: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05934:
05935: l_hdl.pdm_names.push(l_hdl.pdm_name);
05936:
05937: return (l_hdl.pdm_act);
05938: };
05939: };
05940:
05941: final class UnXMLTAGsetForEach implements IUnSAXAppFactHandler {
05942: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05943: String qName, Attributes attributes) throws Exception {
05944: String xTag = KeTools.pcmf_deRef(attributes.getValue("tag"));
05945: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
05946: String xUseRegExp = KeTools.pcmf_deRef(attributes
05947: .getValue("useRegExp"));
05948:
05949: String xInclude = KeTools.pcmf_deRef(attributes
05950: .getValue("include"));
05951:
05952: UnFeDescriptor l_desc = null;
05953: if (xUseRegExp != null && xUseRegExp.equals("true")) {
05954: if (xTag != null)
05955: l_desc = UnFeDescriptor.pcmf_createReTagDesc(xTag);
05956: else if (xName != null)
05957: l_desc = UnFeDescriptor.pcmf_createReNameDesc(xName);
05958: } else {
05959: if (xTag != null)
05960: l_desc = UnFeDescriptor.pcmf_createTagDesc(xTag);
05961: else if (xName != null)
05962: l_desc = UnFeDescriptor.pcmf_createNameDesc(xName);
05963: }
05964:
05965: // @@
05966:
05967: UnFEContainer l_fe = (UnFEContainer) l_hdl.pdm_forEachs
05968: .get(l_desc);
05969: if (l_fe == null) {
05970: l_fe = new UnFEContainer();
05971: l_hdl.pdm_forEachs.put(l_desc, l_fe);
05972: }
05973: ;
05974:
05975: l_fe.pcmf_pushInclude(xInclude);
05976:
05977: l_hdl.pdm_feStack.push(l_desc);
05978: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05979: l_hdl.pdm_names.push(l_hdl.pdm_name);
05980:
05981: // @@
05982:
05983: return (l_hdl.pdm_act);
05984: };
05985: };
05986:
05987: final class UnXMLTAGcomment implements IUnSAXAppFactHandler {
05988: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05989: String qName, Attributes attributes) throws Exception {
05990: l_hdl.pdm_elements.push(l_hdl.pdm_act);
05991: l_hdl.pdm_names.push(l_hdl.pdm_name);
05992:
05993: return (l_hdl.pdm_act);
05994: };
05995: };
05996:
05997: final class UnXMLTAGsetDefault implements IUnSAXAppFactHandler {
05998: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
05999: String qName, Attributes attributes) throws Exception {
06000: String xDefV = KeTools.pcmf_deRef(attributes.getValue("value"));
06001:
06002: String xFg = KeTools.pcmf_deRef(attributes.getValue("fg"));
06003: String xBg = KeTools.pcmf_deRef(attributes.getValue("bg"));
06004: String xBorder = KeTools.pcmf_deRef(attributes
06005: .getValue("border"));
06006: String xBorderCol = KeTools.pcmf_deRef(attributes
06007: .getValue("boColor"));
06008: String xBorderWidth = KeTools.pcmf_deRef(attributes
06009: .getValue("boWidth"));
06010: String xToolTip = KeTools.pcmf_deRef(attributes
06011: .getValue("toolTip"));
06012: String xFontObj = KeTools.pcmf_deRef(attributes
06013: .getValue("fontObject"));
06014: String xIcoObj = KeTools.pcmf_deRef(attributes
06015: .getValue("iconObject"));
06016:
06017: String xDefO = KeTools
06018: .pcmf_deRef(attributes.getValue("object"));
06019:
06020: if (xFg != null || xBg != null || xBorder != null
06021: || xBorderCol != null || xBorderWidth != null
06022: || xToolTip != null || xFontObj != null) {
06023: String l_bg = xBg;
06024: String l_fg = xFg;
06025:
06026: int l_border = IUnComponent.NO_BORDER;
06027:
06028: if (xBorder != null && xBorder.equalsIgnoreCase("INSETS"))
06029: l_border = IUnComponent.INSETS_BORDER;
06030: else if (xBorder != null
06031: && xBorder.equalsIgnoreCase("OUTSETS"))
06032: l_border = IUnComponent.OUTSETS_BORDER;
06033: else if (xBorder != null
06034: && xBorder.equalsIgnoreCase("LINE"))
06035: l_border = IUnComponent.LINE_BORDER;
06036:
06037: String l_borderCol = xBorderCol == null ? "" : xBorderCol;
06038: int l_boWidth = xBorderWidth != null ? Integer
06039: .parseInt(xBorderWidth) : 0;
06040: String l_toolTip = xToolTip;
06041: UnFontDescriptor l_font = null;
06042: Object l_value = null;
06043:
06044: if (xDefV != null)
06045: l_value = xDefV;
06046: else if (xDefO != null)
06047: l_value = KeRegisteredObject.pcmf_getObjByName(xDefO);
06048:
06049: if (xFontObj != null)
06050: l_font = (UnFontDescriptor) KeRegisteredObject
06051: .pcmf_getObjByName(xFontObj);
06052:
06053: IUnImage l_ico = null;
06054:
06055: if (xIcoObj != null)
06056: l_ico = (IUnImage) KeRegisteredObject
06057: .pcmf_getObjByName(xIcoObj);
06058:
06059: UnDefaultProps l_props = new UnDefaultProps(l_value, l_fg,
06060: l_bg, l_border, l_borderCol, l_boWidth, l_font,
06061: l_toolTip, l_ico);
06062: l_hdl.pdm_act.pcmf_setDefaultValue(l_props);
06063: } else if (xDefV != null)
06064: l_hdl.pdm_act.pcmf_setDefaultValue(xDefV);
06065: else if (xDefO != null)
06066: l_hdl.pdm_act.pcmf_setDefaultValue(KeRegisteredObject
06067: .pcmf_getObjByName(xDefO));
06068:
06069: l_hdl.pdm_elements.push(l_hdl.pdm_act);
06070: l_hdl.pdm_names.push(l_hdl.pdm_name);
06071:
06072: return (l_hdl.pdm_act);
06073: };
06074: };
06075:
06076: final class UnXMLTAGsetValue implements IUnSAXAppFactHandler {
06077: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06078: String qName, Attributes attributes) throws Exception {
06079: String xDefV = KeTools.pcmf_deRef(attributes.getValue("value"));
06080: String xDefO = KeTools
06081: .pcmf_deRef(attributes.getValue("object"));
06082:
06083: if (xDefV != null)
06084: l_hdl.pdm_act.pcmf_setValue(xDefV);
06085: else if (xDefO != null)
06086: l_hdl.pdm_act.pcmf_setValue(KeRegisteredObject
06087: .pcmf_getObjByName(xDefO));
06088:
06089: l_hdl.pdm_elements.push(l_hdl.pdm_act);
06090: l_hdl.pdm_names.push(l_hdl.pdm_name);
06091:
06092: return (l_hdl.pdm_act);
06093: };
06094: };
06095:
06096: final class UnXMLTAGcursor implements IUnSAXAppFactHandler {
06097: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06098: String qName, Attributes attributes) throws Exception {
06099: String xCursor = KeTools.pcmf_deRef(attributes
06100: .getValue("value"));
06101:
06102: if (l_hdl.pdm_act instanceof IUnComponent)
06103: ((IUnComponent) l_hdl.pdm_act).pcmf_setCursor(xCursor
06104: .toUpperCase());
06105: else
06106: KeLog.pcmf_log("ug2t",
06107: "<cursor> parent is no UnComponent: class ["
06108: + l_hdl.pdm_act.getClass() + "]"
06109: + ", name [" + l_hdl.pdm_name + "]", this ,
06110: KeLog.ERROR);
06111:
06112: l_hdl.pdm_elements.push(l_hdl.pdm_act);
06113: l_hdl.pdm_names.push(l_hdl.pdm_name);
06114:
06115: return (l_hdl.pdm_act);
06116: };
06117: };
06118:
06119: final class UnXMLTAGsetPlLocal implements IUnSAXAppFactHandler {
06120: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06121: String qName, Attributes attributes) throws Exception {
06122: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
06123:
06124: ((PlBasicComponentAggregat) KeRegisteredObject
06125: .pcmf_getObjByName(PlBasicComponentAggregat.MY_CURRENTPARSED_PLUGIN))
06126: .pcmf_addLocalObject(xName, l_hdl.pdm_act);
06127:
06128: l_hdl.pdm_elements.push(l_hdl.pdm_act);
06129: l_hdl.pdm_names.push(l_hdl.pdm_name);
06130:
06131: return (l_hdl.pdm_act);
06132: };
06133: };
06134:
06135: final class UnXMLTAGsetSpan implements IUnSAXAppFactHandler {
06136: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06137: String qName, Attributes attributes) throws Exception {
06138: String xRow = KeTools.pcmf_deRef(attributes.getValue("row"));
06139: String xCol = KeTools.pcmf_deRef(attributes.getValue("col"));
06140: String xRowS = KeTools.pcmf_deRef(attributes
06141: .getValue("rowSpan"));
06142: String xColS = KeTools.pcmf_deRef(attributes
06143: .getValue("colSpan"));
06144:
06145: try {
06146: if (l_hdl.pdm_act instanceof IUnTable)
06147: ((IUnTable) l_hdl.pdm_act).pcmf_setSpan(Integer
06148: .parseInt(xRow), Integer.parseInt(xCol),
06149: Integer.parseInt(xRowS), Integer
06150: .parseInt(xColS));
06151: else
06152: KeLog.pcmf_log("ug2t",
06153: "<span> parent is no table: class ["
06154: + l_hdl.pdm_act.getClass() + "]"
06155: + ", name [" + l_hdl.pdm_name + "]",
06156: this , KeLog.ERROR);
06157: } catch (Exception e) {
06158: KeLog.pcmf_log("ug2t", "<span> integer value expected",
06159: this , KeLog.ERROR);
06160: }
06161:
06162: l_hdl.pdm_elements.push(l_hdl.pdm_act);
06163: l_hdl.pdm_names.push(l_hdl.pdm_name);
06164:
06165: return (l_hdl.pdm_act);
06166: };
06167: };
06168:
06169: final class UnXMLTAGdeleteColorSettings implements IUnSAXAppFactHandler {
06170: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06171: String qName, Attributes attributes) throws Exception {
06172: ((UnComponent) l_hdl.pdm_act).pcmf_resetColorSettings();
06173:
06174: l_hdl.pdm_elements.push(l_hdl.pdm_act);
06175: l_hdl.pdm_names.push(l_hdl.pdm_name);
06176:
06177: return (l_hdl.pdm_act);
06178: };
06179: };
06180:
06181: final class UnXMLTAGsetExtCss implements IUnSAXAppFactHandler {
06182: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06183: String qName, Attributes attributes) throws Exception {
06184: String xCss = KeTools.pcmf_deRef(attributes.getValue("value"));
06185:
06186: if (l_hdl.pdm_act instanceof IUnApplication)
06187: l_hdl.pdm_appl.pcmf_setExternalCss(xCss);
06188: else
06189: l_hdl.pdm_page.pcmf_setExternalCss(xCss);
06190:
06191: l_hdl.pdm_elements.push(l_hdl.pdm_act);
06192: l_hdl.pdm_names.push(l_hdl.pdm_name);
06193:
06194: return (l_hdl.pdm_act);
06195: };
06196: };
06197:
06198: final class UnXMLTAGsetAutoDelete implements IUnSAXAppFactHandler {
06199: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06200: String qName, Attributes attributes) throws Exception {
06201: String xAutoDel = KeTools.pcmf_deRef(attributes
06202: .getValue("value"));
06203:
06204: if (xAutoDel == null)
06205: KeRegisteredObject
06206: .pcmf_setContextAutoDelete(KeRegisteredObject.AUTO_DELETE_EARLY);
06207: else {
06208: if (xAutoDel.equalsIgnoreCase("disable"))
06209: KeRegisteredObject
06210: .pcmf_setContextAutoDelete(KeRegisteredObject.AUTO_DELETE_DISABLED);
06211: else if (xAutoDel.equalsIgnoreCase("early"))
06212: KeRegisteredObject
06213: .pcmf_setContextAutoDelete(KeRegisteredObject.AUTO_DELETE_EARLY);
06214: else if (xAutoDel.equalsIgnoreCase("late"))
06215: KeRegisteredObject
06216: .pcmf_setContextAutoDelete(KeRegisteredObject.AUTO_DELETE_LATE);
06217: }
06218:
06219: l_hdl.pdm_elements.push(l_hdl.pdm_act);
06220: l_hdl.pdm_names.push(l_hdl.pdm_name);
06221:
06222: return (l_hdl.pdm_act);
06223: };
06224: };
06225:
06226: final class UnXMLTAGsetCurrentFile implements IUnSAXAppFactHandler {
06227: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06228: String qName, Attributes attributes) throws Exception {
06229: String xFile = attributes.getValue("value");
06230:
06231: InputSource l_source = new InputSource("file:"
06232: + KeEnvironment.pcmf_buildPath(xFile));
06233: l_source.setEncoding(KeEnvironment.pcmf_getCharacterSet());
06234:
06235: l_hdl.pdm_sourceStack.push(l_hdl.pdm_myProducer.pem_mySource);
06236: l_hdl.pdm_myProducer.pem_mySource = l_source;
06237: l_hdl.pdm_elements.push(l_hdl.pdm_act);
06238: l_hdl.pdm_names.push(l_hdl.pdm_name);
06239:
06240: return (l_hdl.pdm_act);
06241: };
06242: };
06243:
06244: final class UnXMLTAGinclude implements IUnSAXAppFactHandler {
06245: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06246: String qName, Attributes attributes) throws Exception {
06247: // @@
06248:
06249: String xSource = KeTools
06250: .pcmf_deRef(attributes.getValue("file"));
06251:
06252: UnApplicationFactory l_prod = new UnApplicationFactory(xSource,
06253: l_hdl);
06254: l_hdl.pdm_myProducer.pdmf_beginSource(xSource);
06255: l_prod.pcmf_parseRecursiv();
06256: l_hdl.pdm_myProducer.pdmf_endSource();
06257:
06258: // @@
06259:
06260: l_hdl.pdm_elements.push(l_hdl.pdm_act);
06261: l_hdl.pdm_names.push(l_hdl.pdm_name);
06262:
06263: return (l_hdl.pdm_act);
06264: };
06265: };
06266:
06267: final class UnXMLTAGtip implements IUnSAXAppFactHandler {
06268: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06269: String qName, Attributes attributes) throws Exception {
06270: String xTip = KeTools.pcmf_deRef(attributes.getValue("tip"));
06271:
06272: if (l_hdl.pdm_act instanceof UnComponent && xTip != null)
06273: ((UnComponent) l_hdl.pdm_act).pcmf_setToolTip(xTip);
06274:
06275: l_hdl.pdm_elements.push(l_hdl.pdm_act);
06276: l_hdl.pdm_names.push(l_hdl.pdm_name);
06277:
06278: return (l_hdl.pdm_act);
06279: };
06280: };
06281:
06282: final class UnXMLTAGcolor implements IUnSAXAppFactHandler {
06283: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06284: String qName, Attributes attributes) throws Exception {
06285: String xBg = KeTools.pcmf_deRef(attributes.getValue("bg"));
06286: String xFg = KeTools.pcmf_deRef(attributes.getValue("fg"));
06287:
06288: if (l_hdl.pdm_act instanceof HoGenericTreeNode) {
06289: IKeView l_view = l_hdl.pdm_act.pcmf_getView();
06290: if (l_view instanceof UnIconValueView) {
06291: if (xFg != null && !xFg.equals(""))
06292: ((UnIconValueView) l_view).pcmf_setFg(xFg);
06293: if (xBg != null && !xBg.equals(""))
06294: ((UnIconValueView) l_view).pcmf_setBg(xBg);
06295: } else if (l_view == null) {
06296: UnIconValueView l_nview = new UnIconValueView();
06297: l_hdl.pdm_act.pcmf_setView(l_nview);
06298:
06299: if (xFg != null && !xFg.equals(""))
06300: l_nview.pcmf_setFg(xFg);
06301: if (xBg != null && !xBg.equals(""))
06302: l_nview.pcmf_setBg(xBg);
06303: } else
06304: KeLog.pcmf_log("ug2t",
06305: "<color> cannot set color in : class ["
06306: + l_hdl.pdm_act.getClass() + "]"
06307: + ", name [" + l_hdl.pdm_name + "]",
06308: this , KeLog.ERROR);
06309: } else if (l_hdl.pdm_act instanceof UnComponent) {
06310: if (xBg != null && !xBg.equals(""))
06311: ((UnComponent) l_hdl.pdm_act).pcmf_setBgColor(xBg);
06312:
06313: if (xFg != null && !xFg.equals(""))
06314: ((UnComponent) l_hdl.pdm_act).pcmf_setFgColor(xFg);
06315: } else
06316: KeLog.pcmf_log("ug2t",
06317: "<color> cannot set color in : class ["
06318: + l_hdl.pdm_act.getClass() + "]"
06319: + ", name [" + l_hdl.pdm_name + "]", this ,
06320: KeLog.ERROR);
06321:
06322: l_hdl.pdm_elements.push(l_hdl.pdm_act);
06323: l_hdl.pdm_names.push(l_hdl.pdm_name);
06324:
06325: return (l_hdl.pdm_act);
06326: };
06327: };
06328:
06329: final class UnXMLTAGaddInfo implements IUnSAXAppFactHandler {
06330: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06331: String qName, Attributes attributes) throws Exception {
06332: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
06333: String xClass = KeTools
06334: .pcmf_deRef(attributes.getValue("class"));
06335: String xValue = KeTools
06336: .pcmf_deRef(attributes.getValue("value"));
06337:
06338: Object l_obj = null;
06339: if (xClass != null)
06340: l_obj = Class.forName(xClass).newInstance();
06341: else if (xObj != null)
06342: l_obj = KeRegisteredObject.pcmf_getObjByName(xObj);
06343: else
06344: l_obj = xValue;
06345:
06346: l_hdl.pdm_act.pcmf_setAdditionalInfo(l_obj);
06347:
06348: l_hdl.pdm_elements.push(l_hdl.pdm_act);
06349: l_hdl.pdm_names.push(l_hdl.pdm_name);
06350:
06351: return (l_hdl.pdm_act);
06352: };
06353: };
06354:
06355: final class UnXMLTAGaddProd implements IUnSAXAppFactHandler {
06356: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06357: String qName, Attributes attributes) throws Exception {
06358: String xTag = KeTools.pcmf_deRef(attributes.getValue("tag"));
06359: String xClass = KeTools
06360: .pcmf_deRef(attributes.getValue("class"));
06361:
06362: IUnSAXAppFactHandler l_prod = (IUnSAXAppFactHandler) Class
06363: .forName(xClass).newInstance();
06364: l_hdl.pcmf_addProducer(xTag, l_prod);
06365:
06366: l_hdl.pcmf_doExecStack(l_hdl.pdm_appl, l_hdl.pdm_appl
06367: .pcmf_getUnComponent(), l_hdl.pdm_name);
06368:
06369: return (l_hdl.pdm_appl);
06370: };
06371: };
06372:
06373: final class UnXMLTAGtext implements IUnSAXAppFactHandler {
06374: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06375: String qName, Attributes attributes) throws Exception {
06376: // Attribute auslesen
06377: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
06378: String xValue = KeTools
06379: .pcmf_deRef(attributes.getValue("value"));
06380: String xOrphan = KeTools.pcmf_deRef(attributes
06381: .getValue("orphan"));
06382: String xInline = KeTools.pcmf_deRef(attributes
06383: .getValue("forceInline"));
06384: String xDyn = KeTools
06385: .pcmf_deRef(attributes.getValue("dynamic"));
06386: String xAlign = KeTools
06387: .pcmf_deRef(attributes.getValue("align"));
06388: String xWrap = KeTools.pcmf_deRef(attributes.getValue("wrap"));
06389:
06390: String xFBlock = KeTools.pcmf_deRef(attributes
06391: .getValue("factoryDesc"));
06392: if (xFBlock != null && xFBlock.trim().equals(""))
06393: xFBlock = null;
06394:
06395: // Element erzeugen und in Parent einfügen
06396: IUnLabel l_if = l_hdl.pdm_objFact.pcmf_createTextPlugin(
06397: l_hdl.pdm_AppType, xName, xValue, l_hdl.pdm_appl,
06398: xFBlock);
06399: if (xOrphan == null || xOrphan.equals("false"))
06400: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
06401: .pcmf_getUnComponent());
06402: else
06403: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
06404:
06405: if (xAlign != null) {
06406: if (xAlign.equalsIgnoreCase("CENTER"))
06407: l_if.pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_CENTER);
06408: else if (xAlign.equalsIgnoreCase("EAST"))
06409: l_if.pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_EAST);
06410: else if (xAlign.equalsIgnoreCase("WEST"))
06411: l_if.pcmf_setTextAlign(IUnInputField.TEXT_ALIGN_WEST);
06412: }
06413:
06414: if (xInline != null && xInline.equalsIgnoreCase("true"))
06415: l_if.pcmf_forceInline(true);
06416:
06417: if (xDyn != null && xDyn.equalsIgnoreCase("false"))
06418: l_if.pcmf_setDynamic(false);
06419:
06420: if (l_if instanceof MuGenericLabel) {
06421: if (xWrap != null && xWrap.equals("false"))
06422: ((MuGenericLabel) l_if).pcmf_setWrap(false);
06423: }
06424:
06425: String xReg = KeTools.pcmf_deRef(attributes
06426: .getValue("register"));
06427: if (xReg != null && xReg.equals("") == false)
06428: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
06429:
06430: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
06431:
06432: return (l_if);
06433: };
06434: };
06435:
06436: final class UnXMLTAGaPopup implements IUnSAXAppFactHandler {
06437: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06438: String qName, Attributes attributes) throws Exception {
06439: // Attribute auslesen
06440: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
06441: String xOrphan = KeTools.pcmf_deRef(attributes
06442: .getValue("orphan"));
06443: String xHOffs = KeTools.pcmf_deRef(attributes
06444: .getValue("hOffset"));
06445: String xVOffs = KeTools.pcmf_deRef(attributes
06446: .getValue("vOffset"));
06447: String xValue = KeTools
06448: .pcmf_deRef(attributes.getValue("value"));
06449:
06450: String xFBlock = KeTools.pcmf_deRef(attributes
06451: .getValue("factoryDesc"));
06452: if (xFBlock != null && xFBlock.trim().equals(""))
06453: xFBlock = null;
06454:
06455: // Element erzeugen und in Parent einfügen
06456: IUnAnchoredPopUp l_if = l_hdl.pdm_objFact
06457: .pcmf_createAPopupPlugin(l_hdl.pdm_AppType, xName,
06458: l_hdl.pdm_appl, xFBlock);
06459: if (xOrphan == null || xOrphan.equals("false"))
06460: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
06461: .pcmf_getUnComponent());
06462: else
06463: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
06464:
06465: String xReg = KeTools.pcmf_deRef(attributes
06466: .getValue("register"));
06467: if (xReg != null && xReg.equals("") == false)
06468: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
06469:
06470: if (xHOffs != null)
06471: l_if
06472: .pcmf_setPopUpHorizontalOffset(Integer
06473: .parseInt(xHOffs));
06474: if (xVOffs != null)
06475: l_if.pcmf_setPopUpVerticalOffset(Integer.parseInt(xVOffs));
06476:
06477: if (xValue != null)
06478: l_if.pcmf_setValue(xValue);
06479:
06480: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
06481:
06482: return (l_if);
06483: };
06484: };
06485:
06486: final class UnXMLTAGhtmlaPopup implements IUnSAXAppFactHandler {
06487: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06488: String qName, Attributes attributes) throws Exception {
06489: // Attribute auslesen
06490: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
06491: String xOrphan = KeTools.pcmf_deRef(attributes
06492: .getValue("orphan"));
06493: String xHOffs = KeTools.pcmf_deRef(attributes
06494: .getValue("hOffset"));
06495: String xVOffs = KeTools.pcmf_deRef(attributes
06496: .getValue("vOffset"));
06497: String xValue = KeTools
06498: .pcmf_deRef(attributes.getValue("value"));
06499:
06500: String xFBlock = KeTools.pcmf_deRef(attributes
06501: .getValue("factoryDesc"));
06502: if (xFBlock != null && xFBlock.trim().equals(""))
06503: xFBlock = null;
06504:
06505: // Element erzeugen und in Parent einfügen
06506: IUnAnchoredPopUp l_if = l_hdl.pdm_objFact
06507: .pcmf_createAPopupPlugin(l_hdl.pdm_AppType, xName,
06508: l_hdl.pdm_appl, xFBlock);
06509: if (xOrphan == null || xOrphan.equals("false"))
06510: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
06511: .pcmf_getUnComponent());
06512: else
06513: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
06514:
06515: String xReg = KeTools.pcmf_deRef(attributes
06516: .getValue("register"));
06517: if (xReg != null && xReg.equals("") == false)
06518: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
06519:
06520: if (xHOffs != null)
06521: l_if
06522: .pcmf_setPopUpHorizontalOffset(Integer
06523: .parseInt(xHOffs));
06524: if (xVOffs != null)
06525: l_if.pcmf_setPopUpVerticalOffset(Integer.parseInt(xVOffs));
06526:
06527: if (xValue != null)
06528: l_if.pcmf_setValue(xValue);
06529:
06530: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
06531:
06532: // Html file parsen - nur wenn kein cached run
06533:
06534: // @@
06535:
06536: l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
06537: l_hdl.endElement("", "htmlGui", "htmlGui");
06538:
06539: // @@
06540:
06541: return (l_if);
06542: };
06543: };
06544:
06545: final class UnXMLTAGhidden implements IUnSAXAppFactHandler {
06546: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06547: String qName, Attributes attributes) throws Exception {
06548: // Attribute auslesen
06549: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
06550: String xValue = KeTools
06551: .pcmf_deRef(attributes.getValue("value"));
06552: String xOrphan = KeTools.pcmf_deRef(attributes
06553: .getValue("orphan"));
06554:
06555: // Element erzeugen und in Parent einfügen
06556: IUnLabel l_if = l_hdl.pdm_objFact.pcmf_createText(
06557: l_hdl.pdm_AppType, xName, xValue, l_hdl.pdm_appl);
06558: if (xOrphan == null || xOrphan.equals("false"))
06559: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
06560: .pcmf_getUnComponent());
06561: else
06562: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
06563:
06564: String xReg = KeTools.pcmf_deRef(attributes
06565: .getValue("register"));
06566: if (xReg != null && xReg.equals("") == false)
06567: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
06568:
06569: l_if.pcmf_getUnComponent().pcmf_setView(new UnNullView());
06570: l_if.pcmf_setFixedSize(0, 0, UnFixedSize.FIX_SIZE);
06571:
06572: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
06573:
06574: return (l_if);
06575: };
06576: };
06577:
06578: final class UnXMLTAGfiller implements IUnSAXAppFactHandler {
06579: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06580: String qName, Attributes attributes) throws Exception {
06581: String xX = KeTools.pcmf_deRef(attributes.getValue("xFill"));
06582: String xY = KeTools.pcmf_deRef(attributes.getValue("yFill"));
06583: // Element erzeugen und in Parent einfügen
06584:
06585: IUnLabel l_if = l_hdl.pdm_objFact.pcmf_createText(
06586: l_hdl.pdm_AppType, "myfi", "", l_hdl.pdm_appl);
06587: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode("myfi", l_if
06588: .pcmf_getUnComponent());
06589:
06590: int xFill = 100;
06591: int yFill = 100;
06592:
06593: if (xX != null && xX.equals("false"))
06594: xFill = 0;
06595: if (xY != null && xY.equals("false"))
06596: yFill = 0;
06597:
06598: l_if.pcmf_setTakeMaxSpace(true);
06599:
06600: if (l_hdl.pdm_act instanceof IUnLayouted)
06601: ((IUnLayouted) l_hdl.pdm_act).pcmf_setWeights(l_if
06602: .pcmf_getUnComponent(), xFill, yFill);
06603: else
06604: KeLog
06605: .pcmf_log(
06606: "ug2t",
06607: "<filler> cannot be inserted here, parent object is no layoutable container (tag is ignored): class ["
06608: + l_hdl.pdm_act.getClass()
06609: + "]"
06610: + ", name [" + l_hdl.pdm_name + "]",
06611: this , KeLog.MESSAGE);
06612:
06613: l_hdl
06614: .pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(),
06615: "myfi");
06616:
06617: return (l_if);
06618: };
06619: };
06620:
06621: final class UnXMLTAGline implements IUnSAXAppFactHandler {
06622: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06623: String qName, Attributes attributes) throws Exception {
06624: // Attribute auslesen
06625: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
06626: String xOrphan = KeTools.pcmf_deRef(attributes
06627: .getValue("orphan"));
06628: String xLen = KeTools.pcmf_deRef(attributes.getValue("len"));
06629:
06630: String xFBlock = KeTools.pcmf_deRef(attributes
06631: .getValue("factoryDesc"));
06632: if (xFBlock != null && xFBlock.trim().equals(""))
06633: xFBlock = null;
06634:
06635: // Element erzeugen und in Parent einfügen
06636: IUnSeparator l_if = l_hdl.pdm_objFact.pcmf_createLinePlugin(
06637: l_hdl.pdm_AppType, xName, xLen == null ? 0 : Integer
06638: .parseInt(xLen), l_hdl.pdm_appl, xFBlock);
06639: if (xOrphan == null || xOrphan.equals("false"))
06640: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
06641: .pcmf_getUnComponent());
06642: else
06643: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
06644:
06645: String xReg = KeTools.pcmf_deRef(attributes
06646: .getValue("register"));
06647: if (xReg != null && xReg.equals("") == false)
06648: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
06649:
06650: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
06651:
06652: return (l_if);
06653: };
06654: };
06655:
06656: final class UnXMLTAGspinner implements IUnSAXAppFactHandler {
06657: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06658: String qName, Attributes attributes) throws Exception {
06659: // Attribute auslesen
06660: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
06661: String xOrphan = KeTools.pcmf_deRef(attributes
06662: .getValue("orphan"));
06663: String xSubm = KeTools
06664: .pcmf_deRef(attributes.getValue("submit"));
06665:
06666: String xFBlock = KeTools.pcmf_deRef(attributes
06667: .getValue("factoryDesc"));
06668: if (xFBlock != null && xFBlock.trim().equals(""))
06669: xFBlock = null;
06670:
06671: // Element erzeugen und in Parent einfügen
06672: IUnSpinner l_if = l_hdl.pdm_objFact.pcmf_createSpinnerPlugin(
06673: l_hdl.pdm_AppType, xName, l_hdl.pdm_appl, xFBlock);
06674: if (xOrphan == null || xOrphan.equals("false"))
06675: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
06676: .pcmf_getUnComponent());
06677: else
06678: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
06679:
06680: if (xSubm != null && xSubm.equals("true"))
06681: l_if.pcmf_getUnComponent().pcmf_enableSubmit();
06682:
06683: String xReg = KeTools.pcmf_deRef(attributes
06684: .getValue("register"));
06685: if (xReg != null && xReg.equals("") == false)
06686: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
06687:
06688: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
06689:
06690: return (l_if);
06691: };
06692: };
06693:
06694: final class UnXMLTAGfileChooser implements IUnSAXAppFactHandler {
06695: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06696: String qName, Attributes attributes) throws Exception {
06697: // Attribute auslesen
06698: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
06699: String xValue = KeTools
06700: .pcmf_deRef(attributes.getValue("value"));
06701: String xOrphan = KeTools.pcmf_deRef(attributes
06702: .getValue("orphan"));
06703: String xSubm = KeTools
06704: .pcmf_deRef(attributes.getValue("submit"));
06705: String xUpload = KeTools.pcmf_deRef(attributes
06706: .getValue("uploadReadFile"));
06707:
06708: String xFBlock = KeTools.pcmf_deRef(attributes
06709: .getValue("factoryDesc"));
06710: if (xFBlock != null && xFBlock.trim().equals(""))
06711: xFBlock = null;
06712:
06713: // Element erzeugen und in Parent einfügen
06714: IUnFileChooser l_if = l_hdl.pdm_objFact
06715: .pcmf_createFileChooserPlugin(l_hdl.pdm_AppType, xName,
06716: xValue, l_hdl.pdm_appl, xFBlock);
06717: if (xOrphan == null || xOrphan.equals("false"))
06718: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
06719: .pcmf_getUnComponent());
06720: else
06721: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
06722:
06723: // Submit setzen
06724: if (xSubm != null && xSubm.equals("true"))
06725: l_if.pcmf_getUnComponent().pcmf_enableSubmit();
06726:
06727: if (xUpload != null && xUpload.equals("true"))
06728: l_if.pcmf_setUploadReadFile(true);
06729:
06730: String xReg = KeTools.pcmf_deRef(attributes
06731: .getValue("register"));
06732: if (xReg != null && xReg.equals("") == false)
06733: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
06734:
06735: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
06736:
06737: return (l_if);
06738: };
06739: };
06740:
06741: final class UnXMLTAGimage implements IUnSAXAppFactHandler {
06742: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06743: String qName, Attributes attributes) throws Exception {
06744: // Attribute auslesen
06745: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
06746: String xValue = KeTools
06747: .pcmf_deRef(attributes.getValue("value"));
06748: String xOrphan = KeTools.pcmf_deRef(attributes
06749: .getValue("orphan"));
06750: String xIco = KeTools.pcmf_deRef(attributes.getValue("icon"));
06751: String xAttach = KeTools.pcmf_deRef(attributes
06752: .getValue("attach"));
06753:
06754: String xFBlock = KeTools.pcmf_deRef(attributes
06755: .getValue("factoryDesc"));
06756: if (xFBlock != null && xFBlock.trim().equals(""))
06757: xFBlock = null;
06758:
06759: // Element erzeugen und in Parent einfügen
06760: IUnImage l_if = l_hdl.pdm_objFact.pcmf_createImagePlugin(
06761: l_hdl.pdm_AppType, xName, xValue, l_hdl.pdm_appl,
06762: xFBlock);
06763: if (xOrphan == null || xOrphan.equals("false"))
06764: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
06765: .pcmf_getUnComponent());
06766: else
06767: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
06768:
06769: String xReg = KeTools.pcmf_deRef(attributes
06770: .getValue("register"));
06771: if (xReg != null && xReg.equals("") == false) {
06772: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
06773: if (xAttach == null || xAttach.equals("true"))
06774: l_if.pcmf_attachImage();
06775: }
06776:
06777: if (xIco != null && xIco.equals("true")
06778: && l_hdl.pdm_act instanceof IUnIconView)
06779: ((IUnIconView) l_hdl.pdm_act).pcmf_setIcon(l_if);
06780:
06781: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
06782:
06783: return (l_if);
06784: };
06785: };
06786:
06787: final class UnXMLTAGdrawPane implements IUnSAXAppFactHandler {
06788: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06789: String qName, Attributes attributes) throws Exception {
06790: // Attribute auslesen
06791: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
06792: String xWi = KeTools.pcmf_deRef(attributes.getValue("width"));
06793: String xHi = KeTools.pcmf_deRef(attributes.getValue("height"));
06794: String xOrphan = KeTools.pcmf_deRef(attributes
06795: .getValue("orphan"));
06796: String xPainter = KeTools.pcmf_deRef(attributes
06797: .getValue("painter"));
06798:
06799: String xFBlock = KeTools.pcmf_deRef(attributes
06800: .getValue("factoryDesc"));
06801: if (xFBlock != null && xFBlock.trim().equals(""))
06802: xFBlock = null;
06803:
06804: // Element erzeugen und in Parent einfügen
06805: IUnDrawPane l_if = l_hdl.pdm_objFact.pcmf_createDrawPanePlugin(
06806: l_hdl.pdm_AppType, xName, Integer.parseInt(xWi),
06807: Integer.parseInt(xHi), l_hdl.pdm_appl, xFBlock);
06808: if (xOrphan == null || xOrphan.equals("false"))
06809: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
06810: .pcmf_getUnComponent());
06811: else
06812: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
06813:
06814: if (xPainter != null) {
06815: ((IUnPainter) Class.forName(xPainter).newInstance())
06816: .pcmf_paint(l_if);
06817: l_if.pcmf_commitDrawPane();
06818: }
06819:
06820: String xReg = KeTools.pcmf_deRef(attributes
06821: .getValue("register"));
06822: if (xReg != null && xReg.equals("") == false)
06823: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
06824:
06825: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
06826:
06827: return (l_if);
06828: };
06829: };
06830:
06831: final class UnXMLTAGssWidget implements IUnSAXAppFactHandler {
06832: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06833: String qName, Attributes attributes) throws Exception {
06834: // Attribute auslesen
06835: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
06836: String xWi = KeTools.pcmf_deRef(attributes.getValue("width"));
06837: String xHi = KeTools.pcmf_deRef(attributes.getValue("height"));
06838: String xOrphan = KeTools.pcmf_deRef(attributes
06839: .getValue("orphan"));
06840: String xClass = KeTools
06841: .pcmf_deRef(attributes.getValue("class"));
06842:
06843: String xFBlock = KeTools.pcmf_deRef(attributes
06844: .getValue("factoryDesc"));
06845: if (xFBlock != null && xFBlock.trim().equals(""))
06846: xFBlock = null;
06847:
06848: if (xHi == null)
06849: xHi = "30";
06850: if (xWi == null)
06851: xWi = "100";
06852:
06853: // Element erzeugen und in Parent einfügen
06854: IUnSnapShotComponent l_if = l_hdl.pdm_objFact
06855: .pcmf_createSnapShotPlugin(l_hdl.pdm_AppType, xName,
06856: Integer.parseInt(xWi), Integer.parseInt(xHi),
06857: l_hdl.pdm_appl, xFBlock);
06858: if (xOrphan == null || xOrphan.equals("false"))
06859: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
06860: .pcmf_getUnComponent());
06861: else
06862: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
06863:
06864: if (xClass != null) {
06865: l_if.pcmf_setSnapShotRoot((Component) Class.forName(xClass)
06866: .newInstance());
06867: l_if.pcmf_commitWidget();
06868: }
06869:
06870: String xReg = KeTools.pcmf_deRef(attributes
06871: .getValue("register"));
06872: if (xReg != null && xReg.equals("") == false)
06873: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
06874:
06875: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
06876:
06877: return (l_if);
06878: };
06879: };
06880:
06881: final class UnXMLTAGsplitPane implements IUnSAXAppFactHandler {
06882: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06883: String qName, Attributes attributes) throws Exception {
06884: // Attribute auslesen
06885: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
06886: String xOrphan = KeTools.pcmf_deRef(attributes
06887: .getValue("orphan"));
06888: String xSplit = KeTools
06889: .pcmf_deRef(attributes.getValue("split"));
06890: String xDivPos = KeTools.pcmf_deRef(attributes
06891: .getValue("divPos"));
06892: String xDivWi = KeTools.pcmf_deRef(attributes
06893: .getValue("divWidth"));
06894: String xDivWiA = KeTools.pcmf_deRef(attributes
06895: .getValue("divWidthAbs"));
06896: String xSubm = KeTools
06897: .pcmf_deRef(attributes.getValue("submit"));
06898:
06899: String xFBlock = KeTools.pcmf_deRef(attributes
06900: .getValue("factoryDesc"));
06901: if (xFBlock != null && xFBlock.trim().equals(""))
06902: xFBlock = null;
06903:
06904: // Element erzeugen und in Parent einfügen
06905: IUnSplitPane l_if = l_hdl.pdm_objFact
06906: .pcmf_createSplitPanePlugin(l_hdl.pdm_AppType, xName,
06907: l_hdl.pdm_appl, xFBlock);
06908: if (xOrphan == null || xOrphan.equals("false"))
06909: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
06910: .pcmf_getUnComponent());
06911: else
06912: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
06913:
06914: if (xSplit != null && xSplit.equals("H"))
06915: l_if.pcmf_setSplitMode(IUnSplitPane.HSPLIT);
06916:
06917: if (xDivPos != null)
06918: l_if.pcmf_setSplitPercent(Integer.parseInt(xDivPos));
06919:
06920: if (xDivWi != null)
06921: l_if.pcmf_setSliderPercent(Integer.parseInt(xDivWi));
06922:
06923: if (xDivWiA != null)
06924: l_if.pcmf_setSliderAbs(Integer.parseInt(xDivWiA));
06925:
06926: if (xSubm != null && xSubm.equals("true"))
06927: l_if.pcmf_getUnComponent().pcmf_enableSubmit();
06928:
06929: String xReg = KeTools.pcmf_deRef(attributes
06930: .getValue("register"));
06931: if (xReg != null && xReg.equals("") == false)
06932: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
06933:
06934: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
06935:
06936: return (l_if);
06937: };
06938: };
06939:
06940: final class UnXMLTAGbgimage implements IUnSAXAppFactHandler {
06941: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06942: String qName, Attributes attributes) throws Exception {
06943: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
06944: String xValue = KeTools
06945: .pcmf_deRef(attributes.getValue("value"));
06946: String xUrl = KeTools.pcmf_deRef(attributes.getValue("url"));
06947: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
06948:
06949: if (xValue == null)
06950: xValue = "";
06951:
06952: if (xUrl != null && xUrl.trim().equals("") == false)
06953: xValue = xUrl;
06954:
06955: IUnImage l_if = null;
06956: if (xObj != null && xObj.trim().equals("") == false)
06957: l_if = (IUnImage) KeRegisteredObject
06958: .pcmf_getObjByName(xObj);
06959: else
06960: l_if = l_hdl.pdm_objFact.pcmf_createImage(
06961: l_hdl.pdm_AppType, xName, xValue, l_hdl.pdm_appl);
06962:
06963: String xReg = KeTools.pcmf_deRef(attributes
06964: .getValue("register"));
06965: if (xReg != null && xReg.equals("") == false)
06966: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
06967:
06968: if (l_hdl.pdm_act instanceof IUnPanel)
06969: ((IUnPanel) l_hdl.pdm_act).pcmf_setBgImage(l_if);
06970: else
06971: KeLog.pcmf_log("ug2t",
06972: "<bgimage> cannot insert background picture in: class ["
06973: + l_hdl.pdm_act.getClass() + "]"
06974: + ", name [" + l_hdl.pdm_name + "]", this ,
06975: KeLog.ERROR);
06976:
06977: l_hdl.pdm_elements.push(l_hdl.pdm_act);
06978: l_hdl.pdm_names.push(l_hdl.pdm_name);
06979:
06980: return (l_hdl.pdm_act);
06981: };
06982: };
06983:
06984: final class UnXMLTAGwdgBorder implements IUnSAXAppFactHandler {
06985: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
06986: String qName, Attributes attributes) throws Exception {
06987: // Attribute auslesen
06988: String xStyle = KeTools
06989: .pcmf_deRef(attributes.getValue("style"));
06990: String xColor = KeTools.pcmf_deRef(attributes
06991: .getValue("boColor"));
06992: String xWidth = KeTools
06993: .pcmf_deRef(attributes.getValue("width"));
06994:
06995: if (xWidth == null)
06996: xWidth = "1";
06997: if (xColor == null)
06998: xColor = "gray";
06999:
07000: // Element erzeugen und in Parent einfügen
07001: if (xStyle != null && xStyle.equalsIgnoreCase("INSETS"))
07002: ((UnComponent) l_hdl.pdm_act).pcmf_setBorder(
07003: IUnComponent.INSETS_BORDER, xColor, Integer
07004: .parseInt(xWidth));
07005: else if (xStyle != null && xStyle.equalsIgnoreCase("OUTSETS"))
07006: ((UnComponent) l_hdl.pdm_act).pcmf_setBorder(
07007: IUnComponent.OUTSETS_BORDER, xColor, Integer
07008: .parseInt(xWidth));
07009: else if (xStyle != null && xStyle.equalsIgnoreCase("LINE"))
07010: ((UnComponent) l_hdl.pdm_act).pcmf_setBorder(
07011: IUnComponent.LINE_BORDER, xColor, Integer
07012: .parseInt(xWidth));
07013: else
07014: ((UnComponent) l_hdl.pdm_act).pcmf_setBorder(
07015: IUnComponent.NO_BORDER, xColor, Integer
07016: .parseInt(xWidth));
07017:
07018: l_hdl.pdm_elements.push(l_hdl.pdm_act);
07019: l_hdl.pdm_names.push(l_hdl.pdm_name);
07020:
07021: return (l_hdl.pdm_act);
07022: };
07023: };
07024:
07025: final class UnXMLTAGcssClass implements IUnSAXAppFactHandler {
07026: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07027: String qName, Attributes attributes) throws Exception {
07028: // Attribute auslesen
07029: String xValue = KeTools
07030: .pcmf_deRef(attributes.getValue("value"));
07031:
07032: // Element erzeugen und in Parent einfügen
07033: if (xValue != null)
07034: ((UnComponent) l_hdl.pdm_act).pcmf_setCssClass(xValue);
07035:
07036: l_hdl.pdm_elements.push(l_hdl.pdm_act);
07037: l_hdl.pdm_names.push(l_hdl.pdm_name);
07038:
07039: return (l_hdl.pdm_act);
07040: };
07041: };
07042:
07043: final class UnXMLTAGtabIdx implements IUnSAXAppFactHandler {
07044: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07045: String qName, Attributes attributes) throws Exception {
07046: // Attribute auslesen
07047: String xValue = KeTools
07048: .pcmf_deRef(attributes.getValue("value"));
07049:
07050: // Element erzeugen und in Parent einfügen
07051: if (xValue != null && xValue.trim().equals("") == false
07052: && l_hdl.pdm_act instanceof MuGenericComponent)
07053: ((MuGenericComponent) l_hdl.pdm_act).pcmf_setTabIdx(Integer
07054: .parseInt(xValue));
07055:
07056: l_hdl.pdm_elements.push(l_hdl.pdm_act);
07057: l_hdl.pdm_names.push(l_hdl.pdm_name);
07058:
07059: return (l_hdl.pdm_act);
07060: };
07061: };
07062:
07063: final class UnXMLTAGtakeMax implements IUnSAXAppFactHandler {
07064: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07065: String qName, Attributes attributes) throws Exception {
07066: // Attribute auslesen
07067: String xValue = KeTools
07068: .pcmf_deRef(attributes.getValue("value"));
07069:
07070: // Element erzeugen und in Parent einfügen
07071: if (xValue != null)
07072: ((UnComponent) l_hdl.pdm_act)
07073: .pcmf_setTakeMaxSpace(xValue == null
07074: || xValue.equals("true") ? true : false);
07075:
07076: l_hdl.pdm_elements.push(l_hdl.pdm_act);
07077: l_hdl.pdm_names.push(l_hdl.pdm_name);
07078:
07079: return (l_hdl.pdm_act);
07080: };
07081: };
07082:
07083: final class UnXMLTAGlayout implements IUnSAXAppFactHandler {
07084: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07085: String qName, Attributes attributes) throws Exception {
07086: // Attribute auslesen
07087: String xValue = KeTools
07088: .pcmf_deRef(attributes.getValue("value"));
07089:
07090: // Element erzeugen und in Parent einfügen
07091: if (xValue != null) {
07092: if (l_hdl.pdm_act instanceof IUnLayouted) {
07093: if (xValue.equalsIgnoreCase("GRIDBAG"))
07094: ((IUnLayouted) l_hdl.pdm_act)
07095: .pcmf_setCommonLayout(IUnLayouted.LAYOUT_GRIDBAG);
07096: else if (xValue.equalsIgnoreCase("FLOW"))
07097: ((IUnLayouted) l_hdl.pdm_act)
07098: .pcmf_setCommonLayout(IUnLayouted.LAYOUT_FLOW);
07099: else if (xValue.equalsIgnoreCase("ABSOLUTE"))
07100: ((IUnLayouted) l_hdl.pdm_act)
07101: .pcmf_setCommonLayout(IUnLayouted.LAYOUT_ABSOLUTE);
07102: } else
07103: KeLog.pcmf_log("ug2t",
07104: "<commonLayout> parent is no IUnLayouted: class ["
07105: + l_hdl.pdm_act.getClass() + "]"
07106: + ", name [" + l_hdl.pdm_name + "]",
07107: this , KeLog.ERROR);
07108: }
07109:
07110: l_hdl.pdm_elements.push(l_hdl.pdm_act);
07111: l_hdl.pdm_names.push(l_hdl.pdm_name);
07112:
07113: return (l_hdl.pdm_act);
07114: };
07115: };
07116:
07117: final class UnXMLTAGicon implements IUnSAXAppFactHandler {
07118: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07119: String qName, Attributes attributes) throws Exception {
07120: // Attribute auslesen
07121: String xName = KeTools
07122: .pcmf_deRef(attributes.getValue("object"));
07123: String xPath = KeTools.pcmf_deRef(attributes.getValue("url"));
07124:
07125: if (xName != null && xName.equals("") == false) {
07126: if (l_hdl.pdm_act instanceof IUnIconView)
07127: ((IUnIconView) l_hdl.pdm_act)
07128: .pcmf_setIcon((IUnImage) KeRegisteredObject
07129: .pcmf_getObjByName(xName));
07130: else
07131: KeLog.pcmf_log("ug2t", "<icon> can not set icon in:"
07132: + l_hdl.pdm_act.getClass(), this , KeLog.ERROR);
07133: } else if (xPath != null && xPath.equals("") == false) {
07134: if (l_hdl.pdm_act instanceof IUnIconView) {
07135: IUnImage l_if = l_hdl.pdm_objFact.pcmf_createImage(
07136: l_hdl.pdm_AppType, "icon", xPath,
07137: l_hdl.pdm_appl);
07138: ((IUnIconView) l_hdl.pdm_act).pcmf_setIcon(l_if);
07139: } else
07140: KeLog.pcmf_log("ug2t",
07141: "<icon> can not set icon in: class ["
07142: + l_hdl.pdm_act.getClass() + "]"
07143: + ", name [" + l_hdl.pdm_name + "]",
07144: this , KeLog.ERROR);
07145: } else
07146: KeLog.pcmf_log("ug2t",
07147: "<icon> can not set icon in: class ["
07148: + l_hdl.pdm_act.getClass() + "]"
07149: + ", name [" + l_hdl.pdm_name + "]", this ,
07150: KeLog.ERROR);
07151:
07152: l_hdl.pdm_elements.push(l_hdl.pdm_act);
07153: l_hdl.pdm_names.push(l_hdl.pdm_name);
07154:
07155: return (l_hdl.pdm_act);
07156: };
07157: };
07158:
07159: final class UnXMLTAGsetHtmlLOM implements IUnSAXAppFactHandler {
07160: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07161: String qName, Attributes attributes) throws Exception {
07162: // Attribute auslesen
07163: String xName = KeTools
07164: .pcmf_deRef(attributes.getValue("object"));
07165: String xClass = KeTools
07166: .pcmf_deRef(attributes.getValue("class"));
07167: String xInsets = KeTools.pcmf_deRef(attributes
07168: .getValue("insets"));
07169:
07170: IMuGenericLayoutManager l_if = null;
07171:
07172: if (l_hdl.pdm_AppType == UnComponentFactory.MARKUP) {
07173: if (xName != null && xName.equals("") == false)
07174: l_if = (IMuGenericLayoutManager) KeRegisteredObject
07175: .pcmf_getObjByName(xName);
07176: else if (xClass != null && xClass.equals("") == false)
07177: l_if = (IMuGenericLayoutManager) Class.forName(xClass)
07178: .newInstance();
07179:
07180: if (l_if != null) {
07181: if (l_hdl.pdm_act instanceof MuGenericContainer) {
07182: ((MuGenericContainer) l_hdl.pdm_act)
07183: .pcmf_setLayoutManager(l_if);
07184: if (xInsets != null && xInsets.equals("") == false)
07185: l_if.pcmf_setInsets(Integer.parseInt(xInsets));
07186: } else {
07187: KeLog
07188: .pcmf_log("ug2t",
07189: "<htmlLOM> cannot set layout-manager in: class ["
07190: + l_hdl.pdm_act.getClass()
07191: + "]" + ", name ["
07192: + l_hdl.pdm_name + "]",
07193: this , KeLog.ERROR);
07194: }
07195: } else
07196: KeLog.pcmf_log("ug2t",
07197: "<htmlLOM> html layout-manager not found: class["
07198: + xClass + "] object[" + xName + "]",
07199: this , KeLog.ERROR);
07200: }
07201:
07202: l_hdl.pdm_elements.push(l_hdl.pdm_act);
07203: l_hdl.pdm_names.push(l_hdl.pdm_name);
07204:
07205: return (l_hdl.pdm_act);
07206: };
07207: };
07208:
07209: final class UnXMLTAGcomboBox implements IUnSAXAppFactHandler {
07210: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07211: String qName, Attributes attributes) throws Exception {
07212: // Attribute auslesen
07213: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
07214: String xValue = KeTools
07215: .pcmf_deRef(attributes.getValue("value"));
07216: String xString = KeTools.pcmf_deRef(attributes
07217: .getValue("entry"));
07218: String xSubm = KeTools
07219: .pcmf_deRef(attributes.getValue("submit"));
07220: String xDiab = KeTools.pcmf_deRef(attributes
07221: .getValue("disable"));
07222: String xOrphan = KeTools.pcmf_deRef(attributes
07223: .getValue("orphan"));
07224:
07225: String xFBlock = KeTools.pcmf_deRef(attributes
07226: .getValue("factoryDesc"));
07227: if (xFBlock != null && xFBlock.trim().equals(""))
07228: xFBlock = null;
07229:
07230: if (xValue == null)
07231: xValue = "";
07232: if (xString == null)
07233: xString = "";
07234: // Element erzeugen und in Parent einfügen
07235: IUnComboBox l_if = l_hdl.pdm_objFact.pcmf_createComboBoxPlugin(
07236: l_hdl.pdm_AppType, xName, xValue, xString,
07237: l_hdl.pdm_appl, xFBlock);
07238: if (xOrphan == null || xOrphan.equals("false"))
07239: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
07240: .pcmf_getUnComponent());
07241: else
07242: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
07243: // Submit setzen
07244: if (xSubm != null && xSubm.equals("true"))
07245: l_if.pcmf_getUnComponent().pcmf_enableSubmit();
07246: // Disable Setzen setzen
07247: if (xDiab != null && xDiab.equals("true"))
07248: l_if.pcmf_getUnComponent().pcmf_disable();
07249:
07250: String xReg = KeTools.pcmf_deRef(attributes
07251: .getValue("register"));
07252: if (xReg != null && xReg.equals("") == false)
07253: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
07254:
07255: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
07256:
07257: return (l_if);
07258: };
07259: };
07260:
07261: final class UnXMLTAGlistBox implements IUnSAXAppFactHandler {
07262: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07263: String qName, Attributes attributes) throws Exception {
07264: // Attribute auslesen
07265: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
07266: String xValue = KeTools
07267: .pcmf_deRef(attributes.getValue("value"));
07268: String xString = KeTools.pcmf_deRef(attributes
07269: .getValue("entry"));
07270: String xSize = KeTools.pcmf_deRef(attributes.getValue("size"));
07271: String xSubm = KeTools
07272: .pcmf_deRef(attributes.getValue("submit"));
07273: String xDiab = KeTools.pcmf_deRef(attributes
07274: .getValue("disable"));
07275: String xOrphan = KeTools.pcmf_deRef(attributes
07276: .getValue("orphan"));
07277:
07278: String xFBlock = KeTools.pcmf_deRef(attributes
07279: .getValue("factoryDesc"));
07280: if (xFBlock != null && xFBlock.trim().equals(""))
07281: xFBlock = null;
07282:
07283: if (xValue == null)
07284: xValue = "";
07285: if (xString == null)
07286: xString = "";
07287:
07288: // Element erzeugen und in Parent einfügen
07289: IUnListBox l_if = l_hdl.pdm_objFact.pcmf_createListBoxPlugin(
07290: l_hdl.pdm_AppType, xName, xValue, xString, Integer
07291: .parseInt(xSize), l_hdl.pdm_appl, xFBlock);
07292: if (xOrphan == null || xOrphan.equals("false"))
07293: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
07294: .pcmf_getUnComponent());
07295: else
07296: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
07297: // Submit setzen
07298: if (xSubm != null && xSubm.equals("true"))
07299: l_if.pcmf_getUnComponent().pcmf_enableSubmit();
07300: // Disable Setzen setzen
07301: if (xDiab != null && xDiab.equals("true"))
07302: l_if.pcmf_getUnComponent().pcmf_disable();
07303:
07304: String xReg = KeTools.pcmf_deRef(attributes
07305: .getValue("register"));
07306: if (xReg != null && xReg.equals("") == false)
07307: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
07308:
07309: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
07310:
07311: return (l_if);
07312: };
07313: };
07314:
07315: final class UnXMLTAGradio implements IUnSAXAppFactHandler {
07316: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07317: String qName, Attributes attributes) throws Exception {
07318: // Attribute auslesen
07319: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
07320: String xValue = KeTools
07321: .pcmf_deRef(attributes.getValue("value"));
07322: String xString = KeTools.pcmf_deRef(attributes
07323: .getValue("entry"));
07324: String xSubm = KeTools
07325: .pcmf_deRef(attributes.getValue("submit"));
07326: String xDiab = KeTools.pcmf_deRef(attributes
07327: .getValue("disable"));
07328: String xOrphan = KeTools.pcmf_deRef(attributes
07329: .getValue("orphan"));
07330: String xNL = KeTools.pcmf_deRef(attributes.getValue("layout"));
07331: String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
07332:
07333: String xFBlock = KeTools.pcmf_deRef(attributes
07334: .getValue("factoryDesc"));
07335: if (xFBlock != null && xFBlock.trim().equals(""))
07336: xFBlock = null;
07337:
07338: IUnRadioPanel l_if = null;
07339:
07340: if (xString == null)
07341: xString = xValue;
07342:
07343: // Element erzeugen und in Parent einfügen
07344: if (xNL != null && xNL.equals("false"))
07345: l_if = l_hdl.pdm_objFact.pcmf_createRadioButtonsPlugin(
07346: l_hdl.pdm_AppType, xName, xValue, xString, true,
07347: l_hdl.pdm_appl, xFBlock);
07348: else
07349: l_if = l_hdl.pdm_objFact.pcmf_createRadioButtonsPlugin(
07350: l_hdl.pdm_AppType, xName, xValue, xString, false,
07351: l_hdl.pdm_appl, xFBlock);
07352:
07353: if (l_if instanceof IUnPanel) {
07354: if (xScr != null && xScr.equals("false"))
07355: ((IUnPanel) l_if).pcmf_setScroll(false);
07356: }
07357: ;
07358:
07359: if (xOrphan == null || xOrphan.equals("false"))
07360: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
07361: .pcmf_getUnComponent());
07362: else
07363: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
07364: // Submit setzen
07365: if (xSubm != null && xSubm.equals("true"))
07366: l_if.pcmf_getUnComponent().pcmf_enableSubmit();
07367: // Disable Setzen setzen
07368: if (xDiab != null && xDiab.equals("true"))
07369: l_if.pcmf_getUnComponent().pcmf_disable();
07370:
07371: String xReg = KeTools.pcmf_deRef(attributes
07372: .getValue("register"));
07373: if (xReg != null && xReg.equals("") == false)
07374: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
07375:
07376: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
07377:
07378: return (l_if);
07379: };
07380: };
07381:
07382: final class UnXMLTAGsingleRadio implements IUnSAXAppFactHandler {
07383: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07384: String qName, Attributes attributes) throws Exception {
07385: // Attribute auslesen
07386: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
07387: String xGroup = KeTools
07388: .pcmf_deRef(attributes.getValue("group"));
07389: String xValue = KeTools
07390: .pcmf_deRef(attributes.getValue("value"));
07391: String xLabel = KeTools
07392: .pcmf_deRef(attributes.getValue("label"));
07393: String xString = KeTools.pcmf_deRef(attributes
07394: .getValue("entry"));
07395: String xSubm = KeTools
07396: .pcmf_deRef(attributes.getValue("submit"));
07397: String xDiab = KeTools.pcmf_deRef(attributes
07398: .getValue("disable"));
07399: String xOrphan = KeTools.pcmf_deRef(attributes
07400: .getValue("orphan"));
07401: String xWrap = KeTools.pcmf_deRef(attributes.getValue("wrap"));
07402:
07403: String xFBlock = KeTools.pcmf_deRef(attributes
07404: .getValue("factoryDesc"));
07405: if (xFBlock != null && xFBlock.trim().equals(""))
07406: xFBlock = null;
07407:
07408: IUnRadioButton l_if = null;
07409:
07410: if (xValue == null && xString == null)
07411: xValue = xString = xLabel;
07412: else if (xString == null && xLabel == null)
07413: xString = xValue;
07414: else if (xString == null)
07415: xString = xLabel;
07416:
07417: // Element erzeugen und in Parent einfügen
07418: l_if = l_hdl.pdm_objFact.pcmf_createSingleRadioButtonsPlugin(
07419: l_hdl.pdm_AppType, xName, xValue, xString, xGroup,
07420: l_hdl.pdm_appl, xFBlock);
07421:
07422: if (xOrphan == null || xOrphan.equals("false"))
07423: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
07424: .pcmf_getUnComponent());
07425: else
07426: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
07427: // Submit setzen
07428: if (xSubm != null && xSubm.equals("true"))
07429: l_if.pcmf_getUnComponent().pcmf_enableSubmit();
07430: // Disable Setzen setzen
07431: if (xDiab != null && xDiab.equals("true"))
07432: l_if.pcmf_getUnComponent().pcmf_disable();
07433:
07434: String xReg = KeTools.pcmf_deRef(attributes
07435: .getValue("register"));
07436: if (xReg != null && xReg.equals("") == false)
07437: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
07438:
07439: if (l_if instanceof MuGenericRadioButton) {
07440: if (xWrap != null && xWrap.equals("false"))
07441: ((MuGenericRadioButton) l_if).pcmf_setWrap(false);
07442: }
07443:
07444: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
07445:
07446: return (l_if);
07447: };
07448: };
07449:
07450: final class UnXMLTAGscripting implements IUnSAXAppFactHandler {
07451: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07452: String qName, Attributes attributes) throws Exception {
07453: String xType = KeTools.pcmf_deRef(attributes.getValue("type"));
07454: String xClass = KeTools
07455: .pcmf_deRef(attributes.getValue("class"));
07456: String xSynced = KeTools.pcmf_deRef(attributes
07457: .getValue("synchronized"));
07458:
07459: l_hdl.pdmf_startCDataRecording();
07460:
07461: IUnScriptIntegrator l_script = (IUnScriptIntegrator) Class
07462: .forName(xClass).newInstance();
07463: if (xSynced != null && xSynced.equals("true"))
07464: l_script.pcmf_setSynced(true);
07465:
07466: if (xType.equals(IUnScriptIntegrator.LISTENER))
07467: ((UnComponent) l_hdl.pdm_act).pcmf_addListener(l_script);
07468: else if (xType.equals(IUnScriptIntegrator.PRE_FCT))
07469: ((UnComponent) l_hdl.pdm_act).pcmf_addPreFct(l_script);
07470: else if (xType.equals(IUnScriptIntegrator.POST_FCT))
07471: ((UnComponent) l_hdl.pdm_act).pcmf_addPostFct(l_script);
07472: else if (xType.equals(IUnScriptIntegrator.EXEC))
07473: ((IUnApplication) l_hdl.pdm_act).pcmf_setInitFct(l_script);
07474: else if (xType.equals(IUnScriptIntegrator.MAPPED))
07475: l_hdl.pdm_appl.pcmf_addMappingListener(l_script);
07476: else if (xType.equals(IUnScriptIntegrator.INDIRECT))
07477: ((UnComponent) l_hdl.pdm_act)
07478: .pcmf_addIndirectListener(l_script);
07479:
07480: l_script.pcmf_setType(xType);
07481:
07482: l_hdl.pdm_elements.push(l_script);
07483: l_hdl.pdm_names.push(xType);
07484:
07485: return (l_hdl.pdm_act);
07486: };
07487: };
07488:
07489: final class UnXMLTAGinlinePlugin implements IUnSAXAppFactHandler {
07490: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07491: String qName, Attributes attributes) throws Exception {
07492: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
07493: String xRegister = KeTools.pcmf_deRef(attributes
07494: .getValue("register"));
07495:
07496: l_hdl.pdmf_startCDataRecording();
07497:
07498: l_hdl.pdm_elements.push(xRegister);
07499: l_hdl.pdm_names.push(xName);
07500:
07501: return (l_hdl.pdm_act);
07502: };
07503: };
07504:
07505: final class UnXMLTAGsrvListener implements IUnSAXAppFactHandler {
07506: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07507: String qName, Attributes attributes) throws Exception {
07508: String xClass = KeTools
07509: .pcmf_deRef(attributes.getValue("class"));
07510: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
07511:
07512: IUnGuiEventListener l_listen = null;
07513:
07514: try {
07515: if (xClass != null && xClass.equals("") == false) {
07516: l_listen = (IUnGuiEventListener) Class.forName(xClass)
07517: .newInstance();
07518: String xReg = KeTools.pcmf_deRef(attributes
07519: .getValue("register"));
07520: if (xReg != null && xReg.equals("") == false)
07521: KeRegisteredObject.pcmf_register(xReg, l_listen);
07522: } else if (xObj != null && xObj.equals("") == false)
07523: l_listen = (IUnGuiEventListener) KeRegisteredObject
07524: .pcmf_getObjByName(xObj);
07525:
07526: if (l_listen == null) {
07527: KeLog.pcmf_log("ug2t",
07528: "<srvListener> tag requires a valid class or a valid obj attribute: class["
07529: + xClass + "] object[" + xObj
07530: + "] in : class ["
07531: + l_hdl.pdm_act.getClass() + "]"
07532: + ", name [" + l_hdl.pdm_name + "]",
07533: this , KeLog.ERROR);
07534: l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act,
07535: l_hdl.pdm_name);
07536: return (l_hdl.pdm_act);
07537: }
07538: ;
07539:
07540: ((UnComponent) l_hdl.pdm_act).pcmf_addListener(l_listen);
07541: } catch (Throwable e) {
07542: KeLog.pcmf_log("ug2t", "<srvListener> class: " + xClass
07543: + " for listener could not be found: class ["
07544: + l_hdl.pdm_act.getClass() + "]" + ", name ["
07545: + l_hdl.pdm_name + "]", this , KeLog.ERROR);
07546: }
07547:
07548: l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act,
07549: l_hdl.pdm_name);
07550:
07551: return (l_hdl.pdm_appl);
07552: };
07553: };
07554:
07555: final class UnXMLTAGmapListener implements IUnSAXAppFactHandler {
07556: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07557: String qName, Attributes attributes) throws Exception {
07558: String xClass = KeTools
07559: .pcmf_deRef(attributes.getValue("class"));
07560: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
07561:
07562: IUnMappingEventListener l_listen = null;
07563:
07564: try {
07565: if (xClass != null && xClass.equals("") == false) {
07566: l_listen = (IUnMappingEventListener) Class.forName(
07567: xClass).newInstance();
07568: String xReg = KeTools.pcmf_deRef(attributes
07569: .getValue("register"));
07570: if (xReg != null && xReg.equals("") == false)
07571: KeRegisteredObject.pcmf_register(xReg, l_listen);
07572: } else if (xObj != null && xObj.equals("") == false)
07573: l_listen = (IUnMappingEventListener) KeRegisteredObject
07574: .pcmf_getObjByName(xObj);
07575:
07576: if (l_listen == null) {
07577: KeLog.pcmf_log("ug2t",
07578: "<mapListener> tag requires a valid class or a valid obj attribute: class["
07579: + xClass + "] object[" + xObj
07580: + "]: in class ["
07581: + l_hdl.pdm_act.getClass() + "]"
07582: + ", name [" + l_hdl.pdm_name + "]",
07583: this , KeLog.ERROR);
07584: l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act,
07585: l_hdl.pdm_name);
07586: return (l_hdl.pdm_act);
07587: }
07588: ;
07589:
07590: l_hdl.pdm_appl.pcmf_addMappingListener(l_listen);
07591: } catch (Throwable e) {
07592: KeLog.pcmf_log("ug2t", "<mapListener> class: " + xClass
07593: + " for listener could not be found: class ["
07594: + l_hdl.pdm_act.getClass() + "]" + ", name ["
07595: + l_hdl.pdm_name + "]", this , KeLog.ERROR);
07596: }
07597:
07598: l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act,
07599: l_hdl.pdm_name);
07600:
07601: return (l_hdl.pdm_appl);
07602: };
07603: };
07604:
07605: final class UnXMLTAGpcListener implements IUnSAXAppFactHandler {
07606: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07607: String qName, Attributes attributes) throws Exception {
07608: String xClass = KeTools
07609: .pcmf_deRef(attributes.getValue("class"));
07610: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
07611:
07612: IKePropertyChangeListener l_listen = null;
07613:
07614: try {
07615: if (xClass != null && xClass.equals("") == false) {
07616: l_listen = (IKePropertyChangeListener) Class.forName(
07617: xClass).newInstance();
07618: String xReg = KeTools.pcmf_deRef(attributes
07619: .getValue("register"));
07620: if (xReg != null && xReg.equals("") == false)
07621: KeRegisteredObject.pcmf_register(xReg, l_listen);
07622: } else if (xObj != null && xObj.equals("") == false)
07623: l_listen = (IKePropertyChangeListener) KeRegisteredObject
07624: .pcmf_getObjByName(xObj);
07625:
07626: if (l_listen == null) {
07627: KeLog.pcmf_log("ug2t",
07628: "<pcListener> tag requires a valid class or a valid obj attribute: class["
07629: + xClass + "] object[" + xObj
07630: + "] in: class ["
07631: + l_hdl.pdm_act.getClass() + "]"
07632: + ", name [" + l_hdl.pdm_name + "]",
07633: this , KeLog.ERROR);
07634: l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act,
07635: l_hdl.pdm_name);
07636: return (l_hdl.pdm_act);
07637: }
07638: ;
07639:
07640: l_hdl.pdm_act.pcmf_addPropertyChangedListener(l_listen);
07641: } catch (Throwable e) {
07642: KeLog.pcmf_log("ug2t", "<pcListener> class: " + xClass
07643: + " for listener could not be found: class ["
07644: + l_hdl.pdm_act.getClass() + "]" + ", name ["
07645: + l_hdl.pdm_name + "]", this , KeLog.ERROR);
07646: }
07647:
07648: l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act,
07649: l_hdl.pdm_name);
07650:
07651: return (l_hdl.pdm_appl);
07652: };
07653: };
07654:
07655: final class UnXMLTAGsrvListenerStmt implements IUnSAXAppFactHandler {
07656: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07657: String qName, Attributes attributes) throws Exception {
07658: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
07659: String xMethod = KeTools.pcmf_deRef(attributes
07660: .getValue("method"));
07661: String xParam = KeTools.pcmf_deRef(attributes
07662: .getValue("parameter"));
07663:
07664: if (xParam != null && xParam.equals(""))
07665: xParam = null;
07666:
07667: IUnGuiEventListener l_listen = new UnExpressionListener(xObj,
07668: xMethod, xParam);
07669:
07670: ((UnComponent) l_hdl.pdm_act).pcmf_addListener(l_listen);
07671:
07672: l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act,
07673: l_hdl.pdm_name);
07674:
07675: return (l_hdl.pdm_appl);
07676: };
07677: };
07678:
07679: final class UnXMLTAGxScript implements IUnSAXAppFactHandler {
07680: // @@
07681:
07682: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07683: String qName, Attributes attributes) throws Exception {
07684: String xFile = KeTools.pcmf_deRef(attributes.getValue("file"));
07685: String xBind = KeTools.pcmf_deRef(attributes.getValue("bind"));
07686: String xExec = KeTools.pcmf_deRef(attributes.getValue("exec"));
07687: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
07688:
07689: ScXmlScript l_script = null;
07690:
07691: l_hdl.pdm_optionNr++;
07692: l_hdl.pdm_optional = false;
07693: l_hdl.pdm_optionFalseNr = l_hdl.pdm_optionNr;
07694:
07695: if (xFile.equals("THIS")) {
07696:
07697: // @@
07698:
07699: if (l_hdl.pdm_myProducer.pem_mySource.getByteStream() != null) {
07700: if (l_hdl.pdm_myProducer.pem_mySource.getByteStream()
07701: .available() > 0) {
07702: KeLog
07703: .pcmf_log(
07704: "ug2t",
07705: "<xScript> embedded xScripts are not supported",
07706: this , KeLog.ERROR);
07707: l_hdl.pcmf_doExecStack(l_hdl.pdm_appl,
07708: l_hdl.pdm_appl.pcmf_getUnComponent(),
07709: l_hdl.pdm_name);
07710: return (l_hdl.pdm_appl);
07711: }
07712: l_hdl.pdm_myProducer.pem_mySource.getByteStream()
07713: .reset();
07714: byte l_byte[] = new byte[l_hdl.pdm_myProducer.pem_mySource
07715: .getByteStream().available()];
07716: l_hdl.pdm_myProducer.pem_mySource.getByteStream().read(
07717: l_byte);
07718: l_script = new ScXmlScript(l_byte);
07719: } else
07720: l_script = new ScXmlScript(
07721: l_hdl.pdm_myProducer.pem_mySource.getSystemId()
07722: .replaceFirst("file:", ""));
07723:
07724: // @@
07725:
07726: } else {
07727:
07728: // @@
07729:
07730: l_script = new ScXmlScript(xFile);
07731:
07732: // @@
07733:
07734: }
07735:
07736: if (xBind != null)
07737: l_hdl.pdm_appl.pcmf_getContext().put(xBind, l_script);
07738:
07739: if (xExec != null)
07740: l_script.pcmf_execProc(xExec);
07741:
07742: l_hdl.pcmf_doExecStack(l_hdl.pdm_appl, l_hdl.pdm_appl
07743: .pcmf_getUnComponent(), l_hdl.pdm_name);
07744:
07745: return (l_hdl.pdm_appl);
07746: };
07747: };
07748:
07749: final class UnXMLTAGCB implements IUnSAXAppFactHandler {
07750: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07751: String qName, Attributes attributes) throws Exception {
07752: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
07753: String xValue = KeTools
07754: .pcmf_deRef(attributes.getValue("value"));
07755: String xString = KeTools.pcmf_deRef(attributes
07756: .getValue("label"));
07757: String xSubm = KeTools
07758: .pcmf_deRef(attributes.getValue("submit"));
07759: String xDiab = KeTools.pcmf_deRef(attributes
07760: .getValue("disable"));
07761: String xOrphan = KeTools.pcmf_deRef(attributes
07762: .getValue("orphan"));
07763: String xWrap = KeTools.pcmf_deRef(attributes.getValue("wrap"));
07764:
07765: String xFBlock = KeTools.pcmf_deRef(attributes
07766: .getValue("factoryDesc"));
07767: if (xFBlock != null && xFBlock.trim().equals(""))
07768: xFBlock = null;
07769:
07770: if (xValue == null)
07771: xValue = IUnCheckBox.NOTCHECKED;
07772:
07773: IUnCheckBox l_but = l_hdl.pdm_objFact
07774: .pcmf_createCheckBoxPlugin(l_hdl.pdm_AppType, xValue,
07775: xString, l_hdl.pdm_appl, xFBlock);
07776: if (xOrphan == null || xOrphan.equals("false"))
07777: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_but
07778: .pcmf_getUnComponent());
07779: else
07780: l_but.pcmf_getUnComponent().pcmf_setGlobal(true);
07781: // Submit setzen
07782: if (xSubm != null && xSubm.equals("true"))
07783: l_but.pcmf_getUnComponent().pcmf_enableSubmit();
07784: // Disable Setzen setzen
07785: if (xDiab != null && xDiab.equals("true"))
07786: l_but.pcmf_getUnComponent().pcmf_disable();
07787:
07788: String xReg = KeTools.pcmf_deRef(attributes
07789: .getValue("register"));
07790: if (xReg != null && xReg.equals("") == false)
07791: l_but.pcmf_getUnComponent().pcmf_reRegister(xReg);
07792:
07793: if (l_but instanceof MuGenericCheckBox) {
07794: if (xWrap != null && xWrap.equals("false"))
07795: ((MuGenericCheckBox) l_but).pcmf_setWrap(false);
07796: }
07797:
07798: l_hdl.pcmf_doExecStack(l_but, l_but.pcmf_getUnComponent(),
07799: xName);
07800:
07801: return (l_but);
07802: };
07803: };
07804:
07805: final class UnXMLTAGCallBack implements IUnSAXAppFactHandler {
07806: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07807: String qName, Attributes attributes) throws Exception {
07808: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
07809: String xClass = KeTools
07810: .pcmf_deRef(attributes.getValue("class"));
07811: String xParam = KeTools.pcmf_deRef(attributes
07812: .getValue("dataId"));
07813:
07814: if (l_hdl.pdm_act instanceof UnComponent) {
07815: ACoDataGetter l_cb = null;
07816:
07817: if (xClass == null)
07818: l_cb = (ACoDataGetter) KeRegisteredObject
07819: .pcmf_getObjByName(xObj);
07820: else
07821: l_cb = (ACoDataGetter) Class.forName(xClass)
07822: .newInstance();
07823:
07824: ((UnComponent) l_hdl.pdm_act).pcmf_setDataGetter(l_cb,
07825: xParam, true);
07826: ((UnComponent) l_hdl.pdm_act).pcmf_selfRefresh();
07827: } else
07828: KeLog.pcmf_log("ug2t",
07829: "<dataCallback> current object is no UnComponent: class ["
07830: + l_hdl.pdm_act.getClass() + "]"
07831: + ", name [" + l_hdl.pdm_name + "]", this ,
07832: KeLog.ERROR);
07833:
07834: l_hdl.pdm_elements.push(l_hdl.pdm_act);
07835: l_hdl.pdm_names.push(l_hdl.pdm_name);
07836:
07837: return (l_hdl.pdm_appl);
07838: }
07839: }
07840:
07841: final class UnXMLTAGentry implements IUnSAXAppFactHandler {
07842: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
07843: String qName, Attributes attributes) throws Exception {
07844: Object l_ret = null;
07845: ACoDataGetter l_cb = null;
07846: int l_id = 0;
07847:
07848: String xValue = KeTools
07849: .pcmf_deRef(attributes.getValue("value"));
07850: String xString = KeTools.pcmf_deRef(attributes
07851: .getValue("entry"));
07852: String xCallb = KeTools.pcmf_deRef(attributes
07853: .getValue("callback"));
07854: String xMItem = KeTools.pcmf_deRef(attributes
07855: .getValue("mfct_class"));
07856: String xMOItem = KeTools.pcmf_deRef(attributes
07857: .getValue("mfct_obj"));
07858:
07859: if (xCallb != null && xCallb.equals("") == false) {
07860: l_cb = (ACoDataGetter) KeRegisteredObject
07861: .pcmf_getObjByName(xCallb);
07862: xString = xValue = l_cb.pcmf_getString(l_id++);
07863: }
07864: ;
07865: if (l_hdl.pdm_act instanceof IUnListComponent) {
07866: HoGenericTreeNode l_gobj = null;
07867:
07868: if (xString == null)
07869: xString = xValue;
07870:
07871: do {
07872: if (KeTools.pcmf_isObjReference(xString) == false) {
07873: l_gobj = new HoGenericTreeNode(xString);
07874: l_gobj.pcmf_setValue(xString);
07875: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xString,
07876: l_gobj);
07877:
07878: ((IUnListComponent) l_hdl.pdm_act).pcmf_addValue(
07879: xValue, "~" + l_gobj.pcmf_getRemName());
07880: } else
07881: ((IUnListComponent) l_hdl.pdm_act).pcmf_addValue(
07882: xValue, xString);
07883:
07884: try {
07885: if (l_cb != null)
07886: xString = xValue = l_cb.pcmf_getString(l_id++);
07887: } catch (Exception e) {
07888: l_cb = null;
07889: }
07890: ;
07891: } while (l_cb != null);
07892:
07893: if (l_gobj != null)
07894: l_hdl.pcmf_doExecStack(l_gobj, l_gobj, xValue);
07895: else
07896: l_hdl.pcmf_doExecStack(l_hdl.pdm_appl, l_hdl.pdm_appl
07897: .pcmf_getUnComponent(), l_hdl.pdm_name);
07898:
07899: l_ret = l_hdl.pdm_appl;
07900: } else if (l_hdl.pdm_act instanceof IUnSlider) {
07901: if (xString == null)
07902: xString = xValue;
07903:
07904: do {
07905: ((IUnSlider) l_hdl.pdm_act).pcmf_addValueItem(xValue,
07906: xString);
07907:
07908: try {
07909: if (l_cb != null)
07910: xString = xValue = l_cb.pcmf_getString(l_id++);
07911: } catch (Exception e) {
07912: l_cb = null;
07913: }
07914: ;
07915: } while (l_cb != null);
07916:
07917: l_hdl.pcmf_doExecStack(l_hdl.pdm_appl, l_hdl.pdm_appl
07918: .pcmf_getUnComponent(), l_hdl.pdm_name);
07919:
07920: l_ret = l_hdl.pdm_appl;
07921: } else if (l_hdl.pdm_act instanceof IUnRadioPanel) {
07922: KeTreeNode l_gobj = null;
07923:
07924: if (xString == null)
07925: xString = xValue;
07926:
07927: do {
07928: l_gobj = ((IUnRadioPanel) l_hdl.pdm_act).pcmf_addValue(
07929: xValue, xString);
07930:
07931: try {
07932: if (l_cb != null)
07933: xString = xValue = l_cb.pcmf_getString(l_id++);
07934: } catch (Exception e) {
07935: l_cb = null;
07936: }
07937: ;
07938: } while (l_cb != null);
07939:
07940: l_hdl.pcmf_doExecStack(l_gobj, l_gobj, xValue);
07941: l_ret = l_hdl.pdm_appl;
07942: } else if (l_hdl.pdm_act instanceof IUnTable) {
07943: if (xValue == null || l_cb != null)
07944: xValue = "^";
07945:
07946: StringTokenizer l_tok = null;
07947: ArrayList l_vect = null;
07948: String l_el = null;
07949:
07950: do {
07951: l_tok = new StringTokenizer(xString, xValue, false);
07952: l_vect = new ArrayList();
07953: l_el = null;
07954:
07955: while (l_tok.hasMoreElements()) {
07956: l_el = (String) l_tok.nextElement();
07957: l_el = KeTools.pcmf_deRef(l_el);
07958: l_el = l_el.replace(xValue.charAt(0), '°');
07959: l_vect.add(l_el);
07960: }
07961: ;
07962: ((IUnTable) l_hdl.pdm_act).pcmf_addRow(l_vect);
07963: try {
07964: if (l_cb != null)
07965: xString = l_cb.pcmf_getString(l_id++);
07966: } catch (Exception e) {
07967: l_cb = null;
07968: }
07969: ;
07970: } while (l_cb != null);
07971:
07972: l_hdl.pcmf_doExecStack(l_hdl.pdm_appl, l_hdl.pdm_appl
07973: .pcmf_getUnComponent(), l_hdl.pdm_name);
07974: l_ret = l_hdl.pdm_appl;
07975: } else {
07976: HoGenericTreeNode l_gobj = null;
07977:
07978: if (xString == null)
07979: xString = xValue;
07980:
07981: do {
07982: if (xMItem != null && xMItem.equals("") == false) {
07983: Object l_ex = Class.forName(xMItem).newInstance();
07984: if (l_ex instanceof IUnGuiEventListener)
07985: l_gobj = new UnMenuFunction(xString,
07986: (IUnGuiEventListener) l_ex);
07987: else
07988: l_gobj = new UnMenuFunction(xString,
07989: (IKeExecutable) l_ex);
07990: } else if (xMOItem != null
07991: && xMOItem.equals("") == false) {
07992: Object l_ex = KeRegisteredObject
07993: .pcmf_getObjByName(xMOItem);
07994: if (l_ex instanceof IUnGuiEventListener)
07995: l_gobj = new UnMenuFunction(xString,
07996: (IUnGuiEventListener) l_ex);
07997: else
07998: l_gobj = new UnMenuFunction(xString,
07999: (IKeExecutable) l_ex);
08000: } else
08001: l_gobj = new UnMenuFunction(xValue,
08002: (IKeExecutable) null);
08003:
08004: String xReg = KeTools.pcmf_deRef(attributes
08005: .getValue("register"));
08006: if (xReg != null && xReg.equals("") == false)
08007: l_gobj.pcmf_reRegister(xReg);
08008:
08009: String xOrphan = KeTools.pcmf_deRef(attributes
08010: .getValue("orphan"));
08011: if (xOrphan == null || xOrphan.equals("false"))
08012: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xValue,
08013: l_gobj);
08014:
08015: l_gobj.pcmf_setValue(xString);
08016:
08017: try {
08018: if (l_cb != null)
08019: xString = xValue = l_cb.pcmf_getString(l_id++);
08020: } catch (Exception e) {
08021: l_cb = null;
08022: }
08023: ;
08024: } while (l_cb != null);
08025:
08026: l_hdl.pcmf_doExecStack(l_gobj, l_gobj, xValue);
08027: l_ret = l_gobj;
08028: }
08029: ;
08030:
08031: return (l_ret);
08032: };
08033: };
08034:
08035: final class UnXMLTAGref implements IUnSAXAppFactHandler {
08036: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
08037: String qName, Attributes attributes) throws Exception {
08038: String xOName = KeTools.pcmf_deRef(attributes
08039: .getValue("object"));
08040: String xRef = KeTools.pcmf_deRef(attributes.getValue("ref"));
08041: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
08042: String xOrphan = KeTools.pcmf_deRef(attributes
08043: .getValue("orphan"));
08044:
08045: UnComponent l_obj = null;
08046:
08047: if (xOName != null && xOName.equals("") == false)
08048: l_obj = (UnComponent) KeRegisteredObject
08049: .pcmf_getObjByName(xOName);
08050: else
08051: l_obj = (UnComponent) l_hdl.pdm_appl.pcmf_getUnComponent()
08052: .pcmf_getByPath(xRef);
08053:
08054: if (l_obj != null) {
08055: if (l_obj instanceof AHoSrvGenericComponent)
08056: l_obj = ((AHoSrvGenericComponent) l_obj)
08057: .pcmf_buildRefObj();
08058:
08059: String xReg = KeTools.pcmf_deRef(attributes
08060: .getValue("register"));
08061: if (xReg != null && xReg.equals("") == false)
08062: l_obj.pcmf_reRegister(xReg);
08063:
08064: if (xOrphan == null || xOrphan.equals("false"))
08065: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_obj);
08066: else
08067: l_obj.pcmf_setGlobal(true);
08068:
08069: l_hdl.pcmf_doExecStack(l_obj, l_obj, xName);
08070:
08071: return (l_obj);
08072: } else {
08073: l_hdl.pdm_elements.push(l_hdl.pdm_act);
08074: l_hdl.pdm_names.push(l_hdl.pdm_name);
08075:
08076: KeLog.pcmf_log("ug2t", "<objRef> no valid path: " + xRef,
08077: this , KeLog.ERROR);
08078: return (l_hdl.pdm_appl);
08079: }
08080: };
08081: };
08082:
08083: final class UnXMLTAGrefObj implements IUnSAXAppFactHandler {
08084: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
08085: String qName, Attributes attributes) throws Exception {
08086: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
08087: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
08088:
08089: UnComponent l_obj = (UnComponent) KeRegisteredObject
08090: .pcmf_getObjByName(xObj);
08091:
08092: if (l_obj != null) {
08093: if (l_obj.pcmf_getParentNode() != null
08094: && l_obj instanceof AHoSrvGenericComponent)
08095: l_obj = ((AHoSrvGenericComponent) l_obj)
08096: .pcmf_buildRefObj();
08097:
08098: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName == null
08099: || xName.trim().equals("") ? l_obj.pcmf_getName()
08100: : xName, l_obj);
08101: l_hdl.pcmf_doExecStack(l_obj, l_obj, l_obj.pcmf_getName());
08102:
08103: return (l_obj);
08104: } else {
08105: l_hdl.pdm_elements.push(l_hdl.pdm_act);
08106: l_hdl.pdm_names.push(l_hdl.pdm_name);
08107:
08108: KeLog.pcmf_log("ug2t",
08109: "<refObj> no valid object in repository: " + xObj,
08110: this , KeLog.ERROR);
08111: return (l_hdl.pdm_appl);
08112: }
08113: };
08114: };
08115:
08116: final class UnXMLTAGeditor implements IUnSAXAppFactHandler {
08117: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
08118: String qName, Attributes attributes) throws Exception {
08119: // Attribute auslesen
08120: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
08121: String xValue = KeTools
08122: .pcmf_deRef(attributes.getValue("value"));
08123: String xSubm = KeTools
08124: .pcmf_deRef(attributes.getValue("submit"));
08125: String xMime = KeTools.pcmf_deRef(attributes.getValue("mime"));
08126: String xDiab = KeTools.pcmf_deRef(attributes
08127: .getValue("disable"));
08128: String xOrphan = KeTools.pcmf_deRef(attributes
08129: .getValue("orphan"));
08130: String xValid = KeTools
08131: .pcmf_deRef(attributes.getValue("valid"));
08132:
08133: String xFBlock = KeTools.pcmf_deRef(attributes
08134: .getValue("factoryDesc"));
08135: if (xFBlock != null && xFBlock.trim().equals(""))
08136: xFBlock = null;
08137:
08138: // Element erzeugen und in Parent einfügen
08139: IUnTextArea l_if = l_hdl.pdm_objFact.pcmf_createEditorPlugin(
08140: l_hdl.pdm_AppType, xName, xValue, xMime,
08141: l_hdl.pdm_appl, xFBlock);
08142: if (xOrphan == null || xOrphan.equals("false"))
08143: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
08144: .pcmf_getUnComponent());
08145: else
08146: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
08147: // Submit setzen
08148: if (xSubm != null && xSubm.equals("true"))
08149: l_if.pcmf_getUnComponent().pcmf_enableSubmit();
08150: // Disable Setzen setzen
08151: if (xDiab != null && xDiab.equals("true"))
08152: l_if.pcmf_getUnComponent().pcmf_disable();
08153:
08154: if (xValid != null && xValid.equals("") == false)
08155: l_if.pcmf_setInputFilter(xValid);
08156:
08157: String xReg = KeTools.pcmf_deRef(attributes
08158: .getValue("register"));
08159: if (xReg != null && xReg.equals("") == false)
08160: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
08161:
08162: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
08163:
08164: return (l_if);
08165: };
08166: };
08167:
08168: final class UnXMLTAGprogressBar implements IUnSAXAppFactHandler {
08169: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
08170: String qName, Attributes attributes) throws Exception {
08171: // Attribute auslesen
08172: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
08173: String xValue = KeTools
08174: .pcmf_deRef(attributes.getValue("value"));
08175: String xOrphan = KeTools.pcmf_deRef(attributes
08176: .getValue("orphan"));
08177: String xMin = KeTools.pcmf_deRef(attributes.getValue("min"));
08178: String xMax = KeTools.pcmf_deRef(attributes.getValue("max"));
08179: String xProgress = KeTools.pcmf_deRef(attributes
08180: .getValue("progress"));
08181:
08182: String xFBlock = KeTools.pcmf_deRef(attributes
08183: .getValue("factoryDesc"));
08184: if (xFBlock != null && xFBlock.trim().equals(""))
08185: xFBlock = null;
08186: int l_min = 0;
08187: int l_max = 100;
08188: int l_progress = 0;
08189:
08190: if (xMin != null)
08191: l_min = Integer.parseInt(xMin);
08192: if (xMax != null)
08193: l_max = Integer.parseInt(xMax);
08194: if (xProgress != null)
08195: l_progress = Integer.parseInt(xProgress);
08196:
08197: if (xValue == null)
08198: xValue = Integer.toString(l_progress);
08199:
08200: // Element erzeugen und in Parent einfügen
08201: IUnProgressBar l_if = l_hdl.pdm_objFact
08202: .pcmf_createProgressBarPlugin(l_hdl.pdm_AppType, xName,
08203: xValue, l_min, l_max, l_hdl.pdm_appl, xFBlock);
08204: if (xOrphan == null || xOrphan.equals("false"))
08205: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
08206: .pcmf_getUnComponent());
08207: else
08208: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
08209: // Submit setzen
08210:
08211: l_if.pcmf_setProgress(l_progress);
08212:
08213: String xReg = KeTools.pcmf_deRef(attributes
08214: .getValue("register"));
08215: if (xReg != null && xReg.equals("") == false)
08216: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
08217:
08218: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
08219:
08220: return (l_if);
08221: };
08222: };
08223:
08224: final class UnXMLTAGHBox implements IUnSAXAppFactHandler {
08225: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
08226: String qName, Attributes attributes) throws Exception {
08227: // Attribute auslesen
08228: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
08229: String xOrphan = KeTools.pcmf_deRef(attributes
08230: .getValue("orphan"));
08231:
08232: String xBorderL = KeTools.pcmf_deRef(attributes
08233: .getValue("borderLeft"));
08234: String xBorderR = KeTools.pcmf_deRef(attributes
08235: .getValue("borderRight"));
08236: String xBorderT = KeTools.pcmf_deRef(attributes
08237: .getValue("borderTop"));
08238: String xBorderB = KeTools.pcmf_deRef(attributes
08239: .getValue("borderBottom"));
08240: String xAlign = KeTools
08241: .pcmf_deRef(attributes.getValue("align"));
08242: String xGap = KeTools.pcmf_deRef(attributes.getValue("gap"));
08243: String xMargin = KeTools.pcmf_deRef(attributes
08244: .getValue("margin"));
08245: String xPadding = KeTools.pcmf_deRef(attributes
08246: .getValue("padding"));
08247: String xType = KeTools.pcmf_deRef(attributes.getValue("type"));
08248: // String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
08249:
08250: String xFBlock = KeTools.pcmf_deRef(attributes
08251: .getValue("factoryDesc"));
08252: if (xFBlock != null && xFBlock.trim().equals(""))
08253: xFBlock = null;
08254:
08255: // Element erzeugen und in Parent einfügen
08256: IUnBox l_if = l_hdl.pdm_objFact.pcmf_createBoxPlugin(
08257: l_hdl.pdm_AppType, xName, IUnBox.HBOX, l_hdl.pdm_appl,
08258: xFBlock);
08259: if (xOrphan == null || xOrphan.equals("false"))
08260: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
08261: .pcmf_getUnComponent());
08262: else
08263: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
08264:
08265: if (xType != null && xType.equalsIgnoreCase("SIMPLE"))
08266: l_if.pcmf_setBoxType(IUnBox.SIMPLE);
08267: else if (xType != null && xType.equalsIgnoreCase("SINGLE"))
08268: l_if.pcmf_setBoxType(IUnBox.SINGLE);
08269:
08270: String xReg = KeTools.pcmf_deRef(attributes
08271: .getValue("register"));
08272: if (xReg != null && xReg.equals("") == false)
08273: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
08274:
08275: if (xBorderL != null)
08276: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.LEFT,
08277: xBorderL);
08278: if (xBorderR != null)
08279: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.RIGHT,
08280: xBorderR);
08281: if (xBorderT != null)
08282: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.TOP,
08283: xBorderT);
08284: if (xBorderB != null)
08285: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.BOTTOM,
08286: xBorderB);
08287: if (xAlign != null)
08288: l_if.pcmf_setBoxAlign(xAlign);
08289: if (xGap != null)
08290: l_if.pcmf_setGap(Integer.parseInt(xGap));
08291: if (xMargin != null)
08292: IUnBox.BoxHelper.pcmf_setBoxMargin(l_if, xMargin);
08293: if (xPadding != null)
08294: IUnBox.BoxHelper.pcmf_setBoxPadding(l_if, xPadding);
08295:
08296: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
08297:
08298: return (l_if);
08299: };
08300: };
08301:
08302: final class UnXMLTAGVBox implements IUnSAXAppFactHandler {
08303: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
08304: String qName, Attributes attributes) throws Exception {
08305: // Attribute auslesen
08306: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
08307: String xOrphan = KeTools.pcmf_deRef(attributes
08308: .getValue("orphan"));
08309:
08310: String xBorderL = KeTools.pcmf_deRef(attributes
08311: .getValue("borderLeft"));
08312: String xBorderR = KeTools.pcmf_deRef(attributes
08313: .getValue("borderRight"));
08314: String xBorderT = KeTools.pcmf_deRef(attributes
08315: .getValue("borderTop"));
08316: String xBorderB = KeTools.pcmf_deRef(attributes
08317: .getValue("borderBottom"));
08318: String xAlign = KeTools
08319: .pcmf_deRef(attributes.getValue("align"));
08320: String xGap = KeTools.pcmf_deRef(attributes.getValue("gap"));
08321: String xMargin = KeTools.pcmf_deRef(attributes
08322: .getValue("margin"));
08323: String xPadding = KeTools.pcmf_deRef(attributes
08324: .getValue("padding"));
08325: String xType = KeTools.pcmf_deRef(attributes.getValue("type"));
08326: // String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
08327:
08328: String xFBlock = KeTools.pcmf_deRef(attributes
08329: .getValue("factoryDesc"));
08330: if (xFBlock != null && xFBlock.trim().equals(""))
08331: xFBlock = null;
08332:
08333: // Element erzeugen und in Parent einfügen
08334: IUnBox l_if = l_hdl.pdm_objFact.pcmf_createBoxPlugin(
08335: l_hdl.pdm_AppType, xName, IUnBox.VBOX, l_hdl.pdm_appl,
08336: xFBlock);
08337: if (xOrphan == null || xOrphan.equals("false"))
08338: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
08339: .pcmf_getUnComponent());
08340: else
08341: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
08342:
08343: if (xType != null && xType.equalsIgnoreCase("SIMPLE"))
08344: l_if.pcmf_setBoxType(IUnBox.SIMPLE);
08345: else if (xType != null && xType.equalsIgnoreCase("SINGLE"))
08346: l_if.pcmf_setBoxType(IUnBox.SINGLE);
08347:
08348: String xReg = KeTools.pcmf_deRef(attributes
08349: .getValue("register"));
08350: if (xReg != null && xReg.equals("") == false)
08351: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
08352:
08353: if (xBorderL != null)
08354: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.LEFT,
08355: xBorderL);
08356: if (xBorderR != null)
08357: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.RIGHT,
08358: xBorderR);
08359: if (xBorderT != null)
08360: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.TOP,
08361: xBorderT);
08362: if (xBorderB != null)
08363: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.BOTTOM,
08364: xBorderB);
08365: if (xAlign != null)
08366: l_if.pcmf_setBoxAlign(xAlign);
08367: if (xGap != null)
08368: l_if.pcmf_setGap(Integer.parseInt(xGap));
08369: if (xMargin != null)
08370: IUnBox.BoxHelper.pcmf_setBoxMargin(l_if, xMargin);
08371: if (xPadding != null)
08372: IUnBox.BoxHelper.pcmf_setBoxPadding(l_if, xPadding);
08373:
08374: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
08375:
08376: return (l_if);
08377: };
08378: };
08379:
08380: final class UnXMLTAGBox implements IUnSAXAppFactHandler {
08381: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
08382: String qName, Attributes attributes) throws Exception {
08383: // Attribute auslesen
08384: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
08385: String xOrphan = KeTools.pcmf_deRef(attributes
08386: .getValue("orphan"));
08387:
08388: String xBorderL = KeTools.pcmf_deRef(attributes
08389: .getValue("borderLeft"));
08390: String xBorderR = KeTools.pcmf_deRef(attributes
08391: .getValue("borderRight"));
08392: String xBorderT = KeTools.pcmf_deRef(attributes
08393: .getValue("borderTop"));
08394: String xBorderB = KeTools.pcmf_deRef(attributes
08395: .getValue("borderBottom"));
08396: String xAlign = KeTools
08397: .pcmf_deRef(attributes.getValue("align"));
08398: String xMargin = KeTools.pcmf_deRef(attributes
08399: .getValue("margin"));
08400: String xPadding = KeTools.pcmf_deRef(attributes
08401: .getValue("padding"));
08402: // String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
08403:
08404: String xFBlock = KeTools.pcmf_deRef(attributes
08405: .getValue("factoryDesc"));
08406: if (xFBlock != null && xFBlock.trim().equals(""))
08407: xFBlock = null;
08408:
08409: // Element erzeugen und in Parent einfügen
08410: IUnBox l_if = l_hdl.pdm_objFact.pcmf_createBoxPlugin(
08411: l_hdl.pdm_AppType, xName, IUnBox.HBOX, l_hdl.pdm_appl,
08412: xFBlock);
08413: if (xOrphan == null || xOrphan.equals("false"))
08414: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
08415: .pcmf_getUnComponent());
08416: else
08417: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
08418:
08419: l_if.pcmf_setBoxType(IUnBox.SINGLE);
08420:
08421: String xReg = KeTools.pcmf_deRef(attributes
08422: .getValue("register"));
08423: if (xReg != null && xReg.equals("") == false)
08424: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
08425:
08426: if (xBorderL != null)
08427: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.LEFT,
08428: xBorderL);
08429: if (xBorderR != null)
08430: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.RIGHT,
08431: xBorderR);
08432: if (xBorderT != null)
08433: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.TOP,
08434: xBorderT);
08435: if (xBorderB != null)
08436: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.BOTTOM,
08437: xBorderB);
08438: if (xAlign != null)
08439: l_if.pcmf_setBoxAlign(xAlign);
08440: if (xMargin != null)
08441: IUnBox.BoxHelper.pcmf_setBoxMargin(l_if, xMargin);
08442: if (xPadding != null)
08443: IUnBox.BoxHelper.pcmf_setBoxPadding(l_if, xPadding);
08444:
08445: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
08446:
08447: return (l_if);
08448: };
08449: };
08450:
08451: final class UnXMLTAGhtmlHBox implements IUnSAXAppFactHandler {
08452: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
08453: String qName, Attributes attributes) throws Exception {
08454: // Attribute auslesen
08455: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
08456: String xOrphan = KeTools.pcmf_deRef(attributes
08457: .getValue("orphan"));
08458:
08459: String xBorderL = KeTools.pcmf_deRef(attributes
08460: .getValue("borderLeft"));
08461: String xBorderR = KeTools.pcmf_deRef(attributes
08462: .getValue("borderRight"));
08463: String xBorderT = KeTools.pcmf_deRef(attributes
08464: .getValue("borderTop"));
08465: String xBorderB = KeTools.pcmf_deRef(attributes
08466: .getValue("borderBottom"));
08467: String xAlign = KeTools
08468: .pcmf_deRef(attributes.getValue("align"));
08469: String xGap = KeTools.pcmf_deRef(attributes.getValue("gap"));
08470: String xMargin = KeTools.pcmf_deRef(attributes
08471: .getValue("margin"));
08472: String xPadding = KeTools.pcmf_deRef(attributes
08473: .getValue("padding"));
08474: String xType = KeTools.pcmf_deRef(attributes.getValue("type"));
08475: // String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
08476:
08477: String xFBlock = KeTools.pcmf_deRef(attributes
08478: .getValue("factoryDesc"));
08479: if (xFBlock != null && xFBlock.trim().equals(""))
08480: xFBlock = null;
08481:
08482: // Element erzeugen und in Parent einfügen
08483: IUnBox l_if = l_hdl.pdm_objFact.pcmf_createBoxPlugin(
08484: l_hdl.pdm_AppType, xName, IUnBox.HBOX, l_hdl.pdm_appl,
08485: xFBlock);
08486: if (xOrphan == null || xOrphan.equals("false"))
08487: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
08488: .pcmf_getUnComponent());
08489: else
08490: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
08491:
08492: if (xType != null && xType.equalsIgnoreCase("SIMPLE"))
08493: l_if.pcmf_setBoxType(IUnBox.SIMPLE);
08494: else if (xType != null && xType.equalsIgnoreCase("SINGLE"))
08495: l_if.pcmf_setBoxType(IUnBox.SINGLE);
08496:
08497: String xReg = KeTools.pcmf_deRef(attributes
08498: .getValue("register"));
08499: if (xReg != null && xReg.equals("") == false)
08500: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
08501:
08502: if (xBorderL != null)
08503: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.LEFT,
08504: xBorderL);
08505: if (xBorderR != null)
08506: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.RIGHT,
08507: xBorderR);
08508: if (xBorderT != null)
08509: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.TOP,
08510: xBorderT);
08511: if (xBorderB != null)
08512: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.BOTTOM,
08513: xBorderB);
08514: if (xAlign != null)
08515: l_if.pcmf_setBoxAlign(xAlign);
08516: if (xGap != null)
08517: l_if.pcmf_setGap(Integer.parseInt(xGap));
08518: if (xMargin != null)
08519: IUnBox.BoxHelper.pcmf_setBoxMargin(l_if, xMargin);
08520: if (xPadding != null)
08521: IUnBox.BoxHelper.pcmf_setBoxPadding(l_if, xPadding);
08522:
08523: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
08524:
08525: // Html file parsen - nur wenn kein cached run
08526:
08527: // @@
08528:
08529: l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
08530: l_hdl.endElement("", "htmlGui", "htmlGui");
08531:
08532: // @@
08533:
08534: return (l_if);
08535: };
08536: };
08537:
08538: final class UnXMLTAGhtmlVBox implements IUnSAXAppFactHandler {
08539: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
08540: String qName, Attributes attributes) throws Exception {
08541: // Attribute auslesen
08542: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
08543: String xOrphan = KeTools.pcmf_deRef(attributes
08544: .getValue("orphan"));
08545:
08546: String xBorderL = KeTools.pcmf_deRef(attributes
08547: .getValue("borderLeft"));
08548: String xBorderR = KeTools.pcmf_deRef(attributes
08549: .getValue("borderRight"));
08550: String xBorderT = KeTools.pcmf_deRef(attributes
08551: .getValue("borderTop"));
08552: String xBorderB = KeTools.pcmf_deRef(attributes
08553: .getValue("borderBottom"));
08554: String xAlign = KeTools
08555: .pcmf_deRef(attributes.getValue("align"));
08556: String xGap = KeTools.pcmf_deRef(attributes.getValue("gap"));
08557: String xMargin = KeTools.pcmf_deRef(attributes
08558: .getValue("margin"));
08559: String xPadding = KeTools.pcmf_deRef(attributes
08560: .getValue("padding"));
08561: String xType = KeTools.pcmf_deRef(attributes.getValue("type"));
08562: // String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
08563:
08564: String xFBlock = KeTools.pcmf_deRef(attributes
08565: .getValue("factoryDesc"));
08566: if (xFBlock != null && xFBlock.trim().equals(""))
08567: xFBlock = null;
08568:
08569: // Element erzeugen und in Parent einfügen
08570: IUnBox l_if = l_hdl.pdm_objFact.pcmf_createBoxPlugin(
08571: l_hdl.pdm_AppType, xName, IUnBox.VBOX, l_hdl.pdm_appl,
08572: xFBlock);
08573: if (xOrphan == null || xOrphan.equals("false"))
08574: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
08575: .pcmf_getUnComponent());
08576: else
08577: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
08578:
08579: if (xType != null && xType.equalsIgnoreCase("SIMPLE"))
08580: l_if.pcmf_setBoxType(IUnBox.SIMPLE);
08581: else if (xType != null && xType.equalsIgnoreCase("SINGLE"))
08582: l_if.pcmf_setBoxType(IUnBox.SINGLE);
08583:
08584: String xReg = KeTools.pcmf_deRef(attributes
08585: .getValue("register"));
08586: if (xReg != null && xReg.equals("") == false)
08587: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
08588:
08589: if (xBorderL != null)
08590: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.LEFT,
08591: xBorderL);
08592: if (xBorderR != null)
08593: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.RIGHT,
08594: xBorderR);
08595: if (xBorderT != null)
08596: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.TOP,
08597: xBorderT);
08598: if (xBorderB != null)
08599: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.BOTTOM,
08600: xBorderB);
08601: if (xAlign != null)
08602: l_if.pcmf_setBoxAlign(xAlign);
08603: if (xGap != null)
08604: l_if.pcmf_setGap(Integer.parseInt(xGap));
08605: if (xMargin != null)
08606: IUnBox.BoxHelper.pcmf_setBoxMargin(l_if, xMargin);
08607: if (xPadding != null)
08608: IUnBox.BoxHelper.pcmf_setBoxPadding(l_if, xPadding);
08609:
08610: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
08611:
08612: // Html file parsen - nur wenn kein cached run
08613:
08614: // @@
08615:
08616: l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
08617: l_hdl.endElement("", "htmlGui", "htmlGui");
08618:
08619: // @@
08620:
08621: return (l_if);
08622: };
08623: };
08624:
08625: final class UnXMLTAGhtmlBox implements IUnSAXAppFactHandler {
08626: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
08627: String qName, Attributes attributes) throws Exception {
08628: // Attribute auslesen
08629: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
08630: String xOrphan = KeTools.pcmf_deRef(attributes
08631: .getValue("orphan"));
08632:
08633: String xBorderL = KeTools.pcmf_deRef(attributes
08634: .getValue("borderLeft"));
08635: String xBorderR = KeTools.pcmf_deRef(attributes
08636: .getValue("borderRight"));
08637: String xBorderT = KeTools.pcmf_deRef(attributes
08638: .getValue("borderTop"));
08639: String xBorderB = KeTools.pcmf_deRef(attributes
08640: .getValue("borderBottom"));
08641: String xAlign = KeTools
08642: .pcmf_deRef(attributes.getValue("align"));
08643: String xMargin = KeTools.pcmf_deRef(attributes
08644: .getValue("margin"));
08645: String xPadding = KeTools.pcmf_deRef(attributes
08646: .getValue("padding"));
08647: // String xHtmlFile = KeTools.pcmf_deRef(attributes.getValue("htmlTpl"));
08648:
08649: String xFBlock = KeTools.pcmf_deRef(attributes
08650: .getValue("factoryDesc"));
08651: if (xFBlock != null && xFBlock.trim().equals(""))
08652: xFBlock = null;
08653:
08654: // Element erzeugen und in Parent einfügen
08655: IUnBox l_if = l_hdl.pdm_objFact.pcmf_createBoxPlugin(
08656: l_hdl.pdm_AppType, xName, IUnBox.HBOX, l_hdl.pdm_appl,
08657: xFBlock);
08658: if (xOrphan == null || xOrphan.equals("false"))
08659: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
08660: .pcmf_getUnComponent());
08661: else
08662: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
08663:
08664: l_if.pcmf_setBoxType(IUnBox.SINGLE);
08665:
08666: String xReg = KeTools.pcmf_deRef(attributes
08667: .getValue("register"));
08668: if (xReg != null && xReg.equals("") == false)
08669: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
08670:
08671: if (xBorderL != null)
08672: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.LEFT,
08673: xBorderL);
08674: if (xBorderR != null)
08675: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.RIGHT,
08676: xBorderR);
08677: if (xBorderT != null)
08678: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.TOP,
08679: xBorderT);
08680: if (xBorderB != null)
08681: IUnBox.BoxHelper.pcmf_setBorderStyle(l_if, IUnBox.BOTTOM,
08682: xBorderB);
08683: if (xAlign != null)
08684: l_if.pcmf_setBoxAlign(xAlign);
08685: if (xMargin != null)
08686: IUnBox.BoxHelper.pcmf_setBoxMargin(l_if, xMargin);
08687: if (xPadding != null)
08688: IUnBox.BoxHelper.pcmf_setBoxPadding(l_if, xPadding);
08689:
08690: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
08691:
08692: // Html file parsen - nur wenn kein cached run
08693:
08694: // @@
08695:
08696: l_hdl.startElement("", "htmlGui", "htmlGui", attributes);
08697: l_hdl.endElement("", "htmlGui", "htmlGui");
08698:
08699: // @@
08700:
08701: return (l_if);
08702: };
08703: };
08704:
08705: final class UnXMLTAGFlex implements IUnSAXAppFactHandler {
08706: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
08707: String qName, Attributes attributes) throws Exception {
08708: String xF = KeTools.pcmf_deRef(attributes.getValue("flex"));
08709:
08710: if (l_hdl.pdm_act instanceof UnComponent
08711: && l_hdl.pdm_act.pcmf_getParentNode() instanceof IUnBox) {
08712: int ftype = IUnBox.BOX_CONSTRAINT_NONE;
08713:
08714: if (xF != null) {
08715: if (xF.equalsIgnoreCase("FX"))
08716: ftype = IUnBox.BOX_CONSTRAINT_FLEXFILLX;
08717: else if (xF.equalsIgnoreCase("FY"))
08718: ftype = IUnBox.BOX_CONSTRAINT_FLEXFILLY;
08719: else if (xF.equalsIgnoreCase("FXY"))
08720: ftype = IUnBox.BOX_CONSTRAINT_FLEXFILLXY;
08721: else if (xF.equalsIgnoreCase("F"))
08722: ftype = IUnBox.BOX_CONSTRAINT_FLEX;
08723: }
08724:
08725: ((IUnBox) l_hdl.pdm_act.pcmf_getParentNode())
08726: .pcmf_setContraint((UnComponent) l_hdl.pdm_act,
08727: ftype);
08728: } else
08729: KeLog.pcmf_log("ug2t",
08730: "<flex> cannot set flex here current object is no box: class ["
08731: + l_hdl.pdm_act.getClass() + "]"
08732: + ", name [" + l_hdl.pdm_name + "]", this ,
08733: KeLog.ERROR);
08734:
08735: l_hdl.pdm_elements.push(l_hdl.pdm_act);
08736: l_hdl.pdm_names.push(l_hdl.pdm_name);
08737:
08738: return (l_hdl.pdm_act);
08739: };
08740: };
08741:
08742: final class UnXMLTAGtextBox implements IUnSAXAppFactHandler {
08743: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
08744: String qName, Attributes attributes) throws Exception {
08745: // Attribute auslesen
08746: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
08747: String xValue = KeTools
08748: .pcmf_deRef(attributes.getValue("value"));
08749: String xCols = KeTools.pcmf_deRef(attributes.getValue("cols"));
08750: String xRows = KeTools.pcmf_deRef(attributes.getValue("rows"));
08751: String xSubm = KeTools
08752: .pcmf_deRef(attributes.getValue("submit"));
08753: String xDiab = KeTools.pcmf_deRef(attributes
08754: .getValue("disable"));
08755: String xOrphan = KeTools.pcmf_deRef(attributes
08756: .getValue("orphan"));
08757: String xValid = KeTools
08758: .pcmf_deRef(attributes.getValue("valid"));
08759: String xDefault = KeTools.pcmf_deRef(attributes
08760: .getValue("default"));
08761:
08762: String xFBlock = KeTools.pcmf_deRef(attributes
08763: .getValue("factoryDesc"));
08764: if (xFBlock != null && xFBlock.trim().equals(""))
08765: xFBlock = null;
08766:
08767: // Element erzeugen und in Parent einfügen
08768: IUnTextArea l_if = l_hdl.pdm_objFact.pcmf_createTextBoxPlugin(
08769: l_hdl.pdm_AppType, xName, Integer.parseInt(xCols),
08770: Integer.parseInt(xRows), xValue, l_hdl.pdm_appl,
08771: xFBlock);
08772: if (xOrphan == null || xOrphan.equals("false"))
08773: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
08774: .pcmf_getUnComponent());
08775: else
08776: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
08777: // Submit setzen
08778: if (xSubm != null && xSubm.equals("true"))
08779: l_if.pcmf_getUnComponent().pcmf_enableSubmit();
08780: // Disable Setzen setzen
08781: if (xDiab != null && xDiab.equals("true"))
08782: l_if.pcmf_getUnComponent().pcmf_disable();
08783:
08784: if (xValid != null && xValid.equals("") == false)
08785: l_if.pcmf_setInputFilter(xValid);
08786:
08787: if (xDefault != null)
08788: l_if.pcmf_getUnComponent().pcmf_setDefaultValue(xDefault);
08789:
08790: String xReg = KeTools.pcmf_deRef(attributes
08791: .getValue("register"));
08792: if (xReg != null && xReg.equals("") == false)
08793: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
08794:
08795: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
08796:
08797: return (l_if);
08798: };
08799: };
08800:
08801: final class UnXMLTAGtable implements IUnSAXAppFactHandler {
08802: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
08803: String qName, Attributes attributes) throws Exception {
08804: IUnTable l_if = null;
08805:
08806: // Attribute auslesen
08807: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
08808: String xRows = KeTools.pcmf_deRef(attributes.getValue("rows"));
08809: String xSubm = KeTools
08810: .pcmf_deRef(attributes.getValue("submit"));
08811: String xDiab = KeTools.pcmf_deRef(attributes
08812: .getValue("disable"));
08813: String xSel = KeTools.pcmf_deRef(attributes
08814: .getValue("selectable"));
08815: String xOrphan = KeTools.pcmf_deRef(attributes
08816: .getValue("orphan"));
08817: String xMulti = KeTools
08818: .pcmf_deRef(attributes.getValue("multi"));
08819: String xLock = KeTools.pcmf_deRef(attributes
08820: .getValue("lockColumn"));
08821:
08822: String xFBlock = KeTools.pcmf_deRef(attributes
08823: .getValue("factoryDesc"));
08824: if (xFBlock != null && xFBlock.trim().equals(""))
08825: xFBlock = null;
08826:
08827: boolean l_bxSel = false;
08828: if (xSel != null && xSel.equals("true"))
08829: l_bxSel = true;
08830:
08831: // Element erzeugen und in Parent einfügen
08832: if (xRows == null || xRows.equals(""))
08833: l_if = l_hdl.pdm_objFact.pcmf_createTablePlugin(
08834: l_hdl.pdm_AppType, xName, null, l_bxSel,
08835: l_hdl.pdm_appl, xFBlock);
08836: else {
08837: Collection l_rows = (Collection) KeRegisteredObject
08838: .pcmf_getObjByName(xRows);
08839: l_if = l_hdl.pdm_objFact.pcmf_createTablePlugin(
08840: l_hdl.pdm_AppType, xName, l_rows, l_bxSel,
08841: l_hdl.pdm_appl, xFBlock);
08842: }
08843: ;
08844:
08845: if (xOrphan == null || xOrphan.equals("false"))
08846: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
08847: .pcmf_getUnComponent());
08848: else
08849: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
08850: // Submit setzen
08851: if (xSubm != null && xSubm.equals("true"))
08852: l_if.pcmf_getUnComponent().pcmf_enableSubmit();
08853: // Disable Setzen setzen
08854: if (xDiab != null && xDiab.equals("true"))
08855: l_if.pcmf_getUnComponent().pcmf_disable();
08856:
08857: if (xLock != null && xLock.equals("") == false)
08858: l_if.pcmf_lockColumn(Integer.parseInt(xLock), true);
08859:
08860: String xReg = KeTools.pcmf_deRef(attributes
08861: .getValue("register"));
08862: if (xReg != null && xReg.equals("") == false)
08863: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
08864:
08865: if (l_if instanceof IUnMultiSelectComponent && xMulti != null
08866: && xMulti.equals("true"))
08867: ((IUnMultiSelectComponent) l_if)
08868: .pcmf_setMultiSelection(true);
08869:
08870: if (l_if instanceof MuGenericTable
08871: && l_hdl.pdm_appl instanceof MuGenericApplication)
08872: ((MuGenericTable) l_if)
08873: .pcmf_setPartialRenderLineLimit(((MuGenericApplication) l_hdl.pdm_appl)
08874: .pcmf_getPartialRenderLineLimit());
08875:
08876: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
08877:
08878: return (l_if);
08879: };
08880: };
08881:
08882: final class UnXMLTAGtreeView implements IUnSAXAppFactHandler {
08883: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
08884: String qName, Attributes attributes) throws Exception {
08885: IUnTreeView l_if = null;
08886:
08887: // Attribute auslesen
08888: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
08889: String xRoot = KeTools.pcmf_deRef(attributes.getValue("root"));
08890: String xSubm = KeTools
08891: .pcmf_deRef(attributes.getValue("submit"));
08892: String xDiab = KeTools.pcmf_deRef(attributes
08893: .getValue("disable"));
08894: String xOrphan = KeTools.pcmf_deRef(attributes
08895: .getValue("orphan"));
08896: String xMulti = KeTools
08897: .pcmf_deRef(attributes.getValue("multi"));
08898: String xEdit = KeTools.pcmf_deRef(attributes.getValue("edit"));
08899:
08900: String xFBlock = KeTools.pcmf_deRef(attributes
08901: .getValue("factoryDesc"));
08902: if (xFBlock != null && xFBlock.trim().equals(""))
08903: xFBlock = null;
08904:
08905: // Element erzeugen und in Parent einfügen
08906: if (xRoot == null || xRoot.equals(""))
08907: l_if = l_hdl.pdm_objFact.pcmf_createTreeViewPlugin(
08908: l_hdl.pdm_AppType, xName, null, l_hdl.pdm_appl,
08909: xFBlock);
08910: else
08911: l_if = l_hdl.pdm_objFact.pcmf_createTreeViewPlugin(
08912: l_hdl.pdm_AppType, xName,
08913: (KeTreeNode) KeRegisteredObject
08914: .pcmf_getObjByName(xRoot), l_hdl.pdm_appl,
08915: xFBlock);
08916:
08917: if (xOrphan == null || xOrphan.equals("false"))
08918: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
08919: .pcmf_getUnComponent());
08920: else
08921: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
08922: // Submit setzen
08923: if (xSubm != null && xSubm.equals("false"))
08924: l_if.pcmf_getUnComponent().pcmf_disableSubmit();
08925: // Disable Setzen setzen
08926: if (xDiab != null && xDiab.equals("true"))
08927: l_if.pcmf_getUnComponent().pcmf_disable();
08928:
08929: String xReg = KeTools.pcmf_deRef(attributes
08930: .getValue("register"));
08931: if (xReg != null && xReg.equals("") == false)
08932: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
08933:
08934: if (l_if instanceof IUnMultiSelectComponent && xMulti != null
08935: && xMulti.equals("true"))
08936: ((IUnMultiSelectComponent) l_if)
08937: .pcmf_setMultiSelection(true);
08938:
08939: if (xEdit != null && xEdit.equals("false"))
08940: l_if.pcmf_setEditable(false);
08941:
08942: if (l_if instanceof MuGenericTreeView
08943: && l_hdl.pdm_appl instanceof MuGenericApplication)
08944: ((MuGenericTreeView) l_if)
08945: .pcmf_setPartialRenderLineLimit(((MuGenericApplication) l_hdl.pdm_appl)
08946: .pcmf_getPartialRenderLineLimit());
08947:
08948: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
08949:
08950: return (l_if);
08951: };
08952: };
08953:
08954: final class UnXMLTAGmenu implements IUnSAXAppFactHandler {
08955: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
08956: String qName, Attributes attributes) throws Exception {
08957: IUnMenu l_if = null;
08958:
08959: // Attribute auslesen
08960: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
08961: String xRoot = KeTools.pcmf_deRef(attributes.getValue("root"));
08962: String xSubm = KeTools
08963: .pcmf_deRef(attributes.getValue("submit"));
08964: String xDiab = KeTools.pcmf_deRef(attributes
08965: .getValue("disable"));
08966: String xWidth = KeTools
08967: .pcmf_deRef(attributes.getValue("width"));
08968:
08969: String xFBlock = KeTools.pcmf_deRef(attributes
08970: .getValue("factoryDesc"));
08971: if (xFBlock != null && xFBlock.trim().equals(""))
08972: xFBlock = null;
08973:
08974: // Element erzeugen und in Parent einfügen
08975: if (xRoot == null)
08976: l_if = l_hdl.pdm_objFact.pcmf_createMenuPlugin(
08977: l_hdl.pdm_AppType, xName, null, l_hdl.pdm_appl,
08978: xFBlock);
08979: else
08980: l_if = l_hdl.pdm_objFact.pcmf_createMenuPlugin(
08981: l_hdl.pdm_AppType, xName,
08982: (KeTreeNode) KeRegisteredObject
08983: .pcmf_getObjByName(xRoot), l_hdl.pdm_appl,
08984: xFBlock);
08985:
08986: if (xWidth != null && xWidth.equals("") == false)
08987: l_if.pcmf_setMenuWidth(Integer.parseInt(xWidth));
08988:
08989: if (l_hdl.pdm_act == l_hdl.pdm_appl.pcmf_getUnComponent())
08990: l_hdl.pdm_appl.pcmf_setMainMenu(l_if);
08991:
08992: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
08993: .pcmf_getUnComponent());
08994: // Submit setzen
08995: if (xSubm != null && xSubm.equals("false"))
08996: l_if.pcmf_getUnComponent().pcmf_disableSubmit();
08997: // Disable Setzen setzen
08998: if (xDiab != null && xDiab.equals("true"))
08999: l_if.pcmf_getUnComponent().pcmf_disable();
09000:
09001: String xReg = KeTools.pcmf_deRef(attributes
09002: .getValue("register"));
09003: if (xReg != null && xReg.equals("") == false)
09004: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
09005:
09006: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
09007:
09008: return (l_if);
09009: };
09010: };
09011:
09012: final class UnXMLTAGctxMenu implements IUnSAXAppFactHandler {
09013: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09014: String qName, Attributes attributes) throws Exception {
09015: IUnMenu l_if = null;
09016:
09017: // Attribute auslesen
09018: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
09019: String xRoot = KeTools.pcmf_deRef(attributes.getValue("root"));
09020: String xSubm = KeTools
09021: .pcmf_deRef(attributes.getValue("submit"));
09022: String xDiab = KeTools.pcmf_deRef(attributes
09023: .getValue("disable"));
09024: String xOrphan = KeTools.pcmf_deRef(attributes
09025: .getValue("orphan"));
09026:
09027: String xFBlock = KeTools.pcmf_deRef(attributes
09028: .getValue("factoryDesc"));
09029: if (xFBlock != null && xFBlock.trim().equals(""))
09030: xFBlock = null;
09031:
09032: // Element erzeugen und in Parent einfügen
09033: if (xRoot == null)
09034: l_if = l_hdl.pdm_objFact.pcmf_createCtxMenuPlugin(
09035: l_hdl.pdm_AppType, xName, null, l_hdl.pdm_appl,
09036: xFBlock);
09037: else
09038: l_if = l_hdl.pdm_objFact.pcmf_createCtxMenuPlugin(
09039: l_hdl.pdm_AppType, xName,
09040: (KeTreeNode) KeRegisteredObject
09041: .pcmf_getObjByName(xRoot), l_hdl.pdm_appl,
09042: xFBlock);
09043:
09044: if (xOrphan == null || xOrphan.equals("false"))
09045: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_if
09046: .pcmf_getUnComponent());
09047: else
09048: l_if.pcmf_getUnComponent().pcmf_setGlobal(true);
09049:
09050: // Submit setzen
09051: if (xSubm != null && xSubm.equals("false"))
09052: l_if.pcmf_getUnComponent().pcmf_disableSubmit();
09053: // Disable Setzen setzen
09054: if (xDiab != null && xDiab.equals("true"))
09055: l_if.pcmf_getUnComponent().pcmf_disable();
09056:
09057: String xReg = KeTools.pcmf_deRef(attributes
09058: .getValue("register"));
09059: if (xReg != null && xReg.equals("") == false)
09060: l_if.pcmf_getUnComponent().pcmf_reRegister(xReg);
09061:
09062: l_hdl.pcmf_doExecStack(l_if, l_if.pcmf_getUnComponent(), xName);
09063:
09064: return (l_if);
09065: };
09066: };
09067:
09068: final class UnXMLTAGborder implements IUnSAXAppFactHandler {
09069: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09070: String qName, Attributes attributes) throws Exception {
09071: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
09072: String xOrphan = KeTools.pcmf_deRef(attributes
09073: .getValue("orphan"));
09074: String xNL = KeTools.pcmf_deRef(attributes.getValue("layout"));
09075: String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
09076:
09077: String xColor = KeTools.pcmf_deRef(attributes
09078: .getValue("boColor"));
09079: String xStyle = KeTools
09080: .pcmf_deRef(attributes.getValue("style"));
09081: String xWidth = KeTools
09082: .pcmf_deRef(attributes.getValue("width"));
09083:
09084: String xFBlock = KeTools.pcmf_deRef(attributes
09085: .getValue("factoryDesc"));
09086: if (xFBlock != null && xFBlock.trim().equals(""))
09087: xFBlock = null;
09088:
09089: IUnBorder l_border = null;
09090:
09091: if (xNL != null && xNL.equals("false"))
09092: l_border = l_hdl.pdm_objFact.pcmf_createBorderPlugin(
09093: l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl,
09094: xFBlock);
09095: else
09096: l_border = l_hdl.pdm_objFact.pcmf_createBorderPlugin(
09097: l_hdl.pdm_AppType, xName, false, l_hdl.pdm_appl,
09098: xFBlock);
09099:
09100: if (l_border instanceof IUnPanel) {
09101: if (xScr != null && xScr.equals("false"))
09102: ((IUnPanel) l_border).pcmf_setScroll(false);
09103: }
09104: ;
09105:
09106: if (xColor != null && xColor.equals("") == false)
09107: l_border.pcmf_setBoColor(xColor);
09108:
09109: if (xWidth != null && xWidth.equals("") == false)
09110: l_border.pcmf_setBorderLine(Integer.parseInt(xWidth));
09111:
09112: if (xStyle != null && xStyle.equalsIgnoreCase("INSETS"))
09113: l_border.pcmf_setBoStyle(IUnComponent.INSETS_BORDER);
09114: else if (xStyle != null && xStyle.equalsIgnoreCase("OUTSETS"))
09115: l_border.pcmf_setBoStyle(IUnComponent.OUTSETS_BORDER);
09116: else if (xStyle != null && xStyle.equalsIgnoreCase("LINE"))
09117: l_border.pcmf_setBoStyle(IUnComponent.LINE_BORDER);
09118: else if (xStyle != null && xStyle.equalsIgnoreCase("NONE"))
09119: l_border.pcmf_setBoStyle(IUnComponent.NO_BORDER);
09120:
09121: if (xOrphan == null || xOrphan.equals("false"))
09122: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_border
09123: .pcmf_getUnComponent());
09124: else
09125: l_border.pcmf_getUnComponent().pcmf_setGlobal(true);
09126:
09127: String xReg = KeTools.pcmf_deRef(attributes
09128: .getValue("register"));
09129: if (xReg != null && xReg.equals("") == false)
09130: l_border.pcmf_getUnComponent().pcmf_reRegister(xReg);
09131:
09132: l_hdl.pcmf_doExecStack(l_border,
09133: l_border.pcmf_getUnComponent(), xName);
09134:
09135: return (l_border);
09136: };
09137: };
09138:
09139: final class UnXMLTAGdialog implements IUnSAXAppFactHandler {
09140: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09141: String qName, Attributes attributes) throws Exception {
09142: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
09143: String xOrphan = KeTools.pcmf_deRef(attributes
09144: .getValue("orphan"));
09145: String xNL = KeTools.pcmf_deRef(attributes.getValue("layout"));
09146: String xRs = KeTools.pcmf_deRef(attributes
09147: .getValue("resizable"));
09148: String xDeco = KeTools.pcmf_deRef(attributes.getValue("deco"));
09149: String xActive = KeTools.pcmf_deRef(attributes
09150: .getValue("active"));
09151: String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
09152: String xSubm = KeTools
09153: .pcmf_deRef(attributes.getValue("submit"));
09154: String xGenRs = KeTools.pcmf_deRef(attributes
09155: .getValue("genReshapeEvents"));
09156: String xModal = KeTools
09157: .pcmf_deRef(attributes.getValue("modal"));
09158: String xParent = KeTools.pcmf_deRef(attributes
09159: .getValue("parent"));
09160:
09161: String xFBlock = KeTools.pcmf_deRef(attributes
09162: .getValue("factoryDesc"));
09163: if (xFBlock != null && xFBlock.trim().equals(""))
09164: xFBlock = null;
09165:
09166: IUnDialog l_dialog = null;
09167:
09168: if (xNL != null && xNL.equals("false"))
09169: l_dialog = l_hdl.pdm_objFact.pcmf_createDialogPlugin(
09170: l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl,
09171: xFBlock);
09172: else
09173: l_dialog = l_hdl.pdm_objFact.pcmf_createDialogPlugin(
09174: l_hdl.pdm_AppType, xName, false, l_hdl.pdm_appl,
09175: xFBlock);
09176:
09177: if (l_dialog instanceof IUnPanel) {
09178: if (xScr != null && xScr.equals("false"))
09179: ((IUnPanel) l_dialog).pcmf_setScroll(false);
09180: }
09181: ;
09182:
09183: if (xOrphan == null || xOrphan.equals("false")) {
09184: if (xParent != null && !xParent.equals(""))
09185: ((KeTreeNode) KeRegisteredObject
09186: .pcmf_getObjByName(xParent)).pcmf_addNode(
09187: xName, l_dialog.pcmf_getUnComponent());
09188: else
09189: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName,
09190: l_dialog.pcmf_getUnComponent());
09191: } else
09192: l_dialog.pcmf_getUnComponent().pcmf_setGlobal(true);
09193:
09194: String xReg = KeTools.pcmf_deRef(attributes
09195: .getValue("register"));
09196: if (xReg != null && xReg.equals("") == false)
09197: l_dialog.pcmf_getUnComponent().pcmf_reRegister(xReg);
09198:
09199: if (xRs != null && xRs.equals("false"))
09200: l_dialog.pcmf_setResizable(false);
09201:
09202: if (xDeco != null && xDeco.equals("false"))
09203: l_dialog.pcmf_setDecoration(false);
09204:
09205: if (xModal != null && xModal.equals("true"))
09206: l_dialog.pcmf_setModal(true);
09207:
09208: l_dialog.pcmf_getUnComponent().pcmf_enableSubmit();
09209: if (xSubm != null && xSubm.equals("false"))
09210: l_dialog.pcmf_getUnComponent().pcmf_disableSubmit();
09211:
09212: if (xGenRs != null && xGenRs.equals("true"))
09213: l_dialog.pcmf_setGenerateReshapeEvents(true);
09214:
09215: if (xActive != null && xActive.equals("true"))
09216: l_dialog.pcmf_displayDialog();
09217:
09218: l_hdl.pcmf_doExecStack(l_dialog,
09219: l_dialog.pcmf_getUnComponent(), xName);
09220:
09221: return (l_dialog);
09222: };
09223: };
09224:
09225: final class UnXMLTAGform implements IUnSAXAppFactHandler {
09226: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09227: String qName, Attributes attributes) throws Exception {
09228: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
09229: String xOrphan = KeTools.pcmf_deRef(attributes
09230: .getValue("orphan"));
09231: String xNL = KeTools.pcmf_deRef(attributes.getValue("layout"));
09232: String xIFr = KeTools.pcmf_deRef(attributes.getValue("iFrame"));
09233: String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
09234: String xLazy = KeTools.pcmf_deRef(attributes.getValue("lazy"));
09235:
09236: String xFBlock = KeTools.pcmf_deRef(attributes
09237: .getValue("factoryDesc"));
09238: if (xFBlock != null && xFBlock.trim().equals(""))
09239: xFBlock = null;
09240:
09241: IUnForm l_form = null;
09242:
09243: if (xIFr == null || xIFr.equals("false")) {
09244: if (xNL != null && xNL.equals("false"))
09245: l_form = l_hdl.pdm_objFact.pcmf_createFormPlugin(
09246: l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl,
09247: xFBlock);
09248: else
09249: l_form = l_hdl.pdm_objFact.pcmf_createFormPlugin(
09250: l_hdl.pdm_AppType, xName, false,
09251: l_hdl.pdm_appl, xFBlock);
09252: } else {
09253: if (xNL != null && xNL.equals("false"))
09254: l_form = l_hdl.pdm_objFact.pcmf_createIForm(
09255: l_hdl.pdm_AppType, xName, true, l_hdl.pdm_appl);
09256: else
09257: l_form = l_hdl.pdm_objFact
09258: .pcmf_createIForm(l_hdl.pdm_AppType, xName,
09259: false, l_hdl.pdm_appl);
09260: }
09261:
09262: if (l_form instanceof IUnPanel) {
09263: if (xScr != null && xScr.equals("false"))
09264: ((IUnPanel) l_form).pcmf_setScroll(false);
09265: }
09266: ;
09267:
09268: if (xOrphan == null || xOrphan.equals("false"))
09269: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_form
09270: .pcmf_getUnComponent());
09271: else
09272: l_form.pcmf_getUnComponent().pcmf_setGlobal(true);
09273:
09274: String xReg = KeTools.pcmf_deRef(attributes
09275: .getValue("register"));
09276: if (xReg != null && xReg.equals("") == false)
09277: l_form.pcmf_getUnComponent().pcmf_reRegister(xReg);
09278:
09279: // @@
09280:
09281: l_hdl.pcmf_doExecStack(l_form, l_form.pcmf_getUnComponent(),
09282: xName);
09283:
09284: return (l_form);
09285: };
09286: };
09287:
09288: final class UnXMLTAGhtmlPane implements IUnSAXAppFactHandler {
09289: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09290: String qName, Attributes attributes) throws Exception {
09291: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
09292: String xOrphan = KeTools.pcmf_deRef(attributes
09293: .getValue("orphan"));
09294: String xScr = KeTools.pcmf_deRef(attributes.getValue("scroll"));
09295:
09296: String xFBlock = KeTools.pcmf_deRef(attributes
09297: .getValue("factoryDesc"));
09298: if (xFBlock != null && xFBlock.trim().equals(""))
09299: xFBlock = null;
09300:
09301: IUnHtmlPane l_form = null;
09302:
09303: l_form = l_hdl.pdm_objFact.pcmf_createHtmlPanePlugin(
09304: l_hdl.pdm_AppType, xName, "", l_hdl.pdm_appl, xFBlock);
09305: l_hdl.pdmf_startCDataRecording();
09306:
09307: if (xOrphan == null || xOrphan.equals("false"))
09308: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_form
09309: .pcmf_getUnComponent());
09310: else
09311: l_form.pcmf_getUnComponent().pcmf_setGlobal(true);
09312:
09313: if (xScr != null && xScr.equals("true"))
09314: l_form.pcmf_setScroll(true);
09315:
09316: String xReg = KeTools.pcmf_deRef(attributes
09317: .getValue("register"));
09318: if (xReg != null && xReg.equals("") == false)
09319: l_form.pcmf_getUnComponent().pcmf_reRegister(xReg);
09320:
09321: l_hdl.pcmf_doExecStack(l_form, l_form.pcmf_getUnComponent(),
09322: xName);
09323:
09324: return (l_form);
09325: };
09326: };
09327:
09328: final class UnXMLTAGtoolBox implements IUnSAXAppFactHandler {
09329: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09330: String qName, Attributes attributes) throws Exception {
09331: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
09332: String xOrphan = KeTools.pcmf_deRef(attributes
09333: .getValue("orphan"));
09334:
09335: String xFBlock = KeTools.pcmf_deRef(attributes
09336: .getValue("factoryDesc"));
09337: if (xFBlock != null && xFBlock.trim().equals(""))
09338: xFBlock = null;
09339:
09340: IUnToolBox l_toolBox = l_hdl.pdm_objFact
09341: .pcmf_createToolBoxPlugin(l_hdl.pdm_AppType, xName,
09342: l_hdl.pdm_appl, xFBlock);
09343:
09344: if (xOrphan == null || xOrphan.equals("false"))
09345: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_toolBox
09346: .pcmf_getUnComponent());
09347: else
09348: l_toolBox.pcmf_getUnComponent().pcmf_setGlobal(true);
09349:
09350: String xReg = KeTools.pcmf_deRef(attributes
09351: .getValue("register"));
09352: if (xReg != null && xReg.equals("") == false)
09353: l_toolBox.pcmf_getUnComponent().pcmf_reRegister(xReg);
09354:
09355: l_hdl.pcmf_doExecStack(l_toolBox, l_toolBox
09356: .pcmf_getUnComponent(), xName);
09357:
09358: return (l_toolBox);
09359: };
09360: };
09361:
09362: final class UnXMLTAGtabPane implements IUnSAXAppFactHandler {
09363: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09364: String qName, Attributes attributes) throws Exception {
09365: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
09366: String xOrphan = KeTools.pcmf_deRef(attributes
09367: .getValue("orphan"));
09368: String xSubm = KeTools
09369: .pcmf_deRef(attributes.getValue("submit"));
09370: String xTD = KeTools.pcmf_deRef(attributes
09371: .getValue("tabsBottom"));
09372:
09373: String xFBlock = KeTools.pcmf_deRef(attributes
09374: .getValue("factoryDesc"));
09375: if (xFBlock != null && xFBlock.trim().equals(""))
09376: xFBlock = null;
09377:
09378: IUnTabbedPane l_pane = l_hdl.pdm_objFact
09379: .pcmf_createTabPanePlugin(l_hdl.pdm_AppType, xName,
09380: (xTD != null && xTD.equals("true")) ? true
09381: : false, l_hdl.pdm_appl, xFBlock);
09382:
09383: if (xOrphan == null || xOrphan.equals("false"))
09384: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode(xName, l_pane
09385: .pcmf_getUnComponent());
09386: else
09387: l_pane.pcmf_getUnComponent().pcmf_setGlobal(true);
09388:
09389: if (xSubm != null && xSubm.equals("true"))
09390: l_pane.pcmf_getUnComponent().pcmf_enableSubmit();
09391:
09392: String xReg = KeTools.pcmf_deRef(attributes
09393: .getValue("register"));
09394: if (xReg != null && xReg.equals("") == false)
09395: l_pane.pcmf_getUnComponent().pcmf_reRegister(xReg);
09396:
09397: l_hdl.pcmf_doExecStack(l_pane, l_pane.pcmf_getUnComponent(),
09398: xName);
09399:
09400: return (l_pane);
09401: };
09402: };
09403:
09404: final class UnXMLTAGmodelTpl implements IUnSAXAppFactHandler {
09405: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09406: String qName, Attributes attributes) throws Exception {
09407: IMoValueContainer l_if = null;
09408:
09409: String xClass = KeTools
09410: .pcmf_deRef(attributes.getValue("class"));
09411: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
09412: String xCtx = KeTools.pcmf_deRef(attributes.getValue("objctx"));
09413: String xReg = KeTools.pcmf_deRef(attributes
09414: .getValue("register"));
09415:
09416: if (xCtx != null && xCtx.equalsIgnoreCase("GLOBAL")) {
09417: Object l_obj = KeRegisteredObject
09418: .pcmf_getGlobalObjByName(xReg);
09419: if (l_obj != null) {
09420: l_if = (IMoValueContainer) l_obj;
09421: ((UnComponent) l_hdl.pdm_act).pcmf_setModelTpl(l_if);
09422: l_hdl.pcmf_doExecStack(l_if, l_if, xName);
09423: return (l_if);
09424: }
09425: }
09426:
09427: if (xClass == null)
09428: l_if = new MoLwValueTree();
09429: else
09430: l_if = (IMoValueContainer) Class.forName(xClass)
09431: .newInstance();
09432:
09433: l_if.pcmf_setMyTemplate(xName);
09434:
09435: ((UnComponent) l_hdl.pdm_act).pcmf_setModelTpl(l_if);
09436:
09437: if (xReg != null && xReg.equals("") == false) {
09438: if (xCtx != null && xCtx.equalsIgnoreCase("GLOBAL")) {
09439: if (KeRegisteredObject.pcmf_getGlobalObjByName(xReg) == null) {
09440: KeRegisteredObject.pcmf_unRegister(l_if);
09441: KeRegisteredObject.pcmf_registerGlobal(xReg, l_if);
09442: }
09443: } else
09444: KeRegisteredObject.pcmf_reRegister(xReg, l_if);
09445: }
09446:
09447: l_hdl.pcmf_doExecStack(l_if, l_if, l_hdl.pdm_name);
09448:
09449: return (l_if);
09450: };
09451: };
09452:
09453: final class UnXMLTAGmodel implements IUnSAXAppFactHandler {
09454: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09455: String qName, Attributes attributes) throws Exception {
09456: IMoValue l_if = null;
09457:
09458: String xClass = KeTools
09459: .pcmf_deRef(attributes.getValue("class"));
09460:
09461: if (xClass == null)
09462: l_if = new MoLwValueTree();
09463: else
09464: l_if = (IMoValue) Class.forName(xClass).newInstance();
09465:
09466: ((UnComponent) l_hdl.pdm_act).pcmf_setModel(l_if);
09467: String xReg = KeTools.pcmf_deRef(attributes
09468: .getValue("register"));
09469: if (xReg != null && xReg.equals("") == false) {
09470: if (l_if instanceof KeRegisteredObject)
09471: ((KeRegisteredObject) l_if).pcmf_reRegister(xReg);
09472: else
09473: KeRegisteredObject.pcmf_reRegister(xReg, l_if);
09474: }
09475:
09476: l_hdl.pcmf_doExecStack(l_if, l_if, l_hdl.pdm_name);
09477:
09478: return (l_if);
09479: };
09480: };
09481:
09482: final class UnXMLTAGcontainer implements IUnSAXAppFactHandler {
09483: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09484: String qName, Attributes attributes) throws Exception {
09485: KeTreeNode l_if = null;
09486: if (l_hdl.pdm_AppType == UnComponentFactory.HALFOBJECT)
09487: l_if = new HoGenericTreeNode("container");
09488: else
09489: l_if = new KeTreeNode("container", null);
09490:
09491: // l_if.pcmf_setOwnership(true);
09492: String xReg = KeTools.pcmf_deRef(attributes
09493: .getValue("register"));
09494: if (xReg != null && xReg.equals("") == false)
09495: ((KeRegisteredObject) l_if).pcmf_reRegister(xReg);
09496:
09497: ((KeTreeNode) l_hdl.pdm_act).pcmf_addNode("container", l_if);
09498: l_hdl.pcmf_doExecStack(l_if, l_if, l_hdl.pdm_name);
09499:
09500: return (l_if);
09501: };
09502: };
09503:
09504: final class UnXMLTAGstdSingleValue implements IUnSAXAppFactHandler {
09505: protected static String pdm_singleValue = "de.ug2t.model.values.MoSingleValue";
09506:
09507: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09508: String qName, Attributes attributes) throws Exception {
09509: String xClass = KeTools
09510: .pcmf_deRef(attributes.getValue("class"));
09511:
09512: pdm_singleValue = xClass;
09513:
09514: l_hdl.pdm_elements.push(l_hdl.pdm_act);
09515: l_hdl.pdm_names.push(l_hdl.pdm_name);
09516:
09517: return (l_hdl.pdm_act);
09518: };
09519: };
09520:
09521: final class UnXMLTAGsingleValue implements IUnSAXAppFactHandler {
09522: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09523: String qName, Attributes attributes) throws Exception {
09524: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
09525: String xClass = KeTools
09526: .pcmf_deRef(attributes.getValue("class"));
09527: String xValue = KeTools
09528: .pcmf_deRef(attributes.getValue("value"));
09529: String xMan = KeTools.pcmf_deRef(attributes.getValue("man"));
09530: String xOrphan = KeTools.pcmf_deRef(attributes
09531: .getValue("orphan"));
09532: String xCtx = KeTools.pcmf_deRef(attributes.getValue("objctx"));
09533:
09534: String xToUITr = KeTools.pcmf_deRef(attributes
09535: .getValue("toUITransformerObj"));
09536: String xFrUITr = KeTools.pcmf_deRef(attributes
09537: .getValue("fromUITransformerObj"));
09538: String xToUITrC = KeTools.pcmf_deRef(attributes
09539: .getValue("toUITransformerClass"));
09540: String xFrUITrC = KeTools.pcmf_deRef(attributes
09541: .getValue("fromUITransformerClass"));
09542:
09543: String xReg = KeTools.pcmf_deRef(attributes
09544: .getValue("register"));
09545:
09546: IMoSingleValue l_if = null;
09547:
09548: if (xOrphan == null || xOrphan.equals(""))
09549: xOrphan = "false";
09550:
09551: if (xClass == null)
09552: xClass = UnXMLTAGstdSingleValue.pdm_singleValue;
09553:
09554: if (xCtx != null && xCtx.equalsIgnoreCase("GLOBAL")) {
09555: Object l_obj = KeRegisteredObject
09556: .pcmf_getGlobalObjByName(xReg);
09557: if (l_obj != null) {
09558: l_if = (IMoSingleValue) l_obj;
09559:
09560: if (xOrphan.equals("false")) {
09561: if (l_hdl.pdm_actMValue instanceof IMoValueContainer) {
09562: if (xOrphan == null || xOrphan.equals("false")) {
09563: ((IMoValueContainer) l_hdl.pdm_actMValue)
09564: .pcmf_addValue(xName, l_if);
09565:
09566: if (xMan != null && xMan.equals("true")) {
09567: MoChildDescriptor l_desc = new MoChildDescriptor();
09568: l_desc.setPem_minInst(1);
09569: ((IMoValueContainer) l_hdl.pdm_actMValue)
09570: .pcmf_addDesc(xName, l_desc);
09571: }
09572: }
09573: } else
09574: KeLog
09575: .pcmf_log(
09576: l_hdl.pdm_appl
09577: .pcmf_getUnComponent()
09578: .toString(),
09579: "<singleValue> can not insert items in MoSingleValue",
09580: this , KeLog.FATAL);
09581: }
09582:
09583: l_hdl.pcmf_doExecStack(l_if, l_if, xName);
09584: return (l_if);
09585: }
09586: }
09587:
09588: if (xClass == null)
09589: l_if = new MoSingleValue();
09590: else
09591: l_if = (IMoSingleValue) Class.forName(xClass).newInstance();
09592:
09593: if (xReg != null && xReg.equals("") == false) {
09594: if (xCtx != null && xCtx.equalsIgnoreCase("GLOBAL")) {
09595: if (KeRegisteredObject.pcmf_getGlobalObjByName(xReg) == null) {
09596: KeRegisteredObject.pcmf_unRegister(l_if);
09597: KeRegisteredObject.pcmf_registerGlobal(xReg, l_if);
09598: }
09599: } else
09600: KeRegisteredObject.pcmf_reRegister(xReg, l_if);
09601: }
09602:
09603: l_if.pcmf_setMyTemplate(xName);
09604:
09605: if (l_if instanceof KeTreeElement) {
09606: KeTreeElement l_el = (KeTreeElement) l_if;
09607: l_el.pcmf_setName(xName);
09608: if (xOrphan.equals("true"))
09609: l_el.pcmf_setEarlyAutoDelete(false);
09610: }
09611: ;
09612:
09613: if (l_hdl.pdm_actMValue == null && xOrphan.equals("false"))
09614: l_if.pcmf_setUiMap((UnComponent) l_hdl.pdm_act);
09615:
09616: if (xValue != null) {
09617: l_if.pcmf_setValue(xValue);
09618: l_if.pcmf_validate();
09619: }
09620:
09621: if (xToUITr != null && xToUITr.equals("") == false) {
09622: IUnTransformer l_trans = (IUnTransformer) KeRegisteredObject
09623: .pcmf_getObjByName(xToUITr);
09624: l_if.pcmf_setToUITransformer(l_trans);
09625: } else if (xToUITrC != null && xToUITrC.equals("") == false) {
09626: IUnTransformer l_trans = (IUnTransformer) Class.forName(
09627: xToUITrC).newInstance();
09628: l_if.pcmf_setToUITransformer(l_trans);
09629: }
09630:
09631: if (xFrUITr != null && xFrUITr.equals("") == false) {
09632: IUnTransformer l_trans = (IUnTransformer) KeRegisteredObject
09633: .pcmf_getObjByName(xFrUITr);
09634: l_if.pcmf_setFromUITransformer(l_trans);
09635: } else if (xFrUITrC != null && xFrUITrC.equals("") == false) {
09636: IUnTransformer l_trans = (IUnTransformer) Class.forName(
09637: xFrUITrC).newInstance();
09638: l_if.pcmf_setFromUITransformer(l_trans);
09639: }
09640:
09641: if (xOrphan.equals("false")) {
09642: if (l_hdl.pdm_actMValue instanceof IMoValueContainer) {
09643: if (xOrphan == null || xOrphan.equals("false")) {
09644: ((IMoValueContainer) l_hdl.pdm_actMValue)
09645: .pcmf_addValue(xName, l_if);
09646:
09647: if (xMan != null && xMan.equals("true")) {
09648: MoChildDescriptor l_desc = new MoChildDescriptor();
09649: l_desc.setPem_minInst(1);
09650: ((IMoValueContainer) l_hdl.pdm_actMValue)
09651: .pcmf_addDesc(xName, l_desc);
09652: }
09653: }
09654: } else
09655: KeLog
09656: .pcmf_log(
09657: l_hdl.pdm_appl.pcmf_getUnComponent()
09658: .toString(),
09659: "<singleValue> can not insert items in MoSingleValue",
09660: this , KeLog.FATAL);
09661: }
09662:
09663: l_hdl.pcmf_doExecStack(l_if, l_if, xName);
09664:
09665: return (l_if);
09666: };
09667: };
09668:
09669: final class UnXMLTAGvalueReference implements IUnSAXAppFactHandler {
09670: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09671: String qName, Attributes attributes) throws Exception {
09672: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
09673: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
09674: String xMan = KeTools.pcmf_deRef(attributes.getValue("man"));
09675: String xMap = KeTools.pcmf_deRef(attributes.getValue("map2Ui"));
09676:
09677: Object l_ref = KeRegisteredObject.pcmf_getObjByName(xObj);
09678:
09679: if (l_ref instanceof IMoValue) {
09680: if (l_hdl.pdm_actMValue == null)
09681: ((UnComponent) l_hdl.pdm_act)
09682: .pcmf_setModel((IMoValue) l_ref);
09683: else if (l_hdl.pdm_actMValue instanceof IMoValueContainer) {
09684: if (l_hdl.pdm_actMValue != l_ref)
09685: ((IMoValueContainer) l_hdl.pdm_actMValue)
09686: .pcmf_addValue(xName, (IMoValue) l_ref);
09687: else
09688: ((IMoValueContainer) l_hdl.pdm_actMValue)
09689: .pcmf_addValue(xName, ((IMoValue) l_ref)
09690: .pcmf_cloneModelValue(true, true));
09691:
09692: MoChildDescriptor l_desc = new MoChildDescriptor();
09693: l_desc.setPem_isReference(true);
09694:
09695: if (xMap == null || xMap.equals("false"))
09696: l_desc.setPem_mapWithParent2Ui(false);
09697: else
09698: l_desc.setPem_mapWithParent2Ui(true);
09699: ;
09700:
09701: if (xMan != null && xMan.equals("true"))
09702: l_desc.setPem_minInst(1);
09703:
09704: ((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_addDesc(
09705: xName, l_desc);
09706: } else
09707: KeLog
09708: .pcmf_log(
09709: l_hdl.pdm_appl.pcmf_getUnComponent()
09710: .toString(),
09711: "<modelValRef> can not insert items in MoSingleValue",
09712: this , KeLog.FATAL);
09713: } else
09714: KeLog.pcmf_log(l_hdl.pdm_appl.pcmf_getUnComponent()
09715: .toString(),
09716: "<modelValRef> object does not implement IMoValue: "
09717: + xObj, this , KeLog.FATAL);
09718:
09719: l_hdl.pcmf_doExecStack(l_ref, l_ref, xName);
09720:
09721: return (l_ref);
09722: };
09723: };
09724:
09725: final class UnXMLTAGvalueRtReference implements IUnSAXAppFactHandler {
09726: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09727: String qName, Attributes attributes) throws Exception {
09728: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
09729: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
09730: String xMan = KeTools.pcmf_deRef(attributes.getValue("man"));
09731: String xOrphan = KeTools.pcmf_deRef(attributes
09732: .getValue("orphan"));
09733: String xMap = KeTools.pcmf_deRef(attributes.getValue("map2Ui"));
09734:
09735: Object l_ref = new MoLazyValueReference(xObj);
09736:
09737: if (l_hdl.pdm_actMValue == null)
09738: ((UnComponent) l_hdl.pdm_act)
09739: .pcmf_setModel((IMoValue) l_ref);
09740: else if (l_hdl.pdm_actMValue instanceof IMoValueContainer) {
09741: if (xOrphan == null || xOrphan.equals("false")) {
09742: ((IMoValueContainer) l_hdl.pdm_actMValue)
09743: .pcmf_addValue(xName, (IMoValue) l_ref);
09744:
09745: MoChildDescriptor l_desc = new MoChildDescriptor();
09746: l_desc.setPem_isReference(true);
09747:
09748: if (xMap == null || xMap.equals("false"))
09749: l_desc.setPem_mapWithParent2Ui(false);
09750: else
09751: l_desc.setPem_mapWithParent2Ui(true);
09752: ;
09753:
09754: if (xMan != null && xMan.equals("true"))
09755: l_desc.setPem_minInst(1);
09756:
09757: ((IMoValueContainer) l_hdl.pdm_actMValue).pcmf_addDesc(
09758: xName, l_desc);
09759: }
09760: } else
09761: KeLog
09762: .pcmf_log(
09763: l_hdl.pdm_appl.pcmf_getUnComponent()
09764: .toString(),
09765: "<modelValRtRef> can not insert items in MoSingleValue",
09766: this , KeLog.FATAL);
09767:
09768: l_hdl.pcmf_doExecStack(l_ref, l_ref, xName);
09769:
09770: return (l_ref);
09771: };
09772: };
09773:
09774: final class UnXMLTAGmultipleValue implements IUnSAXAppFactHandler {
09775: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09776: String qName, Attributes attributes) throws Exception {
09777: String xName = KeTools.pcmf_deRef(attributes.getValue("name"));
09778: String xClass = KeTools
09779: .pcmf_deRef(attributes.getValue("class"));
09780: String xMan = KeTools.pcmf_deRef(attributes.getValue("man"));
09781: String xOrphan = KeTools.pcmf_deRef(attributes
09782: .getValue("orphan"));
09783: String xCtx = KeTools.pcmf_deRef(attributes.getValue("objctx"));
09784: String xReg = KeTools.pcmf_deRef(attributes
09785: .getValue("register"));
09786:
09787: if (xOrphan == null || xOrphan.equals(""))
09788: xOrphan = "false";
09789:
09790: IMoValueContainer l_if = null;
09791:
09792: if (xCtx != null && xCtx.equalsIgnoreCase("GLOBAL")) {
09793: Object l_obj = KeRegisteredObject
09794: .pcmf_getGlobalObjByName(xReg);
09795: if (l_obj != null) {
09796: l_if = (IMoValueContainer) l_obj;
09797:
09798: if (xOrphan.equals("false")) {
09799: if (l_hdl.pdm_actMValue == null)
09800: l_if.pcmf_setUiMap((UnComponent) l_hdl.pdm_act);
09801:
09802: if (l_hdl.pdm_actMValue instanceof IMoValueContainer) {
09803: if (xOrphan == null || xOrphan.equals("false")) {
09804: ((IMoValueContainer) l_hdl.pdm_actMValue)
09805: .pcmf_addValue(xName, l_if);
09806: if (xMan != null && xMan.equals("true")) {
09807: MoChildDescriptor l_desc = new MoChildDescriptor();
09808: l_desc.setPem_minInst(1);
09809: ((IMoValueContainer) l_hdl.pdm_actMValue)
09810: .pcmf_addDesc(xName, l_desc);
09811: }
09812: }
09813: } else
09814: KeLog
09815: .pcmf_log(
09816: l_hdl.pdm_appl
09817: .pcmf_getUnComponent()
09818: .toString(),
09819: "<multipleValue> can not insert items in MoSingleValue",
09820: this , KeLog.FATAL);
09821: }
09822:
09823: l_hdl.pcmf_doExecStack(l_if, l_if, xName);
09824: return (l_if);
09825: }
09826: }
09827:
09828: if (xClass == null)
09829: l_if = new MoLwValueTree();
09830: else
09831: l_if = (IMoValueContainer) Class.forName(xClass)
09832: .newInstance();
09833:
09834: if (xReg != null && xReg.equals("") == false) {
09835: if (xCtx != null && xCtx.equalsIgnoreCase("GLOBAL")) {
09836: if (KeRegisteredObject.pcmf_getGlobalObjByName(xReg) == null) {
09837: KeRegisteredObject.pcmf_unRegister(l_if);
09838: KeRegisteredObject.pcmf_registerGlobal(xReg, l_if);
09839: }
09840: } else
09841: KeRegisteredObject.pcmf_reRegister(xReg, l_if);
09842: }
09843:
09844: if (l_if instanceof KeTreeElement) {
09845: KeTreeElement l_el = (KeTreeElement) l_if;
09846: l_el.pcmf_setName(xName);
09847: }
09848: ;
09849: if (l_if instanceof KeRegisteredObject
09850: && xOrphan.equals("true"))
09851: ((KeRegisteredObject) l_if).pcmf_setEarlyAutoDelete(false);
09852:
09853: l_if.pcmf_setMyTemplate(xName);
09854:
09855: if (xOrphan.equals("false")) {
09856: if (l_hdl.pdm_actMValue == null)
09857: l_if.pcmf_setUiMap((UnComponent) l_hdl.pdm_act);
09858:
09859: if (l_hdl.pdm_actMValue instanceof IMoValueContainer) {
09860: if (xOrphan == null || xOrphan.equals("false")) {
09861: ((IMoValueContainer) l_hdl.pdm_actMValue)
09862: .pcmf_addValue(xName, l_if);
09863: if (xMan != null && xMan.equals("true")) {
09864: MoChildDescriptor l_desc = new MoChildDescriptor();
09865: l_desc.setPem_minInst(1);
09866: ((IMoValueContainer) l_hdl.pdm_actMValue)
09867: .pcmf_addDesc(xName, l_desc);
09868: }
09869: }
09870: } else
09871: KeLog
09872: .pcmf_log(
09873: l_hdl.pdm_appl.pcmf_getUnComponent()
09874: .toString(),
09875: "<multipleValue> can not insert items in MoSingleValue",
09876: this , KeLog.FATAL);
09877: }
09878:
09879: l_hdl.pcmf_doExecStack(l_if, l_if, xName);
09880:
09881: return (l_if);
09882: };
09883: };
09884:
09885: final class UnXMLTAGtransformer implements IUnSAXAppFactHandler {
09886: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09887: String qName, Attributes attributes) throws Exception {
09888: String xClass = KeTools
09889: .pcmf_deRef(attributes.getValue("class"));
09890: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
09891: String xOrphan = KeTools.pcmf_deRef(attributes
09892: .getValue("orphan"));
09893: String xAttach = KeTools.pcmf_deRef(attributes
09894: .getValue("attach"));
09895:
09896: IUnTransformer l_if = null;
09897:
09898: if (xOrphan != null && xOrphan.equals("")) {
09899: if (xClass == null) {
09900: l_if = (IUnTransformer) KeRegisteredObject
09901: .pcmf_getObjByName(xObj);
09902: l_hdl.pdm_actMValue.pcmf_setTransformer(l_if);
09903: } else {
09904: l_if = (IUnTransformer) Class.forName(xClass)
09905: .newInstance();
09906: l_hdl.pdm_actMValue.pcmf_setTransformer(l_if);
09907: }
09908: } else {
09909: if (xClass == null)
09910: l_if = (IUnTransformer) KeRegisteredObject
09911: .pcmf_getObjByName(xObj);
09912: else
09913: l_if = (IUnTransformer) Class.forName(xClass)
09914: .newInstance();
09915: }
09916:
09917: String xReg = KeTools.pcmf_deRef(attributes
09918: .getValue("register"));
09919: if (xReg != null && xReg.equals("") == false) {
09920: KeRegisteredObject.pcmf_register(xReg, l_if);
09921: if (l_if instanceof IKeAttachable
09922: && (xAttach == null || xAttach.equals("true")))
09923: ((IKeAttachable) l_if).pcmf_attachExtern();
09924: }
09925:
09926: l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue,
09927: l_hdl.pdm_actMValue, l_hdl.pdm_name);
09928:
09929: return (l_hdl.pdm_actMValue);
09930: };
09931: };
09932:
09933: final class UnXMLTAGobserver implements IUnSAXAppFactHandler {
09934: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09935: String qName, Attributes attributes) throws Exception {
09936: String xClass = KeTools
09937: .pcmf_deRef(attributes.getValue("class"));
09938: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
09939:
09940: if (xClass == null) {
09941: l_hdl.pdm_actMValue
09942: .pcmf_addObserver((IMoObserver) KeRegisteredObject
09943: .pcmf_getObjByName(xObj));
09944: } else
09945: l_hdl.pdm_actMValue.pcmf_addObserver((IMoObserver) Class
09946: .forName(xClass).newInstance());
09947:
09948: l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue,
09949: l_hdl.pdm_actMValue, l_hdl.pdm_name);
09950:
09951: return (l_hdl.pdm_actMValue);
09952: };
09953: };
09954:
09955: final class UnXMLTAGvalidator implements IUnSAXAppFactHandler {
09956: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09957: String qName, Attributes attributes) throws Exception {
09958: String xClass = KeTools
09959: .pcmf_deRef(attributes.getValue("class"));
09960: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
09961:
09962: if (xClass == null) {
09963: l_hdl.pdm_actMValue
09964: .pcmf_setValidator((IUnValidator) KeRegisteredObject
09965: .pcmf_getObjByName(xObj));
09966: } else
09967: l_hdl.pdm_actMValue.pcmf_setValidator((IUnValidator) Class
09968: .forName(xClass).newInstance());
09969:
09970: l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue,
09971: l_hdl.pdm_actMValue, l_hdl.pdm_name);
09972:
09973: return (l_hdl.pdm_actMValue);
09974: };
09975: };
09976:
09977: final class UnXMLTAGuiMap implements IUnSAXAppFactHandler {
09978: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
09979: String qName, Attributes attributes) throws Exception {
09980: String xClass = KeTools
09981: .pcmf_deRef(attributes.getValue("class"));
09982: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
09983: String xPath = KeTools.pcmf_deRef(attributes.getValue("path"));
09984: String xRelPath = KeTools.pcmf_deRef(attributes
09985: .getValue("relPath"));
09986:
09987: if (xPath != null)
09988: l_hdl.pdm_actMValue
09989: .pcmf_setUiMap((UnComponent) l_hdl.pdm_appl
09990: .pcmf_getUnComponent()
09991: .pcmf_getByPath(xPath));
09992: else if (xObj != null)
09993: l_hdl.pdm_actMValue
09994: .pcmf_setUiMap((UnComponent) KeRegisteredObject
09995: .pcmf_getObjByName(xObj));
09996: else if (xRelPath != null)
09997: l_hdl.pdm_actMValue
09998: .pcmf_setUiMap((UnComponent) ((KeTreeNode) l_hdl.pdm_act)
09999: .pcmf_getByPath(xRelPath));
10000: else
10001: l_hdl.pdm_actMValue.pcmf_setUiMap((UnComponent) Class
10002: .forName(xClass).newInstance());
10003:
10004: l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue,
10005: l_hdl.pdm_actMValue, l_hdl.pdm_name);
10006:
10007: return (l_hdl.pdm_actMValue);
10008: };
10009: };
10010:
10011: final class UnXMLTAGuiErrorGW implements IUnSAXAppFactHandler {
10012: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
10013: String qName, Attributes attributes) throws Exception {
10014: String xClass = KeTools
10015: .pcmf_deRef(attributes.getValue("class"));
10016: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
10017:
10018: if (xClass == null) {
10019: l_hdl.pdm_actMValue
10020: .pcmf_setUiErrorGW((IMoMappingErrorHandler) KeRegisteredObject
10021: .pcmf_getObjByName(xObj));
10022: } else
10023: l_hdl.pdm_actMValue
10024: .pcmf_setUiErrorGW((IMoMappingErrorHandler) Class
10025: .forName(xClass).newInstance());
10026:
10027: l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue,
10028: l_hdl.pdm_actMValue, l_hdl.pdm_name);
10029:
10030: return (l_hdl.pdm_actMValue);
10031: };
10032: };
10033:
10034: final class UnXMLTAGreader implements IUnSAXAppFactHandler {
10035: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
10036: String qName, Attributes attributes) throws Exception {
10037: String xClass = KeTools
10038: .pcmf_deRef(attributes.getValue("class"));
10039: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
10040:
10041: if (xClass == null) {
10042: l_hdl.pdm_actMValue
10043: .pcmf_setReader((IMoReader) KeRegisteredObject
10044: .pcmf_getObjByName(xObj));
10045: } else
10046: l_hdl.pdm_actMValue.pcmf_setReader((IMoReader) Class
10047: .forName(xClass).newInstance());
10048:
10049: l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue,
10050: l_hdl.pdm_actMValue, l_hdl.pdm_name);
10051:
10052: return (l_hdl.pdm_actMValue);
10053: };
10054: };
10055:
10056: final class UnXMLTAGwriter implements IUnSAXAppFactHandler {
10057: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
10058: String qName, Attributes attributes) throws Exception {
10059: String xClass = KeTools
10060: .pcmf_deRef(attributes.getValue("class"));
10061: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
10062:
10063: if (xClass == null) {
10064: l_hdl.pdm_actMValue
10065: .pcmf_setWriter((IMoWriter) KeRegisteredObject
10066: .pcmf_getObjByName(xObj));
10067: } else
10068: l_hdl.pdm_actMValue.pcmf_setWriter((IMoWriter) Class
10069: .forName(xClass).newInstance());
10070:
10071: l_hdl.pcmf_doExecStack(l_hdl.pdm_actMValue,
10072: l_hdl.pdm_actMValue, l_hdl.pdm_name);
10073:
10074: return (l_hdl.pdm_actMValue);
10075: };
10076: };
10077:
10078: final class UnXMLTAGappInit implements IUnSAXAppFactHandler {
10079: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
10080: String qName, Attributes attributes) throws Exception {
10081: String xClass = KeTools
10082: .pcmf_deRef(attributes.getValue("class"));
10083: String xObj = KeTools.pcmf_deRef(attributes.getValue("object"));
10084:
10085: try {
10086: if (xClass == null)
10087: l_hdl.pdm_appl
10088: .pcmf_setInitFct((IKeExecutable) KeRegisteredObject
10089: .pcmf_getObjByName(xObj));
10090: else {
10091: Object l_obj = null;
10092: l_obj = Class.forName(xClass).newInstance();
10093: String xReg = KeTools.pcmf_deRef(attributes
10094: .getValue("register"));
10095: if (xReg != null && xReg.equals("") == false)
10096: KeRegisteredObject.pcmf_register(xReg, l_obj);
10097:
10098: l_hdl.pdm_appl.pcmf_setInitFct((IKeExecutable) l_obj);
10099: }
10100: } catch (Throwable e) {
10101: KeLog
10102: .pcmf_log(
10103: "ug2t",
10104: "<appInit> no valid application Init class or object specified",
10105: this , KeLog.ERROR);
10106: }
10107:
10108: l_hdl.pdm_elements.push(l_hdl.pdm_act);
10109: l_hdl.pdm_names.push(l_hdl.pdm_name);
10110:
10111: return (l_hdl.pdm_act);
10112: };
10113: };
10114:
10115: final class UnXMLTAGtreeLoader implements IUnSAXAppFactHandler {
10116: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
10117: String qName, Attributes attributes) throws Exception {
10118: String xClassModel = KeTools.pcmf_deRef(attributes
10119: .getValue("modelClass"));
10120:
10121: String xClassRenderer = KeTools.pcmf_deRef(attributes
10122: .getValue("rendererClass"));
10123: String xObjRenderer = KeTools.pcmf_deRef(attributes
10124: .getValue("rendererObject"));
10125:
10126: String xPostFctClass = KeTools.pcmf_deRef(attributes
10127: .getValue("postFctClass"));
10128: String xPostFctObject = KeTools.pcmf_deRef(attributes
10129: .getValue("postFctObject"));
10130:
10131: TreeModel l_model = null;
10132:
10133: if (xClassModel != null)
10134: l_model = (TreeModel) Class.forName(xClassModel)
10135: .newInstance();
10136:
10137: IUnTreeItemRenderer l_renderer = null;
10138: if (xClassRenderer != null)
10139: l_renderer = (IUnTreeItemRenderer) Class.forName(
10140: xClassRenderer).newInstance();
10141: else if (xObjRenderer != null)
10142: l_renderer = (IUnTreeItemRenderer) KeRegisteredObject
10143: .pcmf_getObjByName(xObjRenderer);
10144:
10145: UnTreeViewLoader l_loader = new UnTreeViewLoader(l_model,
10146: (IUnTreeView) l_hdl.pdm_act, l_renderer);
10147: String xReg = KeTools.pcmf_deRef(attributes
10148: .getValue("register"));
10149: if (xReg != null && xReg.equals("") == false)
10150: l_loader.pcmf_reRegister(xReg);
10151:
10152: if (xPostFctClass != null || xPostFctObject != null) {
10153: IKeExecutable l_exec = null;
10154:
10155: if (xPostFctClass != null)
10156: l_exec = (IKeExecutable) Class.forName(xPostFctClass)
10157: .newInstance();
10158: else if (xPostFctObject != null)
10159: l_exec = (IKeExecutable) KeRegisteredObject
10160: .pcmf_getObjByName(xPostFctObject);
10161:
10162: l_loader.pcmf_setPostFct(l_exec);
10163: }
10164:
10165: l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act,
10166: l_hdl.pdm_name);
10167:
10168: return (l_hdl.pdm_act);
10169: };
10170: };
10171:
10172: final class UnXMLTAGlistLoader implements IUnSAXAppFactHandler {
10173: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
10174: String qName, Attributes attributes) throws Exception {
10175: String xClassModel = KeTools.pcmf_deRef(attributes
10176: .getValue("modelClass"));
10177:
10178: String xClassRenderer = KeTools.pcmf_deRef(attributes
10179: .getValue("rendererClass"));
10180: String xObjRenderer = KeTools.pcmf_deRef(attributes
10181: .getValue("rendererObject"));
10182:
10183: String xPostFctClass = KeTools.pcmf_deRef(attributes
10184: .getValue("postFctClass"));
10185: String xPostFctObject = KeTools.pcmf_deRef(attributes
10186: .getValue("postFctObject"));
10187:
10188: ListModel l_model = null;
10189:
10190: if (xClassModel != null)
10191: l_model = (ListModel) Class.forName(xClassModel)
10192: .newInstance();
10193:
10194: IUnListItemRenderer l_renderer = null;
10195: if (xClassRenderer != null)
10196: l_renderer = (IUnListItemRenderer) Class.forName(
10197: xClassRenderer).newInstance();
10198: else if (xObjRenderer != null)
10199: l_renderer = (IUnListItemRenderer) KeRegisteredObject
10200: .pcmf_getObjByName(xObjRenderer);
10201:
10202: UnListLoader l_loader = new UnListLoader(l_model,
10203: (IUnListComponent) l_hdl.pdm_act, l_renderer);
10204: String xReg = KeTools.pcmf_deRef(attributes
10205: .getValue("register"));
10206: if (xReg != null && xReg.equals("") == false)
10207: l_loader.pcmf_reRegister(xReg);
10208:
10209: if (xPostFctClass != null || xPostFctObject != null) {
10210: IKeExecutable l_exec = null;
10211:
10212: if (xPostFctClass != null)
10213: l_exec = (IKeExecutable) Class.forName(xPostFctClass)
10214: .newInstance();
10215: else if (xPostFctObject != null)
10216: l_exec = (IKeExecutable) KeRegisteredObject
10217: .pcmf_getObjByName(xPostFctObject);
10218:
10219: l_loader.pcmf_setPostFct(l_exec);
10220: }
10221:
10222: l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act,
10223: l_hdl.pdm_name);
10224:
10225: return (l_hdl.pdm_act);
10226: };
10227: };
10228:
10229: final class UnXMLTAGtableLoader implements IUnSAXAppFactHandler {
10230: public final Object pcmf_hdlSaxEvent(UnApplFactSAXHandler l_hdl,
10231: String qName, Attributes attributes) throws Exception {
10232: String xClassModel = KeTools.pcmf_deRef(attributes
10233: .getValue("modelClass"));
10234:
10235: String xClassRenderer = KeTools.pcmf_deRef(attributes
10236: .getValue("rendererClass"));
10237: String xObjRenderer = KeTools.pcmf_deRef(attributes
10238: .getValue("rendererObject"));
10239:
10240: String xPostFctClass = KeTools.pcmf_deRef(attributes
10241: .getValue("postFctClass"));
10242: String xPostFctObject = KeTools.pcmf_deRef(attributes
10243: .getValue("postFctObject"));
10244:
10245: TableModel l_model = null;
10246:
10247: if (xClassModel != null)
10248: l_model = (TableModel) Class.forName(xClassModel)
10249: .newInstance();
10250:
10251: IUnTableItemRenderer l_renderer = null;
10252: if (xClassRenderer != null)
10253: l_renderer = (IUnTableItemRenderer) Class.forName(
10254: xClassRenderer).newInstance();
10255: else if (xObjRenderer != null)
10256: l_renderer = (IUnTableItemRenderer) KeRegisteredObject
10257: .pcmf_getObjByName(xObjRenderer);
10258:
10259: UnTableLoader l_loader = new UnTableLoader(l_model,
10260: (IUnTable) l_hdl.pdm_act, l_renderer);
10261: String xReg = KeTools.pcmf_deRef(attributes
10262: .getValue("register"));
10263: if (xReg != null && xReg.equals("") == false)
10264: l_loader.pcmf_reRegister(xReg);
10265:
10266: if (xPostFctClass != null || xPostFctObject != null) {
10267: IKeExecutable l_exec = null;
10268:
10269: if (xPostFctClass != null)
10270: l_exec = (IKeExecutable) Class.forName(xPostFctClass)
10271: .newInstance();
10272: else if (xPostFctObject != null)
10273: l_exec = (IKeExecutable) KeRegisteredObject
10274: .pcmf_getObjByName(xPostFctObject);
10275:
10276: l_loader.pcmf_setPostFct(l_exec);
10277: }
10278:
10279: l_hdl.pcmf_doExecStack(l_hdl.pdm_act, l_hdl.pdm_act,
10280: l_hdl.pdm_name);
10281:
10282: return (l_hdl.pdm_act);
10283: };
10284: };
10285:
10286: // =============================================
10287:
10288: /**
10289: * @author Dirk
10290: *
10291: * date: 15.03.2004 project: WiSer-Framework
10292: *
10293: * <p>
10294: * UnApplicationFactory covers all routines to parse an application's
10295: * XML-description
10296: * </p>
10297: */
10298: public final class UnApplicationFactory implements IKeProducer {
10299: private XMLReader pem_xmlReader = new Piccolo();
10300:
10301: static private UnApplFactSAXHandler pem_staticHandler = new UnApplFactSAXHandler();
10302: private UnApplFactSAXHandler pem_handler = UnApplicationFactory.pem_staticHandler;
10303:
10304: private ArrayList pem_parseCacheSwing = null;
10305: private ArrayList pem_parseCacheHTML = null;
10306: private boolean pem_cachedRun = false;
10307: private boolean pem_cacheRun = false;
10308:
10309: private String pem_source = null;
10310: private UnComponentFactory pem_objFact = null;
10311: private IHoSession pem_session = null;
10312: protected InputSource pem_mySource = null;
10313: private boolean pem_useCache = true;
10314:
10315: private boolean pem_clearCache = false;
10316: private boolean pem_clearStatics = false;
10317:
10318: static private boolean pem_standAlone = false;
10319:
10320: protected void pdmf_clearCache() {
10321: this .pem_clearCache = true;
10322: }
10323:
10324: protected void pdmf_clearStatics() {
10325: this .pem_clearStatics = true;
10326: }
10327:
10328: protected void pdmf_beginSource(String xSource) {
10329: try {
10330: AttributesImpl l_attr = new AttributesImpl();
10331: l_attr.addAttribute(null, null, "value", "", xSource);
10332: this .pem_handler.startElement("", "INT_SCF", "INT_SCF",
10333: l_attr);
10334: } catch (Exception e) {
10335: KeLog.pcmf_log("ug2t", "error switching to source: "
10336: + xSource, this , KeLog.ERROR);
10337: }
10338: }
10339:
10340: protected void pdmf_endSource() {
10341: try {
10342: this .pem_handler.endElement("", "INT_SCF", "INT_SCF");
10343: } catch (Exception e) {
10344: KeLog.pcmf_log("ug2t", "error ending source", this ,
10345: KeLog.ERROR);
10346: }
10347: }
10348:
10349: public void pcmf_useNonStaticHandler(boolean xUse) {
10350: if (xUse)
10351: this .pem_handler = new UnApplFactSAXHandler();
10352: else
10353: this .pem_handler = UnApplicationFactory.pem_staticHandler;
10354:
10355: pem_xmlReader.setContentHandler(pem_handler);
10356: }
10357:
10358: public static boolean pcmf_isStandAlone() {
10359: return (pem_standAlone);
10360: }
10361:
10362: public static void pcmf_setStandAloneMode(boolean xMode) {
10363: pem_standAlone = xMode;
10364:
10365: if (pem_standAlone) {
10366: KeLog.pcmf_log("ug2t", "startup in STAND-ALONE mode", null,
10367: KeLog.MESSAGE);
10368: } else
10369: KeLog.pcmf_log("ug2t", "startup in C/S mode", null,
10370: KeLog.MESSAGE);
10371: }
10372:
10373: public void pcmf_setTerminateOnError(boolean xTerm) {
10374: this .pem_handler.pcmf_setTerminateOnError(xTerm);
10375: }
10376:
10377: protected final class UnInThreadProducer1 extends KeNameSpaceThread {
10378: private Object pem_obj = null;
10379: private String pem_threadName = null;
10380: private Object pem_res = null;
10381: private IHoSession pem_session = null;
10382:
10383: public UnInThreadProducer1(Object xParamter,
10384: String xThreadName, IHoSession xSess) {
10385: super (xThreadName);
10386:
10387: this .pem_obj = xParamter;
10388: this .pem_threadName = xThreadName;
10389: KeRegisteredObject.pcmf_deleteContext(xThreadName);
10390: this .pem_session = xSess;
10391: };
10392:
10393: public void run() {
10394: try {
10395: KeRegisteredObject.pcmf_register(
10396: IHoSession.SESSION_NAME, pem_session);
10397: this .pem_res = UnApplicationFactory.this
10398: .pcmf_produce(this .pem_obj);
10399: } catch (Exception e) {
10400: KeLog.pcmf_logException("ug2t", this , e);
10401: }
10402: }
10403:
10404: public String pcmf_getName() {
10405: return (this .pem_threadName);
10406: }
10407:
10408: public Object pcmf_getObj() {
10409: try {
10410: while (this .isAlive()) {
10411: if (pem_session != null
10412: && Thread.holdsLock(this .pem_session))
10413: this .pem_session.wait(100);
10414: else
10415: Thread.sleep(100);
10416: }
10417: } catch (Exception e) {
10418: KeLog.pcmf_logException("ug2t", this , e);
10419: }
10420: return (this .pem_res);
10421: }
10422: }
10423:
10424: protected final class UnInThreadProducer2 extends KeNameSpaceThread {
10425: private Object pem_obj = null;
10426: private String pem_threadName = null;
10427: private Object pem_res = null;
10428: private KeTreeNode pem_root = null;
10429: private IUnApplication pem_appl = null;
10430: private int pem_type = 0;
10431: private IHoSession pem_session = null;
10432:
10433: public UnInThreadProducer2(int xType, Object xParamter,
10434: KeTreeNode xRoot, IUnApplication xAppl,
10435: String xThreadName, IHoSession xSess) {
10436: super (xThreadName);
10437:
10438: this .pem_obj = xParamter;
10439: this .pem_threadName = xThreadName;
10440: KeRegisteredObject.pcmf_deleteContext(xThreadName);
10441: this .pem_type = xType;
10442: this .pem_appl = xAppl;
10443: this .pem_root = xRoot;
10444: this .pem_session = xSess;
10445: };
10446:
10447: public void run() {
10448: try {
10449: if (this .pem_type == UnComponentFactory.HALFOBJECT)
10450: KeRegisteredObject.pcmf_register(
10451: IHoSession.SESSION_NAME, pem_session);
10452:
10453: synchronized (pem_root) {
10454: this .pem_res = UnApplicationFactory.this
10455: .pcmf_produceFromString(pem_type, pem_obj,
10456: pem_root, pem_appl);
10457: }
10458: } catch (Exception e) {
10459: KeLog.pcmf_logException("ug2t", this , e);
10460: }
10461: }
10462:
10463: public String pcmf_getName() {
10464: return (this .pem_threadName);
10465: }
10466:
10467: public Object pcmf_getObj() {
10468: try {
10469: while (this .isAlive()) {
10470: if (pem_session != null
10471: && Thread.holdsLock(this .pem_session))
10472: this .pem_session.wait(100);
10473: else
10474: Thread.sleep(100);
10475: }
10476: } catch (Exception e) {
10477: KeLog.pcmf_logException("ug2t", this , e);
10478: }
10479: return (this .pem_res);
10480: }
10481: }
10482:
10483: public UnApplicationFactory(String xSource,
10484: UnComponentFactory xObjFact) {
10485: pem_xmlReader.setContentHandler(pem_handler);
10486:
10487: this .pem_source = xSource;
10488: this .pem_objFact = xObjFact;
10489: this .pem_session = (IHoSession) KeRegisteredObject
10490: .pcmf_getObjByName(IHoSession.SESSION_NAME);
10491:
10492: return;
10493: };
10494:
10495: public UnApplicationFactory(String xSource,
10496: UnApplFactSAXHandler xHandler) {
10497: pem_xmlReader.setContentHandler(xHandler);
10498:
10499: this .pem_source = xSource;
10500: this .pem_objFact = xHandler.pdm_objFact;
10501: this .pem_session = (IHoSession) KeRegisteredObject
10502: .pcmf_getObjByName(IHoSession.SESSION_NAME);
10503:
10504: return;
10505: };
10506:
10507: public UnApplicationFactory(String xSource,
10508: UnComponentFactory xObjFact, boolean xUseCache) {
10509: pem_xmlReader.setContentHandler(pem_handler);
10510:
10511: this .pem_source = xSource;
10512: this .pem_objFact = xObjFact;
10513: this .pem_session = (IHoSession) KeRegisteredObject
10514: .pcmf_getObjByName(IHoSession.SESSION_NAME);
10515:
10516: this .pem_useCache = xUseCache;
10517:
10518: return;
10519: };
10520:
10521: protected final void pcmf_parseRecursiv() throws Exception {
10522: synchronized (pem_handler) {
10523: pem_xmlReader.parse(KeEnvironment
10524: .pcmf_buildPath(this .pem_source));
10525: }
10526: ;
10527:
10528: return;
10529: };
10530:
10531: // @@
10532:
10533: public final Object pcmf_produce(Object xParamter) throws Exception {
10534: Object l_res = null;
10535: synchronized (pem_handler) {
10536: try {
10537: int l_type = ((Integer) xParamter).intValue();
10538:
10539: // @@
10540:
10541: this .pem_session = (IHoSession) KeRegisteredObject
10542: .pcmf_getObjByName(IHoSession.SESSION_NAME);
10543:
10544: // @@
10545:
10546: if (l_type == UnComponentFactory.MARKUP) {
10547: MuGenericTemplateKit l_myKit = (MuGenericTemplateKit) KeRegisteredObject
10548: .pcmf_getObjByName(MuGenericTemplateKit.TEMPLATE_KIT_NAME);
10549: if (l_myKit == null) {
10550: this .pem_objFact.pcmf_resetPluginStatics();
10551: pem_handler.pcmf_init(l_type, this .pem_objFact,
10552: this );
10553: } else {
10554: l_myKit.getPem_fact().pcmf_resetPluginStatics();
10555: pem_handler.pcmf_init(l_type, l_myKit
10556: .getPem_fact(), this );
10557: }
10558: } else {
10559: this .pem_objFact.pcmf_resetPluginStatics();
10560: pem_handler.pcmf_init(l_type, this .pem_objFact,
10561: this );
10562: }
10563:
10564: this .pem_mySource = new InputSource("file:"
10565: + KeEnvironment.pcmf_buildPath(this .pem_source));
10566: this .pem_mySource.setEncoding(KeEnvironment
10567: .pcmf_getCharacterSet());
10568:
10569: if (this .pem_parseCacheHTML == null
10570: && this .pem_handler.pdm_AppType == UnComponentFactory.MARKUP) {
10571: // @@
10572:
10573: KeLog
10574: .pcmf_log(
10575: "ug2t",
10576: "produce web application from scratch (parse configuration nodes from file)",
10577: this , KeLog.MESSAGE);
10578: // @@
10579:
10580: pem_xmlReader.parse(this .pem_mySource);
10581:
10582: // @@
10583: } else if (this .pem_parseCacheSwing == null
10584: && (this .pem_handler.pdm_AppType == UnComponentFactory.HALFOBJECT || this .pem_handler.pdm_AppType == UnComponentFactory.MIXED)) {
10585: // @@
10586:
10587: KeLog
10588: .pcmf_log(
10589: "ug2t",
10590: "produce swing application from scratch (parse configuration nodes from file)",
10591: this , KeLog.MESSAGE);
10592:
10593: // @@
10594:
10595: pem_xmlReader.parse(this .pem_mySource);
10596:
10597: // @
10598: } else {
10599:
10600: // @@
10601: }
10602:
10603: l_res = pem_handler.pcmf_getAppl();
10604:
10605: // @@
10606:
10607: IUnApplication l_appl = this .pem_handler.pcmf_getAppl();
10608: if (l_appl != null) {
10609: final UnComponent l_active = l_appl
10610: .pcmf_getActive();
10611: if (l_active != null)
10612: this .pem_handler.pcmf_getAppl().pcmf_setActive(
10613: l_active.pcmf_getName());
10614: }
10615: } catch (SAXParseException se) {
10616: KeLog
10617: .pcmf_log(
10618: "ug2t",
10619: "SAX parser Exception at [line: "
10620: + se.getLineNumber()
10621: + "] [col: "
10622: + se.getColumnNumber()
10623: + "] [file: "
10624: + KeEnvironment
10625: .pcmf_buildPath(this .pem_source)
10626: + "]", this , KeLog.FATAL);
10627:
10628: // @@
10629:
10630: } catch (Exception e) {
10631: KeLog.pcmf_log("ug2t",
10632: "unexpected exception during XML parsing",
10633: this , KeLog.FATAL);
10634:
10635: // @@
10636:
10637: pem_handler.pcmf_exit();
10638: throw (e);
10639: }
10640:
10641: pem_handler.pcmf_exit();
10642: return (l_res);
10643: }
10644: };
10645:
10646: public final IUnPage pcmf_produceHtmlPage(int xType, String xTitle,
10647: String xFile, IUnApplication xAppl) throws Exception {
10648: KeTreeNode l_pnode = new KeTreeNode();
10649: l_pnode.pcmf_setEarlyAutoDelete(true);
10650: String l_pageDef = "<htmlPage orphan='true' active='false' name='"
10651: + xTitle
10652: + "' scroll='false' layout='true' external='true' htmlTpl='"
10653: + xFile + "'/>";
10654: Object l_res = this .pcmf_produceFromString(xType, l_pageDef,
10655: l_pnode, xAppl);
10656:
10657: return ((IUnPage) l_res);
10658: }
10659:
10660: public final IUnForm pcmf_produceHtmlForm(int xType, String xName,
10661: boolean xScroll, String xFile, IUnApplication xAppl)
10662: throws Exception {
10663: KeTreeNode l_pnode = new KeTreeNode();
10664: l_pnode.pcmf_setEarlyAutoDelete(true);
10665: String l_pageDef = "<htmlForm orphan='true' name='" + xName
10666: + "' scroll='" + (xScroll ? "true" : "false")
10667: + "' layout='true' external='true' htmlTpl='" + xFile
10668: + "'/>";
10669: Object l_res = this .pcmf_produceFromString(xType, l_pageDef,
10670: l_pnode, xAppl);
10671:
10672: return ((IUnForm) l_res);
10673: }
10674:
10675: public final void pcmf_produceHtmlGui(int xType, String xFile,
10676: UnComponent xParent, IUnApplication xAppl) throws Exception {
10677: String l_pageDef = "<htmlGui external='true' htmlTpl='" + xFile
10678: + "'/>";
10679: this .pcmf_produceFromString(xType, l_pageDef, xParent, xAppl);
10680:
10681: return;
10682: }
10683:
10684: public final Object pcmf_produceFromString(int xType,
10685: Object xParamter, KeTreeNode xRoot, IUnApplication xAppl)
10686: throws Exception {
10687: Object l_res = null;
10688: synchronized (pem_handler) {
10689: try {
10690: this .pem_session = (IHoSession) KeRegisteredObject
10691: .pcmf_getObjByName(IHoSession.SESSION_NAME);
10692:
10693: // @@
10694:
10695: if (xType == UnComponentFactory.MARKUP) {
10696: MuGenericTemplateKit l_myKit = (MuGenericTemplateKit) KeRegisteredObject
10697: .pcmf_getObjByName(MuGenericTemplateKit.TEMPLATE_KIT_NAME);
10698: if (l_myKit == null)
10699: pem_handler.pcmf_init(xType, this .pem_objFact,
10700: xAppl, xRoot, this );
10701: else
10702: pem_handler.pcmf_init(xType, l_myKit
10703: .getPem_fact(), xAppl, xRoot, this );
10704: } else
10705: pem_handler.pcmf_init(xType, this .pem_objFact,
10706: xAppl, xRoot, this );
10707:
10708: ByteArrayInputStream l_sourcestream = new ByteArrayInputStream(
10709: xParamter.toString().getBytes());
10710: this .pem_mySource = new InputSource(l_sourcestream);
10711: this .pem_mySource.setEncoding(KeEnvironment
10712: .pcmf_getCharacterSet());
10713: pem_xmlReader.parse(this .pem_mySource);
10714: l_sourcestream.close();
10715: l_res = xRoot;
10716:
10717: // @@
10718:
10719: // Aktive Seite nochmal setzten, damit alle Menues etc komplett
10720: // aufgebaut
10721: // sind
10722: IUnApplication l_appl = this .pem_handler.pcmf_getAppl();
10723: if (l_appl != null) {
10724: final UnComponent l_active = l_appl
10725: .pcmf_getActive();
10726: if (l_active != null)
10727: this .pem_handler.pcmf_getAppl().pcmf_setActive(
10728: l_active.pcmf_getName());
10729: }
10730: } catch (SAXParseException se) {
10731: KeLog.pcmf_log("ug2t",
10732: "SAX parser Exception at [line: "
10733: + se.getLineNumber() + "] [col: "
10734: + se.getColumnNumber() + "] [String:\n"
10735: + xParamter.toString() + "\n]", this ,
10736: KeLog.FATAL);
10737: // @@
10738:
10739: pem_handler.pcmf_exit();
10740: throw (se);
10741: } catch (Exception e) {
10742: KeLog.pcmf_log("ug2t",
10743: "unexpected exception during XML parsing",
10744: this , KeLog.FATAL);
10745: // @@
10746:
10747: pem_handler.pcmf_exit();
10748: throw (e);
10749: }
10750:
10751: pem_handler.pcmf_exit();
10752: return (l_res);
10753: }
10754: };
10755:
10756: public final Object pcmf_produceWidgetsFromFile(int xType,
10757: String xFile, IUnApplication xAppl) throws Exception {
10758: Object l_res = null;
10759: KeTreeNode l_node = new KeTreeNode("", null);
10760: l_node.pcmf_setEarlyAutoDelete(true);
10761:
10762: synchronized (pem_handler) {
10763: try {
10764: this .pem_session = (IHoSession) KeRegisteredObject
10765: .pcmf_getObjByName(IHoSession.SESSION_NAME);
10766:
10767: // @@
10768:
10769: if (xType == UnComponentFactory.MARKUP) {
10770: MuGenericTemplateKit l_myKit = (MuGenericTemplateKit) KeRegisteredObject
10771: .pcmf_getObjByName(MuGenericTemplateKit.TEMPLATE_KIT_NAME);
10772: if (l_myKit == null)
10773: pem_handler.pcmf_init(xType, this .pem_objFact,
10774: xAppl, l_node, this );
10775: else
10776: pem_handler.pcmf_init(xType, l_myKit
10777: .getPem_fact(), xAppl, l_node, this );
10778: } else
10779: pem_handler.pcmf_init(xType, this .pem_objFact,
10780: xAppl, l_node, this );
10781:
10782: if (xFile == null)
10783: this .pem_mySource = new InputSource("file:"
10784: + KeEnvironment
10785: .pcmf_buildPath(this .pem_source));
10786: else
10787: this .pem_mySource = new InputSource("file:"
10788: + KeEnvironment.pcmf_buildPath(xFile));
10789:
10790: this .pem_mySource.setEncoding(KeEnvironment
10791: .pcmf_getCharacterSet());
10792: pem_xmlReader.parse(this .pem_mySource);
10793:
10794: l_res = l_node.pcmf_getElementAt(0);
10795: l_node.pcmf_removeNode((KeTreeNode) l_res);
10796:
10797: // @@
10798:
10799: // Aktive Seite nochmal setzten, damit alle Menues etc komplett
10800: // aufgebaut
10801: // sind
10802: IUnApplication l_appl = this .pem_handler.pcmf_getAppl();
10803: if (l_appl != null) {
10804: final UnComponent l_active = l_appl
10805: .pcmf_getActive();
10806: if (l_active != null)
10807: this .pem_handler.pcmf_getAppl().pcmf_setActive(
10808: l_active.pcmf_getName());
10809: }
10810: } catch (SAXParseException se) {
10811: KeLog
10812: .pcmf_log(
10813: "ug2t",
10814: "SAX parser Exception at [line: "
10815: + se.getLineNumber()
10816: + "] [col: "
10817: + se.getColumnNumber()
10818: + "] [file: "
10819: + KeEnvironment
10820: .pcmf_buildPath(this .pem_source)
10821: + "]", this , KeLog.FATAL);
10822: // @@
10823:
10824: pem_handler.pcmf_exit();
10825: throw (se);
10826: } catch (Exception e) {
10827: KeLog.pcmf_log("ug2t",
10828: "unexpected exception during XML parsing",
10829: this , KeLog.FATAL);
10830: // @@
10831:
10832: pem_handler.pcmf_exit();
10833: throw (e);
10834: }
10835:
10836: pem_handler.pcmf_exit();
10837: return (l_res);
10838: }
10839: };
10840:
10841: public final Object pcmf_produceWidgetsFromString(int xType,
10842: String xString, IUnApplication xAppl) throws Exception {
10843: Object l_res = null;
10844: KeTreeNode l_node = new KeTreeNode("", null);
10845: l_node.pcmf_setEarlyAutoDelete(true);
10846:
10847: synchronized (pem_handler) {
10848: try {
10849: this .pem_session = (IHoSession) KeRegisteredObject
10850: .pcmf_getObjByName(IHoSession.SESSION_NAME);
10851:
10852: // @@
10853:
10854: if (xType == UnComponentFactory.MARKUP) {
10855: MuGenericTemplateKit l_myKit = (MuGenericTemplateKit) KeRegisteredObject
10856: .pcmf_getObjByName(MuGenericTemplateKit.TEMPLATE_KIT_NAME);
10857: if (l_myKit == null)
10858: pem_handler.pcmf_init(xType, this .pem_objFact,
10859: xAppl, l_node, this );
10860: else
10861: pem_handler.pcmf_init(xType, l_myKit
10862: .getPem_fact(), xAppl, l_node, this );
10863: } else
10864: pem_handler.pcmf_init(xType, this .pem_objFact,
10865: xAppl, l_node, this );
10866:
10867: ByteArrayInputStream l_sourcestream = new ByteArrayInputStream(
10868: xString.getBytes());
10869: this .pem_mySource = new InputSource(l_sourcestream);
10870:
10871: this .pem_mySource.setEncoding(KeEnvironment
10872: .pcmf_getCharacterSet());
10873: pem_xmlReader.parse(this .pem_mySource);
10874:
10875: l_sourcestream.close();
10876:
10877: l_res = l_node.pcmf_getElementAt(0);
10878: l_node.pcmf_removeNode((KeTreeNode) l_res);
10879:
10880: // @@
10881:
10882: // Aktive Seite nochmal setzten, damit alle Menues etc komplett
10883: // aufgebaut
10884: // sind
10885: IUnApplication l_appl = this .pem_handler.pcmf_getAppl();
10886: if (l_appl != null) {
10887: final UnComponent l_active = l_appl
10888: .pcmf_getActive();
10889: if (l_active != null)
10890: this .pem_handler.pcmf_getAppl().pcmf_setActive(
10891: l_active.pcmf_getName());
10892: }
10893: } catch (SAXParseException se) {
10894: KeLog.pcmf_log("ug2t",
10895: "SAX parser Exception at [line: "
10896: + se.getLineNumber() + "] [col: "
10897: + se.getColumnNumber() + "] [String:\n"
10898: + xString + "\n]", this , KeLog.FATAL);
10899: // @@
10900:
10901: pem_handler.pcmf_exit();
10902: throw (se);
10903: } catch (Exception e) {
10904: KeLog.pcmf_log("ug2t",
10905: "unexpected exception during XML parsing",
10906: this , KeLog.FATAL);
10907: // @@
10908:
10909: pem_handler.pcmf_exit();
10910: throw (e);
10911: }
10912:
10913: pem_handler.pcmf_exit();
10914: return (l_res);
10915: }
10916: };
10917:
10918: public final Object pcmf_produceInOwnThread(Object xParamter,
10919: String xThreadName) {
10920: UnInThreadProducer1 l_th = new UnInThreadProducer1(xParamter,
10921: xThreadName, this .pem_session);
10922: l_th.start();
10923: return (l_th.pcmf_getObj());
10924: };
10925:
10926: public final Object pcmf_produceFromStringInOwnThread(int xType,
10927: Object xParamter, KeTreeNode xRoot, IUnApplication xAppl,
10928: String xThreadName) {
10929: UnInThreadProducer2 l_th = new UnInThreadProducer2(xType,
10930: xParamter, xRoot, xAppl, xThreadName, this.pem_session);
10931: l_th.start();
10932: return (l_th.pcmf_getObj());
10933: };
10934: }
|