|
Hi there! I'm using an Orbeon XForms autocomplete within an Orbeon 4.8-CE build from the github branch. The corresponding form definition seems quite normal to me: <fr:autocomplete ref="station/selected" resource="http://prototype.local/list?type=station&items=15&query={$fr-search-value}" max-results-displayed="15" f:url-norewrite="true" show-full-itemset-dropdown="false"> <xforms:itemset nodeset="//item"> <xforms:label ref="text()"/> <xforms:value ref="@id"/> </xforms:itemset> </fr:autocomplete>
As soon as the XPath " .../station/selected" is enabled (it was implicitly hidden before) an Orbeon error is raised in the browser: Exception in client-side code. Message: An invalid or illegal string was specified File: Line number: 113
In the JS console the error seems to be located in the Yahoo/YUI part: SyntaxError: An invalid or illegal string was specified
| ","g");var XFORMS_REGEXP_AMPERSAND=new RegExp("&","g");var XFORMS_REGEXP_INVALID_XML_CHAR=new RegExp("[\x00-\x08\x0B\x0C\x0E-\x1F]","g");var XFORMS_WIDE_TEXTAREA_MIN_ROWS=5;var DEFAULT_LOADING_TEXT="Loading...";(function(){var YD=YAHOO.util.Dom;var OD;_.defer(function(){OD=ORBEON.util.Dom;});_.mixin({take:function(obj,interceptor,context){return interceptor.call(context,obj);},match:function(obj){function compareMaybe(f){return _.isFunction(f)?f(obj):f==obj;}function applyMaybe(f){return _.isFunction(f)?f(obj):f;}for(var i=1;i)","g"),"$1");elementSource=elementSource.replace(new RegExp(">"),' name="'+value+'">');var newElement=document.createElement(elementSource);element.parentNode.insertBefore(newElement,element);element.parentNode.removeChild(element);}}}else{element.setAttribute(name,value);}}}},getChildElementByIndex:function(parent,position){for(var i=0;i0){element.removeChild(element.firstChild);}var textNode=element.ownerDocument.createTextNode(text);element.appendChild(textNode);}else{element.innerText=text;}},nudgeAfterDelay:function(element){if(YAHOO.env.ua.ie!=0&&YAHOO.env.ua.ie<=7){var tables=element.getElementsByTagName("table");window.setTimeout(function(){element.className=element.className;for(var tableIndex=0;tableIndex1){throw new Error("Ambiguous month");}return _.indexOf(ORBEON.util.DateTime._monthNames,matches[0]);},_parseWeekday:function(weekday){var matches=_.filter(ORBEON.util.DateTime._weekdayNames,function(item){return new RegExp("^"+weekday,"i").test(item);});if(matches.length==0){throw new Error("Invalid day string");}if(matches.length>1){throw new Error("Ambiguous weekday");}return _.indexOf(ORBEON.util.DateTime._weekdayNames,matches[0]);},_currentYear:new Date().getFullYear(),_parseYear:function(year){year=parseInt(year,10);if(year<100){var twentiethCentury=1900+year;var twentyFirstCentury=2000+year;year=Math.abs(twentiethCentury-ORBEON.util.DateTime._currentYear)');ORBEON.xforms.Globals.modalProgressPanel.render(document.body);}ORBEON.xforms.Globals.modalProgressPanel.show();},overlayUseDisplayHidden:function(overlay){YD.setStyle(overlay.element,"display","none");overlay.beforeShowEvent.subscribers.unshift(new YAHOO.util.Subscriber(function(){YD.setStyle(overlay.element,"display","block");}));overlay.beforeHideEvent.subscribe(function(){YD.setStyle(overlay.element,"display","none");});},countOccurrences:function(str,character){var count=0;var pos=str.indexOf(character);while(pos!=-1){count++;pos=str.indexOf(character,pos+1);}return count;},appendToEffectiveId:function(effectiveId,ending){var prefixedId=ORBEON.util.Utils.getEffectiveIdNoSuffix(effectiveId);return prefixedId+ending+ORBEON.util.Utils.getEffectiveIdSuffixWithSeparator(effectiveId);},getEffectiveIdNoSuffix:function(effectiveId){if(effectiveId==null){return null;}var suffixIndex=effectiveId.indexOf(XF_REPEAT_SEPARATOR);if(suffixIndex!=-1){return effectiveId.substring(0,suffixIndex);}else{return effectiveId;}},getRepeatIndexes:function(effectiveId){if(effectiveId==null){return null;}var suffixIndex=effectiveId.indexOf(XF_REPEAT_SEPARATOR);if(suffixIndex!=-1){return effectiveId.substring(suffixIndex+1).split(XF_REPEAT_INDEX_SEPARATOR);}else{return"";}},getEffectiveIdSuffixWithSeparator:function(effectiveId){if(effectiveId==null){return null;}var suffixIndex=effectiveId.indexOf(XF_REPEAT_SEPARATOR);if(suffixIndex!=-1){return effectiveId.substring(suffixIndex);}else{return"";}},getLocalName:function(element){if(element.nodeType==1){return element.tagName.indexOf(":")==-1?element.tagName:element.tagName.substr(element.tagName.indexOf(":")+1);}else{return null;}},addSuffixToIdsAndRemoveDisabled:function(element,idSuffix,repeatDepth){element.removeAttribute("disabled");var idSuffixWithDepth=idSuffix;for(var repeatDepthIndex=0;repeatDepthIndex");for(var attributeIndex=0;attributeIndex0){setTimeout(checkAjaxReceived,100);}else{testCase.resume(function(){afterAjaxResponseFunction.call(testCase);});}}causingAjaxRequestFunction.call(testCase);setTimeout(checkAjaxReceived,100);testCase.wait(20000);},executeSequenceCausingAjaxRequest:function(testCase,tests){if(tests.length>0){var testTuple=tests.shift();ORBEON.util.Test.executeCausingAjaxRequest(testCase,function(){testTuple[0].call(testCase);},function(){if(testTuple[1]){testTuple[1].call(testCase);}ORBEON.util.Test.executeSequenceCausingAjaxRequest(testCase,tests);});}},runMayCauseXHR:function(){var testCase=arguments[0];var continuations=Array.prototype.slice.call(arguments,1);if(continuations.length>0){var continuation=continuations.shift();ORBEON.util.Test.executeCausingAjaxRequest(testCase,function(){continuation.call(testCase);},function(){ORBEON.util.Test.runMayCauseXHR.apply(null,[testCase].concat(continuations));});}},startFirebugLite:function(){if(!window.firebug){var firebugScript=document.createElement("script");firebugScript.setAttribute("src","http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js");document.body.appendChild(firebugScript);(function(){if(window.firebug){firebug.init();}else{setTimeout(arguments.callee);}})();}},onOrbeonLoadedRunTest:function(onlyFunctionName){ORBEON.xforms.Events.orbeonLoadedEvent.subscribe(function(){if(parent&&parent.TestManager){parent.TestManager.load();}else{if(!_.isUndefined(onlyFunctionName)){_.each(YAHOO.tool.TestRunner.masterSuite.items,function(testCase){_.each(_.functions(testCase),function(functionName){if(functionName.indexOf("test")==0&&functionName!=onlyFunctionName){delete testCase[functionName];}});});}new YAHOO.tool.TestLogger();YAHOO.tool.TestRunner.run();}});},click:function(id){var element=OD.get(id);var button=element.tagName.toLowerCase()=="button"?element:OD.getElementByTagName(element,"button");button.click();},assertMessage:function(expected){var messageDialog=OD.get("xforms-message-dialog");var body=YD.getElementsByClassName("bd",null,messageDialog)[0];var actual=OD.getStringValue(OD.getChildElementByIndex(body,0));YAHOO.util.Assert.areEqual(expected,actual,"didn't get the expected message");OD.getElementByTagName(messageDialog,"button").click();}}};ORBEON.util.Properties.init();})();ORBEON.xforms={};ORBEON.xforms.action={};ORBEON.xforms.control={};ORBEON.xforms.server={};ORBEON.widgets=ORBEON.widgets||{};ORBEON.widget=ORBEON.widget||{};ORBEON.xforms.Globals=ORBEON.xforms.Globals||{};ORBEON.xforms.Controls={isRelevant:function(control){return !YAHOO.util.Dom.hasClass(control,"xforms-disabled")&&!YAHOO.util.Dom.hasClass(control,"xforms-disabled-subsequent");},isReadonly:function(control){return YAHOO.util.Dom.hasClass(control,"xforms-readonly");},isRequired:function(control){return YAHOO.util.Dom.hasClass(control,"xforms-required");},isValid:function(control){return !YAHOO.util.Dom.hasClass(control,"xforms-invalid");},getForm:function(control){if(typeof control.form=="undefined"){var candidateForm=control;while(candidateForm.tagName.toLowerCase()!="form"){candidateForm=candidateForm.parentNode;}return candidateForm;}else{return control.form;}},getCurrentValueEvent:new YAHOO.util.CustomEvent(null,null,false,YAHOO.util.CustomEvent.FLAT),getCurrentValue:function(control){var event={control:control};ORBEON.xforms.Controls.getCurrentValueEvent.fire(event);if(!_.isUndefined(event.result)){return event.result;}else{if(YAHOO.util.Dom.hasClass(control,"xforms-input")&&YAHOO.util.Dom.hasClass(control,"xforms-type-time")){var timeInputValue=YAHOO.util.Dom.getElementsByClassName("xforms-input-input",null,control)[0].value;var timeJSDate=ORBEON.util.DateTime.magicTimeToJSDate(timeInputValue);return timeJSDate==null?timeInputValue:ORBEON.util.DateTime.jsDateToISOTime(timeJSDate);}else{if(YAHOO.util.Dom.hasClass(control,"xforms-input")&&YAHOO.util.Dom.hasClass(control,"xforms-type-date")){var dateInputValue;if(YAHOO.util.Dom.hasClass(control,"xforms-input-appearance-minimal")){var imgElement=YAHOO.util.Dom.getElementsByClassName("xforms-input-appearance-minimal","img",control)[0];dateInputValue=ORBEON.util.Dom.getAttribute(imgElement,"alt");}else{dateInputValue=YAHOO.util.Dom.getElementsByClassName("xforms-input-input",null,control)[0].value;}var dateJSDate=ORBEON.util.DateTime.magicDateToJSDate(dateInputValue);return dateJSDate==null?dateInputValue:ORBEON.util.DateTime.jsDateToISODate(dateJSDate);}else{if(YAHOO.util.Dom.hasClass(control,"xforms-input")&&YAHOO.util.Dom.hasClass(control,"xforms-type-dateTime")){var dateValue=YAHOO.util.Dom.getElementsByClassName("xforms-type-date",null,control)[0].value;var jsDateDate=ORBEON.util.DateTime.magicDateToJSDate(dateValue);var timeValue=YAHOO.util.Dom.getElementsByClassName("xforms-type-time",null,control)[0].value;var jsDateTime=ORBEON.util.DateTime.magicTimeToJSDate(timeValue);if(jsDateDate==null||jsDateTime==null){return dateValue==""&&timeValue==""?"":dateValue+"T"+timeValue;}else{return ORBEON.util.DateTime.jsDateToISODateTime(jsDateDate,jsDateTime);}}else{if((YAHOO.util.Dom.hasClass(control,"xforms-input")&&!YAHOO.util.Dom.hasClass(control,"xforms-type-boolean")&&!YAHOO.util.Dom.hasClass(control,"xforms-static"))||YAHOO.util.Dom.hasClass(control,"xforms-secret")){var input=control.tagName.toLowerCase()=="input"?control:control.getElementsByTagName("input")[0];return input.value;}else{if(YAHOO.util.Dom.hasClass(control,"xforms-select-appearance-full")||YAHOO.util.Dom.hasClass(control,"xforms-select1-appearance-full")||(YAHOO.util.Dom.hasClass(control,"xforms-input")&&YAHOO.util.Dom.hasClass(control,"xforms-type-boolean"))){var inputs=control.getElementsByTagName("input");var spanValue="";for(var inputIndex=0;inputIndex0)?lhhaElements.get(0):null;},getControlForLHHA:function(element,lhhaType){var suffix=ORBEON.xforms.Controls._classNameToId[lhhaType];return element.id.indexOf(suffix)!=-1?ORBEON.util.Dom.get(element.id.replace(new RegExp(ORBEON.util.Utils.escapeRegex(ORBEON.xforms.Controls._classNameToId[lhhaType]),"g"),"")):element.parentNode;},_setMessage:function(control,lhhaType,message){var lhhaElement=ORBEON.xforms.Controls.getControlLHHA(control,lhhaType);if(lhhaElement!=null){lhhaElement.innerHTML=message;if(message==""){if(lhhaType=="help"&&!YAHOO.util.Dom.hasClass(lhhaElement,"xforms-disabled")){YAHOO.util.Dom.addClass(lhhaElement,"xforms-disabled-subsequent");var help=ORBEON.xforms.Controls.getControlLHHA(control,"help");YAHOO.util.Dom.addClass(help,"xforms-disabled-subsequent");}}else{if(ORBEON.xforms.Controls.isRelevant(control)){YAHOO.util.Dom.removeClass(lhhaElement,"xforms-disabled");YAHOO.util.Dom.removeClass(lhhaElement,"xforms-disabled-subsequent");if(lhhaType=="help"){var help=ORBEON.xforms.Controls.getControlLHHA(control,"help");YAHOO.util.Dom.removeClass(help,"xforms-disabled");YAHOO.util.Dom.removeClass(help,"xforms-disabled-subsequent");}}}}ORBEON.xforms.Controls.lhhaChangeEvent.fire({control:control,type:lhhaType,message:message});},lhhaChangeEvent:new YAHOO.util.CustomEvent(null,null,false,YAHOO.util.CustomEvent.FLAT),getLabelMessage:function(control){if(YAHOO.util.Dom.hasClass(control,"xforms-trigger")||YAHOO.util.Dom.hasClass(control,"xforms-submit")){var labelElement=ORBEON.xforms.Controls.getControlLHHA(control,"control");return labelElement.innerHTML;}else{if(YAHOO.util.Dom.hasClass(control,"xforms-dialog")){var labelDiv=ORBEON.util.Dom.getChildElementByIndex(control,0);return labelDiv.innerHTML;}else{if(YAHOO.util.Dom.hasClass(control,"xforms-group-appearance-xxforms-fieldset")){var legend=ORBEON.util.Dom.getChildElementByIndex(control,0);if(legend!=null){return legend.innerHTML;}}else{var labelElement=ORBEON.xforms.Controls.getControlLHHA(control,"label");return labelElement==null?"":labelElement.innerHTML;}}}},setLabelMessage:function(control,message){if(YAHOO.util.Dom.hasClass(control,"xforms-trigger")||YAHOO.util.Dom.hasClass(control,"xforms-submit")){ORBEON.xforms.Controls._setMessage(control,"control",message);}else{if(YAHOO.util.Dom.hasClass(control,"xforms-dialog")){var labelDiv=ORBEON.util.Dom.getChildElementByIndex(control,0);labelDiv.innerHTML=message;}else{if(YAHOO.util.Dom.hasClass(control,"xforms-group-appearance-xxforms-fieldset")){var legend=ORBEON.util.Dom.getChildElementByIndex(control,0);if(legend!=null){legend.innerHTML=message;}}else{if(YAHOO.util.Dom.hasClass(control,"xforms-output-appearance-xxforms-download")){var anchor=YAHOO.util.Dom.getChildren(control)[0];anchor.innerHTML=message;}else{ORBEON.xforms.Controls._setMessage(control,"label",message);}}}}},getHelpMessage:function(control){var helpElement=ORBEON.xforms.Controls.getControlLHHA(control,"help");return helpElement==null?"":ORBEON.util.Dom.getStringValue(helpElement);},setHelpMessage:function(control,message){message=ORBEON.util.String.escapeForMarkup(message);ORBEON.xforms.Controls._setMessage(control,"help",message);ORBEON.xforms.Controls._setTooltipMessage(control,message,ORBEON.xforms.Globals.helpTooltipForControl);},setConstraintLevel:function(control,newLevel){var alertActive=newLevel!="";function toggleCommonClasses(element){$(element).toggleClass("xforms-invalid",newLevel=="error");$(element).toggleClass("xforms-warning",newLevel=="warning");$(element).toggleClass("xforms-info",newLevel=="info");}toggleCommonClasses(control);var alertElement=ORBEON.xforms.Controls.getControlLHHA(control,"alert");if(alertElement){$(alertElement).toggleClass("xforms-active",alertActive);if(!_.isUndefined($(alertElement).attr("id"))){toggleCommonClasses(alertElement);}}var alertTooltip=ORBEON.xforms.Globals.alertTooltipForControl[control.id];if(alertTooltip!=null&&alertTooltip!=true){if(!alertActive){alertTooltip.cfg.setProperty("disabled",true);alertTooltip.hide();}else{alertTooltip.cfg.setProperty("disabled",false);}}},setDisabledOnFormElement:function(element,disabled){if(disabled){element.setAttribute("disabled","disabled");}else{element.removeAttribute("disabled");}},setRelevant:function(control,isRelevant){var FN=ORBEON.xforms.FlatNesting;if(YAHOO.util.Dom.hasClass(control,"xforms-group-begin-end")){FN.setRelevant(control,isRelevant);}else{var elementsToUpdate=[control,ORBEON.xforms.Controls.getControlLHHA(control,"label"),ORBEON.xforms.Controls.getControlLHHA(control,"alert")];if(!isRelevant||(isRelevant&&ORBEON.xforms.Controls.getHelpMessage(control)!="")){elementsToUpdate.push(ORBEON.xforms.Controls.getControlLHHA(control,"help"));}if(!isRelevant||(isRelevant&&ORBEON.xforms.Controls.getHintMessage(control)!="")){elementsToUpdate.push(ORBEON.xforms.Controls.getControlLHHA(control,"hint"));}for(var elementIndex=0;elementIndex0){var itemIndex=0;var foundSelected=false;for(;itemIndex0){var itemIndex=0;for(;itemIndexclientHeight){while(scrollHeight>=clientHeight){textarea.rows=textarea.rows+1;if(textarea.clientHeight<=clientHeight){break;}clientHeight=textarea.clientHeight;linesAdded++;}}else{if(scrollHeightXFORMS_WIDE_TEXTAREA_MIN_ROWS&&scrollHeight=clientHeight){break;}clientHeight=textarea.clientHeight;linesAdded--;}}}},updateHTMLAreaClasses:function(textarea){var iframe=textarea.previousSibling;while(iframe.nodeType!=ORBEON.util.Dom.ELEMENT_TYPE){iframe=textarea.previousSibling;}iframe.className=textarea.className;},showDialog:function(controlId,neighbor){var divElement=ORBEON.util.Dom.get(controlId);var yuiDialog=ORBEON.xforms.Globals.dialogs[controlId];if(ORBEON.xforms.Globals.currentFocusControlId!=null){var focusedElement=ORBEON.util.Dom.get(ORBEON.xforms.Globals.currentFocusControlId);if(focusedElement!=null){focusedElement.blur();}}if(YAHOO.util.Dom.hasClass(divElement,"xforms-initially-hidden")){YAHOO.util.Dom.removeClass(divElement,"xforms-initially-hidden");yuiDialog.render();}YAHOO.util.Dom.addClass(yuiDialog.innerElement,"yui-module");YAHOO.util.Dom.addClass(yuiDialog.innerElement,"yui-overlay");YAHOO.util.Dom.addClass(yuiDialog.innerElement,"yui-panel");yuiDialog.element.style.display="block";yuiDialog.show();yuiDialog.cfg.setProperty("zIndex",ORBEON.xforms.Globals.lastDialogZIndex++);if(neighbor==null){yuiDialog.center();}else{yuiDialog.cfg.setProperty("context",[neighbor,"tl","bl"]);yuiDialog.align();}},getWidget:function(control){for(var widgetClass in ORBEON.widgets){var widget=ORBEON.widgets[widgetClass];if(widget.extending!=null&&widget.appliesToControl(control)){return widget;}}},deleteControl:function(control){ORBEON.xforms.ServerValueStore.remove(control.id);ORBEON.xforms.Globals.hintTooltipForControl[control.id]=null;ORBEON.xforms.Globals.alertTooltipForControl[control.id]=null;ORBEON.xforms.Globals.helpTooltipForControl[control.id]=null;ORBEON.xforms.Globals.dialogs[control.id]=null;ORBEON.xforms.Globals.dialogMinimalLastMouseOut[control.id]=null;},typeChangedEvent:new YAHOO.util.CustomEvent(null,null,false,YAHOO.util.CustomEvent.FLAT),findCaseBegin:function(controlId){var caseBeginId="xforms-case-begin-"+controlId;return ORBEON.util.Dom.get(caseBeginId);},isCaseSelected:function(controlId){var caseBegin=ORBEON.xforms.Controls.findCaseBegin(controlId);return YAHOO.util.Dom.hasClass(caseBegin,"xforms-case-selected");},toggleCase:function(controlId,visible){var caseBegin=ORBEON.xforms.Controls.findCaseBegin(controlId);var caseBeginParent=caseBegin.parentNode;var foundCaseBegin=false;for(var childIndex=0;caseBeginParent.childNodes.length;childIndex++){var cursor=caseBeginParent.childNodes[childIndex];if(!foundCaseBegin){if(cursor.id==caseBegin.id){foundCaseBegin=true;}else{continue;}}if(cursor.nodeType==ELEMENT_TYPE){if(cursor.id=="xforms-case-end-"+controlId){break;}var doAnimate=cursor.id!="xforms-case-begin-"+controlId&&YAHOO.util.Dom.hasClass(cursor,"xxforms-animate")&&YAHOO.env.ua.ie==0;var updateClasses=_.partial(function(el){if(visible){YAHOO.util.Dom.addClass(el,"xforms-case-selected");YAHOO.util.Dom.removeClass(el,"xforms-case-deselected");YAHOO.util.Dom.removeClass(el,"xforms-case-deselected-subsequent");}else{YAHOO.util.Dom.addClass(el,"xforms-case-deselected-subsequent");YAHOO.util.Dom.removeClass(el,"xforms-case-selected");}},cursor);if(doAnimate){if(visible){updateClasses();$(cursor).css("display","none");$(cursor).animate({height:"toggle"},{duration:200});}else{$(cursor).animate({height:"toggle"},{duration:200,complete:updateClasses});}}else{updateClasses();ORBEON.util.Dom.nudgeAfterDelay(cursor);}}}}};ORBEON.xforms.FlatNesting={isGroupBeginEnd:function(node){return node.nodeType==ELEMENT_TYPE&&YAHOO.util.Dom.hasClass(node,"xforms-group-begin-end");},isGroupBegin:function(node){return this.isGroupBeginEnd(node)&&node.id.indexOf("group-begin-")==0;},isGroupEnd:function(node){return this.isGroupBeginEnd(node)&&node.id.indexOf("group-end-")==0;},isRepeatBeginEnd:function(node){return node.nodeType==ELEMENT_TYPE&&YAHOO.util.Dom.hasClass(node,"xforms-repeat-begin-end");},isRepeatBegin:function(node){return this.isRepeatBeginEnd(node)&&node.id.indexOf("repeat-begin-")==0;},isRepeatEnd:function(node){return this.isRepeatBeginEnd(node)&&node.id.indexOf("repeat-end-")==0;},isRepeatDelimiter:function(node){return node.nodeType==ELEMENT_TYPE&&YAHOO.util.Dom.hasClass(node,"xforms-repeat-delimiter");},isBegin:function(node){return this.isGroupBegin(node)||this.isRepeatBegin(node);},isEnd:function(node){return this.isGroupEnd(node)||this.isRepeatEnd(node);},foldAncestors:function(startNode,startValue,foldFunction,stopValue){var FN=ORBEON.xforms.FlatNesting;var isGroup=FN.isGroupBegin(startNode);var isRepeat=FN.isRepeatDelimiter(startNode);var depth=0;var currentNode=startNode;var currentValue=startValue;while(true){currentNode=YAHOO.util.Dom.getPreviousSibling(currentNode);if(currentNode==null){break;}if(currentNode.nodeType==ELEMENT_TYPE){if(FN.isEnd(currentNode)){depth++;}if(FN.isBegin(currentNode)){depth--;}if(depth<0&&((isGroup&&FN.isGroupEnd(currentNode))||(isRepeat&&FN.isRepeatBegin(currentNode)))){currentValue=foldFunction(currentNode,currentValue);if(currentValue==stopValue){return stopValue;}}}}return currentValue;},foldDescendants:function(startNode,startValue,foldFunction,stopValue){var FN=ORBEON.xforms.FlatNesting;var isGroup=this.isGroupBegin(startNode);var isRepeat=this.isRepeatDelimiter(startNode);var depth=0;var stopDepth=0;var currentNode=startNode;var valueStack=[];var currentValue=startValue;while(true){currentNode=YAHOO.util.Dom.getNextSibling(currentNode);if(currentNode==null){break;}if(currentNode.nodeType==ELEMENT_TYPE){if(this.isBegin(currentNode)){depth++;if(stopDepth>0){stopDepth++;}else{valueStack.push(currentValue);currentValue=foldFunction(currentNode,currentValue);if(currentValue==stopValue){stopDepth++;}}}else{if(this.isEnd(currentNode)){depth--;if(depth<0){break;}if(stopDepth>0){stopDepth--;}else{currentValue=valueStack.pop();}}else{if(isRepeat&&depth==0&&this.isRepeatDelimiter(currentNode)){break;}else{if(stopDepth==0){currentValue=foldFunction(currentNode,currentValue);}}}}}}return currentValue;},hasAncestor:function(startNode,conditionFunction){var FN=ORBEON.xforms.FlatNesting;return FN.foldAncestors(startNode,false,function(value,node){return conditionFunction(node);},true);},setRelevant:function(node,isRelevant){var FN=ORBEON.xforms.FlatNesting;var YD=YAHOO.util.Dom;var OD=ORBEON.util.Dom;var OC=ORBEON.xforms.Controls;if(isRelevant){YAHOO.util.Dom.removeClass(node,"xforms-disabled");}else{YAHOO.util.Dom.addClass(node,"xforms-disabled");}if(isRelevant&&FN.hasAncestor(node,function(node){return YAHOO.util.Dom.hasClass(node,"xforms-disabled");})){return;}FN.foldDescendants(node,null,function(node,value){if(isRelevant&&FN.isBegin(node)&&YD.hasClass(node,"xforms-disabled")){return true;}if(isRelevant){YD.removeClass(node,"xforms-disabled");YD.removeClass(node,"xforms-disabled-subsequent");OD.nudgeAfterDelay(node);}else{YD.addClass(node,"xforms-disabled-subsequent");}return false;},true);}};ORBEON.xforms.Events={_findParentXFormsControl:function(element){while(true){if(!element){return null;}if(element.xformsElement){return element.xformsElement;}else{if(element.ownerDocument&&element.ownerDocument.xformsElement){return element.ownerDocument.xformsElement;}else{if(element.tagName!=null&&element.tagName.toLowerCase()=="iframe"){for(var dialogId in ORBEON.xforms.Globals.dialogs){var dialog=ORBEON.xforms.Globals.dialogs[dialogId];if(dialog.iframe==element){return dialog.element;}}}else{if(element.className!=null){if(element.id&&ORBEON.util.String.endsWith(element.id,"_container")&&YAHOO.util.Dom.hasClass(element,"xforms-textarea")&&YAHOO.util.Dom.hasClass(element,"xforms-mediatype-text-html")&&ORBEON.util.Properties.htmlEditor.get()=="yui"){return ORBEON.util.Dom.getChildElementByClass(element,"xforms-textarea");}else{if($(element).is(".xforms-control, .xbl-component")){return element;}else{if(YAHOO.util.Dom.hasClass(element,"xforms-dialog")||YAHOO.util.Dom.hasClass(element,"xforms-help")||YAHOO.util.Dom.hasClass(element,"xforms-alert")){return element;}}}}}}}element=element.parentNode;}},_findAncestorFocusableControl:function(eventTarget){var ancestorControl=ORBEON.xforms.Events._findParentXFormsControl(eventTarget);var sendFocus=ancestorControl!=null&&!YAHOO.util.Dom.hasClass(ancestorControl,"xforms-dialog")&&!$(ancestorControl).is(".xbl-component:not(.xbl-focusable)");return sendFocus?ancestorControl:null;},focus:function(event){var eventTarget=YAHOO.util.Event.getTarget(event);if(_.isUndefined(document.addEventListener)){YAHOO.util.Dom.generateId(eventTarget);var changeListenerElement=ORBEON.xforms.Globals.changeListeners[eventTarget.id];var needToRegisterChangeListener=_.isUndefined(changeListenerElement)||changeListenerElement!=eventTarget;if(needToRegisterChangeListener){YAHOO.util.Event.addListener(eventTarget,"change",ORBEON.xforms.Events.change);ORBEON.xforms.Globals.changeListeners[eventTarget.id]=eventTarget;}}if(!ORBEON.xforms.Globals.maskFocusEvents){var newFocusControlElement=ORBEON.xforms.Events._findAncestorFocusableControl(eventTarget);var currentFocusControlElement=ORBEON.xforms.Globals.currentFocusControlId!=null?ORBEON.util.Dom.get(ORBEON.xforms.Globals.currentFocusControlId):null;if(newFocusControlElement!=null){if(ORBEON.xforms.ServerValueStore.get(newFocusControlElement.id)==null&&!YAHOO.util.Dom.hasClass(newFocusControlElement,"xforms-select-appearance-compact")&&!YAHOO.util.Dom.hasClass(newFocusControlElement,"xforms-select1-appearance-compact")){var controlCurrentValue=ORBEON.xforms.Controls.getCurrentValue(newFocusControlElement);ORBEON.xforms.ServerValueStore.set(newFocusControlElement.id,controlCurrentValue);}}if(newFocusControlElement!=null&¤tFocusControlElement!=newFocusControlElement){var events=[];var changeValue=false;if(currentFocusControlElement!=null){if(YAHOO.util.Dom.hasClass(currentFocusControlElement,"xforms-textarea")&&YAHOO.util.Dom.hasClass(currentFocusControlElement,"xforms-mediatype-text-html")){changeValue=true;}if(changeValue){xformsValueChanged(currentFocusControlElement);}}events.push(new ORBEON.xforms.server.AjaxServer.Event(null,newFocusControlElement.id,null,"xforms-focus"));ORBEON.xforms.Globals.currentFocusControlId=newFocusControlElement.id;ORBEON.xforms.Globals.currentFocusControlElement=newFocusControlElement;ORBEON.xforms.server.AjaxServer.fireEvents(events,true);}}else{ORBEON.xforms.Globals.maskFocusEvents=false;}},blurEvent:new YAHOO.util.CustomEvent(null,null,false,YAHOO.util.CustomEvent.FLAT),blur:function(event){if(!ORBEON.xforms.Globals.maskFocusEvents){var target=YAHOO.util.Event.getTarget(event);var control=ORBEON.xforms.Events._findAncestorFocusableControl(target);if(control!=null){ORBEON.xforms.Events.blurEvent.fire({control:control,target:target});ORBEON.xforms.Globals.currentFocusControlId=control.id;ORBEON.xforms.Globals.currentFocusControlElement=control;var relatedTarget=event.relatedTarget||document.activeElement;var relatedControl=ORBEON.xforms.Events._findAncestorFocusableControl(relatedTarget);if(relatedControl==null){ORBEON.xforms.Globals.currentFocusControlId=null;var events=[new ORBEON.xforms.server.AjaxServer.Event(null,control.id,null,"xxforms-blur")];ORBEON.xforms.server.AjaxServer.fireEvents(events,false);}}}},change:function(event){var target=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(event));if(target!=null){if(YAHOO.util.Dom.hasClass(target,"xforms-upload")){ORBEON.xforms.Page.getControl(target).change();}else{if(_.isNumber(ORBEON.xforms.Globals.changedIdsRequest[target.id])){ORBEON.xforms.Globals.changedIdsRequest[target.id]=0;}if(YAHOO.util.Dom.hasClass(target,"xforms-select1-appearance-compact")){var select=ORBEON.util.Dom.getElementByTagName(target,"select");if(select.value==""){select.options[0].selected=true;}else{var foundSelected=false;for(var optionIndex=0;optionIndex=ORBEON.util.Properties.delayBeforeCloseMinimalDialog.get()){var event=new ORBEON.xforms.server.AjaxServer.Event(null,yuiDialog.element.id,null,"xxforms-dialog-close");ORBEON.xforms.server.AjaxServer.fireEvents([event],false);}},sendHeartBeatIfNeeded:function(heartBeatDelay){var currentTime=new Date().getTime();if((currentTime-ORBEON.xforms.Globals.lastEventSentTime)>=heartBeatDelay){var heartBeatDiv=ORBEON.util.Dom.get("xforms-heartbeat");if(heartBeatDiv==null){var form;for(var formIndex=0;formIndex=1.9,isRenderingEnginePresto:YAHOO.env.ua.opera,isRenderingEngineWebCore:YAHOO.env.ua.webkit,isRenderingEngineWebCore13:YAHOO.env.ua.webkit<=312,isRenderingEngineTrident:YAHOO.env.ua.ie,ns:{},xformsServerURL:{},xformsServerUploadURL:{},calendarImageURL:{},eventQueue:[],eventsFirstEventTime:0,discardableTimerIds:{},requestForm:null,requestIgnoreErrors:false,requestInProgress:false,requestDocument:"",requestTryCount:0,executeEventFunctionQueued:0,maskFocusEvents:false,maskDialogCloseEvents:false,currentFocusControlId:null,currentFocusControlElement:null,htmlAreaNames:[],repeatTreeChildToParent:{},repeatIndexes:{},repeatTreeParentToAllChildren:{},yuiCalendar:null,tooltipLibraryInitialized:false,changedIdsRequest:{},loadingOtherPage:false,activeControl:null,autosizeTextareas:[],dialogs:{},dialogMinimalLastMouseOut:{},hintTooltipForControl:{},alertTooltipForControl:{},helpTooltipForControl:{},debugDiv:null,debugLastTime:new Date().getTime(),lastEventSentTime:new Date().getTime(),pageLoadedRegistered:true,sliderYui:{},isReloading:false,lastDialogZIndex:1050,formErrorPanel:{},formHelpPanel:{},formHelpPanelMessageDiv:{},formHelpPanelCloseButton:{},formUUID:{},formStaticState:{},formDynamicState:{},formServerEvents:{},formClientState:{},modalProgressPanel:null,changeListeners:{},topLevelListenerRegistered:ORBEON.xforms.Globals.topLevelListenerRegistered==null?false:ORBEON.xforms.Globals.topLevelListenerRegistered,processRepeatHierarchy:function(repeatTreeString){var repeatTree=repeatTreeString.split(",");for(var repeatIndex=0;repeatIndex1){var parent=repeatInfo[repeatInfo.length-1];ORBEON.xforms.Globals.repeatTreeChildToParent[id]=parent;}}for(var child in ORBEON.xforms.Globals.repeatTreeChildToParent){var parent=ORBEON.xforms.Globals.repeatTreeChildToParent[child];while(parent!=null){if(!ORBEON.xforms.Globals.repeatTreeParentToAllChildren[parent]){ORBEON.xforms.Globals.repeatTreeParentToAllChildren[parent]=new Array();}ORBEON.xforms.Globals.repeatTreeParentToAllChildren[parent].push(child);parent=ORBEON.xforms.Globals.repeatTreeChildToParent[parent];}}}});(function(){var methodsFrom=ORBEON.xforms.Globals.isRenderingEngineTrident?ORBEON.util.IEDom:ORBEON.util.MozDom;for(var method in methodsFrom){ORBEON.util.Dom[method]=methodsFrom[method];}}());YAHOO.util.Dom.addClass(document.body,"yui-skin-sam");if(YAHOO.env.ua.webkit&&YAHOO.env.ua.mobile){YAHOO.util.Dom.addClass(document.body,"xforms-ios");}for(var formIndex=0;formIndex .xforms-error-panel"),function(errorPanelEl){YAHOO.util.Dom.generateId(errorPanelEl);YAHOO.util.Dom.removeClass(errorPanelEl,"xforms-initially-hidden");var errorPanel=new YAHOO.widget.Panel(errorPanelEl.id,{modal:true,fixedcenter:false,underlay:"shadow",visible:false,constraintoviewport:true,draggable:true});errorPanel.render();ORBEON.util.Utils.overlayUseDisplayHidden(errorPanel);errorPanel.beforeHideEvent.subscribe(ORBEON.xforms.Events.errorPanelClosed,formID);ORBEON.xforms.Globals.formErrorPanel[formID]=errorPanel;var titleDiv=ORBEON.util.Dom.getChildElementByClass(errorPanelEl,"hd");var bodyDiv=ORBEON.util.Dom.getChildElementByClass(errorPanelEl,"bd");var detailsHiddenDiv=ORBEON.util.Dom.getChildElementByClass(bodyDiv,"xforms-error-panel-details-hidden");var showDetailsA=ORBEON.util.Dom.getChildElementByIndex(ORBEON.util.Dom.getChildElementByIndex(detailsHiddenDiv,0),0);YAHOO.util.Dom.generateId(showDetailsA);var detailsShownDiv=ORBEON.util.Dom.getChildElementByClass(bodyDiv,"xforms-error-panel-details-shown");var hideDetailsA=ORBEON.util.Dom.getChildElementByIndex(ORBEON.util.Dom.getChildElementByIndex(detailsShownDiv,0),0);YAHOO.util.Dom.generateId(hideDetailsA);errorPanel.errorTitleDiv=titleDiv;errorPanel.errorBodyDiv=bodyDiv;errorPanel.errorDetailsDiv=ORBEON.util.Dom.getChildElementByClass(detailsShownDiv,"xforms-error-panel-details");YAHOO.util.Event.addListener(showDetailsA.id,"click",ORBEON.xforms.Events.errorShowHideDetails);YAHOO.util.Event.addListener(hideDetailsA.id,"click",ORBEON.xforms.Events.errorShowHideDetails);var closeA=YAHOO.util.Dom.getElementsByClassName("xforms-error-panel-close",null,errorPanelEl);if(closeA.length!=0){YAHOO.util.Dom.generateId(closeA[0]);YAHOO.util.Event.addListener(closeA[0].id,"click",ORBEON.xforms.Events.errorCloseClicked,errorPanel);}var reloadA=YAHOO.util.Dom.getElementsByClassName("xforms-error-panel-reload",null,errorPanelEl);if(reloadA.length!=0){YAHOO.util.Dom.generateId(reloadA[0]);YAHOO.util.Event.addListener(reloadA[0].id,"click",ORBEON.xforms.Events.errorReloadClicked,errorPanel);}});var elements=formElement.elements;var xformsRepeatTree;var xformsRepeatIndices;for(var elementIndex=0;elementIndex0){window.setInterval(function(){ORBEON.xforms.Events.sendHeartBeatIfNeeded(heartBeatDelay);},heartBeatDelay/10);}}window.setTimeout(function(){ORBEON.xforms.Events.orbeonLoadedEvent.fire();},ORBEON.util.Properties.internalShortDelay.get());},profileDocument:function(){console.profile("XForms initialization");ORBEON.xforms.Init.document();console.profileEnd();},insertedElementEvent:new YAHOO.util.CustomEvent(null,null,false,YAHOO.util.CustomEvent.FLAT),insertedElement:function(element){ORBEON.xforms.Init.insertedElementEvent.fire({element:element});if(element.nodeType==ORBEON.util.Dom.ELEMENT_TYPE){if(YAHOO.util.Dom.hasClass(element,"xforms-textarea")&&YAHOO.util.Dom.hasClass(element,"xforms-mediatype-text-html")){ORBEON.xforms.Init._htmlArea(element);}else{if(YAHOO.util.Dom.hasClass(element,"xforms-dialog")){ORBEON.xforms.Init._dialog(element);}}for(var childIndex=0;childIndex | "+srcElement.innerHTML+"
":srcElement.innerHTML;dragElement.className=srcElement.className;YAHOO.util.Dom.setStyle(srcElement,"visibility","hidden");},onDrag:function(e){var y=YAHOO.util.Event.getPageY(e);if(ythis.lastY){this.goingUp=false;}}this.lastY=y;},onDragOver:function(e,id){var srcElement=this.getEl();var srcDelimiter=YAHOO.util.Dom.getPreviousSibling(srcElement);var destElement=ORBEON.util.Dom.get(id)[0];if(YAHOO.util.Dom.hasClass(srcElement,"xforms-dnd")&&srcElement.nodeName.toLowerCase()==destElement.getEl().nodeName.toLowerCase()){var parent=destElement.getEl().parentNode;this.overElement=destElement.getEl();parent.removeChild(srcDelimiter);parent.removeChild(srcElement);if(this.goingUp){var insertionReferenceElement=this.overElement;parent.insertBefore(srcElement,insertionReferenceElement);parent.insertBefore(srcDelimiter,insertionReferenceElement);}else{var insertionReferenceElement=YAHOO.util.Dom.getNextSibling(this.overElement);parent.insertBefore(srcDelimiter,insertionReferenceElement);parent.insertBefore(srcElement,insertionReferenceElement);}YAHOO.util.DragDropMgr.refreshCache();}},endDrag:function(e){var srcElement=this.getEl();var proxy=this.getDragEl();var proxyid=proxy.id;var thisid=this.id;YAHOO.util.Dom.setStyle(proxyid,"visibility","hidden");YAHOO.util.Dom.setStyle(thisid,"visibility","");var endPosition=this._getPosition(srcElement);if(endPosition!=this._startPosition){var form=ORBEON.xforms.Controls.getForm(srcElement);var event=new ORBEON.xforms.server.AjaxServer.Event(form,this.sourceControlID,null,"xxforms-dnd",null,null,null,null,null,["dnd-start",this._startPosition,"dnd-end",endPosition]);this._renumberIDs(this.sourceControlID);ORBEON.xforms.server.AjaxServer.fireEvents([event],false);}}});function xformsIsDefined(thing){return typeof thing!="undefined";}function xformsDispatchEvent(target,eventName){if(target.dispatchEvent){var event=document.createEvent("HTMLEvents");event.initEvent(eventName.toLowerCase(),true,true);target.dispatchEvent(event);}else{target.fireEvent("on"+eventName);}}function xformsPreventDefault(event){if(event.preventDefault){event.preventDefault();}else{return false;}}function xformsArrayContains(array,element){for(var i=0;i ...ss];if(widget.extending!=null&&widget.appliesToControl(control)){return widget;}... Actually there is a weird line in the source code of the received XML-Diff:<xxf:event-response xmlns:xxf="http://orbeon.org/oxf/xml/xforms"> <xxf:action> <xxf:control-values> ","g");var XFORMS_REGEXP_AMPERSAND=new RegExp("&","g");var XFORMS_REGEXP_INVALID_XML_CHAR=new RegExp("[\x00-\x08\x0B\x0C\x0E-\x1F]","g");var XFORMS_WIDE_TEXTAREA_MIN_ROWS=5;var DEFAULT_LOADING_TEXT="Loading...";(function(){var YD=YAHOO.util.Dom;var OD;_.defer(function(){OD=ORBEON.util.Dom;});_.mixin({take:function(obj,interceptor,context){return interceptor.call(context,obj);},match:function(obj){function compareMaybe(f){return _.isFunction(f)?f(obj):f==obj;}function applyMaybe(f){return _.isFunction(f)?f(obj):f;}for(var i=1;i)","g"),"$1");elementSource=elementSource.replace(new RegExp(">"),' name="'+value+'">');var newElement=document.createElement(elementSource);element.parentNode.insertBefore(newElement,element);element.parentNode.removeChild(element);}}}else{element.setAttribute(name,value);}}}},getChildElementByIndex:function(parent,position){for(var i=0;i0){element.removeChild(element.firstChild);}var textNode=element.ownerDocument.createTextNode(text);element.appendChild(textNode);}else{element.innerText=text;}},nudgeAfterDelay:function(element){if(YAHOO.env.ua.ie!=0&&YAHOO.env.ua.ie<=7){var tables=element.getElementsByTagName("table");window.setTimeout(function(){element.className=element.className;for(var tableIndex=0;tableIndex1){throw new Error("Ambiguous month");}return _.indexOf(ORBEON.util.DateTime._monthNames,matches[0]);},_parseWeekday:function(weekday){var matches=_.filter(ORBEON.util.DateTime._weekdayNames,function(item){return new RegExp("^"+weekday,"i").test(item);});if(matches.length==0){throw new Error("Invalid day string");}if(matches.length>1){throw new Error("Ambiguous weekday");}return _.indexOf(ORBEON.util.DateTime._weekdayNames,matches[0]);},_currentYear:new Date().getFullYear(),_parseYear:function(year){year=parseInt(year,10);if(year<100){var twentiethCentury=1900+year;var twentyFirstCentury=2000+year;year=Math.abs(twentiethCentury-ORBEON.util.DateTime._currentYear)');ORBEON.xforms.Globals.modalProgressPanel.render(document.body);}ORBEON.xforms.Globals.modalProgressPanel.show();},overlayUseDisplayHidden:function(overlay){YD.setStyle(overlay.element,"display","none");overlay.beforeShowEvent.subscribers.unshift(new YAHOO.util.Subscriber(function(){YD.setStyle(overlay.element,"display","block");}));overlay.beforeHideEvent.subscribe(function(){YD.setStyle(overlay.element,"display","none");});},countOccurrences:function(str,character){var count=0;var pos=str.indexOf(character);while(pos!=-1){count++;pos=str.indexOf(character,pos+1);}return count;},appendToEffectiveId:function(effectiveId,ending){var prefixedId=ORBEON.util.Utils.getEffectiveIdNoSuffix(effectiveId);return prefixedId+ending+ORBEON.util.Utils.getEffectiveIdSuffixWithSeparator(effectiveId);},getEffectiveIdNoSuffix:function(effectiveId){if(effectiveId==null){return null;}var suffixIndex=effectiveId.indexOf(XF_REPEAT_SEPARATOR);if(suffixIndex!=-1){return effectiveId.substring(0,suffixIndex);}else{return effectiveId;}},getRepeatIndexes:function(effectiveId){if(effectiveId==null){return null;}var suffixIndex=effectiveId.indexOf(XF_REPEAT_SEPARATOR);if(suffixIndex!=-1){return effectiveId.substring(suffixIndex+1).split(XF_REPEAT_INDEX_SEPARATOR);}else{return"";}},getEffectiveIdSuffixWithSeparator:function(effectiveId){if(effectiveId==null){return null;}var suffixIndex=effectiveId.indexOf(XF_REPEAT_SEPARATOR);if(suffixIndex!=-1){return effectiveId.substring(suffixIndex);}else{return"";}},getLocalName:function(element){if(element.nodeType==1){return element.tagName.indexOf(":")==-1?element.tagName:element.tagName.substr(element.tagName.indexOf(":")+1);}else{return null;}},addSuffixToIdsAndRemoveDisabled:function(element,idSuffix,repeatDepth){element.removeAttribute("disabled");var idSuffixWithDepth=idSuffix;for(var repeatDepthIndex=0;repeatDepthIndex");for(var attributeIndex=0;attributeIndex0){setTimeout(checkAjaxReceived,100);}else{testCase.resume(function(){afterAjaxResponseFunction.call(testCase);});}}causingAjaxRequestFunction.call(testCase);setTimeout(checkAjaxReceived,100);testCase.wait(20000);},executeSequenceCausingAjaxRequest:function(testCase,tests){if(tests.length>0){var testTuple=tests.shift();ORBEON.util.Test.executeCausingAjaxRequest(testCase,function(){testTuple[0].call(testCase);},function(){if(testTuple[1]){testTuple[1].call(testCase);}ORBEON.util.Test.executeSequenceCausingAjaxRequest(testCase,tests);});}},runMayCauseXHR:function(){var testCase=arguments[0];var continuations=Array.prototype.slice.call(arguments,1);if(continuations.length>0){var continuation=continuations.shift();ORBEON.util.Test.executeCausingAjaxRequest(testCase,function(){continuation.call(testCase);},function(){ORBEON.util.Test.runMayCauseXHR.apply(null,[testCase].concat(continuations));});}},startFirebugLite:function(){if(!window.firebug){var firebugScript=document.createElement("script");firebugScript.setAttribute("src","http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js");document.body.appendChild(firebugScript);(function(){if(window.firebug){firebug.init();}else{setTimeout(arguments.callee);}})();}},onOrbeonLoadedRunTest:function(onlyFunctionName){ORBEON.xforms.Events.orbeonLoadedEvent.subscribe(function(){if(parent&&parent.TestManager){parent.TestManager.load();}else{if(!_.isUndefined(onlyFunctionName)){_.each(YAHOO.tool.TestRunner.masterSuite.items,function(testCase){_.each(_.functions(testCase),function(functionName){if(functionName.indexOf("test")==0&&functionName!=onlyFunctionName){delete testCase[functionName];}});});}new YAHOO.tool.TestLogger();YAHOO.tool.TestRunner.run();}});},click:function(id){var element=OD.get(id);var button=element.tagName.toLowerCase()=="button"?element:OD.getElementByTagName(element,"button");button.click();},assertMessage:function(expected){var messageDialog=OD.get("xforms-message-dialog");var body=YD.getElementsByClassName("bd",null,messageDialog)[0];var actual=OD.getStringValue(OD.getChildElementByIndex(body,0));YAHOO.util.Assert.areEqual(expected,actual,"didn't get the expected message");OD.getElementByTagName(messageDialog,"button").click();}}};ORBEON.util.Properties.init();})();ORBEON.xforms={};ORBEON.xforms.action={};ORBEON.xforms.control={};ORBEON.xforms.server={};ORBEON.widgets=ORBEON.widgets||{};ORBEON.widget=ORBEON.widget||{};ORBEON.xforms.Globals=ORBEON.xforms.Globals||{};ORBEON.xforms.Controls={isRelevant:function(control){return !YAHOO.util.Dom.hasClass(control,"xforms-disabled")&&!YAHOO.util.Dom.hasClass(control,"xforms-disabled-subsequent");},isReadonly:function(control){return YAHOO.util.Dom.hasClass(control,"xforms-readonly");},isRequired:function(control){return YAHOO.util.Dom.hasClass(control,"xforms-required");},isValid:function(control){return !YAHOO.util.Dom.hasClass(control,"xforms-invalid");},getForm:function(control){if(typeof control.form=="undefined"){var candidateForm=control;while(candidateForm.tagName.toLowerCase()!="form"){candidateForm=candidateForm.parentNode;}return candidateForm;}else{return control.form;}},getCurrentValueEvent:new YAHOO.util.CustomEvent(null,null,false,YAHOO.util.CustomEvent.FLAT),getCurrentValue:function(control){var event={control:control};ORBEON.xforms.Controls.getCurrentValueEvent.fire(event);if(!_.isUndefined(event.result)){return event.result;}else{if(YAHOO.util.Dom.hasClass(control,"xforms-input")&&YAHOO.util.Dom.hasClass(control,"xforms-type-time")){var timeInputValue=YAHOO.util.Dom.getElementsByClassName("xforms-input-input",null,control)[0].value;var timeJSDate=ORBEON.util.DateTime.magicTimeToJSDate(timeInputValue);return timeJSDate==null?timeInputValue:ORBEON.util.DateTime.jsDateToISOTime(timeJSDate);}else{if(YAHOO.util.Dom.hasClass(control,"xforms-input")&&YAHOO.util.Dom.hasClass(control,"xforms-type-date")){var dateInputValue;if(YAHOO.util.Dom.hasClass(control,"xforms-input-appearance-minimal")){var imgElement=YAHOO.util.Dom.getElementsByClassName("xforms-input-appearance-minimal","img",control)[0];dateInputValue=ORBEON.util.Dom.getAttribute(imgElement,"alt");}else{dateInputValue=YAHOO.util.Dom.getElementsByClassName("xforms-input-input",null,control)[0].value;}var dateJSDate=ORBEON.util.DateTime.magicDateToJSDate(dateInputValue);return dateJSDate==null?dateInputValue:ORBEON.util.DateTime.jsDateToISODate(dateJSDate);}else{if(YAHOO.util.Dom.hasClass(control,"xforms-input")&&YAHOO.util.Dom.hasClass(control,"xforms-type-dateTime")){var dateValue=YAHOO.util.Dom.getElementsByClassName("xforms-type-date",null,control)[0].value;var jsDateDate=ORBEON.util.DateTime.magicDateToJSDate(dateValue);var timeValue=YAHOO.util.Dom.getElementsByClassName("xforms-type-time",null,control)[0].value;var jsDateTime=ORBEON.util.DateTime.magicTimeToJSDate(timeValue);if(jsDateDate==null||jsDateTime==null){return dateValue==""&&timeValue==""?"":dateValue+"T"+timeValue;}else{return ORBEON.util.DateTime.jsDateToISODateTime(jsDateDate,jsDateTime);}}else{if((YAHOO.util.Dom.hasClass(control,"xforms-input")&&!YAHOO.util.Dom.hasClass(control,"xforms-type-boolean")&&!YAHOO.util.Dom.hasClass(control,"xforms-static"))||YAHOO.util.Dom.hasClass(control,"xforms-secret")){var input=control.tagName.toLowerCase()=="input"?control:control.getElementsByTagName("input")[0];return input.value;}else{if(YAHOO.util.Dom.hasClass(control,"xforms-select-appearance-full")||YAHOO.util.Dom.hasClass(control,"xforms-select1-appearance-full")||(YAHOO.util.Dom.hasClass(control,"xforms-input")&&YAHOO.util.Dom.hasClass(control,"xforms-type-boolean"))){var inputs=control.getElementsByTagName("input");var spanValue="";for(var inputIndex=0;inputIndex0)?lhhaElements.get(0):null;},getControlForLHHA:function(element,lhhaType){var suffix=ORBEON.xforms.Controls._classNameToId[lhhaType];return element.id.indexOf(suffix)!=-1?ORBEON.util.Dom.get(element.id.replace(new RegExp(ORBEON.util.Utils.escapeRegex(ORBEON.xforms.Controls._classNameToId[lhhaType]),"g"),"")):element.parentNode;},_setMessage:function(control,lhhaType,message){var lhhaElement=ORBEON.xforms.Controls.getControlLHHA(control,lhhaType);if(lhhaElement!=null){lhhaElement.innerHTML=message;if(message==""){if(lhhaType=="help"&&!YAHOO.util.Dom.hasClass(lhhaElement,"xforms-disabled")){YAHOO.util.Dom.addClass(lhhaElement,"xforms-disabled-subsequent");var help=ORBEON.xforms.Controls.getControlLHHA(control,"help");YAHOO.util.Dom.addClass(help,"xforms-disabled-subsequent");}}else{if(ORBEON.xforms.Controls.isRelevant(control)){YAHOO.util.Dom.removeClass(lhhaElement,"xforms-disabled");YAHOO.util.Dom.removeClass(lhhaElement,"xforms-disabled-subsequent");if(lhhaType=="help"){var help=ORBEON.xforms.Controls.getControlLHHA(control,"help");YAHOO.util.Dom.removeClass(help,"xforms-disabled");YAHOO.util.Dom.removeClass(help,"xforms-disabled-subsequent");}}}}ORBEON.xforms.Controls.lhhaChangeEvent.fire({control:control,type:lhhaType,message:message});},lhhaChangeEvent:new YAHOO.util.CustomEvent(null,null,false,YAHOO.util.CustomEvent.FLAT),getLabelMessage:function(control){if(YAHOO.util.Dom.hasClass(control,"xforms-trigger")||YAHOO.util.Dom.hasClass(control,"xforms-submit")){var labelElement=ORBEON.xforms.Controls.getControlLHHA(control,"control");return labelElement.innerHTML;}else{if(YAHOO.util.Dom.hasClass(control,"xforms-dialog")){var labelDiv=ORBEON.util.Dom.getChildElementByIndex(control,0);return labelDiv.innerHTML;}else{if(YAHOO.util.Dom.hasClass(control,"xforms-group-appearance-xxforms-fieldset")){var legend=ORBEON.util.Dom.getChildElementByIndex(control,0);if(legend!=null){return legend.innerHTML;}}else{var labelElement=ORBEON.xforms.Controls.getControlLHHA(control,"label");return labelElement==null?"":labelElement.innerHTML;}}}},setLabelMessage:function(control,message){if(YAHOO.util.Dom.hasClass(control,"xforms-trigger")||YAHOO.util.Dom.hasClass(control,"xforms-submit")){ORBEON.xforms.Controls._setMessage(control,"control",message);}else{if(YAHOO.util.Dom.hasClass(control,"xforms-dialog")){var labelDiv=ORBEON.util.Dom.getChildElementByIndex(control,0);labelDiv.innerHTML=message;}else{if(YAHOO.util.Dom.hasClass(control,"xforms-group-appearance-xxforms-fieldset")){var legend=ORBEON.util.Dom.getChildElementByIndex(control,0);if(legend!=null){legend.innerHTML=message;}}else{if(YAHOO.util.Dom.hasClass(control,"xforms-output-appearance-xxforms-download")){var anchor=YAHOO.util.Dom.getChildren(control)[0];anchor.innerHTML=message;}else{ORBEON.xforms.Controls._setMessage(control,"label",message);}}}}},getHelpMessage:function(control){var helpElement=ORBEON.xforms.Controls.getControlLHHA(control,"help");return helpElement==null?"":ORBEON.util.Dom.getStringValue(helpElement);},setHelpMessage:function(control,message){message=ORBEON.util.String.escapeForMarkup(message);ORBEON.xforms.Controls._setMessage(control,"help",message);ORBEON.xforms.Controls._setTooltipMessage(control,message,ORBEON.xforms.Globals.helpTooltipForControl);},setConstraintLevel:function(control,newLevel){var alertActive=newLevel!="";function toggleCommonClasses(element){$(element).toggleClass("xforms-invalid",newLevel=="error");$(element).toggleClass("xforms-warning",newLevel=="warning");$(element).toggleClass("xforms-info",newLevel=="info");}toggleCommonClasses(control);var alertElement=ORBEON.xforms.Controls.getControlLHHA(control,"alert");if(alertElement){$(alertElement).toggleClass("xforms-active",alertActive);if(!_.isUndefined($(alertElement).attr("id"))){toggleCommonClasses(alertElement);}}var alertTooltip=ORBEON.xforms.Globals.alertTooltipForControl[control.id];if(alertTooltip!=null&&alertTooltip!=true){if(!alertActive){alertTooltip.cfg.setProperty("disabled",true);alertTooltip.hide();}else{alertTooltip.cfg.setProperty("disabled",false);}}},setDisabledOnFormElement:function(element,disabled){if(disabled){element.setAttribute("disabled","disabled");}else{element.removeAttribute("disabled");}},setRelevant:function(control,isRelevant){var FN=ORBEON.xforms.FlatNesting;if(YAHOO.util.Dom.hasClass(control,"xforms-group-begin-end")){FN.setRelevant(control,isRelevant);}else{var elementsToUpdate=[control,ORBEON.xforms.Controls.getControlLHHA(control,"label"),ORBEON.xforms.Controls.getControlLHHA(control,"alert")];if(!isRelevant||(isRelevant&&ORBEON.xforms.Controls.getHelpMessage(control)!="")){elementsToUpdate.push(ORBEON.xforms.Controls.getControlLHHA(control,"help"));}if(!isRelevant||(isRelevant&&ORBEON.xforms.Controls.getHintMessage(control)!="")){elementsToUpdate.push(ORBEON.xforms.Controls.getControlLHHA(control,"hint"));}for(var elementIndex=0;elementIndex0){var itemIndex=0;var foundSelected=false;for(;itemIndex0){var itemIndex=0;for(;itemIndexclientHeight){while(scrollHeight>=clientHeight){textarea.rows=textarea.rows+1;if(textarea.clientHeight<=clientHeight){break;}clientHeight=textarea.clientHeight;linesAdded++;}}else{if(scrollHeightXFORMS_WIDE_TEXTAREA_MIN_ROWS&&scrollHeight=clientHeight){break;}clientHeight=textarea.clientHeight;linesAdded--;}}}},updateHTMLAreaClasses:function(textarea){var iframe=textarea.previousSibling;while(iframe.nodeType!=ORBEON.util.Dom.ELEMENT_TYPE){iframe=textarea.previousSibling;}iframe.className=textarea.className;},showDialog:function(controlId,neighbor){var divElement=ORBEON.util.Dom.get(controlId);var yuiDialog=ORBEON.xforms.Globals.dialogs[controlId];if(ORBEON.xforms.Globals.currentFocusControlId!=null){var focusedElement=ORBEON.util.Dom.get(ORBEON.xforms.Globals.currentFocusControlId);if(focusedElement!=null){focusedElement.blur();}}if(YAHOO.util.Dom.hasClass(divElement,"xforms-initially-hidden")){YAHOO.util.Dom.removeClass(divElement,"xforms-initially-hidden");yuiDialog.render();}YAHOO.util.Dom.addClass(yuiDialog.innerElement,"yui-module");YAHOO.util.Dom.addClass(yuiDialog.innerElement,"yui-overlay");YAHOO.util.Dom.addClass(yuiDialog.innerElement,"yui-panel");yuiDialog.element.style.display="block";yuiDialog.show();yuiDialog.cfg.setProperty("zIndex",ORBEON.xforms.Globals.lastDialogZIndex++);if(neighbor==null){yuiDialog.center();}else{yuiDialog.cfg.setProperty("context",[neighbor,"tl","bl"]);yuiDialog.align();}},getWidget:function(control){for(var widgetClass in ORBEON.widgets){var widget=ORBEON.widgets[widgetClass];if(widget.extending!=null&&widget.appliesToControl(control)){return widget;}}},deleteControl:function(control){ORBEON.xforms.ServerValueStore.remove(control.id);ORBEON.xforms.Globals.hintTooltipForControl[control.id]=null;ORBEON.xforms.Globals.alertTooltipForControl[control.id]=null;ORBEON.xforms.Globals.helpTooltipForControl[control.id]=null;ORBEON.xforms.Globals.dialogs[control.id]=null;ORBEON.xforms.Globals.dialogMinimalLastMouseOut[control.id]=null;},typeChangedEvent:new YAHOO.util.CustomEvent(null,null,false,YAHOO.util.CustomEvent.FLAT),findCaseBegin:function(controlId){var caseBeginId="xforms-case-begin-"+controlId;return ORBEON.util.Dom.get(caseBeginId);},isCaseSelected:function(controlId){var caseBegin=ORBEON.xforms.Controls.findCaseBegin(controlId);return YAHOO.util.Dom.hasClass(caseBegin,"xforms-case-selected");},toggleCase:function(controlId,visible){var caseBegin=ORBEON.xforms.Controls.findCaseBegin(controlId);var caseBeginParent=caseBegin.parentNode;var foundCaseBegin=false;for(var childIndex=0;caseBeginParent.childNodes.length;childIndex++){var cursor=caseBeginParent.childNodes[childIndex];if(!foundCaseBegin){if(cursor.id==caseBegin.id){foundCaseBegin=true;}else{continue;}}if(cursor.nodeType==ELEMENT_TYPE){if(cursor.id=="xforms-case-end-"+controlId){break;}var doAnimate=cursor.id!="xforms-case-begin-"+controlId&&YAHOO.util.Dom.hasClass(cursor,"xxforms-animate")&&YAHOO.env.ua.ie==0;var updateClasses=_.partial(function(el){if(visible){YAHOO.util.Dom.addClass(el,"xforms-case-selected");YAHOO.util.Dom.removeClass(el,"xforms-case-deselected");YAHOO.util.Dom.removeClass(el,"xforms-case-deselected-subsequent");}else{YAHOO.util.Dom.addClass(el,"xforms-case-deselected-subsequent");YAHOO.util.Dom.removeClass(el,"xforms-case-selected");}},cursor);if(doAnimate){if(visible){updateClasses();$(cursor).css("display","none");$(cursor).animate({height:"toggle"},{duration:200});}else{$(cursor).animate({height:"toggle"},{duration:200,complete:updateClasses});}}else{updateClasses();ORBEON.util.Dom.nudgeAfterDelay(cursor);}}}}};ORBEON.xforms.FlatNesting={isGroupBeginEnd:function(node){return node.nodeType==ELEMENT_TYPE&&YAHOO.util.Dom.hasClass(node,"xforms-group-begin-end");},isGroupBegin:function(node){return this.isGroupBeginEnd(node)&&node.id.indexOf("group-begin-")==0;},isGroupEnd:function(node){return this.isGroupBeginEnd(node)&&node.id.indexOf("group-end-")==0;},isRepeatBeginEnd:function(node){return node.nodeType==ELEMENT_TYPE&&YAHOO.util.Dom.hasClass(node,"xforms-repeat-begin-end");},isRepeatBegin:function(node){return this.isRepeatBeginEnd(node)&&node.id.indexOf("repeat-begin-")==0;},isRepeatEnd:function(node){return this.isRepeatBeginEnd(node)&&node.id.indexOf("repeat-end-")==0;},isRepeatDelimiter:function(node){return node.nodeType==ELEMENT_TYPE&&YAHOO.util.Dom.hasClass(node,"xforms-repeat-delimiter");},isBegin:function(node){return this.isGroupBegin(node)||this.isRepeatBegin(node);},isEnd:function(node){return this.isGroupEnd(node)||this.isRepeatEnd(node);},foldAncestors:function(startNode,startValue,foldFunction,stopValue){var FN=ORBEON.xforms.FlatNesting;var isGroup=FN.isGroupBegin(startNode);var isRepeat=FN.isRepeatDelimiter(startNode);var depth=0;var currentNode=startNode;var currentValue=startValue;while(true){currentNode=YAHOO.util.Dom.getPreviousSibling(currentNode);if(currentNode==null){break;}if(currentNode.nodeType==ELEMENT_TYPE){if(FN.isEnd(currentNode)){depth++;}if(FN.isBegin(currentNode)){depth--;}if(depth<0&&((isGroup&&FN.isGroupEnd(currentNode))||(isRepeat&&FN.isRepeatBegin(currentNode)))){currentValue=foldFunction(currentNode,currentValue);if(currentValue==stopValue){return stopValue;}}}}return currentValue;},foldDescendants:function(startNode,startValue,foldFunction,stopValue){var FN=ORBEON.xforms.FlatNesting;var isGroup=this.isGroupBegin(startNode);var isRepeat=this.isRepeatDelimiter(startNode);var depth=0;var stopDepth=0;var currentNode=startNode;var valueStack=[];var currentValue=startValue;while(true){currentNode=YAHOO.util.Dom.getNextSibling(currentNode);if(currentNode==null){break;}if(currentNode.nodeType==ELEMENT_TYPE){if(this.isBegin(currentNode)){depth++;if(stopDepth>0){stopDepth++;}else{valueStack.push(currentValue);currentValue=foldFunction(currentNode,currentValue);if(currentValue==stopValue){stopDepth++;}}}else{if(this.isEnd(currentNode)){depth--;if(depth<0){break;}if(stopDepth>0){stopDepth--;}else{currentValue=valueStack.pop();}}else{if(isRepeat&&depth==0&&this.isRepeatDelimiter(currentNode)){break;}else{if(stopDepth==0){currentValue=foldFunction(currentNode,currentValue);}}}}}}return currentValue;},hasAncestor:function(startNode,conditionFunction){var FN=ORBEON.xforms.FlatNesting;return FN.foldAncestors(startNode,false,function(value,node){return conditionFunction(node);},true);},setRelevant:function(node,isRelevant){var FN=ORBEON.xforms.FlatNesting;var YD=YAHOO.util.Dom;var OD=ORBEON.util.Dom;var OC=ORBEON.xforms.Controls;if(isRelevant){YAHOO.util.Dom.removeClass(node,"xforms-disabled");}else{YAHOO.util.Dom.addClass(node,"xforms-disabled");}if(isRelevant&&FN.hasAncestor(node,function(node){return YAHOO.util.Dom.hasClass(node,"xforms-disabled");})){return;}FN.foldDescendants(node,null,function(node,value){if(isRelevant&&FN.isBegin(node)&&YD.hasClass(node,"xforms-disabled")){return true;}if(isRelevant){YD.removeClass(node,"xforms-disabled");YD.removeClass(node,"xforms-disabled-subsequent");OD.nudgeAfterDelay(node);}else{YD.addClass(node,"xforms-disabled-subsequent");}return false;},true);}};ORBEON.xforms.Events={_findParentXFormsControl:function(element){while(true){if(!element){return null;}if(element.xformsElement){return element.xformsElement;}else{if(element.ownerDocument&&element.ownerDocument.xformsElement){return element.ownerDocument.xformsElement;}else{if(element.tagName!=null&&element.tagName.toLowerCase()=="iframe"){for(var dialogId in ORBEON.xforms.Globals.dialogs){var dialog=ORBEON.xforms.Globals.dialogs[dialogId];if(dialog.iframe==element){return dialog.element;}}}else{if(element.className!=null){if(element.id&&ORBEON.util.String.endsWith(element.id,"_container")&&YAHOO.util.Dom.hasClass(element,"xforms-textarea")&&YAHOO.util.Dom.hasClass(element,"xforms-mediatype-text-html")&&ORBEON.util.Properties.htmlEditor.get()=="yui"){return ORBEON.util.Dom.getChildElementByClass(element,"xforms-textarea");}else{if($(element).is(".xforms-control, .xbl-component")){return element;}else{if(YAHOO.util.Dom.hasClass(element,"xforms-dialog")||YAHOO.util.Dom.hasClass(element,"xforms-help")||YAHOO.util.Dom.hasClass(element,"xforms-alert")){return element;}}}}}}}element=element.parentNode;}},_findAncestorFocusableControl:function(eventTarget){var ancestorControl=ORBEON.xforms.Events._findParentXFormsControl(eventTarget);var sendFocus=ancestorControl!=null&&!YAHOO.util.Dom.hasClass(ancestorControl,"xforms-dialog")&&!$(ancestorControl).is(".xbl-component:not(.xbl-focusable)");return sendFocus?ancestorControl:null;},focus:function(event){var eventTarget=YAHOO.util.Event.getTarget(event);if(_.isUndefined(document.addEventListener)){YAHOO.util.Dom.generateId(eventTarget);var changeListenerElement=ORBEON.xforms.Globals.changeListeners[eventTarget.id];var needToRegisterChangeListener=_.isUndefined(changeListenerElement)||changeListenerElement!=eventTarget;if(needToRegisterChangeListener){YAHOO.util.Event.addListener(eventTarget,"change",ORBEON.xforms.Events.change);ORBEON.xforms.Globals.changeListeners[eventTarget.id]=eventTarget;}}if(!ORBEON.xforms.Globals.maskFocusEvents){var newFocusControlElement=ORBEON.xforms.Events._findAncestorFocusableControl(eventTarget);var currentFocusControlElement=ORBEON.xforms.Globals.currentFocusControlId!=null?ORBEON.util.Dom.get(ORBEON.xforms.Globals.currentFocusControlId):null;if(newFocusControlElement!=null){if(ORBEON.xforms.ServerValueStore.get(newFocusControlElement.id)==null&&!YAHOO.util.Dom.hasClass(newFocusControlElement,"xforms-select-appearance-compact")&&!YAHOO.util.Dom.hasClass(newFocusControlElement,"xforms-select1-appearance-compact")){var controlCurrentValue=ORBEON.xforms.Controls.getCurrentValue(newFocusControlElement);ORBEON.xforms.ServerValueStore.set(newFocusControlElement.id,controlCurrentValue);}}if(newFocusControlElement!=null&¤tFocusControlElement!=newFocusControlElement){var events=[];var changeValue=false;if(currentFocusControlElement!=null){if(YAHOO.util.Dom.hasClass(currentFocusControlElement,"xforms-textarea")&&YAHOO.util.Dom.hasClass(currentFocusControlElement,"xforms-mediatype-text-html")){changeValue=true;}if(changeValue){xformsValueChanged(currentFocusControlElement);}}events.push(new ORBEON.xforms.server.AjaxServer.Event(null,newFocusControlElement.id,null,"xforms-focus"));ORBEON.xforms.Globals.currentFocusControlId=newFocusControlElement.id;ORBEON.xforms.Globals.currentFocusControlElement=newFocusControlElement;ORBEON.xforms.server.AjaxServer.fireEvents(events,true);}}else{ORBEON.xforms.Globals.maskFocusEvents=false;}},blurEvent:new YAHOO.util.CustomEvent(null,null,false,YAHOO.util.CustomEvent.FLAT),blur:function(event){if(!ORBEON.xforms.Globals.maskFocusEvents){var target=YAHOO.util.Event.getTarget(event);var control=ORBEON.xforms.Events._findAncestorFocusableControl(target);if(control!=null){ORBEON.xforms.Events.blurEvent.fire({control:control,target:target});ORBEON.xforms.Globals.currentFocusControlId=control.id;ORBEON.xforms.Globals.currentFocusControlElement=control;var relatedTarget=event.relatedTarget||document.activeElement;var relatedControl=ORBEON.xforms.Events._findAncestorFocusableControl(relatedTarget);if(relatedControl==null){ORBEON.xforms.Globals.currentFocusControlId=null;var events=[new ORBEON.xforms.server.AjaxServer.Event(null,control.id,null,"xxforms-blur")];ORBEON.xforms.server.AjaxServer.fireEvents(events,false);}}}},change:function(event){var target=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(event));if(target!=null){if(YAHOO.util.Dom.hasClass(target,"xforms-upload")){ORBEON.xforms.Page.getControl(target).change();}else{if(_.isNumber(ORBEON.xforms.Globals.changedIdsRequest[target.id])){ORBEON.xforms.Globals.changedIdsRequest[target.id]=0;}if(YAHOO.util.Dom.hasClass(target,"xforms-select1-appearance-compact")){var select=ORBEON.util.Dom.getElementByTagName(target,"select");if(select.value==""){select.options[0].selected=true;}else{var foundSelected=false;for(var optionIndex=0;optionIndex=ORBEON.util.Properties.delayBeforeCloseMinimalDialog.get()){var event=new ORBEON.xforms.server.AjaxServer.Event(null,yuiDialog.element.id,null,"xxforms-dialog-close");ORBEON.xforms.server.AjaxServer.fireEvents([event],false);}},sendHeartBeatIfNeeded:function(heartBeatDelay){var currentTime=new Date().getTime();if((currentTime-ORBEON.xforms.Globals.lastEventSentTime)>=heartBeatDelay){var heartBeatDiv=ORBEON.util.Dom.get("xforms-heartbeat");if(heartBeatDiv==null){var form;for(var formIndex=0;formIndex=1.9,isRenderingEnginePresto:YAHOO.env.ua.opera,isRenderingEngineWebCore:YAHOO.env.ua.webkit,isRenderingEngineWebCore13:YAHOO.env.ua.webkit<=312,isRenderingEngineTrident:YAHOO.env.ua.ie,ns:{},xformsServerURL:{},xformsServerUploadURL:{},calendarImageURL:{},eventQueue:[],eventsFirstEventTime:0,discardableTimerIds:{},requestForm:null,requestIgnoreErrors:false,requestInProgress:false,requestDocument:"",requestTryCount:0,executeEventFunctionQueued:0,maskFocusEvents:false,maskDialogCloseEvents:false,currentFocusControlId:null,currentFocusControlElement:null,htmlAreaNames:[],repeatTreeChildToParent:{},repeatIndexes:{},repeatTreeParentToAllChildren:{},yuiCalendar:null,tooltipLibraryInitialized:false,changedIdsRequest:{},loadingOtherPage:false,activeControl:null,autosizeTextareas:[],dialogs:{},dialogMinimalLastMouseOut:{},hintTooltipForControl:{},alertTooltipForControl:{},helpTooltipForControl:{},debugDiv:null,debugLastTime:new Date().getTime(),lastEventSentTime:new Date().getTime(),pageLoadedRegistered:true,sliderYui:{},isReloading:false,lastDialogZIndex:1050,formErrorPanel:{},formHelpPanel:{},formHelpPanelMessageDiv:{},formHelpPanelCloseButton:{},formUUID:{},formStaticState:{},formDynamicState:{},formServerEvents:{},formClientState:{},modalProgressPanel:null,changeListeners:{},topLevelListenerRegistered:ORBEON.xforms.Globals.topLevelListenerRegistered==null?false:ORBEON.xforms.Globals.topLevelListenerRegistered,processRepeatHierarchy:function(repeatTreeString){var repeatTree=repeatTreeString.split(",");for(var repeatIndex=0;repeatIndex1){var parent=repeatInfo[repeatInfo.length-1];ORBEON.xforms.Globals.repeatTreeChildToParent[id]=parent;}}for(var child in ORBEON.xforms.Globals.repeatTreeChildToParent){var parent=ORBEON.xforms.Globals.repeatTreeChildToParent[child];while(parent!=null){if(!ORBEON.xforms.Globals.repeatTreeParentToAllChildren[parent]){ORBEON.xforms.Globals.repeatTreeParentToAllChildren[parent]=new Array();}ORBEON.xforms.Globals.repeatTreeParentToAllChildren[parent].push(child);parent=ORBEON.xforms.Globals.repeatTreeChildToParent[parent];}}}});(function(){var methodsFrom=ORBEON.xforms.Globals.isRenderingEngineTrident?ORBEON.util.IEDom:ORBEON.util.MozDom;for(var method in methodsFrom){ORBEON.util.Dom[method]=methodsFrom[method];}}());YAHOO.util.Dom.addClass(document.body,"yui-skin-sam");if(YAHOO.env.ua.webkit&&YAHOO.env.ua.mobile){YAHOO.util.Dom.addClass(document.body,"xforms-ios");}for(var formIndex=0;formIndex .xforms-error-panel"),function(errorPanelEl){YAHOO.util.Dom.generateId(errorPanelEl);YAHOO.util.Dom.removeClass(errorPanelEl,"xforms-initially-hidden");var errorPanel=new YAHOO.widget.Panel(errorPanelEl.id,{modal:true,fixedcenter:false,underlay:"shadow",visible:false,constraintoviewport:true,draggable:true});errorPanel.render();ORBEON.util.Utils.overlayUseDisplayHidden(errorPanel);errorPanel.beforeHideEvent.subscribe(ORBEON.xforms.Events.errorPanelClosed,formID);ORBEON.xforms.Globals.formErrorPanel[formID]=errorPanel;var titleDiv=ORBEON.util.Dom.getChildElementByClass(errorPanelEl,"hd");var bodyDiv=ORBEON.util.Dom.getChildElementByClass(errorPanelEl,"bd");var detailsHiddenDiv=ORBEON.util.Dom.getChildElementByClass(bodyDiv,"xforms-error-panel-details-hidden");var showDetailsA=ORBEON.util.Dom.getChildElementByIndex(ORBEON.util.Dom.getChildElementByIndex(detailsHiddenDiv,0),0);YAHOO.util.Dom.generateId(showDetailsA);var detailsShownDiv=ORBEON.util.Dom.getChildElementByClass(bodyDiv,"xforms-error-panel-details-shown");var hideDetailsA=ORBEON.util.Dom.getChildElementByIndex(ORBEON.util.Dom.getChildElementByIndex(detailsShownDiv,0),0);YAHOO.util.Dom.generateId(hideDetailsA);errorPanel.errorTitleDiv=titleDiv;errorPanel.errorBodyDiv=bodyDiv;errorPanel.errorDetailsDiv=ORBEON.util.Dom.getChildElementByClass(detailsShownDiv,"xforms-error-panel-details");YAHOO.util.Event.addListener(showDetailsA.id,"click",ORBEON.xforms.Events.errorShowHideDetails);YAHOO.util.Event.addListener(hideDetailsA.id,"click",ORBEON.xforms.Events.errorShowHideDetails);var closeA=YAHOO.util.Dom.getElementsByClassName("xforms-error-panel-close",null,errorPanelEl);if(closeA.length!=0){YAHOO.util.Dom.generateId(closeA[0]);YAHOO.util.Event.addListener(closeA[0].id,"click",ORBEON.xforms.Events.errorCloseClicked,errorPanel);}var reloadA=YAHOO.util.Dom.getElementsByClassName("xforms-error-panel-reload",null,errorPanelEl);if(reloadA.length!=0){YAHOO.util.Dom.generateId(reloadA[0]);YAHOO.util.Event.addListener(reloadA[0].id,"click",ORBEON.xforms.Events.errorReloadClicked,errorPanel);}});var elements=formElement.elements;var xformsRepeatTree;var xformsRepeatIndices;for(var elementIndex=0;elementIndex0){window.setInterval(function(){ORBEON.xforms.Events.sendHeartBeatIfNeeded(heartBeatDelay);},heartBeatDelay/10);}}window.setTimeout(function(){ORBEON.xforms.Events.orbeonLoadedEvent.fire();},ORBEON.util.Properties.internalShortDelay.get());},profileDocument:function(){console.profile("XForms initialization");ORBEON.xforms.Init.document();console.profileEnd();},insertedElementEvent:new YAHOO.util.CustomEvent(null,null,false,YAHOO.util.CustomEvent.FLAT),insertedElement:function(element){ORBEON.xforms.Init.insertedElementEvent.fire({element:element});if(element.nodeType==ORBEON.util.Dom.ELEMENT_TYPE){if(YAHOO.util.Dom.hasClass(element,"xforms-textarea")&&YAHOO.util.Dom.hasClass(element,"xforms-mediatype-text-html")){ORBEON.xforms.Init._htmlArea(element);}else{if(YAHOO.util.Dom.hasClass(element,"xforms-dialog")){ORBEON.xforms.Init._dialog(element);}}for(var childIndex=0;childIndex "+srcElement.innerHTML+" |