[Xsltforms-support] bug?
Brought to you by:
alain-couthures
From: Stephen C. <ste...@gm...> - 2012-01-17 08:28:44
|
Hello, I have a problem with an XForms Schema designer "app" that I am building based on XSLTForms I get an exception thrown that causes the view to freeze up. The problem can be replicated here: http://collinta.com.au/xsltforms/designer.xml (Note: in FF minimize and maximise the window after it loads in, seems to be FF bug) You will see two repeats one on the left which is a list of schema elements 1 to 5 and one in the middle which shows the children of the specific element selected on the left. Its possible to select each of elements 1 to 5 no problems. But if you select element 1, that contains a sequence of two elements a and b, and then select any two items (order seems irrelevant) you should see the view freeze up. This occurs in Firefox 9.0.1 and IE 9.0. In FF Error Console I see an error that occurs on line 5882 (marked by >> below), namely "this.select.firstChild is null": XsltForms_select.prototype.setValue = function(value) { if (!this.full && (!value || value === "")) { this.selectedOptions = []; if (this.select.firstChild.value !== "\xA0") { var empty = this.select.options[0].cloneNode(true); empty.value = "\xA0"; empty.text = "\xA0"; empty.id = ""; this.select.insertBefore(empty, this.select.options[0]); this.select.selectedIndex = 0; } } else { >> if (!this.full && this.select.firstChild.value === "\xA0") { this.select.removeChild(this.select.firstChild); } var vals = value? (this.multiple? value.split(XsltForms_globals.valuesSeparator) : [value]) : [""]; var list = this.full? (XsltForms_browser.isXhtml ? this.element.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "input") : this.element.getElementsByTagName("input")) : this.select.options; var well = true; for (var i = 0, len = vals.length; well && i < len; i++) { var val = vals[i]; var found = false; for (var j = 0, len1 = list.length; !found && j < len1; j++) { if (list[j].value === val) { found = true; } } well = found; } if (well || (this.multiple && !value)) { if (this.outRange) { this.outRange = false; XsltForms_xmlevents.dispatch(this, "xforms-in-range"); } } else if ((!this.multiple || value) && !this.outRange) { this.outRange = true; XsltForms_xmlevents.dispatch(this, "xforms-out-of-range"); } vals = this.multiple? vals : [vals[0]]; var readonly = this.element.node.readonly; var item; if (this.full) { for (var n = 0, len2 = list.length; n < len2; n++) { item = list[n]; item.checked = XsltForms_browser.inArray(item.value, vals); } } else { this.selectedOptions = []; for (var k = 0, len3 = list.length; k < len3; k++) { item = list[k]; var b = XsltForms_browser.inArray(item.value, vals); if (b) { this.selectedOptions.push(item); } try { item.selected = b; } catch(e) { } } } } }; Any help with this is greatly appreciated. Steve Cameron |