(!window.myfaces) ? window.myfaces = {} : null; (!myfaces._impl) ? myfaces._impl = {} : null; (!myfaces._impl.core) ? myfaces._impl.core = {} : null; if (!myfaces._impl.core._Runtime) { myfaces._impl.core._Runtime = new function() { var _T = this; _T._reservedNMS = {}; _T._classReplacementCnt = 0; _T.globalEval = function(code) { if (window.execScript) { var ret = window.execScript(code); if ("undefined" != typeof ret && ret == "null") { return null; } return ret; } else { if (window.eval) { if (!_T.browser.isBlackBerry || _T.browser.isBlackBerry >= 6) { var gEval = function() { var ret = window.eval.call(window, code); if ("undefined" == typeof ret) { return null; } return ret; }; var ret = gEval(); if ("undefined" == typeof ret) { return null; } return ret; } else { return _T._globalEvalHeadAppendixMethod(code); } } } eval.call(window, code); return null; }; _T._globalEvalHeadAppendixMethod = function(code) { var location = document.getElementsByTagName("head")[0] || document.documentElement; var placeHolder = document.createElement("script"); placeHolder.type = "text/javascript"; placeHolder.text = code; location.insertBefore(placeHolder, location.firstChild); location.removeChild(placeHolder); return null; }; _T.applyToGlobalNamespace = function(nms, obj) { var splitted = nms.split(/\./); if (splitted.length == 1) { window[nms] = obj; return; } var parent = splitted.slice(0, splitted.length - 1); var child = splitted[splitted.length - 1]; var parentNamespace = _T.fetchNamespace(parent.join(".")); parentNamespace[child] = obj; }; _T.fetchNamespace = function(nms) { if ("undefined" == typeof nms || null == nms || !_T._reservedNMS[nms]) { return null; } var ret = null; try { if (!_T.browser.isIE) { ret = _T.globalEval("window." + nms); } } catch (e) { } if ("undefined" != typeof ret && null != ret) { return ret; } nms = nms.split(/\./); ret = window; var len = nms.length; for ( var cnt = 0; cnt < len; cnt++) { ret = ret[nms[cnt]]; if ("undefined" == typeof ret || null == ret) { return null; } } return ret; }; _T.isString = function(it) { return !!arguments.length && it != null && (typeof it == "string" || it instanceof String); }; _T.reserveNamespace = function(nms, obj) { if (!_T.isString(nms)) { throw Error("Namespace must be a string with . as delimiter"); } if (_T._reservedNMS[nms] || null != _T.fetchNamespace(nms)) { return false; } var entries = nms.split(/\./); var currNms = window; var tmpNmsName = []; for ( var cnt = 0; cnt < entries.length; cnt++) { var subNamespace = entries[cnt]; tmpNmsName.push(subNamespace); if ("undefined" == typeof currNms[subNamespace]) { currNms[subNamespace] = {}; } if (cnt == entries.length - 1 && "undefined" != typeof obj) { currNms[subNamespace] = obj; } else { currNms = currNms[subNamespace]; } _T._reservedNMS[tmpNmsName.join(".")] = true; } return true; }; _T.exists = function(root, subNms) { if (!root) { return false; } if (root == window && _T._reservedNMS[subNms]) { return true; } if (!subNms) { return true; } try { if ("undefined" != typeof root[subNms]) { return true; } var p = subNms.split("."); var len = p.length; for ( var i = 0; i < len; i++) { if ("undefined" == typeof root[p[i]]) { return false; } root = root[p[i]]; } return true; } catch (e) { return false; } }; _T.require = function(nms) { if (_T.exists(nms)) { return; } var rootPath = _T.getGlobalConfig("myfacesScriptRoot", ""); _T.loadScriptEval(rootPath + "/" + nms.replace(/\./g, "/") + ".js"); }, _T.getGlobalConfig = function(configName, defaultValue) { return (myfaces["config"] && "undefined" != typeof myfaces.config[configName]) ? myfaces.config[configName] : defaultValue; }; _T.getLocalOrGlobalConfig = function(localOptions, configName, defaultValue) { var _local = !!localOptions; var _localResult; if (_local) { _localResult = (localOptions["myfaces"]) ? localOptions["myfaces"][configName] : undefined; _local = "undefined" != typeof _localResult; } return (!_local) ? _T.getGlobalConfig(configName, defaultValue) : _localResult; }; _T.getXHRLvl = function() { if (!_T.XHR_LEVEL) { _T.getXHRObject(); } return _T.XHR_LEVEL; }; _T.getXHRObject = function() { if (window.XMLHttpRequest) { var _ret = new XMLHttpRequest(); return _ret; } try { _T.XHR_LEVEL = 1; return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { } return new ActiveXObject("Microsoft.XMLHTTP"); }; _T.loadScriptEval = function(src, type, defer, charSet) { var xhr = _T.getXHRObject(); xhr.open("GET", src, false); if (charSet) { xhr.setRequestHeader("Content-Type", "application/x-javascript; charset:" + charSet); } xhr.send(null); if (xhr.readyState == 4) { if (xhr.status == 200) { if (!defer) { _T.globalEval(xhr.responseText.replace("\n", "\r\n") + "\r\n//@ sourceURL=" + src); } else { setTimeout( function() { _T.globalEval(xhr.responseText + "\r\n//@ sourceURL=" + src); }, 1); } } else { throw Error(xhr.responseText); } } else { throw Error("Loading of script " + src + " failed "); } }; _T.loadScriptByBrowser = function(src, type, defer, charSet) { var d = _T.browser; var position = "head"; try { var holder = document.getElementsByTagName(position)[0]; if ("undefined" == typeof holder || null == holder) { holder = document.createElement(position); var html = document.getElementsByTagName("html"); html.appendChild(holder); } var script = document.createElement("script"); script.type = type || "text/javascript"; script.src = src; if (charSet) { script.charset = charSet; } if (defer) { script.defer = defer; } holder.appendChild(script); } catch (e) { return false; } return true; }; _T.loadScript = function(src, type, defer, charSet) { if (!_T.browser.isFF) { _T.loadScriptEval(src, type, defer, charSet); } else { _T.loadScriptByBrowser(src, type, defer, charSet); } }; _T.delegateObj = function(newCls, delegateObj, protoFuncs, nmsFuncs) { if (!_T.isString(newCls)) { throw Error("new class namespace must be of type String"); } if ("function" != typeof newCls) { newCls = _reserveClsNms(newCls, protoFuncs); if (!newCls) { return null; } } var proto = newCls.prototype; for ( var key in delegateObj) { ( function(key, delFn) { if (key && typeof delFn == "function") { proto[key] = function() { return delFn.apply(delegateObj, arguments); }; } })(key, delegateObj[key]); } proto._delegateObj = delegateObj; proto.constructor = newCls; proto._callDelegate = function(methodName) { var passThrough = (arguments.length == 1) ? [] : Array.prototype.slice.call(arguments, 1); var ret = this._delegateObj[methodName].apply( this._delegateObj, passThrough); if ("undefined" != ret) { return ret; } }; _applyFuncs(newCls, protoFuncs, true); _applyFuncs(newCls, nmsFuncs, false); return newCls; }; _T.extendClass = function(newCls, extendCls, protoFuncs, nmsFuncs) { if (!_T.isString(newCls)) { throw Error("new class namespace must be of type String"); } if (_T._reservedNMS[newCls]) { return; } if ("function" != typeof newCls) { newCls = _reserveClsNms(newCls, protoFuncs); if (!newCls) { return null; } } if (extendCls._mfClazz) { extendCls = extendCls._mfClazz; } if ("undefined" != typeof extendCls && null != extendCls) { var tmpFunc = function() { }; tmpFunc.prototype = extendCls.prototype; newCls.prototype = new tmpFunc(); tmpFunc = null; newCls.prototype.constructor = newCls; newCls.prototype._parentCls = extendCls.prototype; newCls.prototype._callSuper = function(methodName) { var passThrough = (arguments.length == 1) ? [] : Array.prototype.slice.call(arguments, 1); var _mappedName = [ "_", methodName, "_mf_r" ].join(""); this._mfClsDescLvl = this._mfClsDescLvl || new Array(); var descLevel = this._mfClsDescLvl; var _oldDescLevel = this._mfClsDescLvl[_mappedName] || this; var _parentCls = _oldDescLevel._parentCls; try { descLevel[_mappedName] = _parentCls; _parentCls[methodName].apply(this, passThrough); } finally { descLevel[_mappedName] = _oldDescLevel; } }; newCls.prototype._mfClazz = newCls; } _applyFuncs(newCls, protoFuncs, true); _applyFuncs(newCls, nmsFuncs, false); return newCls; }; _T.pluginClass = function(classNms, protoFuncs, overWrite) { var oldClass = _T.fetchNamespace(classNms); if (!oldClass) { throw new Error("The class namespace " + classNms + " is not existent"); } if (!overWrite) { var preserveNMS = classNms + "." + ("" + _T._classReplacementCnt++); _T.reserveNamespace(preserveNMS, oldClass); return _T.extendClass(classNms, preserveNMS, protoFuncs); } else { if (protoFuncs.constructor_) { newCls.prototype.constructor = protoFuncs.constructor_; } _applyFuncs(oldClass, protoFuncs, true); } }, _T.singletonExtendClass = function(newCls, extendsCls, protoFuncs, nmsFuncs) { return _makeSingleton(_T.extendClass, newCls, extendsCls, protoFuncs, nmsFuncs); }; _T.singletonDelegateObj = function(newCls, delegateObj, protoFuncs, nmsFuncs) { if (_T._reservedNMS[newCls]) { return; } return _makeSingleton(_T.delegateObj, newCls, delegateObj, protoFuncs, nmsFuncs); }; var _makeSingleton = function(ooFunc, newCls, delegateObj, protoFuncs, nmsFuncs) { if (_T._reservedNMS[newCls]) { return; } var clazz = ooFunc(newCls + "._mfClazz", delegateObj, protoFuncs, nmsFuncs); if (clazz != null) { _T.applyToGlobalNamespace(newCls, new clazz()); } _T.fetchNamespace(newCls)["_mfClazz"] = clazz; }; var _reserveClsNms = function(newCls, protoFuncs) { var constr = null; if ("undefined" != typeof protoFuncs && null != protoFuncs) { constr = ("undefined" != typeof null != protoFuncs["constructor_"] && null != protoFuncs["constructor_"]) ? protoFuncs["constructor_"] : function() { }; } else { constr = function() { }; } if (!_T.reserveNamespace(newCls, constr)) { return null; } newCls = _T.fetchNamespace(newCls); return newCls; }; var _applyFuncs = function(newCls, funcs, proto) { if (funcs) { for ( var key in funcs) { if ("undefined" == typeof key || null == key || key == "_callSuper") { continue; } if (!proto) { newCls[key] = funcs[key]; } else { newCls.prototype[key] = funcs[key]; } } } }; _T.assertType = function(probe, theType) { return _T.isString(theType) ? probe == typeof theType : probe instanceof theType; }; _T.addOnLoad = function(target, func) { var oldonload = (target) ? target.onload : null; target.onload = (!oldonload) ? func : function() { try { oldonload(); } catch (e) { throw e; } finally { func(); } }; }; _T.getLanguage = function(lOverride) { var deflt = { language :"en", variant :"UK" }; try { var lang = lOverride || navigator.language || navigator.browserLanguage; if (!lang || lang.length < 2) { return deflt; } return { language :lang.substr(0, 2), variant :(lang.length >= 5) ? lang.substr(3, 5) : null }; } catch (e) { return deflt; } }; ( function() { var n = navigator; var dua = n.userAgent, dav = n.appVersion, tv = parseFloat(dav); _T.browser = {}; var d = _T.browser; if (dua.indexOf("Opera") >= 0) { _T.isOpera = tv; } if (dua.indexOf("AdobeAIR") >= 0) { d.isAIR = 1; } if (dua.indexOf("BlackBerry") >= 0) { d.isBlackBerry = tv; } d.isKhtml = (dav.indexOf("Konqueror") >= 0) ? tv : 0; d.isWebKit = parseFloat(dua.split("WebKit/")[1]) || undefined; d.isChrome = parseFloat(dua.split("Chrome/")[1]) || undefined; var index = Math.max(dav.indexOf("WebKit"), dav.indexOf("Safari"), 0); if (index && !d.isChrome) { d.isSafari = parseFloat(dav.split("Version/")[1]); if (!d.isSafari || parseFloat(dav.substr(index + 7)) <= 419.3) { d.isSafari = 2; } } if (dua.indexOf("Gecko") >= 0 && !d.isKhtml && !d.isWebKit) { d.isMozilla = d.isMoz = tv; } if (d.isMoz) { d.isFF = parseFloat(dua.split("Firefox/")[1] || dua.split("Minefield/")[1] || dua.split("Shiretoko/")[1]) || undefined; } if (document.all && !d.isOpera && !d.isBlackBerry) { d.isIE = parseFloat(dav.split("MSIE ")[1]) || undefined; d.isIEMobile = parseFloat(dua.split("IEMobile")[1]); if (d.isIE >= 8 && document.documentMode != 5) { d.isIE = document.documentMode; } } })(); }; } myfaces._impl.core._Runtime .extendClass( "myfaces._impl.i18n.Messages", Object, { MSG_TEST :"Testmessage", MSG_DEV_MODE :"Note, this message is only sent, because project stage is development and no " + "other error listeners are registered.", MSG_AFFECTED_CLASS :"Affected Class:", MSG_AFFECTED_METHOD :"Affected Method:", MSG_ERROR_NAME :"Error Name:", MSG_ERROR_MESSAGE :"Error Name:", MSG_ERROR_DESC :"Error Description:", MSG_ERROR_NO :"Error Number:", MSG_ERROR_LINENO :"Error Line Number:", ERR_FORM :"Sourceform could not be determined, either because element is not attached to a form or we have multiple forms with named elements of the same identifier or name, stopping the ajax processing", ERR_VIEWSTATE :"jsf.viewState: param value not of type form!", ERR_TRANSPORT :"Transport type {0} does not exist", ERR_EVT_PASS :"an event must be passed down (either a an event object null or undefined) ", ERR_CONSTRUCT :"Parts of the response couldn't be retrieved when constructing the event data: {0} ", ERR_MALFORMEDXML :"The server response could not be parsed, the server has returned with a response which is not xml !", ERR_SOURCE_FUNC :"source cannot be a function (probably source and event were not defined or set to null", ERR_EV_OR_UNKNOWN :"An event object or unknown must be passed as second parameter", ERR_SOURCE_NOSTR :"source cannot be a string", ERR_SOURCE_DEF_NULL :"source must be defined or null", ERR_MUST_STRING :"{0}: {1} namespace must be of type String", ERR_REF_OR_ID :"{0}: {1} a reference node or identifier must be provided", ERR_PARAM_GENERIC :"{0}: parameter {1} must be of type {2}", ERR_PARAM_STR :"{0}: {1} param must be of type string", ERR_PARAM_STR_RE :"{0}: {1} param must be of type string or a regular expression", ERR_PARAM_MIXMAPS :"{0}: both a source as well as a destination map must be provided", ERR_MUST_BE_PROVIDED :"{0}: an {1} and a {2} must be provided", ERR_MUST_BE_PROVIDED1 :"{0}: {1} must be set", ERR_REPLACE_EL :"replaceElements called while evalNodes is not an array", ERR_EMPTY_RESPONSE :"{0}: The response cannot be null or empty!", ERR_ITEM_ID_NOTFOUND :"{0}: item with identifier {1} could not be found", ERR_PPR_IDREQ :"{0}: Error in PPR Insert, id must be present", ERR_PPR_INSERTBEFID :"{0}: Error in PPR Insert, before id or after id must be present", ERR_PPR_INSERTBEFID_1 :"{0}: Error in PPR Insert, before node of id {1} does not exist in document", ERR_PPR_INSERTBEFID_2 :"{0}: Error in PPR Insert, after node of id {1} does not exist in document", ERR_PPR_DELID :"{0}: Error in delete, id not in xml markup", ERR_PPR_UNKNOWNCID :"{0}: Unknown Html-Component-ID: {1}", ERR_NO_VIEWROOTATTR :"{0}: Changing of ViewRoot attributes is not supported", ERR_NO_HEADATTR :"{0}: Changing of Head attributes is not supported", ERR_RED_URL :"{0}: Redirect without url" }); myfaces._impl.core._Runtime .extendClass( "myfaces._impl.i18n.Messages_de", myfaces._impl.i18n.Messages, { MSG_TEST :"Testnachricht", MSG_DEV_MODE :"Sie sehen diese Nachricht, da sie sich gerade im Entwicklungsmodus befinden " + "und sie keine Fehlerbehandlungsfunktionen registriert haben.", MSG_AFFECTED_CLASS :"Klasse:", MSG_AFFECTED_METHOD :"Methode:", MSG_ERROR_NAME :"Fehler Name:", MSG_ERROR_MESSAGE :"Nachricht:", MSG_ERROR_DESC :"Fehlerbeschreibung:", MSG_ERROR_NO :"Fehlernummer:", MSG_ERROR_LINENO :"Zeilennummer:", ERR_FORM :"Das Quellformular konnte nicht gefunden werden. " + "Mögliche Gründe: Sie haben entweder kein formular definiert, oder es kommen mehrere Formulare vor, " + "die alle das auslösende Element mit demselben Namen besitzen. " + "Die Weitere Ajax Ausführung wird gestoppt.", ERR_VIEWSTATE :"jsf.viewState: der Parameter ist not vom Typ form!", ERR_TRANSPORT :"Transport typ {0} existiert nicht", ERR_EVT_PASS :"Ein Event Objekt muss übergeben werden (entweder ein event Objekt oder null oder undefined)", ERR_CONSTRUCT :"Teile des response konnten nicht ermittelt werden während die Event Daten bearbeitet wurden: {0} ", ERR_MALFORMEDXML :"Es gab zwar eine Antwort des Servers, jedoch war diese nicht im erwarteten XML Format. Der Server hat kein valides XML gesendet! Bearbeitung abgebrochen.", ERR_SOURCE_FUNC :"source darf keine Funktion sein", ERR_EV_OR_UNKNOWN :"Ein Ereignis Objekt oder UNKNOWN muss als 2. Parameter übergeben werden", ERR_SOURCE_NOSTR :"source darf kein String sein", ERR_SOURCE_DEF_NULL :"source muss entweder definiert oder null sein", ERR_MUST_STRING :"{0}: {1} namespace muss vom Typ String sein", ERR_REF_OR_ID :"{0}: {1} Ein Referenzknoten oder id muss übergeben werden", ERR_PARAM_GENERIC :"{0}: Paramter {1} muss vom Typ {2} sein", ERR_PARAM_STR :"{0}: Parameter {1} muss vom Typ String sein", ERR_PARAM_STR_RE :"{0}: Parameter {1} muss entweder ein String oder ein Regulärer Ausdruck sein", ERR_PARAM_MIXMAPS :"{0}: both a source as well as a destination map must be provided", ERR_MUST_BE_PROVIDED :"{0}: ein {1} und ein {2} müssen übergeben werden", ERR_MUST_BE_PROVIDED1 :"{0}: {1} muss gesetzt sein", ERR_REPLACE_EL :"replaceElements aufgerufen während evalNodes nicht ein Array ist", ERR_EMPTY_RESPONSE :"{0}: Die Antwort darf nicht null oder leer sein!", ERR_ITEM_ID_NOTFOUND :"{0}: Element mit ID {1} konnte nicht gefunden werden", ERR_PPR_IDREQ :"{0}: Fehler im PPR Insert, ID muss gesetzt sein", ERR_PPR_INSERTBEFID :"{0}: Fehler im PPR Insert, before ID oder after ID muss gesetzt sein", ERR_PPR_INSERTBEFID_1 :"{0}: Fehler im PPR Insert, before Knoten mit ID {1} Existiert nicht", ERR_PPR_INSERTBEFID_2 :"{0}: Fehler im PPR Insert, after Knoten mit ID {1} Existiert nicht", ERR_PPR_DELID :"{0}: Fehler im PPR delete, id ist nicht im xml Markup vorhanden", ERR_PPR_UNKNOWNCID :"{0}: Unbekannte Html-Komponenten-ID: {1}", ERR_NO_VIEWROOTATTR :"{0}: Änderung von ViewRoot Attributen ist nicht erlaubt", ERR_NO_HEADATTR :"{0}: Änderung von Head Attributen ist nicht erlaubt", ERR_RED_URL :"{0}: Redirect ohne URL" }); myfaces._impl.core._Runtime .extendClass( "myfaces._impl.i18n.Messages_nl", myfaces._impl.i18n.Messages, { MSG_TEST :"Testbericht", MSG_DEV_MODE :"Opmerking, dit bericht is enkel gestuurd omdat het project stadium develoment is en er geen " + "andere listeners zijn geconfigureerd.", MSG_AFFECTED_CLASS :"Betrokken Klasse:", MSG_AFFECTED_METHOD :"Betrokken Methode:", MSG_ERROR_NAME :"Naam foutbericht:", MSG_ERROR_MESSAGE :"Naam foutbericht:", MSG_ERROR_DESC :"Omschrijving fout:", MSG_ERROR_NO :"Fout nummer:", MSG_ERROR_LINENO :"Fout lijn nummer:", ERR_FORM :"De doel form kon niet bepaald worden, ofwel omdat het element niet tot een form behoort, ofwel omdat er verschillende forms zijn met 'named element' met dezelfde identifier of naam, ajax verwerking is gestopt.", ERR_VIEWSTATE :"jsf.viewState: param waarde is niet van het type form!", ERR_TRANSPORT :"Transport type {0} bestaat niet", ERR_EVT_PASS :"een event moet opgegegevn worden (ofwel een event object null of undefined) ", ERR_CONSTRUCT :"Delen van het antwoord konden niet opgehaald worden bij het aanmaken van de event data: {0} ", ERR_MALFORMEDXML :"Het antwoordt van de server kon niet ontleed worden, de server heeft een antwoord gegeven welke geen xml bevat!", ERR_SOURCE_FUNC :"source kan geen functie zijn (waarschijnlijk zijn source en event niet gedefinieerd of kregen de waarde null)", ERR_EV_OR_UNKNOWN :"Een event object of 'unknown' moet gespecifieerd worden als tweede parameter", ERR_SOURCE_NOSTR :"source kan geen string zijn", ERR_SOURCE_DEF_NULL :"source moet gedefinieerd zijn of null bevatten", ERR_MUST_STRING :"{0}: {1} namespace moet van het type String zijn", ERR_REF_OR_ID :"{0}: {1} een referentie node of identifier moet opgegeven worden", ERR_PARAM_GENERIC :"{0}: parameter {1} moet van het type {2} zijn", ERR_PARAM_STR :"{0}: {1} parameter moet van het type string zijn", ERR_PARAM_STR_RE :"{0}: {1} parameter moet van het type string zijn of een reguliere expressie", ERR_PARAM_MIXMAPS :"{0}: zowel source als destination map moeten opgegeven zijn", ERR_MUST_BE_PROVIDED :"{0}: een {1} en een {2} moeten opgegeven worden", ERR_MUST_BE_PROVIDED1 :"{0}: {1} moet gezet zijn", ERR_REPLACE_EL :"replaceElements opgeroepen maar evalNodes is geen array", ERR_EMPTY_RESPONSE :"{0}: Het antwoord kan geen null of leeg zijn!", ERR_ITEM_ID_NOTFOUND :"{0}: item met identifier {1} kan niet gevonden worden", ERR_PPR_IDREQ :"{0}: Fout in PPR Insert, id moet bestaan", ERR_PPR_INSERTBEFID :"{0}: Fout in PPR Insert, before id of after id moet bestaan", ERR_PPR_INSERTBEFID_1 :"{0}: Fout in PPR Insert, before node van id {1} bestaat niet in het document", ERR_PPR_INSERTBEFID_2 :"{0}: Fout in PPR Insert, after node van id {1} bestaat niet in het document", ERR_PPR_DELID :"{0}: Fout in delete, id is niet in de xml markup", ERR_PPR_UNKNOWNCID :"{0}: Onbekende Html-Component-ID: {1}", ERR_NO_VIEWROOTATTR :"{0}: Wijzigen van ViewRoot attributen is niet ondersteund", ERR_NO_HEADATTR :"{0}: Wijzigen van Head attributen is niet ondersteund", ERR_RED_URL :"{0}: Redirect zonder url" }); myfaces._impl.core._Runtime .singletonDelegateObj( "myfaces._impl._util._Lang", myfaces._impl.core._Runtime, { _processedExceptions : {}, _installedLocale :null, getMessage : function(C, B) { if (!this._installedLocale) { this.initLocale(); } var D = this._installedLocale[C] || B || C + " - undefined message"; for ( var A = 2; A < arguments.length; A++) { D = D.replace(new RegExp( [ "\\{", A - 2, "\\}" ] .join(""), "g"), new String(arguments[A])); } return D; }, initLocale : function(A) { if (A) { this._installedLocale = new A(); return; } var D = this._callDelegate("getLanguage", this ._callDelegate("getGlobalConfig", "locale")); var C = D ? D.language : ""; var F = D ? [ D.language, "_", D.variant || "" ] .join("") : ""; var E = myfaces._impl.i18n; var B = E["Messages_" + F] || E["Messages_" + C] || E.Messages; this._installedLocale = new B(); }, isExceptionProcessed : function(A) { return !!this._processedExceptions[A.toString()]; }, setExceptionProcessed : function(A) { this._processedExceptions[A.toString()] = true; }, clearExceptionProcessed : function() { for ( var A in this._processedExceptions) { this._processedExceptions[A] = null; } this._processedExceptions = {}; }, fetchNamespace : function(A) { if (!A || !this.isString(A)) { throw Error(this.getMessage("ERR_MUST_STRING", null, "_Lang.fetchNamespace", "namespace")); } return this._callDelegate("fetchNamespace", A); }, reserveNamespace : function(A) { if (!this.isString(A)) { throw Error(this .getMessage("ERR_MUST_STRING", null, "_Lang.reserveNamespace", "namespace")); } return this._callDelegate("reserveNamespace", A); }, globalEval : function(A) { if (!this.isString(A)) { throw Error(this.getMessage("ERR_MUST_STRING", null, "_Lang.globalEval", "code")); } return this._callDelegate("globalEval", A); }, getEvent : function(A) { A = (!A) ? window.event || {} : A; return A; }, getEventTarget : function(A) { A = this.getEvent(A); var B = A.srcElement || A.target || A.source || null; while ((B) && (B.nodeType != 1)) { B = B.parentNode; } return B; }, consumeEvent : function(A) { A = A || window.event; (A.stopPropagation) ? A.stopPropagation() : A.cancelBubble = true; }, equalsIgnoreCase : function(B, A) { if (!B && !A) { return true; } if (!B || !A) { return false; } return B.toLowerCase() === A.toLowerCase(); }, escapeString : function(B, A) { return B.replace(/([\.$?*|:{}\(\)\[\]\\\/\+^])/g, function(C) { if (A && A.indexOf(C) != -1) { return C; } return "\\" + C; }); }, byId : function(A) { if (!A) { throw Error(this.getMessage("ERR_REF_OR_ID", null, "_Lang.byId", "reference")); } return (this.isString(A)) ? document.getElementById(A) : A; }, trimStringInternal : function(A, B) { return this.strToArray(A, B).join(B); }, strToArray : function(C, D) { if (!this.isString(C)) { throw Error(this.getMessage("ERR_PARAM_STR", null, "myfaces._impl._util._Lang.strToArray", "it")); } if (!D) { throw Error(this.getMessage("ERR_PARAM_STR_RE", null, "myfaces._impl._util._Lang.strToArray", "splitter")); } var E = C.split(D); var A = E.length; for ( var B = 0; B < A; B++) { E[B] = this.trim(E[B]); } return E; }, trim : function(C) { if (!this.isString(C)) { throw Error(this.getMessage("ERR_PARAM_STR", null, "_Lang.trim", "str")); } C = C.replace(/^\s\s*/, ""); var A = /\s/; var B = C.length; while (A.test(C.charAt(--B))) { } return C.slice(0, B + 1); }, isString : function(A) { return !!arguments.length && A != null && (typeof A == "string" || A instanceof String); }, hitch : function(A, B) { if (arguments.length > 2) { return this._hitchArgs._hitchArgs.apply( this._hitchArgs, arguments); } if (!B) { B = A; A = null; } if (this.isString(B)) { A = A || window || function() { }; if (!A[B]) { throw ( [ 'myfaces._impl._util._Lang: scope["', B, '"] is null (scope="', A, '")' ] .join("")); } return function() { return A[B].apply(A, arguments || []); }; } return !A ? B : function() { return B.apply(A, arguments || []); }; }, _hitchArgs : function(B, D) { var C = this.objToArray(arguments, 2); var A = this.isString(D); return function() { var E = this.objToArray(arguments); var F = A ? (B || this.global)[D] : D; return F && F.apply(B || this, C.concat(E)); }; }, mixMaps : function(F, H, E, C) { if (!F || !H) { throw Error(this.getMessage("ERR_PARAM_MIXMAPS", null, "_Lang.mixMaps")); } var D = {}; var B = {}; var G = null; var A = "undefined"; for (G in H) { if (C && C[G]) { continue; } if (!E) { D[G] = (A != typeof F[G]) ? F[G] : H[G]; } else { D[G] = (A != typeof H[G]) ? H[G] : F[G]; } B[G] = true; } for (G in F) { D[G] = (A != typeof D[G]) ? D[G] : F[G]; } return D; }, contains : function(A, C) { if (!A || !C) { throw Error(this.getMessage("ERR_MUST_BE_PROVIDED", null, "_Lang.contains", "arr {array}", "str {string}")); } for ( var B = 0; B < A.length; B++) { if (A[B] == C) { return true; } } return false; }, arrToMap : function(B, E) { var C = new Array(B.length); var A = B.length; E = (E) ? E : 0; for ( var D = 0; D < A; D++) { C[B[D]] = D + E; } return C; }, arrToString : function(A, B) { if (!A) { throw Error(this.getMessage( "ERR_MUST_BE_PROVIDED1", null, "arr {array}")); } if (this.isString(A)) { return A; } B = B || "\n"; return A.join(B); }, objToArray : function(E, G, B) { if (!E) { return null; } var F = ("undefined" != typeof G || null != G) ? G : 0; var D = B || []; try { return D.concat(Array.prototype.slice.call(E, F)); } catch (C) { for ( var A = F; A < E.length; A++) { D.push(E[A]); } return D; } }, arrForEach : function(A, D) { try { var B = Number(arguments[2]) || 0; var E = arguments[3]; if (Array.prototype.forEach) { (B) ? A.slice(B).forEach(D, E) : A .forEach(D, E); } else { B = (B < 0) ? Math.ceil(B) : Math.floor(B); if (typeof D != "function") { throw new TypeError(); } for ( var C = 0; C < A.length; C++) { if (E) { D.call(E, A[C], C, A); } else { D(A[C], C, A); } } } } finally { D = null; } }, arrFilter : function(A, F) { try { var C = Number(arguments[2]) || 0; var G = arguments[3]; if (Array.prototype.filter) { return ((C) ? A.slice(C).filter(F, G) : A .filter(F, G)); } else { if (typeof F != "function") { throw new TypeError(); } var B = []; C = (C < 0) ? Math.ceil(C) : Math.floor(C); for ( var D = C; D < A.length; D++) { if (G) { var E = A[D]; if (F.call(G, E, D, A)) { B.push(E); } } else { var E = A[D]; if (F(A[D], D, A)) { B.push(E); } } } } } finally { F = null; } }, arrIndexOf : function(B, C) { if (!B) { return -1; } var D = Number(arguments[2]) || 0; if (Array.prototype.indexOf) { return B.indexOf(C, D); } var A = B.length; D = (D < 0) ? Math.ceil(D) : Math.floor(D); if (D < 0) { D += A; } while (D < A && B[D] !== C) { D++; } return (D < A) ? D : -1; }, applyArgs : function(D, C, B) { var A = "undefined"; if (B) { for ( var F = 0; F < C.length; F++) { if (A != typeof D["_" + B[F]]) { D["_" + B[F]] = C[F]; } if (A != typeof D[B[F]]) { D[B[F]] = C[F]; } } } else { for ( var E in C) { if (A != typeof D["_" + E]) { D["_" + E] = C[E]; } if (A != typeof D[E]) { D[E] = C[E]; } } } }, createErrorMsg : function(D, E, C) { var B = []; var F = this.keyValToStr; B.push(F(this.getMessage("MSG_AFFECTED_CLASS"), D)); B.push(F(this.getMessage("MSG_AFFECTED_METHOD"), E)); if (C) { var A = "undefined"; B.push(F(this.getMessage("MSG_ERROR_NAME"), C.name ? C.name : A)); B.push(F(this.getMessage("MSG_ERROR_MESSAGE"), C.message ? C.message : A)); B.push(F(this.getMessage("MSG_ERROR_DESC"), C.description ? C.description : A)); B.push(F(this.getMessage("MSG_ERROR_NO"), A != typeof C.number ? C.number : A)); B .push(F( this.getMessage("MSG_ERROR_LINENO"), A != typeof C.lineNumber ? C.lineNumber : A)); } return B.join(""); }, keyValToStr : function(C, D, A) { var B = []; B.push(C); B.push(D); if ("undefined" == typeof A) { A = "\n"; } B.push(A); return B.join(""); }, parseXML : function(A) { try { var D = null, B = null; if (window.DOMParser) { D = new DOMParser(); B = D.parseFromString(A, "text/xml"); } else { B = new ActiveXObject("Microsoft.XMLDOM"); B.async = "false"; B.loadXML(A); } return B; } catch (C) { return null; } }, serializeXML : function(A) { if (A.xml) { return A.xml; } return (new XMLSerializer()).serializeToString(A); }, serializeChilds : function(C) { var A = []; if (!C.childNodes) { return ""; } for ( var B = 0; B < C.childNodes.length; B++) { A.push(this.serializeXML(C.childNodes[B])); } return A.join(""); }, isXMLParseError : function(B) { if (B == null) { return true; } var A = function(E) { if (!E || !E.childNodes) { return false; } for ( var D = 0; D < E.childNodes.length; D++) { var C = E.childNodes[D]; if (C.tagName && C.tagName == "parsererror") { return true; } } return false; }; return !B || (this.exists(B, "parseError.errorCode") && B.parseError.errorCode != 0) || A(B); }, createFormDataDecorator : function(B) { var C = null; var A = null; if (!this.FormDataDecoratorArray) { this.FormDataDecoratorArray = function(D) { this._valBuf = D; this._idx = {}; }; C = this.FormDataDecoratorArray; C.prototype.append = function(D, E) { this._valBuf.push( [ encodeURIComponent(D), encodeURIComponent(E) ].join("=")); this._idx[D] = true; }; C.prototype.hasKey = function(D) { return !!this._idx[D]; }; C.prototype.makeFinal = function() { return this._valBuf.join("&"); }; } if (!this.FormDataDecoratorOther) { this.FormDataDecoratorOther = function(D) { this._valBuf = D; this._idx = {}; }; C = this.FormDataDecoratorOther; C.prototype.append = function(D, E) { this._valBuf.append(D, E); this._idx[D] = true; }; C.prototype.hasKey = function(D) { return !!this._idx[D]; }; C.prototype.makeFinal = function() { return this._valBuf; }; } if (B instanceof Array) { A = new this.FormDataDecoratorArray(B); } else { A = new this.FormDataDecoratorOther(B); } return A; } }); myfaces._impl.core._Runtime.extendClass("myfaces._impl._util._Queue", Object, { _q :null, _space :0, _size :-1, constructor_ : function() { this._q = []; this._Lang = myfaces._impl._util._Lang; }, length : function() { return this._q.length - this._space; }, isEmpty : function() { return (this._q.length == 0); }, setQueueSize : function(A) { this._size = A; this._readjust(); }, enqueue : function(A) { this._q.push(A); this._readjust(); }, _readjust : function() { var A = this._size; while (null != A && "undefined" != typeof A && A > -1 && this.length() > A) { this.dequeue(); } }, remove : function(B) { var A = this.indexOf(B); if (A != -1) { this._q.splice(A, 1); } }, dequeue : function() { var B = null; var C = this._q.length; var A = this._q; if (C) { B = A[this._space]; if ((++this._space) << 1 >= C) { this._q = A.slice(this._space); this._space = 0; } } return B; }, each : function(A) { this._Lang.arrForEach(this._q, A, this._space); }, arrFilter : function(A) { return this._Lang.arrFilter(this._q, A, this._space); }, indexOf : function(A) { return this._Lang.indexOf(this._q, A); }, cleanup : function() { this._q = []; this._space = 0; } }); myfaces._impl.core._Runtime.extendClass("myfaces._impl._util._ListenerQueue", myfaces._impl._util._Queue, { constructor_ : function() { this._callSuper("constructor"); }, _assertListener : function(A) { if ("function" != typeof (A)) { var B = myfaces._impl._util._Lang.getMessage( "ERR_PARAM_GENERIC", null, "_ListenerQueue", arguments.caller.toString(), "function"); throw Error(B); } }, enqueue : function(A) { this._assertListener(A); this._callSuper("enqueue", A); }, remove : function(A) { this._assertListener(A); this._callSuper("remove", A); }, broadcastEvent : function(D) { var C = myfaces._impl._util._Lang; var B = C.objToArray(arguments); var A = function(E) { E.apply(null, B); }; try { this.each(A); } finally { A = null; } } }); myfaces._impl.core._Runtime .singletonExtendClass( "myfaces._impl._util._Dom", Object, { IE_QUIRKS_EVENTS : { "onabort" :true, "onload" :true, "onunload" :true, "onchange" :true, "onsubmit" :true, "onreset" :true, "onselect" :true, "onblur" :true, "onfocus" :true, "onkeydown" :true, "onkeypress" :true, "onkeyup" :true, "onclick" :true, "ondblclick" :true, "onmousedown" :true, "onmousemove" :true, "onmouseout" :true, "onmouseover" :true, "onmouseup" :true }, _Lang :myfaces._impl._util._Lang, _RT :myfaces._impl.core._Runtime, _dummyPlaceHolder :null, constructor_ : function() { var A = myfaces._impl.core._Runtime.browser; if (A.isIE <= 6 && A.isIEMobile) { myfaces.config = myfaces.config || {}; myfaces.config._autoeval = false; return; } this._RT.addOnLoad(window, function() { myfaces._impl._util._Dom.isManualScriptEval(); }); if (document.body) { this._RT.addOnLoad(document.body, function() { myfaces._impl._util._Dom.isManualScriptEval(); }); } }, runScripts : function(F, E) { var B = []; var C = this._Lang .hitch( this, function(H) { if (H.tagName && this._Lang .equalsIgnoreCase( H.tagName, "script")) { var I = H.getAttribute("src"); if ("undefined" != typeof I && null != I && I.length > 0) { if ((I .indexOf("ln=scripts") == -1 && I .indexOf("ln=javax.faces") == -1) || (I .indexOf("/jsf.js") == -1 && I .indexOf("/jsf-uncompressed.js") == -1)) { if (B.length) { this._RT .globalEval(B .join("\n")); B = []; } } this._RT .loadScriptEval( I, H .getAttribute("type"), false, "UTF-8"); } else { var J = (!E) ? H.text : this._Lang .serializeChilds(H); var G = true; while (G) { G = false; if (J.substring(0, 1) == " ") { J = J.substring(1); G = true; } if (J.substring(0, 4) == ""); var G = E.indexOf("<[CDATA["); var B = E.indexOf("]]>"); if (this.isValidPositionCombination(F, D, G, B)) { return true; } return F <= D && G <= B; }, checkBackForComment : function(C, A) { var E = C.substring(A); var B = E.lastIndexOf(""); var G = E.lastIndexOf("<[CDATA["); var F = E.lastIndexOf("]]>"); if (this.isValidPositionCombination(B, D, G, F)) { return true; } }, isValidPositionCombination : function(D, C, B, A) { return D <= C && B <= A; }, isFullyEmbedded : function(B, A, D, C) { return D < B < A < C; }, isPartiallyEmbedded : function(B, A, D, C) { return D < B < C < A || B < D < A < C; } }); (!window.myfaces) ? window.myfaces = {} : null; if (!myfaces.oam) { myfaces.oam = new function() { this.setHiddenInput = function(E, B, D) { var C = document.forms[E]; if (typeof C == "undefined") { C = document.getElementById(E); } if (typeof C.elements[B] != "undefined" && (C.elements[B].nodeName == "INPUT" || C.elements[B].nodeName == "input")) { C.elements[B].value = D; } else { var A = document.createElement("input"); A.setAttribute("type", "hidden"); A.setAttribute("id", B); A.setAttribute("name", B); A.setAttribute("value", D); C.appendChild(A); } }; this.clearHiddenInput = function(E, A, D) { var C = document.forms[E]; if (typeof C == "undefined") { C = document.getElementById(E); } var B = C.elements[A]; if (typeof B != "undefined") { C.removeChild(B); } }; this.submitForm = function(L, K, I, C) { var F = "clearFormHiddenParams_" + L.replace(/-/g, "$:").replace(/:/g, "_"); if (typeof window[F] == "function") { window[F](L); } var A = document.forms[L]; if (typeof A == "undefined") { A = document.getElementById(L); } if (myfaces.core.config.autoScroll && typeof window.getScrolling != "undefined") { myfaces.oam.setHiddenInput(L, "autoScroll", getScrolling()); } if (myfaces.core.config.ieAutoSave) { var E = navigator.userAgent.toLowerCase(); var J = navigator.appVersion; if (E.indexOf("msie") != -1) { if (!(E.indexOf("ppc") != -1 && E.indexOf("windows ce") != -1 && J >= 4)) { window.external.AutoCompleteSaveForm(A); } } } var H = A.target; if (I != null) { A.target = I; } if ((typeof C != "undefined") && C != null) { for ( var D = 0, B; (B = C[D]); D++) { myfaces.oam.setHiddenInput(L, B[0], B[1]); } } myfaces.oam.setHiddenInput(L, L + ":" + "_idcl", K); if (A.onsubmit) { var M = A.onsubmit(); if ((typeof M == "undefined") || M) { try { A.submit(); } catch (G) { } } } else { try { A.submit(); } catch (G) { } } A.target = H; if ((typeof C != "undefined") && C != null) { for ( var D = 0, B; (B = C[D]); D++) { myfaces.oam.clearHiddenInput(L, B[0], B[1]); } } myfaces.oam.clearHiddenInput(L, L + ":" + "_idcl", K); return false; }; }; } (!myfaces.core) ? myfaces.core = {} : null; (!myfaces.core.config) ? myfaces.core.config = {} : null; myfaces._impl.core._Runtime.extendClass( "myfaces._impl.xhrCore._FinalizeableObj", Object, { _resettableContent :null, constructor_ : function() { this._resettableContent = {}; }, _initDefaultFinalizableFields : function() { for ( var A in this) { if (null == this[A] && A != "_resettableContent" && A.indexOf("_mf") != 0 && A.indexOf("_") == 0) { this._resettableContent[A] = true; } } }, _finalize : function() { if (!myfaces._impl.core._Runtime.browser.isIE || !this._resettableContent) { return; } for ( var A in this._resettableContent) { if (myfaces._impl.core._Runtime .exists(this[A], "_finalize")) { this[A]._finalize(); } delete this[A]; } } }); myfaces._impl.core._Runtime .extendClass( "myfaces._impl.xhrCore._AjaxUtils", myfaces._impl.xhrCore._FinalizeableObj, { _processedExceptions : {}, constructor_ : function(A, B) { this._onException = A; this._onWarning = B; }, encodeSubmittableFields : function(H, F, C, E, A, D) { try { if (!A) { this ._onWarning( F, C, "myfaces._impl.xhrCore._AjaxUtils", "encodeSubmittableFields " + "Html-Component is not nested in a Form-Tag"); return null; } if (D && D.length > 0) { this.encodePartialSubmit(A, E, false, D, H); } else { var B = A.elements.length; for ( var G = 0; G < B; G++) { this.encodeElement(A.elements[G], H); } } this.appendIssuingItem(E, H); } catch (G) { this._onException(F, C, "myfaces._impl.xhrCore._AjaxUtils", "encodeSubmittableFields", G); } }, encodePartialSubmit : function(D, H, N, E, G) { var F = myfaces._impl._util._Lang; var K = myfaces._impl.core.Impl; var J = myfaces._impl._util._Dom; var B = function(O) { if (O.nodeType != 1) { return false; } if (N && D != O) { return true; } var P = O.id || O.name; return (P && F.contains(E, P)) || P == K.P_VIEWSTATE; }; var A = J.findAll(D, B, false); var M = { "input" :true, "select" :true, "textarea" :true }; if (A && A.length) { for ( var C = 0; C < A.length; C++) { var L = (A[C].tagName.toLowerCase() == "form") ? D.elements : J.findByTagNames(A[C], M, true); if (L && L.length) { for ( var I = 0; I < L.length; I++) { this.encodeElement(L[I], G); } } else { this.encodeElement(A[C], G); } } } this.appendViewState(D, G); }, appendViewState : function(A, F) { var D = myfaces._impl._util._Dom; var E = myfaces._impl.core.Impl; if (F.hasKey(E.P_VIEWSTATE)) { return; } var C = D.findByName(A, E.P_VIEWSTATE, true); if (C && C.length) { for ( var B = 0; B < C.length; B++) { this.encodeElement(C[B], F); } } }, appendIssuingItem : function(A, B) { if (A && A.type && A.type.toLowerCase() == "submit") { B.append(A.name, A.value); } }, encodeElement : function(F, E) { if (!F.name) { return; } var G = myfaces._impl.core._Runtime; var B = F.name; var D = F.tagName.toLowerCase(); var H = F.type; if (H != null) { H = H.toLowerCase(); } if (((D == "input" || D == "textarea" || D == "select") && (B != null && B != "")) && !F.disabled) { if (D == "select") { if (F.selectedIndex >= 0) { var A = F.options.length; for ( var I = 0; I < A; I++) { if (F.options[I].selected) { var C = F.options[I]; E .append( B, (C .getAttribute("value") != null) ? C.value : C.text); } } } } if ((D != "select" && H != "button" && H != "reset" && H != "submit" && H != "image") && ((H != "checkbox" && H != "radio") || F.checked)) { if ("undefined" != typeof F.files && F.files != null && G.getXHRLvl() >= 2 && F.files.length) { E.append(B, F.files[0]); } else { E.append(B, F.value); } } } }, _finalize : function() { delete this._onException; delete this._onWarning; } }); myfaces._impl.core._Runtime.extendClass( "myfaces._impl.xhrCore._AjaxRequestQueue", myfaces._impl._util._Queue, { _curReq :null, constructor_ : function() { this._callSuper("constructor"); }, enqueue : function(B) { if (typeof B._delay == "number") { this.clearDelayTimeout(); var A = myfaces._impl._util._Lang; this._delayTimeoutId = window.setTimeout(A.hitch(this, function() { this.clearDelayTimeout(); delete B._delay; this.enqueue(B); }), B._delay); } else { if (this._curReq == null) { this._curReq = B; this._curReq.send(); } else { this._callSuper("enqueue", B); if (B._queueSize != this._size) { this.setQueueSize(B._queueSize); } } } }, clearDelayTimeout : function() { try { if (typeof this._delayTimeoutId == "number") { window.clearTimeout(this._delayTimeoutId); delete this._delayTimeoutId; } } catch (A) { } }, processQueue : function() { this._curReq = this.dequeue(); if (this._curReq) { this._curReq.send(); } }, cleanup : function() { this._curReq = null; this._callSuper("cleanup"); } }); myfaces._impl.core._Runtime.extendClass("myfaces._impl.xhrCore._BaseRequest", myfaces._impl.xhrCore._FinalizeableObj, { _Dom :myfaces._impl._util._Dom, _Lang :myfaces._impl._util._Lang, _RT :myfaces._impl.core._Runtime, _contentType :"application/x-www-form-urlencoded", _source :null, _xhr :null, _encoding :null, _context :null, _ajaxUtil :null, _sourceForm :null, _passThrough :null, _requestParameters :null, _exception :null, _timeout :null, _delay :null, _queueSize :-1, _partialIdsArray :null, _onDone :null, _onSuccess :null, _onError :null, _onException :null, _onWarning :null, _onTimeout :null, _response :null, _timeoutId :null, _ajaxType :"POST", _CONTENT_TYPE :"Content-Type", _HEAD_FACES_REQ :"Faces-Request", _READY_STATE_DONE :4, _STATUS_OK_MINOR :200, _STATUS_OK_MAJOR :300, _VAL_AJAX :"partial/ajax", constructor_ : function() { this._callSuper("constructor"); this._Lang = myfaces._impl._util._Lang; this._Dom = myfaces._impl._util._Dom; this._initDefaultFinalizableFields(); }, send : function() { }, callback : function() { }, getViewState : function() { var A = this._Lang.createFormDataDecorator(new Array()); this._ajaxUtil.encodeSubmittableFields(A, this._xhr, this._context, this._source, this._sourceForm, this._partialIdsArray); return A; } }); myfaces._impl.core._Runtime .extendClass( "myfaces._impl.xhrCore._AjaxRequest", myfaces._impl.xhrCore._BaseRequest, { constructor_ : function(A) { try { this._callSuper("constructor", A); this._Lang.applyArgs(this, A); if (!this._response) { this._response = new myfaces._impl.xhrCore._AjaxResponse( this._onException, this._onWarning); } this._ajaxUtil = new myfaces._impl.xhrCore._AjaxUtils( this._onException, this._onWarning); } catch (B) { this._onException(this._context, "myfaces._impl.xhrCore._AjaxRequest", "constructor", B); } }, send : function() { try { this._initRequestParams(); this._startXHR(); this._startTimeout(); } catch (A) { this._onException(this._xhr, this._context, "myfaces._impl.xhrCore._AjaxRequest", "send", A); } }, _initRequestParams : function() { this._requestParameters = this.getViewState(); for ( var A in this._passThrough) { this._requestParameters.append(A, this._passThrough[A]); } }, _startXHR : function() { this._preCreateXHR(); this._xhr = myfaces._impl.core._Runtime.getXHRObject(); this._postCreateXHR(); var A; if (typeof this._sourceForm.elements["javax.faces.encodedURL"] == "undefined") { A = this._sourceForm.action; } else { A = this._sourceForm.elements["javax.faces.encodedURL"].value; } this._xhr.open(this._ajaxType, A + ((this._ajaxType == "GET") ? "?" + this._requestParameters.makeFinal() : ""), true); var C = this._contentType; if (this._encoding) { C = C + "; charset:" + this._encoding; } this._xhr.setRequestHeader(this._CONTENT_TYPE, this._contentType); this._xhr.setRequestHeader(this._HEAD_FACES_REQ, this._VAL_AJAX); this._xhr.onreadystatechange = this._Lang.hitch(this, this.callback); var B = myfaces._impl.core._Runtime.getGlobalConfig( "jsfAjaxImpl", myfaces._impl.core.Impl); B.sendEvent(this._xhr, this._context, myfaces._impl.core.Impl.BEGIN); this._preSend(); try { this._xhr .send((this._ajaxType != "GET") ? this._requestParameters .makeFinal() : null); } finally { this._postSend(); } }, _startTimeout : function() { if (this._timeout && this._onTimeout) { var B = this._xhr; var A = this._context; if (this._timeoutId) { window.clearTimeout(this._timeoutId); this._timeoutId = null; } this._timeoutId = window.setTimeout(this._Lang .hitch(this, function() { try { B.onreadystatechange = function() { }; B.abort(); this._onTimeout(B, A); } catch (C) { alert(C); } finally { } }), this._timeout); } }, callback : function() { try { var B = myfaces._impl.core._Runtime .getGlobalConfig("jsfAjaxImpl", myfaces._impl.core.Impl); if (this._xhr.readyState == this._READY_STATE_DONE) { if (this._timeoutId) { window.clearTimeout(this._timeoutId); this._timeoutId = null; } this._onDone(this._xhr, this._context); if (this._xhr.status >= this._STATUS_OK_MINOR && this._xhr.status < this._STATUS_OK_MAJOR) { this._onSuccess(this._xhr, this._context); } else { this._onError(this._xhr, this._context); } } } catch (A) { if (this._onException) { this._onException(this._xhr, this._context, "myfaces._impl.xhrCore._AjaxRequest", "callback", A); } else { alert(A.toString()); } } finally { this._Lang.clearExceptionProcessed(); if (this._xhr.readyState == this._READY_STATE_DONE) { this._callSuper("_finalize"); } } }, _preCreateXHR : function() { }, _postCreateXHR : function() { }, _preSend : function() { }, _postSend : function() { } }); myfaces._impl.core._Runtime .extendClass( "myfaces._impl.xhrCore._IFrameRequest", myfaces._impl.xhrCore._BaseRequest, { _FRAME_ID :"_mf_comm_frm", _frame :null, _RT :myfaces._impl.core._Runtime, CLS_NAME :"myfaces._impl.xhrCore._IFrameRequest", JX_PART_IFRAME :"javax.faces.partial.iframe", MF_PART_IFRAME :"org.apache.myfaces.partial.iframe", constructor_ : function(A) { try { this._callSuper("constructor", A); this._Lang.applyArgs(this, A); if (!this._response) { this._response = new myfaces._impl.xhrCore._AjaxResponse( this._onException, this._onWarning); } this._ajaxUtil = new myfaces._impl.xhrCore._AjaxUtils( this._onException, this._onWarning); } catch (B) { this._onException(null, this._context, this.CLS_NAME, "constructor", B); } }, send : function() { var E = this._RT.getGlobalConfig("jsfAjaxImpl", myfaces._impl.core.Impl); var D = myfaces._impl.core._Runtime; this._frame = this._createTransportFrame(); if (!D.browser.isIE) { this._frame.onload = this._Lang.hitch(this, this.callback); } else { this._frame.onload_IE = this._Lang.hitch(this, this.callback); } E.sendEvent(this._xhr, this._context, E.BEGIN); var C = this._sourceForm.target; var F = this._sourceForm.method; var A = 0; var B = this._sourceForm; try { this._initAjaxParams(); B.target = this._frame.name; B.method = this._ajaxType; B.submit(); } finally { this._removeAjaxParams(C); B.target = C; B.method = F; } }, callback : function() { var A = {}; try { A.responseText = this._getFrameText(); A.responseXML = this._getFrameXml(); A.readyState = this._READY_STATE_DONE; this._onDone(A, this._context); if (!this._Lang.isXMLParseError(A.responseXML)) { A.status = 201; this._onSuccess(A, this._context); } else { A.status = 0; this._onError(A, this._context); } } catch (B) { this._onException(null, this._context, this.CLS_NAME, "constructor", B); } finally { this._clearFrame(); this._frame = null; } }, _getFrameDocument : function() { return this._frame.contentWindow.document || this._frame.contentDocument || this._frame.document; }, _getFrameText : function() { var B = this._getFrameDocument(); var A = B.body || B.documentElement; return A.innerHTML; }, _clearFrame : function() { var B = this._getFrameDocument(); var A = B.documentElement || B.body; this._Dom._removeChildNodes(A, false); }, _getFrameXml : function() { var A = this._getFrameDocument(); return A.XMLDocument || A; }, _initAjaxParams : function() { var C = myfaces._impl.core.Impl; var B = this._Lang.hitch(this, this._appendHiddenValue); for ( var A in this._passThrough) { B(A, this._passThrough[A]); } B(this.JX_PART_IFRAME, "true"); B(this.MF_PART_IFRAME, "true"); }, _removeAjaxParams : function(F) { var G = myfaces._impl.core.Impl; this._sourceForm.target = F; var A = []; var B = {}; for ( var D in this._passThrough) { B[D] = true; } B[this.JX_PART_IFRAME] = true; B[this.MF_PART_IFRAME] = true; (B["javax.faces.ViewState"]) ? delete B["javax.faces.ViewState"] : null; for ( var C = this._sourceForm.elements.length - 1; C >= 0; C--) { var E = this._sourceForm.elements[C]; if (B[E.name] && E.type == "hidden") { E.parentNode.removeChild(E); delete E; } } }, _appendHiddenValue : function(B, C) { if ("undefined" == typeof C) { return; } var A = document.createElement("input"); this._Dom.setAttribute(A, "type", "hidden"); this._Dom.setAttribute(A, "name", B); this._Dom.setAttribute(A, "style", "display:none"); this._Dom.setAttribute(A, "value", C); this._sourceForm.appendChild(A); }, _removeHiddenValue : function(A) { var B = this._Dom.findByName(this._sourceForm, A, true); if (B.length) { B[0].parentNode.removeChild(B[0]); delete B[0]; } }, _createTransportFrame : function() { var C = this._RT; var D = document.getElementById(this._FRAME_ID); if (!D) { if (!C.browser.isIE) { D = document.createElement("iframe"); this._Dom.setAttribute(D, "src", "about:blank"); this._Dom.setAttribute(D, "id", this._FRAME_ID); this._Dom.setAttribute(D, "name", this._FRAME_ID); this._Dom.setAttribute(D, "type", "content"); this._Dom.setAttribute(D, "collapsed", "true"); this._Dom.setAttribute(D, "style", "display:none"); document.body.appendChild(D); } else { var B = document.createElement("div"); this._Dom.setAttribute(B, "style", "display:none"); B.innerHTML = ""; var A = document.body; if (A.firstChild) { A.insertBefore(B, document.body.firstChild); } else { A.appendChild(B); } } } return document.getElementById(this._FRAME_ID); } }); myfaces._impl.core._Runtime .extendClass( "myfaces._impl.xhrCore._AjaxResponse", myfaces._impl.xhrCore._FinalizeableObj, { RESP_PARTIAL :"partial-response", RESP_TYPE_ERROR :"error", RESP_TYPE_REDIRECT :"redirect", RESP_TYPE_CHANGES :"changes", CMD_CHANGES :"changes", CMD_UPDATE :"update", CMD_DELETE :"delete", CMD_INSERT :"insert", CMD_EVAL :"eval", CMD_ERROR :"error", CMD_ATTRIBUTES :"attributes", CMD_EXTENSION :"extension", CMD_REDIRECT :"redirect", P_VIEWSTATE :"javax.faces.ViewState", P_VIEWROOT :"javax.faces.ViewRoot", P_VIEWHEAD :"javax.faces.ViewHead", P_VIEWBODY :"javax.faces.ViewBody", constructor_ : function(A, B) { this._updateElems = []; this._updateForms = []; this._onException = A; this._onWarning = B; this.appliedViewState = null; this._Lang = myfaces._impl._util._Lang; this._Dom = myfaces._impl._util._Dom; this._RT = myfaces._impl.core._Runtime; this._Impl = this._RT.getGlobalConfig("jsfAjaxImpl", myfaces._impl.core.Impl); }, processResponse : function(E, B) { B._mfInternal = B._mfInternal || {}; try { var I = this._Impl; if (!E) { throw Exception(this._Lang.getMessage( "ERR_EMPTY_RESPONSE", null, "jsf.ajaxResponse")); } if (!this._Lang.exists(E, "responseXML")) { I.sendError(E, B, myfaces._impl.core.Impl.EMPTY_RESPONSE); return; } var D = E.responseXML; if (this._Lang.isXMLParseError(D)) { I.sendError(E, B, myfaces._impl.core.Impl.MALFORMEDXML); return; } var G = D.childNodes[0]; if ("undefined" == typeof G || G == null) { I.sendError(E, B, I.MALFORMEDXML); return; } else { if (G.tagName != this.RESP_PARTIAL) { G = G.nextSibling; if (!G || G.tagName != this.RESP_PARTIAL) { I .sendError( E, B, myfaces._impl.core.Impl.MALFORMEDXML); return; } } } var J = G.childNodes.length; for ( var F = 0; F < J; F++) { var A = G.childNodes[F]; var C = A.tagName; if (C == this.CMD_ERROR) { this.processError(E, B, A); return; } else { if (C == this.CMD_REDIRECT) { if (!this.processRedirect(E, B, A)) { return; } } else { if (C == this.CMD_CHANGES) { if (!this.processChanges(E, B, A)) { return; } } } } } this.fixViewStates(B); } catch (H) { this._onException(E, B, "myfaces._impl.xhrCore._AjaxResponse", "processResponse", H); } }, fixViewStates : function(B) { if (null == this.appliedViewState) { return; } if (this._RT.getLocalOrGlobalConfig(B, "no_portlet_env", false)) { for ( var A = document.forms.length - 1; A >= 0; A--) { this._setVSTForm(document.forms[A]); } return; } this._Lang.arrForEach(this._updateForms, this._setVSTForm, 0, this); this._Lang.arrForEach(this._updateElems, this._setVSTInnerForms, 0, this); }, _setVSTForm : function(D, B) { var C = (D.elements) ? D.elements[this.P_VIEWSTATE] : null; if (C && !B) { this._Dom.setAttribute(C, "value", this.appliedViewState); } else { if (!C) { var A = this._Dom.getDummyPlaceHolder(); A.innerHTML = [ "" ] .join(""); try { D.appendChild(A.childNodes[0]); } finally { A.innerHTML = ""; } } } }, _setVSTInnerForms : function(B) { var C = this._Dom.findByTagName(B, "form", false); var A = this._Lang.hitch(this, function(D) { this._setVSTForm(D, true); }); try { this._Lang.arrForEach(C, A, 0, this); } finally { A = false; } }, processError : function(E, B, D) { var C = D.firstChild.textContent || ""; var A = D.childNodes[1].firstChild.data || ""; var F = this._Impl; F.sendError(E, B, myfaces._impl.core.Impl.SERVER_ERROR, C, A); }, processRedirect : function(C, A, B) { var D = B.getAttribute("url"); if (!D) { var E = this._Impl; E.sendError(C, A, myfaces._impl.core.Impl.MALFORMEDXML, myfaces._impl.core.Impl.MALFORMEDXML, this._Lang.getMessage("ERR_RED_URL", null, "_AjaxResponse.processRedirect")); return false; } D = this._Lang.trim(D); if (D == "") { return false; } window.location = D; return true; }, processChanges : function(E, B, D) { var C = D.childNodes; for ( var A = 0; A < C.length; A++) { switch (C[A].tagName) { case this.CMD_UPDATE: if (!this.processUpdate(E, B, C[A])) { return false; } break; case this.CMD_EVAL: this._Lang.globalEval(C[A].firstChild.data); break; case this.CMD_INSERT: if (!this.processInsert(E, B, C[A])) { return false; } break; case this.CMD_DELETE: if (!this.processDelete(E, B, C[A])) { return false; } break; case this.CMD_ATTRIBUTES: if (!this.processAttributes(E, B, C[A])) { return false; } break; case this.CMD_EXTENSION: break; default: var F = this._Impl; F.sendError(E, B, myfaces._impl.core.Impl.MALFORMEDXML); return false; } } return true; }, processUpdate : function(F, B, D) { if (D.getAttribute("id") == this.P_VIEWSTATE) { var E = D.firstChild.nodeValue; var A = B._mfInternal, H = (A) ? A["_mfSourceControlId"] : B.source.id, C = (A && A["_mfSourceFormId"] && document.forms[A["_mfSourceFormId"]]) ? document.forms[A["_mfSourceFormId"]] : ((H) ? this._Dom.fuzzyFormDetection(H) : null); this.appliedViewState = E; if (!C) { return true; } this._setVSTForm(C); } else { var G = this._Dom.concatCDATABlocks(D); switch (D.getAttribute("id")) { case this.P_VIEWROOT: G = G.substring(G.indexOf("[\s\n]*\/\/-->/g, "//-->")); } if (this._Lang.isXMLParseError(G)) { var A = new (this._RT.getGlobalConfig( "updateParser", myfaces._impl._util._HtmlStripper))(); var H = A.parse(I, "head"); C = this._Lang.parseXML("" + H + ""); if (this._Lang.isXMLParseError(C)) { try { C = document.createElement("head"); C.innerHTML = H; } catch (E) { F.sendError(D, B, F.MALFORMEDXML, F.MALFORMEDXML, "Error head replacement failed reason:" + E.toString()); return null; } } } else { C = G.getElementsByTagName("head")[0]; } this._Dom.runScripts(C, true); return G; }, _replaceBody : function(E, C, N) { var A = new (this._RT.getGlobalConfig("updateParser", myfaces._impl._util._HtmlStripper))(); var H = document.getElementsByTagName("body")[0]; var L = document.createElement("div"); L.id = "myfaces_bodyplaceholder"; var M = H.parentNode; this._Dom._removeChildNodes(H); H.innerHTML = ""; var B = H; B.appendChild(L); var F = null; var K = (arguments.length > 3) ? arguments[3] : this._Lang.parseXML(N); if (this._Lang.isXMLParseError(K)) { K = this._Lang.parseXML(N.replace( /[\s\n]*\/\/-->/g, "//-->")); } if (this._Lang.isXMLParseError(K)) { var A = new (this._RT.getGlobalConfig( "updateParser", myfaces._impl._util._HtmlStripper))(); F = A.parse(N, "body"); } else { var G = K.getElementsByTagName("body")[0]; F = this._Lang.serializeChilds(G); if (!this._RT.browser.isIEMobile || this._RT.browser.isIEMobile >= 7) { for ( var D = 0; D < G.attributes.length; D++) { var J = G.attributes[D].value; if (J) { this._Dom.setAttribute(B, G.attributes[D].name, J); } } } } var I = this.replaceHtmlItem(E, C, L, F); if (I) { this._pushOperationResult(I); } return I; }, replaceHtmlItem : function(D, B, F, A) { try { var C = (!this._Lang.isString(F)) ? F : this._Dom .byId(F); if (!C) { throw Error(this._Lang.getMessage( "ERR_ITEM_ID_NOTFOUND", null, "_AjaxResponse.replaceHtmlItem", (F) ? F.toString() : "undefined")); } return this._Dom.outerHTML(C, A); } catch (E) { this._onException(D, B, "myfaces._impl.xhrCore._AjaxResponse", "replaceHTMLItem", E); } return null; }, processInsert : function(C, A, O) { var K = this._Impl; var D = this._Dom; var Q = this._Lang; var M = O.getAttribute("id"); var I = O.getAttribute("before"); var L = O.getAttribute("after"); var J = M && this._Lang.trim(M) != ""; var R = I && this._Lang.trim(I) != ""; var E = L && this._Lang.trim(L) != ""; if (!J) { K.sendError(C, A, K.MALFORMEDXML, K.MALFORMEDXML, this._Lang.getMessage("ERR_PPR_IDREQ")); return false; } if (!(R || E)) { K.sendError(C, A, K.MALFORMEDXML, K.MALFORMEDXML, this._Lang .getMessage("ERR_PPR_INSERTBEFID")); return false; } var F = null; var H = null; var B = this._Dom.concatCDATABlocks(O); var G; if (R) { I = this._Lang.trim(I); var N = document.getElementById(I); if (!N) { K.sendError(C, A, K.MALFORMEDXML, K.MALFORMEDXML, this._Lang.getMessage( "ERR_PPR_INSERTBEFID_1", null, "_AjaxResponse.processInsert", I)); return false; } F = document.createElement("div"); H = N.parentNode; H.insertBefore(F, N); G = this.replaceHtmlItem(C, A, F, B); if (G) { this._pushOperationResult(G); } } else { L = this._Lang.trim(L); var P = document.getElementById(L); if (!P) { K.sendError(C, A, K.MALFORMEDXML, K.MALFORMEDXML, this._Lang.getMessage( "ERR_PPR_INSERTBEFID_2", null, "_AjaxResponse.processInsert", L)); return false; } F = document.createElement("div"); H = P.parentNode; H.insertBefore(F, P.nextSibling); G = this.replaceHtmlItem(C, A, F, B); if (G) { this._pushOperationResult(G); } } return true; }, processDelete : function(E, B, D) { var G = this._Impl; var F = D.getAttribute("id"); if (!F) { G .sendError( E, B, G.MALFORMEDXML, G.MALFORMEDXML, this._Lang .getMessage( "ERR_PPR_DELID", null, "_AjaxResponse.processDelete")); return false; } var C = this._Dom.byId(F); if (!C) { throw Error(this._Lang.getMessage( "ERR_PPR_UNKNOWNCID", null, "_AjaxResponse.processDelete", F)); } var A = this._Dom.getParent(C, "form"); if (null != A) { this._updateForms.push(A); } this._Dom.deleteItem(C); return true; }, processAttributes : function(E, A, C) { var J = this._Impl; var B = C.getAttribute("id"); if (!B) { J .sendError(E, A, J.MALFORMEDXML, J.MALFORMEDXML, "Error in attributes, id not in xml markup"); return false; } var K = C.childNodes; if (!K) { return false; } for ( var H = 0; H < K.length; H++) { var D = K[H]; var I = D.getAttribute("name"); var G = D.getAttribute("value"); if (!I) { continue; } I = this._Lang.trim(I); if ("undefined" == typeof G || null == G) { G = ""; } switch (B) { case this.P_VIEWROOT: throw new Error(this._Lang.getMessage( "ERR_NO_VIEWROOTATTR", null, "_AjaxResponse.processAttributes")); break; case this.P_VIEWHEAD: throw new Error(this._Lang.getMessage( "ERR_NO_HEADATTR", null, "_AjaxResponse.processAttributes")); break; case this.P_VIEWBODY: var F = document.getElementsByTagName("body")[0]; this._Dom.setAttribute(F, I, G); break; default: this._Dom.setAttribute(document .getElementById(B), I, G); break; } } return true; }, _finalize : function() { delete this._onException; delete this._onWarning; delete this._updateElems; delete this._updateForms; delete this.appliedViewState; } }); myfaces._impl.core._Runtime .extendClass( "myfaces._impl.xhrCore._Transports", Object, { _PAR_ERRORLEVEL :"errorlevel", _PAR_QUEUESIZE :"queuesize", _PAR_PPS :"pps", _PAR_TIMEOUT :"timeout", _PAR_DELAY :"delay", _q :new myfaces._impl.xhrCore._AjaxRequestQueue(), _threshold :"ERROR", _Lang :myfaces._impl._util._Lang, _RT :myfaces._impl.core._Runtime, xhrPost : function(D, C, B, A) { (new (this._getAjaxReqClass(B))(this._getArguments(D, C, B, A))).send(); }, xhrQueuedPost : function(D, C, B, A) { this._q.enqueue(new (this._getAjaxReqClass(B))(this ._getArguments(D, C, B, A))); }, xhrGet : function(E, D, C, A) { var B = this._getArguments(E, D, C, A); B.ajaxType = "GET"; (new (this._getAjaxReqClass(C))(B)).send(); }, xhrQueuedGet : function(E, D, C, A) { var B = this._getArguments(E, D, C, A); B.ajaxType = "GET"; this._q.enqueue(new (this._getAjaxReqClass(C))(B)); }, multipartPost : function(E, D, C, A) { var B = this._getArguments(E, D, C, A); (new (this._getMultipartReqClass(C))(B)).send(); }, multipartQueuedPost : function(E, D, C, A) { var B = this._getArguments(E, D, C, A); this._q.enqueue(new (this._getMultipartReqClass(C))(B)); }, multipartGet : function(E, D, C, A) { var B = this._getArguments(E, D, C, A); B.ajaxType = "GET"; (new (this._getMultipartReqClass(C))(B)).send(); }, multipartQueuedGet : function(E, D, C, A) { var B = this._getArguments(E, D, C, A); B.ajaxType = "GET"; this._q.enqueue(new (this._getMultipartReqClass(C))(B)); }, response : function(C, B) { var A = new (this._getAjaxReqClass(B))( { xhr :C, context :B }); A._response.processResponse(C, B); }, _getArguments : function(H, F, E, B) { var G = myfaces._impl.core._Runtime; var A = G.getLocalOrGlobalConfig; var D = myfaces._impl._util._Lang; var C = { "source" :H, "sourceForm" :F, "context" :E, "passThrough" :B, "xhrQueue" :this._q, "onDone" :this._Lang.hitch(this, this._stdOnDone), "onSuccess" :this._Lang.hitch(this, this._stdOnSuccess), "onError" :this._Lang.hitch(this, this._stdOnError), "onTimeout" :this._Lang.hitch(this, this._stdOnTimeout), "onException" :this._Lang.hitch(this, this._stdErrorHandler), "onWarn" :this._Lang.hitch(this, this._stdErrorHandler) }; this._applyConfig(C, E, "alarmThreshold", this._PAR_ERRORLEVEL); this._applyConfig(C, E, "queueSize", this._PAR_QUEUESIZE); this._applyConfig(C, E, "timeout", this._PAR_TIMEOUT); this._applyConfig(C, E, "delay", this._PAR_DELAY); if (A(E, this._PAR_PPS, false) && D.exists(B, myfaces._impl.core.Impl.P_EXECUTE) && B[myfaces._impl.core.Impl.P_EXECUTE].length > 0) { C["partialIdsArray"] = B[myfaces._impl.core.Impl.P_EXECUTE] .split(" "); } return C; }, _applyConfig : function(A, E, D, C) { var F = myfaces._impl.core._Runtime; var B = F.getLocalOrGlobalConfig; if (B(E, C, null) != null) { A[D] = B(E, C, null); } }, _stdOnDone : function(B, A) { this._loadImpl(); this._Impl.sendEvent(B, A, this._Impl.COMPLETE); }, _stdOnSuccess : function(B, A) { this._loadImpl(); try { this._Impl.response(B, A); this._Impl.sendEvent(B, A, this._Impl.SUCCESS); } finally { this._q.processQueue(); delete A.source; } }, _stdOnError : function(C, B) { this._loadImpl(); var A; try { A = "Request failed"; if (C.status) { A += "with status " + C.status; if (C.statusText) { A += " and reason " + this._xhr.statusText; } } } catch (D) { A = "Request failed with unknown status"; } finally { try { this._Impl.sendError(C, B, this._Impl.HTTPERROR, this._Impl.HTTPERROR, A); } finally { this._q.processQueue(); delete B.source; } } }, _stdOnTimeout : function(B, A) { this._loadImpl(); try { this._Impl.sendEvent(B, A, this._Impl.TIMEOUT_EVENT, this._Impl.TIMEOUT_EVENT); } finally { this._q.processQueue(); } }, _stdErrorHandler : function(G, E, D, F, C) { this._loadImpl(); var B = myfaces._impl._util._Lang; var A = B.isExceptionProcessed(C); try { if (this._threshold == "ERROR" && !A) { this._Impl.sendError(G, E, this._Impl.CLIENT_ERROR, C.name, "MyFaces ERROR:" + this._Lang.createErrorMsg(D, F, C)); } } finally { this._q.cleanup(); try { if (!A) { B.setExceptionProcessed(C); } } catch (H) { } throw C; } }, _loadImpl : function() { if (!this._Impl) { this._Impl = myfaces._impl.core._Runtime .getGlobalConfig("jsfAjaxImpl", myfaces._impl.core.Impl); } return this._Impl; }, _getMultipartReqClass : function(A) { return myfaces._impl.xhrCore._IFrameRequest; }, _getAjaxReqClass : function(A) { return myfaces._impl.xhrCore._AjaxRequest; } }); myfaces._impl.core._Runtime .singletonExtendClass( "myfaces._impl.core.Impl", Object, { _transport :new (myfaces._impl.core._Runtime .getGlobalConfig("transport", myfaces._impl.xhrCore._Transports))(), _evtListeners :new (myfaces._impl.core._Runtime .getGlobalConfig("eventListenerQueue", myfaces._impl._util._ListenerQueue))(), _errListeners :new (myfaces._impl.core._Runtime .getGlobalConfig("errorListenerQueue", myfaces._impl._util._ListenerQueue))(), IDENT_ALL :"@all", IDENT_NONE :"@none", IDENT_THIS :"@this", IDENT_FORM :"@form", P_PARTIAL_SOURCE :"javax.faces.source", P_VIEWSTATE :"javax.faces.ViewState", P_AJAX :"javax.faces.partial.ajax", P_EXECUTE :"javax.faces.partial.execute", P_RENDER :"javax.faces.partial.render", P_EVT :"javax.faces.partial.event", ERROR :"error", EVENT :"event", BEGIN :"begin", COMPLETE :"complete", SUCCESS :"success", HTTPERROR :"httpError", EMPTY_RESPONSE :"emptyResponse", MALFORMEDXML :"malformedXML", SERVER_ERROR :"serverError", CLIENT_ERROR :"clientError", TIMEOUT_EVENT :"timeout", _Lang :myfaces._impl._util._Lang, _Dom :myfaces._impl._util._Dom, _BLOCKFILTER : { onerror :true, onevent :true, render :true, execute :true, myfaces :true }, getViewState : function(C) { if (C) { C = this._Lang.byId(C); } if (!C || !C.nodeName || C.nodeName.toLowerCase() != "form") { throw new Error(this._Lang .getMessage("ERR_VIEWSTATE")); } var B = new myfaces._impl.xhrCore._AjaxUtils(0); var A = this._Lang.createFormDataDecorator( []); B.encodeSubmittableFields(A, null, null, null, C, null); return A.makeFinal(); }, request : function(E, B, L) { var F = this._Lang; var H = this._Dom; var J = myfaces._impl.core._Runtime.getLocalOrGlobalConfig; F.assertType(L.onerror, "function"); F.assertType(L.onevent, "function"); L = L || {}; if ("undefined" == typeof B) { B = window.event || null; } E = F.byId(E); var G = H.nodeIdOrName(E); var I = F.mixMaps( {}, L, true, this._BLOCKFILTER); if (B) { I[this.P_EVT] = B.type; } var D = { source :E, onevent :L.onevent, onerror :L.onerror, myfaces :L.myfaces }; var C = (L.myfaces && L.myfaces.form) ? F .byId(L.myfaces.form) : this._getForm(E, B); I[this.P_PARTIAL_SOURCE] = G; I[this.P_AJAX] = true; if (L.execute) { this._transformList(I, this.P_EXECUTE, L.execute + " @this", C, G); } else { I[this.P_EXECUTE] = G; } if (L.render) { this._transformList(I, this.P_RENDER, L.render, C, G); } var K = this._getTransportType(D, I, C); D._mfInternal = {}; var A = D._mfInternal; A["_mfSourceFormId"] = C.id; A["_mfSourceControlId"] = G; A["_mfTransportType"] = K; I[C.id] = C.id; this._transport[K](E, C, D, I); }, _getForm : function(E, D) { var C = this._Dom; var A = this._Lang; var B = C.fuzzyFormDetection(E); if (!B && D) { B = C.fuzzyFormDetection(A.getEventTarget(D)); if (!B) { throw Error(A.getMessage("ERR_FORM")); } } else { if (!B) { throw Error(A.getMessage("ERR_FORM")); } } return B; }, _getTransportType : function(B, G, A) { var H = myfaces._impl.core._Runtime.getLocalOrGlobalConfig; var E = this._Lang; var F = this._Dom; var C = H(B, "transportAutoSelection", false); var D = (C && F.getAttribute(A, "enctype") == "multipart/form-data") ? F .isMultipartCandidate(G[this.P_EXECUTE]) : false; var I = (!D) ? H(B, "transportType", "xhrQueuedPost") : H(B, "transportType", "multipartQueuedPost"); if (!this._transport[I]) { throw new Error(E.getMessage("ERR_TRANSPORT", null, I)); } return I; }, _transformList : function(J, H, C, A, F) { var D = this._Lang; var E = 1, K = (C) ? C.split(/\s+/) : [], I = (K.length) ? D .arrToMap(K, E) : {}, L = I[this.IDENT_NONE], M = I[this.IDENT_ALL], B = I[this.IDENT_THIS], G = I[this.IDENT_FORM]; if (L) { J[H] = this.IDENT_NONE; return J; } if (M) { J[H] = this.IDENT_ALL; return J; } if (G) { K[G - E] = A.id; } if (B && !I[F]) { K[B - E] = F; } J[H] = K.join(" "); return J; }, addOnError : function(A) { this._errListeners.enqueue(A); }, addOnEvent : function(A) { this._evtListeners.enqueue(A); }, sendError : function sendError(E, B, A, K, I) { var D = myfaces._impl._util._Lang; var J = {}; var F = function() { return (A && A === myfaces._impl.core.Impl.MALFORMEDXML) ? D .getMessage("ERR_MALFORMEDXML") : ""; }; J.type = this.ERROR; J.status = A; J.serverErrorName = K; J.serverErrorMessage = I; try { J.source = B.source; J.responseCode = E.status; J.responseText = E.responseText; J.responseXML = E.responseXML; } catch (G) { } if (B["onerror"]) { B.onerror(J); } this._errListeners.broadcastEvent(J); if (jsf.getProjectStage() === "Development" && this._errListeners.length() == 0) { var H = myfaces._impl.core._Runtime .getGlobalConfig("defaultErrorOutput", alert); var C = []; C.push((A) ? A : ""); C.push((K) ? K : ""); C.push((I) ? I : ""); C.push(F()); H(C.join("-") + D.getMessage("MSG_DEV_MODE")); } }, sendEvent : function sendEvent(G, E, C) { var D = myfaces._impl._util._Lang; var F = {}; F.type = this.EVENT; F.status = C; F.source = E.source; if (C !== this.BEGIN) { try { var B = function(J, I) { try { return J[I]; } catch (K) { return "unkown"; } }; F.responseCode = B(G, "status"); F.responseText = B(G, "responseText"); F.responseXML = B(G, "responseXML"); } catch (H) { var A = myfaces._impl.core._Runtime .getGlobalConfig("jsfAjaxImpl", myfaces._impl.core.Impl); A.sendError(G, E, this.CLIENT_ERROR, "ErrorRetrievingResponse", D .getMessage("ERR_CONSTRUCT", H .toString())); throw H; } } if (E.onevent) { E.onevent.call(null, F); } this._evtListeners.broadcastEvent(F); }, response : function(B, A) { this._transport.response(B, A); }, getProjectStage : function() { var D = document.getElementsByTagName("script"); var B = myfaces._impl.core._Runtime.getGlobalConfig; for ( var C = 0; C < D.length; C++) { if (D[C].src .search(/\/javax\.faces\.resource\/jsf\.js.*ln=javax\.faces/) != -1) { var A = D[C].src.match(/stage=([^&;]*)/); if (A) { if (A[1] == "Production" || A[1] == "Development" || A[1] == "SystemTest" || A[1] == "UnitTest") { return A[1]; } } else { return B("projectStage", "Production"); } } } return B("projectStage", "Production"); }, chain : function(F, E) { var A = arguments.length; var D = this._Lang; if (A < 2) { throw new Error(D.getMessage("ERR_EV_OR_UNKNOWN")); } else { if (A < 3) { if ("function" == typeof E || this._Lang.isString(E)) { throw new Error(D .getMessage("ERR_EVT_PASS")); } return true; } } if ("undefined" == typeof F) { throw new Error(D.getMessage("ERR_SOURCE_DEF_NULL")); } else { if ("function" == typeof F) { throw new Error(D.getMessage("ERR_SOURCE_FUNC")); } } if (this._Lang.isString(F)) { throw new Error(D.getMessage("ERR_SOURCE_NOSTR")); } if ("function" == typeof E || this._Lang.isString(E)) { throw new Error(D.getMessage("ERR_EV_OR_UNKNOWN")); } for ( var C = 2; C < A; C++) { var B; if ("function" == typeof arguments[C]) { B = arguments[C].call(F, E); } else { B = new Function("event", arguments[C]).call(F, E); } if (B === false) { return false; } } return true; } }); if ("undefined" != typeof OpenAjax && ("undefined" == typeof jsf || null == typeof jsf)) { OpenAjax.hub.registerLibrary("jsf", "www.sun.com", "1.0", null); } if (!window.jsf) { window.jsf = new function() { this.specversion = 200000; this.implversion = 2; this.getProjectStage = function() { var A = myfaces._impl.core._Runtime.getGlobalConfig("jsfAjaxImpl", myfaces._impl.core.Impl); return A.getProjectStage(); }; this.getViewState = function(B) { var A = myfaces._impl.core._Runtime.getGlobalConfig("jsfAjaxImpl", myfaces._impl.core.Impl); return A.getViewState(B); }; }; } if (!jsf.ajax) { jsf.ajax = new function() { this.request = function(C, D, B) { if (!B) { B = {}; } var A = myfaces._impl.core._Runtime.getGlobalConfig("jsfAjaxImpl", myfaces._impl.core.Impl); return A.request(C, D, B); }; this.addOnError = function(B) { var A = myfaces._impl.core._Runtime.getGlobalConfig("jsfAjaxImpl", myfaces._impl.core.Impl); return A.addOnError(B); }; this.addOnEvent = function(B) { var A = myfaces._impl.core._Runtime.getGlobalConfig("jsfAjaxImpl", myfaces._impl.core.Impl); return A.addOnEvent(B); }; this.response = function(C, B) { var A = myfaces._impl.core._Runtime.getGlobalConfig("jsfAjaxImpl", myfaces._impl.core.Impl); return A.response(C, B); }; }; } if (!jsf.util) { jsf.util = new function() { this.chain = function(C, B) { var A = myfaces._impl.core._Runtime.getGlobalConfig("jsfAjaxImpl", myfaces._impl.core.Impl); return A.chain.apply(A, arguments); }; }; }