HxG_5.prototype.JSFBehavior=function () { this.beforeOthers=true; this.suppressAttach=false; } HxG_5.prototype.JSFBehavior.prototype.onPageLoad=function () { this.setEvent(); return true; } HxG_5.prototype.JSFBehavior.prototype.setAttribute=function(a) { hX_5.parseArg (this.attributeTable, this, (arguments.length>1)?arguments:a); if (this.setAttributeCode) this.setAttributeCode(); return true; } HxG_5.prototype.JSFBehavior.prototype.getAttribute=function (attribute) { return (hX_5.getArg(this.attributeTable, this, attribute)); } HxG_5.prototype.JSFBehavior.prototype.setEvent=function () { if (this.DOMobj != null) { if (!this.HTMLrendered && !(this.eventname==hX_5._onL || this.suppressAttach)) { if (!this.beforeOthers) hX_5.attachBehaviorEvent(this.DOMobj, this.type, this.eventname, hX_5._lN); else hX_5.attachBehaviorEvent(this.DOMobj, this.type, this.eventname, hX_5._lP); } if (this.setEventCode) this.setEventCode(); this.HTMLrendered=true; return true; } return false; } HxG_5.prototype.JSFBehavior.prototype.destroy=function () { var e,i,d=[this.actions,this.targets]; if (this.destroyCode) this.destroyCode(); if (this.extraEvents) { while (this.extraEvents.length > 0) { e=this.extraEvents.pop(); hX_5.removeEvent(e[0],e[1],null,true); } delete this.extraEvents; } if (this.extraIds) { while (this.extraIds.length > 0) { e=this.extraIds.pop(); hX_5.removeEvent(e[0],e[1],e[2]); } delete this.extraIds; } for (i=0; i0) d[i].pop(); delete d[i]; } } delete d; if (this.attributeTable) delete this.attributeTable; return true; } HxG_5.prototype.JSFBehaviorGeneric=function () { this.type=hX_5.BHR_generic; this.beforeOthers=false; this.fcn=null; this.actions= []; this.targets= []; this.attributeTable=[]; this.attributeTable ['action']=['actions', hX_5.ARG_TO_NAU, false, null, null]; this.attributeTable ['function']=['fcn', hX_5.ARG_TO_FCNS, false, null, null]; this.attributeTable ['target']=['targets', hX_5.ARG_TO_NAN, false, null, null]; this.setAttribute(arguments); } HxG_5.prototype.JSFBehaviorGeneric.prototype=new hX_5.JSFBehavior(); HxG_5.prototype.JSFBehaviorGeneric.prototype.setEventCode=function() { if (!this.HTMLrendered && this.eventname == hX_5._onL) { var evt; if (document.createEventObject!=undefined) { evt=document.createEventObject(); evt.type=hX_5._onL; } else { evt=document.createEvent("HTMLEvents"); evt.initEvent(hX_5._onL, true, true); } return hX_5.action.processAction(this.DOMobj, evt, this.fcn, this.actions, true, this.targets, null, null, null); } return true; } HxG_5.prototype.JSFBehaviorGeneric.prototype.dispatchBehavior=function (thisObj, evt) { return ((this.DOMobj != null) && (evt != null)) ? hX_5.action.processAction(this.DOMobj, evt, this.fcn, this.actions, true, this.targets, null, null, null) : true; } HxG_5.prototype.JSFBehaviorKeybind=function () { this.type=hX_5.BHR_keybind; this.keyArray=[]; this.keyCode=this.modifier=this.fcn=null; this.actions= []; this.targets= []; this.cancelBubble=true; this.retainFocus=false; this.coBehavior=-1; this.attributeTable=[]; this.attributeTable ['keycode']=['keyCode', hX_5.ARG_TO_NUM, false, 1, 999999]; this.attributeTable ['modifier']=['modifier', hX_5.ARG_TO_NAU, false, null, null]; this.attributeTable ['action']=['actions', hX_5.ARG_TO_NAU, false, null, null]; this.attributeTable ['function']=['fcn', hX_5.ARG_TO_FCNS, false, null, null]; this.attributeTable ['target']=['targets', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['cancel-bubble']=['cancelBubble', hX_5.ARG_IS_TRUE, false, null, null]; this.attributeTable ['retain-focus']=['retainFocus', hX_5.ARG_IS_TRUE, false, null, null]; this.setAttribute(arguments); } HxG_5.prototype.JSFBehaviorKeybind.prototype=new hX_5.JSFBehavior(); HxG_5.prototype.JSFKey=function () { this.keyCode=null; this.modAlt=this.modShift=this.modCtrl=false; this.actions=this.targets=this.fcn=null; this.cancelBubble=true; this.retainFocus=false; } HxG_5.prototype.JSFBehaviorKeybind.prototype.addSubComponent=function(obj) { var sub=new hX_5.JSFKey(); sub.keyCode=obj.keyCode; if (obj.modifier) { obj.modifier=obj.modifier; sub.modAlt=(obj.modifier.indexOf("ALT") >= 0); sub.modShift= (obj.modifier.indexOf("SHIFT") >= 0); sub.modCtrl=(obj.modifier.indexOf("CTRL") >= 0); } if (obj.actions) sub.actions=obj.actions; if (obj.targets) sub.targets=obj.targets; if (obj.fcn) sub.fcn=obj.fcn; if (obj.cancelBubble) sub.cancelBubble= obj.cancelBubble; if (obj.retainFocus) sub.retainFocus=obj.retainFocus; this.keyArray.push(sub); if (obj.keyCode == 112) document.onhelp=function () { return false; } } HxG_5.prototype.JSFBehaviorKeybind.prototype.setEventCode=function () { if (!this.HTMLrendered) if (hX_5.brw.isNavOrMoz()) hX_5.attachBehaviorEvent(this.DOMobj, this.type, hX_5._onKP, hX_5._lN, hX_5._onKD); } HxG_5.prototype.JSFBehaviorKeybind.prototype.setAttributeCode=function() { var obj, i, found=false; for (i=0; i < this.keyArray.length; i++) { obj=this.keyArray[i]; if (obj.keyCode==this.keyCode && (this.modifier==null || (this.modifier!= null && obj.modifier && obj.modifier==this.modifier))) { found=true; if (this.actions) obj.actions=this.actions; if (this.targets) obj.targets=this.targets; if (this.fcn) obj.fcn=this.fcn; if (this.cancelBubble) obj.cancelBubble= this.cancelBubble; if (this.retainFocus) obj.retainFocus=this.retainFocus; } } if (!found) this.addSubComponent(this); } HxG_5.prototype.isKeyBound=function(obj, keyname, evt, action, action1, action2) { if (obj != null && keyname != null && this.isString(keyname)) { var a, b, c, s, i, j, k, objid; for (i=0; i < 2; i++) { objid=(i==0) ? ((obj.tagName != hX_5._FRM) ? obj.id : null) : ((obj.form != null && obj.form.tagName == hX_5._FRM) ? obj.form.id : null) b=(objid != null) ? (this.getBehaviorById(objid, hX_5.BHR_keybind, hX_5._evKD)) : null; b=(b != null) ? b : this.getBehaviorById(objid, hX_5.BHR_keybind, hX_5._evKP); if (b != null) { for (k=0; k < b.keyArray.length; k++) { if (b.keyArray[k].keyCode == keyname) if (evt == null) return true; else { a=((evt.altKey) ? true : false), c=((evt.ctrlKey) ? true : false), s=((evt.shiftKey) ? true : false); if ((a == b.keyArray[k].modAlt) && (s == b.keyArray[k].modShift) && (c == b.keyArray[k].modCtrl)) { if (action) { for (j=0;j0) { o=this.keyArray.pop(); delete o; } } HxG_5.prototype.JSFBehaviorKeybind.prototype.dispatchBehavior=function (thisObj, evt) { var result=true; if ((this.DOMobj != null) && (evt != null) && (this.keyArray.length > 0)) { var i, j, t, b, a=((evt.altKey) ? true : false), c=((evt.ctrlKey) ? true : false), s=((evt.shiftKey) ? true : false); if (this.coBehavior==-1) this.coBehavior=hX_5.getBehaviorById(this.DOMobj.id, hX_5.BHR_assist, hX_5._onIN); for (i=0; i < this.keyArray.length && result; i++) { if ((evt.keyCode == this.keyArray[i].keyCode) && (a == this.keyArray[i].modAlt) && (s == this.keyArray[i].modShift) && (c == this.keyArray[i].modCtrl)) { if ((this.keyArray[i].actions!=null && this.keyArray[i].actions.length>0 && this.keyArray[i].actions[0]!=null) || this.keyArray[i].fcn != null) { if (evt.type == hX_5._evKP) result=false; else { b=false; if (this.coBehavior!=null) for (j=0;!b&&j "); hX_5.action.positionLabels (this.DOMobj, this.spanIsPopup, this.spInfo, this.spError); } if ((this.spInfo!=null) && this.infoSpanAlways && !v) hX_5.g.setP(this.spInfo, hX_5._DSP, ((this.spanIsPopup!=null)?hX_5._BLK:hX_5._E)); if (this.spError!=null) { if (this.errorSpanAlways) this.errorString=hX_5.getIHTML(this.spError); this.errorOnLoad=(v) ? this.errorString : null; if (this.errorOnLoad!=null) { if (this.eventname==hX_5._onB) { if (this.errorClass!=null && this.DOMobj.className!=this.errorClass) this.DOMobj.className=this.errorClass; } else { if (this.spLabel && this.labelErrorClass!=null && this.spLabel.className!=this.labelErrorClass) this.spLabel.className=this.labelErrorClass; } } } if (this.eventname==hX_5._onB && this.errorActions!=null && this.successActions!=null) { for (i=0; !foundError && i < this.errorActions.length; i++) { t=(this.errorActions[i]!=null) ? this.errorActions[i] : hX_5._E; if (t==hX_5.ACT_FOCUS || t==hX_5.ACT_SELECTED || t==hX_5.ACT_UNSELECTED) foundError=this.errorTargets == null || this.errorTargets.length < i+1 || this.errorTargets[i]==null || this.errorTargets[i].length==0 || this.errorTargets[i]==this.DOMobj.id; } if (foundError) { for (i=0; i < this.successActions.length; i++) { t=(this.successActions[i]!=null) ? this.successActions[i] : hX_5._E; if (t==hX_5.ACT_FOCUS || t==hX_5.ACT_SELECTED) { if (this.successTargets == null || this.successTargets.length < i+1 || this.successTargets[i]==null || this.successTargets[i].length==0 || this.successTargets[i]==this.DOMobj.id) this.successActions[i]=hX_5._E; } } } } foundError=false; for (i=0; this.errorActions != null && i < this.errorActions.length; i++) { t=(this.errorActions[i]!=null) ? this.errorActions[i] : hX_5._E; if (t==hX_5.ACT_FOCUS || t==hX_5.ACT_SELECTED || t==hX_5.ACT_UNSELECTED) { if (foundError) this.errorActions[i]=hX_5._E; else foundError=true; } } foundError=false; for (i=0; this.successActions != null && i < this.successActions.length; i++) { t=(this.successActions[i]!=null) ? this.successActions[i] : hX_5._E; if (t==hX_5.ACT_FOCUS || t==hX_5.ACT_SELECTED || t==hX_5.ACT_UNSELECTED) { if (foundError) this.successActions[i]=hX_5._E; else foundError=true; } } } } HxG_5.prototype.JSFBehaviorValidate.prototype.destroyCode=function () { var i,d=[this.spLabel,this.spInfo,this.spError,this.successActions,this.errorActions,this.successTargets,this.errorTargets]; for (i=0; i0) d[i].pop(); delete d[i]; } } delete d; return true; } HxG_5.prototype.JSFBehaviorValidate.prototype.subDispatch=function (evt) { evt=(evt) ? evt : ((event) ? event: null); if (evt) { var b,c=hX_5.evtGetTarget(evt); if (c!=null) { b=hX_5.getBehaviorById(c.name, hX_5.BHR_validate, evt.type); if (b!=null && b.DOMobj) return(b.dispatchBehavior (b.DOMobj, evt)); } } } HxG_5.prototype.JSFBehaviorValidate.prototype.subDispatch1=function (evt) { evt=(evt) ? evt : ((event) ? event: null); if (evt) { var b,c=hX_5.evtGetTarget(evt); if (c!=null) { b=c.id.lastIndexOf("_INPUT"); if (b>=0) { c=c.id.substr(0,b); b=hX_5.getBehaviorById(c, hX_5.BHR_validate, evt.type); if (b!=null && b.DOMobj) return(b.dispatchBehavior (b.DOMobj, evt)); } } } } HxG_5.prototype.JSFBehaviorValidate.prototype.dispatchBehavior=function (thisObj, evt) { var result=true; if ((this.DOMobj != null) && (evt != null)) { if (hX_5.pendingFocusReturn && hX_5.pendingFocusReturn != this.DOMobj.id) return true; if (evt.type==hX_5._evF && hX_5.pendingBlurRefocus != null && hX_5.pendingBlurRefocus == this.DOMobj.id) { hX_5.pendingBlurRefocus=null; return true; } hX_5.pendingFocusReturn=hX_5.pendingBlurRefocus=null; if ((this.DOMobj.readOnly != null && this.DOMobj.readOnly == true) || (this.DOMobj.disabled != null && this.DOMobj.disabled == true)) return true; if (this.coBehavior == -1) this.coBehavior=hX_5.getBehaviorById(this.DOMobj.id, hX_5.BHR_assist, hX_5._onIN); if (evt.type==hX_5._evB || evt.type==hX_5._evF) { var error=null, strValue=this.DOMobj.value, objValue=strValue; if (evt.type==hX_5._evF) { if (this.coBehavior && this.coBehavior.assist) error=null; else if (this.converter) { if (this.converter && strValue.length > 0) { objValue=this.converter.stringToValue(strValue); if (objValue == null) error=this.converter.lastError(); } } if (error != null && error == hX_5.ERR_empty) error=null; } else { var spc=this.specialValidator(); if (spc.handled) { if (spc.lastError) error=hX_5.ERR_required; else objValue=spc.lastValue; delete spc; } else { if (this.converter) { if (strValue.length == 0 && (this.converter.type != hX_5.CVT_mask)) objValue=hX_5._E; else { objValue=this.converter.stringToValue(strValue); if (objValue == null) error=this.converter.lastError(); else { strValue=this.converter.valueToString(objValue); if (strValue == null) error=this.converter.lastError(); else this.DOMobj.value=strValue; } } } if (error == null && this.validator) { if (!(this.validator.validate(objValue, this.converter))) error=this.validator.lastError(); } } } var fcn=this.successFunction, action, cssStyle, b=null, cssLabelStyle=null, tgt; if (error != null) { evt.errorMsg=error; evt.objValue=void(0); } else { if (fcn != null) { evt.errorMsg=void(0); evt.objValue=objValue; try { var realfcn=(hX_5.isFunction(fcn)) ? fcn : new Function ("event", fcn); result=realfcn.call(thisObj, evt); result=(hX_5.isUnDef(typeof result)) ? true : ((result == false) ? false: true); if (evt) { if (evt.returnValue!=undefined && evt.returnValue == false) result=false; else if (evt.getPreventDefault && evt.getPreventDefault()) result=false; } } catch (e) { window.status=hX_5.INTERR_Dispatcher; if (evt && evt.errorMsg) evt.errorMsg=null; } if (!result) { if (evt.errorMsg!=undefined) error=evt.errorMsg; else error=evt.errorMsg=hX_5.ERR_generic } } } if (this.errorOnLoad!=null && this.hasLabels) evt.errorMsg=error=this.errorOnLoad; if (error && this.errorSpanAlways && this.errorString!=null) evt.errorMsg=error=this.errorString; if (error != null) { fcn=this.errorFunction; action=this.errorActions; tgt=(this.errorTargets == null) ? [this.DOMobj] : this.errorTargets; cssStyle=(this.errorClass!=null)?this.errorClass:((this.successClass) ? this.successClass : this.defaultClass); } else { fcn=null; action=this.successActions; tgt=(this.successTargets == null) ? [this.DOMobj] : this.successTargets; cssStyle=(this.successClass) ? this.successClass : this.defaultClass; } var lab=null, inf=null, err=null, infoShow=false, errorShow=false; if (evt.type==hX_5._evB || (evt.type==hX_5._evF && error!=null)) { lab=this.spLabel, inf=this.spInfo; err=this.spError; if (error != null) { if (this.spLabel) cssLabelStyle=((this.labelErrorClass!=null)?this.labelErrorClass:((this.labelSuccessClass!=null)?this.labelSuccessClass:null)); if (this.spInfo) infoShow=false if (this.spError) errorShow=true; } else { if (this.spLabel) cssLabelStyle=(this.labelSuccessClass!=null)?this.labelSuccessClass:null; if (this.spInfo) infoShow=(this.infoSpanAlways); if (this.spError) errorShow=false; } if (this.errorOnLoad!=null) { this.errorOnLoad=null; b=hX_5.getBehaviorById(this.DOMobj.id, this.type, ((this.eventname==hX_5._onF)?hX_5._onB:hX_5._onF)); if (b) b.clearError(); } } else { if (!this.infoSpanAlways && (this.spError==null || !this.isVisible(this.spError))) { inf=this.spInfo; infoShow=true; } } result=hX_5.action.processActionEx (this.DOMobj, evt, fcn, action, false, tgt, cssStyle, null, null, (error != null), error, lab, cssLabelStyle, this.spanIsPopup, inf, infoShow, err, errorShow); } } return result; } HxG_5.prototype.JSFBehaviorValidate.prototype.specialValidator=function () { var r=false, lErr=false, lVal=hX_5._E, sel=false, i,c,s,p=((this.DOMobj.form!=undefined)?this.DOMobj.form:this.DOMobj.parentNode); if (this.validator && this.validator.required && this.DOMobj!=null && this.DOMobj.tagName!=undefined) { if (this.DOMobj.tagName==hX_5._SEL) { while (p!=null && p.tagName!=undefined && p.tagName!=hX_5._FRM) p=p.parentNode; if (p && p.tagName!=undefined && p.tagName==hX_5._FRM && this.DOMobj.id!=undefined) { r=true; c=p.elements[this.DOMobj.id]; c=(c.length==undefined)?[c]:c; for (i=0; i0 && s!=hX_5._Z) { sel=true; lVal=lVal+((lVal.length>0)?hX_5._SM:hX_5._E)+c[i].value; } } else { sel=true; lVal=lVal+((lVal.length>0)?hX_5._SM:hX_5._E)+c[i].value; } } } if (!sel) lErr=true; } } else if (this.DOMobj.tagName==hX_5._TAB) { while (p!=null && p.tagName!=undefined && p.tagName!=hX_5._FRM) p=p.parentNode; if (p && p.tagName!=undefined && p.tagName==hX_5._FRM && this.DOMobj.id!=undefined) { r=true; c=p.elements[this.DOMobj.id]; c=(c.length==undefined)?[c]:c; for (i=0; i0)?c[i].value:"on"; lVal=lVal+((lVal.length>0)?hX_5._SM:hX_5._E)+s; sel=true; } } if (!sel) lErr=true; } } else if (this.DOMobj.tagName==hX_5._INP && this.DOMobj.type!=undefined) { if (this.DOMobj.type==hX_5._CHK) { r=true; if (!this.DOMobj.checked) lErr=true; else lVal="on"; } else if (this.DOMobj.type==hX_5._FIL) { r=true; if (this.DOMobj.value!=null && this.DOMobj.value.length>0) lVal=this.DOMobj.value; else lErr=true; } } if (!r && this.isComponent!=null) { if (this.isComponent.type==hX_5.CMP_colorpicker) { r=true; if (this.DOMobj.value==null || this.DOMobj.value.length==0) lErr=true; else lVal=this.DOMobj.value; } else if (this.isComponent.type==hX_5.CMP_calendar) { r=true; c=hX_5.getElementById(this.DOMobj.id + "_INPUT"); if (c.value==null || c.value.length==0) lErr=true; else lVal=c.value; } } } return {handled:r, lastError:lErr, lastValue:lVal}; } HxG_5.prototype.JSFBehaviorAssist=function () { this.type=hX_5.BHR_assist; this.suppressAttach=true; this.converterId=this.validatorId=this.autoTab=this.autoSubmit=this.autoChar=this.promptChar=this.imeMode=null; this.converter=this.validator=this.assist=this.state=this.maxChars=null; this.doAutoChar=false; this.attributeTable=[]; this.attributeTable ['converter']=['converterId', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['validator']=['validatorId', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['auto-char']=['autoChar', hX_5.ARG_IS_TRUE, false, null, null]; this.attributeTable ['auto-tab']=['autoTab', hX_5.ARG_TO_NUM, false, 0, 999999]; this.attributeTable ['auto-submit']=['autoSubmit', hX_5.ARG_TO_NAS, false, null, null]; this.attributeTable ['prompt-char']=['promptChar', hX_5.ARG_TO_NAS, false, null, null]; this.attributeTable ['ime-mode']=['imeMode', hX_5.ARG_TO_NAN, false, null, null]; this.setAttribute(arguments); } HxG_5.prototype.JSFBehaviorAssist.prototype=new hX_5.JSFBehavior(); HxG_5.prototype.JSFBehaviorAssist.prototype.setAttributeCode=function () { this.validator=this.converter=null; if (this.validatorId) this.validator=hX_5.getValidatorById(this.validatorId); if (this.converterId) this.converter=hX_5.getConverterById(this.converterId); if (this.validator) { if ((this.validator.type==hX_5.CVT_number || this.validator.type==hX_5.CVT_datetime) && this.converter==null) this.validator=null; } if (this.promptChar) { if (this.promptChar == hX_5._DFT || this.promptChar.length == 0) this.promptChar=hX_5._U; if (this.promptChar.length > 1) this.promptChar=this.promptChar.charAt(0); this.autoChar=true; } if (this.autoChar && !this.promptChar) this.promptChar=hX_5._U; if (this.autoChar && this.converter && this.converter.type==hX_5.CVT_number && this.converter.isExponent) { this.promptChar=this.autoChar=null; } this.doAutoChar=(this.autoChar && this.converter); } HxG_5.prototype.JSFBehaviorAssist.prototype.setEventCode=function () { if (!this.HTMLrendered) { if (this.doAutoChar) { this.state=new hX_5.inputState(this.DOMobj, this); if (this.converter.type == hX_5.CVT_number) this.assist=new hX_5.NumberAssist(this.DOMobj, this.state, this.converter, this.validator, this.promptChar); else if (this.converter.type == hX_5.CVT_datetime) this.assist=new hX_5.DateTimeAssist(this.DOMobj, this.state, this.converter, this.validator, this.promptChar); else if (this.converter.type == hX_5.CVT_mask) this.assist=new hX_5.MaskAssist(this.DOMobj, this.state, this.converter, this.validator, this.promptChar); } } if (this.autoTab != null) { var maxlen=(this.autoTab > 0) ? this.autoTab : 0; var domMaxLen=(this.DOMobj.maxLength == -1 || this.DOMobj.maxLength == 0x7fffffff || this.DOMobj.maxLength == void(0)) ? 0 : this.DOMobj.maxLength; maxlen=(maxlen <= 0) ? domMaxLen : maxlen; this.maxChars=(maxlen > 0) ? maxlen : ((this.converter && this.converter.getMaxLength) ? this.converter.getMaxLength(this.validator) : 0); if (this.maxChars <= 0) this.autoTab=null; else { if (domMaxLen > 0) this.DOMobj.maxLength=this.maxChars; if (!this.HTMLrendered && this.state == null) this.state=new hX_5.inputState(this.DOMobj, this, true); this.state.setAutoTab(this.maxChars); if (this.autoSubmit != null) this.state.setAutoSubmit(true); } } if (this.imeMode != null) { if (hX_5.brw.isIE()) { if (this.assist != null) this.DOMobj.style.imeMode=hX_5._DSB; else if (this.imeMode != null) this.DOMobj.style.imeMode=this.imeMode; } } } HxG_5.prototype.JSFBehaviorAssist.prototype.destroyCode=function () { var i,d=[this.state,this.assist]; for (i=0; i0) d[i].pop(); delete d[i]; } } delete d; return true; } HxG_5.prototype.JSFBehaviorAlert=function () { this.type=hX_5.BHR_alert; this.message=hX_5._E; this.mType=1; this.attributeTable=[]; this.attributeTable ['message']=['message', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['prompt-type']=['mType', hX_5.ARG_TO_NUM, false, 0, 2]; this.setAttribute(arguments); } HxG_5.prototype.JSFBehaviorAlert.prototype=new hX_5.JSFBehavior(); HxG_5.prototype.JSFBehaviorAlert.prototype.dispatchBehavior=function (thisObj, evt) { if (this.DOMobj != null && this.eventname != hX_5._E) { var a=[]; var t=[this.message]; if (this.mType == 2) { return false; } else if (this.mType == 1 && this.message != hX_5._E) { a.push(hX_5.ACT_CONFIRM); return hX_5.action.processAction(this.DOMobj, evt, null, a, true, t, null, null, null); } else if (this.message != hX_5._E) { a.push(hX_5.ACT_ALERT); hX_5.action.processAction(this.DOMobj, evt, null, a, true, t, null, null, null); return true; } } return true; } HxG_5.prototype.JSFBehaviorFocus=function () { this.type=hX_5.BHR_focus; this.beforeOthers=false; this.suppressAttach=true; this.focusId=null; this.select=false; this.attributeTable=[]; this.attributeTable ['focus-id']=['focusId', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['select']=['select', hX_5.ARG_IS_TRUE, false, null, null]; this.setAttribute(arguments); } HxG_5.prototype.JSFBehaviorFocus.prototype=new hX_5.JSFBehavior(); HxG_5.prototype.JSFBehaviorFocus.prototype.setEventCode=function() { if (!this.HTMLrendered && this.eventname == hX_5._onL) this.dispatchBehavior(null, null); return true; } HxG_5.prototype.JSFBehaviorFocus.prototype.dispatchBehavior=function (thisObj, evt) { if (this.eventname != hX_5._E) { var n, obj=(this.focusId == null) ? null : hX_5.getElementById(this.focusId); if (obj == null || (obj && obj.tagName && obj.tagName == HxG_5._FRM)) { n=hX_5.getTabElements(); if (n && n.length > 0 && n[0].obj) hX_5.i.setFocus(n[0].obj, this.select, true); } else hX_5.i.setFocus(obj, this.select, true); } return; } HxG_5.prototype.JSFBehaviorHS=function () { this.type=hX_5.BHR_hs; this.beforeOthers=false; this.inHideObject=this.inHideTree=this.inHideField=hX_5._E; this.state=null; this.hideObject=this.hideField=this.hideTree=null; this.hasComponents=null; this.attributeTable=[]; this.attributeTable ['hide-object']=['inHideObject', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['hide-tree']=['inHideTree', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['hide-field']=['inHideField', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['hide-field-value']=['state', hX_5.ARG_TO_NAN, false, null, null]; this.setAttribute(arguments); } HxG_5.prototype.JSFBehaviorHS.prototype=new hX_5.JSFBehavior(); HxG_5.prototype.JSFBehaviorHS.prototype.setEventCode=function() { this.hasComponents=(this.hideObject) ? hX_5.getComponentsInId(this.hideObject) : null; this.hideShow(); return true; } HxG_5.prototype.JSFBehaviorHS.prototype.setAttributeCode=function() { this.hideObject=hX_5.getElementById(this.inHideObject); this.hideTree=hX_5.getElementById(this.inHideTree); this.hideField=hX_5.getElementById(this.inHideField); this.state=(this.state==null || this.state==hX_5._E)?hX_5._NO:this.state.toLowerCase(); if (this.HTMLrendered) this.hideShow(); return true; } HxG_5.prototype.JSFBehaviorHS.prototype.dispatchBehavior=function (thisObj, evt) { if (this.DOMobj != null && this.hideObject != null) { this.state=(this.hideObject.style.display == hX_5._NO) ? hX_5._VS : hX_5._NO; this.hideShow(); } return; } HxG_5.prototype.JSFBehaviorHS.prototype.hideShow=function () { if (this.DOMobj != null && this.hideObject != null) { var bHidden=(this.hideObject.style.display == hX_5._NO), bStateHidden=(!(this.state == hX_5._VS)), lD='_display'; if (bHidden != bStateHidden) { var r, child, idString, node; if (this.hideTree != null && this.hideTree.rows) for (r=0; r < this.hideTree.rows.length; r++) { if (r != 0) { child=hX_5.findNestedObject(this.hideTree.rows[r], hX_5._TAB); if (child != null && child.nodeName == hX_5._TAB) { child.style.display=hX_5._NO; idString=child.id; idString=idString.substring(0,idString.lastIndexOf(hX_5._U)); node=hX_5.getElementById (idString+lD); if (node != null) node.value=hX_5._NO; } } } if (this.state != hX_5._NO) { this.hideObject.style.display=hX_5._E; if (this.hasComponents) hX_5.redraw(); } else this.hideObject.style.display=hX_5._NO; } if (this.hideField && this.state != this.hideField.value) this.hideField.value=this.state; } return; } HxG_5.prototype.JSFBehaviorTrack=function () { this.type=hX_5.BHR_track; this.suppressAttach=true; this.lastField=null; this.lastCursor=null; this.isTrackable=function (obj) { if (obj.tagName) { var t, skip=(obj.tagName==hX_5._BTN || obj.tagName==hX_5._ANC); if (!skip && obj.tagName == hX_5._INP) { t=obj.type.toLowerCase(); skip=(t==hX_5._SBM || t==hX_5._RES || t==hX_5._lIMG || t==hX_5._TBTN) } return !skip; } return false; } this.attributeTable=[]; this.setAttribute(arguments); } HxG_5.prototype.JSFBehaviorTrack.prototype=new hX_5.JSFBehavior(); HxG_5.prototype.JSFBehaviorTrack.prototype.setEventCode=function () { if (!this.HTMLrendered) { if (this.DOMobj && this.DOMobj.id && this.DOMobj.id.length > 0 && this.DOMobj.tagName && this.DOMobj.tagName == hX_5._FRM) { this.lastField=document.getElementById(this.DOMobj.id + ":POST_LASTFIELD"); this.lastCursor= document.getElementById(this.DOMobj.id + ":POST_LASTCURSOR"); if (this.lastField != null && this.lastField.value!=undefined) { this.extraEvents=[]; this.lastField.disabled=false; if (this.lastCursor != null) this.lastCursor.diabled=false; if (hX_5.brw.isIE()) { hX_5.attachBehaviorEvent(this.DOMobj, this.type, "onfocusin", hX_5._lF, hX_5._onIN); this.extraEvents.push([this.DOMobj,"onfocusin"]); } else { var i, obj, tabElements=hX_5.getTabElements(); for (i=0; i < tabElements.length; i++) { obj=tabElements[i].obj; if (obj && obj.id && obj.tagName && this.isTrackable(obj)) { hX_5.attachBehaviorEvent(obj, this.type, hX_5._onF, hX_5._lF, "oninput_FORM"); this.extraEvents.push([obj,hX_5._onF]); } } } hX_5.attachBehaviorEvent(this.DOMobj, this.type, hX_5._onMU, hX_5._lF, hX_5._onIN); hX_5.attachBehaviorEvent(this.DOMobj, this.type, hX_5._onKU, hX_5._lF, hX_5._onIN); this.extraEvents.push([this.DOMobj, hX_5._onMU]); this.extraEvents.push([this.DOMobj, hX_5._onKU]); if (hX_5.cursorTracking == null) hX_5.cursorTracking=[]; hX_5.cursorTracking.push(this); } } } } HxG_5.prototype.JSFBehaviorTrack.prototype.dispatchBehavior=function (thisObj, evt) { var src, result=true; if ((this.DOMobj != null) && (evt != null)) { src=(evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : (hX_5.brw.isIE() ? document.body : null)); this.markFocus(src, evt.type); } return result; } HxG_5.prototype.JSFBehaviorTrack.prototype.markFocus=function (src, etype) { if (src != null) { if (src.form!=undefined && src.form!=null && src.form==this.DOMobj) { var id=(src.id!=undefined && src.id!=null && src.id.length>0)?src.id:hX_5._E; id=(id.length>0) ? id : (src.name!=undefined && src.name!=null && src.name.length>0)?src.name:hX_5._E; if (id.length > 0 && hX_5.isTabbable(src) && this.isTrackable(src)) { if (etype=="focusin" || etype==hX_5._evF) { this.lastField.value=id; if (this.lastCursor != null) this.lastCursor.value=-1; } else if (this.lastCursor != null && (etype==hX_5._evMU || etype==hX_5._evKU)) { if (this.lastField.value == id) { var t=(src.type) ? src.type.toLowerCase() : hX_5._E; this.lastCursor.value=(src.tagName==hX_5._TXT || (src.tagName==hX_5._INP && t==hX_5._XT)) ? hX_5.sel.getCaretPos(src) : -1; } } } } } } HxG_5.prototype.JSFBehaviorMouseclick=function () { this.type=hX_5.BHR_mouseclick; this.suppressAttach=true; this.timer=null; this.mouseArray=[]; this.scope=hX_5._RGT; this.fcn=null; this.actions= []; this.targets= []; this.extraEvents=null; this.eventIds=null; this.attributeTable=[]; this.attributeTable ['scope']=['scope', hX_5.ARG_TO_NAN, false, null, null]; this.attributeTable ['action']=['actions', hX_5.ARG_TO_NAU, false, null, null]; this.attributeTable ['function']=['fcn', hX_5.ARG_TO_FCNS, false, null, null]; this.attributeTable ['target']=['targets', hX_5.ARG_TO_NAN, false, null, null]; this.setAttribute(arguments); } HxG_5.prototype.JSFBehaviorMouseclick.prototype=new hX_5.JSFBehavior(); HxG_5.prototype.JSFMouse=function () { this.scope=hX_5._RGT; this.actions=this.fcn=this.targets=null; } HxG_5.prototype.JSFBehaviorMouseclick.prototype.addSubComponent=function(obj) { var sub=new hX_5.JSFMouse(); sub.scope=obj.scope; if (obj.actions) sub.actions=obj.actions; if (obj.targets) sub.targets=obj.targets; if (obj.fcn) sub.fcn=obj.fcn; this.mouseArray.push(sub); } HxG_5.prototype.JSFBehaviorMouseclick.prototype.setAttributeCode=function() { var o, i, found=false; if (this.scope) this.scope=this.scope.toLowerCase(); for (i=0; i < this.mouseArray.length; i++) { o=this.mouseArray[i]; if (o.scope==this.scope) { found=true; if (this.actions) o.actions=this.actions; if (this.targets) o.targets=this.targets; if (this.fcn) o.fcn=this.fcn; } } if (!found) this.addSubComponent(this); } HxG_5.prototype.JSFBehaviorKeybind.prototype.destroyCode=function () { var o; while (this.mouseArraylength>0) { o=this.mouseArray.pop(); delete o; } } HxG_5.prototype.JSFBehaviorMouseclick.prototype.setEventCode=function () { var i, ms=null, eID; for (i=0; i0 && thisB.mouseArray[j].actions[0]!=null) || thisB.mouseArray[j].fcn != null) { if (evt.type==hX_5._evMD) { if (!m && document.body.setCapture) thisB.DOMobj.setCapture(); m=true; } else if (evt.type==hX_5._evMU) { if (!m && document.body.setCapture && thisB.timer==null) thisB.timer=hX_5.i.startTimerTimed (thisB.id, 0, hX_5._onMS, 1, hX_5.BHR_mouseclick, hX_5._onMS); m=true; } else if (evt.type==hX_5._evMC || evt.type==hX_5._evCM) { hX_5.action.processAction(thisB.DOMobj, evt, thisB.mouseArray[j].fcn, thisB.mouseArray[j].actions, true, thisB.mouseArray[j].targets, null, null, null); m=true; } else if (evt.type==hX_5._evMCC) { m=true; } } } } if (m) { hX_5.i.cancelAction(evt, true); return false; } } return true; } HxG_5.prototype.JSFBehaviorAjax=function () { this.backChannel=null; this.DOMParser=null; this.deferScript=null; this.deferScriptChar=null; this.deferComp=null; this.deferCompAtt=null; this.nowScript=false; this.locked=false; this.saveId=null; this.saveEvt=null; this.pauseId=null; } HxG_5.prototype.JSFBehaviorAjax.prototype.onPageLoad=function () { this.saveId=this.DOMobj.id; return true; } HxG_5.prototype.JSFBehaviorAjax.prototype.setAttribute=function(a) { hX_5.parseArg (this.attributeTable, this, (arguments.length>1)?arguments:a); return true; } HxG_5.prototype.JSFBehaviorAjax.prototype.getAttribute=function (attribute) { return (hX_5.getArg(this.attributeTable, this, attribute)); } HxG_5.prototype.JSFBehaviorAjax.prototype.destroy=function () { if (this.backChannel) { if (this.backChannel.destroy) this.backChannel.destroy(); delete (this.backChannel); } if (this.DOMParser) { this.DOMParser.parentNode.removeChild(this.DOMParser); delete this.DOMParser; } if (this.deferScript) delete this.deferScript; if (this.deferCompAtt) delete this.deferCompAtt; if (this.saveEvt) delete this.saveEvt; var i,d=[this.paramNames,this.paramFields,this.actions,this.targets]; for (i=0; i0) d[i].pop(); delete d[i]; } } delete d; if (this.attributeTable) delete this.attributeTable; return true; } HxG_5.prototype.JSFBehaviorAjax.prototype.dispatchBehavior=function (thisObj, evt) { var r=true, m, t=this.DOMobj.tagName, url=((this.href==null || this.href.length==0)?window.location.pathname:hX_5.stripURL(this.href)); url=hX_5.reEncodeURI(url); if (this.locked) return r; if (this.saveId) this.DOMobj=hX_5.getElementById (this.saveId); this.pauseId=null; if (t==hX_5._INP || t==hX_5._TXT || t==hX_5._BTN || t==hX_5._SEL) { this.callbackError(hX_5.INTERR_bc_badpanel); return false; } if (url!=null) { this.saveEvt=null; if (this.startFcn!=null) r=hX_5.action.processFunction(this.DOMobj, evt, this.startFcn); if (evt!=null) this.saveEvt=hX_5.i.duplicateEvent(evt); if (r) { this.uilock(); this.pauseId=hX_5.action.pauseActions(); m=(this.type==hX_5.BHR_ajaxget)?"axpartial":((this.type==hX_5.BHR_ajaxsubmit)?"axfull":"axnone"); if (this.backChannel) this.backChannel.reset(); else this.backChannel=new hX_5.HTTPBackchannel("backChannel", this.callbackBehavior, ((this.type==hX_5.BHR_ajaxsubmit)?true:false), true, this.DOMobj.id+"_AJAX_IFRAME", this.callbackError, true, hX_5.isPortal); this.backChannel.LoadEx(url, this, this.DOMobj, m, this.paramNames, this.paramFields, null, ((evt!=null)?hX_5.evtGetTarget(evt):null)); } } return r; } HxG_5.prototype.JSFBehaviorAjax.prototype.callbackBehavior=function (XMLData, StringData) { var evt=null, r=true; if (XMLData && XMLData.documentElement) { } else if (StringData) { var b, c, spcO=false, o, o1=null, DOM_o1=null, oH, i, j, k, l, h, t, svParent, svPos, svId, sE, tB="=0) { chB=ch+tPH.length; isP=true; } } if (isP) { ch=StringData.lastIndexOf(tPHX); if (ch<0) { this.callbackError(hX_5.INTERR_bc_baddata); return false; } } else { ch=StringData.lastIndexOf(tB); if (ch<0) ch=StringData.lastIndexOf(tB.toLowerCase()); } if (chB<0) { this.callbackError(hX_5.INTERR_bc_baddata); return false; } BODY=(ch>0) ? StringData.substring(chB,ch) : StringData.substr(chB); } if (this.DOMParser==null) this.DOMParser=hX_5.ifr.create(document, this.DOMobj.id + "_DOMPARSER", true, false); b=hX_5.ifr.getDoc(this.DOMParser); if (b && b.body) { try { ch=0; l=BODY.length; w1=hX_5._SCR.toLowerCase(); w2=(hX_5._SL+hX_5._SCR).toLowerCase(); while (ch=0 && (k+aa[i].src.length >= ab[j].src.length)) skip=true; } if (!skip) { sE=document.createElement(hX_5._SCR); sE.setAttribute(lsrc,aa[i].src); if (aa[i].type!=null && aa[i].type.length>0) sE.setAttribute(ltype,aa[i].type); if (aa[i].charset!=null && aa[i].charset.length>0) sE.setAttribute(lcharset,aa[i].charset); h.appendChild(sE); ad.push(ad[i]); this.nowScript=true; } } } } for (i=0; i=0) { for (i=0; i0) ? j[0] : null; } } if (f!=null) { j=f.elements[oH.name]; if (j!=null) { if (j.length!=undefined) j=j[0]; j.value=oH.value; break; } } } } } } oH=oH.nextSibling; } } if (this.deferScript.length>0) hX_5.i.startObjTimerTimed(this, 0, (hX_5.brw.isIE()?10:50)); else { if (this.endFcn!=null) r=hX_5.action.processFunction(this.DOMobj, this.saveEvt, this.endFcn); if (this.pauseId) hX_5.action.unPauseActions(this.pauseId); this.locked=false; } } if (BODY!=null) delete BODY; } catch (e) { this.callbackError(hX_5.INTERR_bc_baddata + ((e.message!=undefined && e.message.length>0)?(hX_5._B + e.message):hX_5._E)); } } } return r; } HxG_5.prototype.JSFBehaviorAjax.prototype.destroyNode=function (node) { var a, i, k=null, l; while (node.lastChild!=null) this.destroyNode(node.lastChild); if (node.id!=undefined) { i=hX_5.getComponentById(node.id); if (i!=null) hX_5.removeComponent(i); a=hX_5.getBehaviorsById(node.id); for (i=0; a!=null && i=node.parentNode.cells.length)?(node.parentNode.cells.length-1):node.cellIndex; node.parentNode.deleteCell(l); } else if (node.tagName!=undefined && node.tagName==hX_5._TR) { l=(node.rowIndex>=node.parentNode.rows.length)?(node.parentNode.rows.length-1):node.rowIndex; node.parentNode.deleteRow(l); } else k=node.parentNode.removeChild(node); if (k!=null) delete k; } HxG_5.prototype.JSFBehaviorAjax.prototype.dispatchTimer=function () { var o, i, s, spn, r=true; if (this.deferScript.length>0) { try { if (this.nowScript) hX_5.AJAX_prototypeloader(); hX_5.bodyLoadDone=false; o=document.getElementById((this.source)?this.source:this.DOMobj.id); o=(o==null)?document.body:o; if (hX_5.brw.isIE()) { s=document.createElement(hX_5._SCR); s.setAttribute("type", "text/javascript"); s.setAttribute("text", this.deferScript); if (this.deferScriptChar!=null && this.deferScriptChar.length>0) s.setAttribute("charset", this.deferScriptChar); o.appendChild(s); } else { spn=document.createElement(hX_5._SPN); s=""; document.body.appendChild(spn); } } catch(e) { this.callbackError(hX_5.INTERR_bc_baddata + ((e.message!=undefined && e.message.length>0)?(hX_5._B + e.message):hX_5._E)); r=false; } } if (this.deferComp) { o=hX_5.getComponentById(this.deferComp); if (o) for (i=0; i