null
null
null
null
-1
null
null
null
false
true
return this.getAttribute("selection") == "open";
if (!this._inputField) {
this._inputField =
document.getAnonymousElementByAttribute(this, "anonid", "control");
}
return this._inputField;
if (!this._dropMarker) {
this._dropMarker =
document.getAnonymousElementByAttribute(this, "anonid", "dropmarker");
}
return this._dropMarker;
if (!this._popup) {
this._popup =
document.getAnonymousElementByAttribute(this, "anonid", "popup");
}
return this._popup;
if (!this._container) {
this._container =
document.getAnonymousElementByAttribute(this, "anonid", "container");
}
return this._container;
. No need to update the value of the control
// in this case.
if (this._selected && this.popupOpen) {
this.hidePopup();
this._selected.setActive(false);
this._selected = this._tmpSelected;
this._tmpSelected = null;
if (this._selected) {
this._selected.setActive(true);
}
}
}
return true;
]]>
0) {
return aDown ? next.anonymousItemSetContent.firstChild
: next.anonymousItemSetContent.lastChild;
}
}
node = next;
}
// if we are in a choices or itemset element
var parent = aNode.parentNode;
if (parent.namespaceURI == this.XFORMS_NS &&
parent.localName == "choices") {
var sibling = aDown ? parent.nextSibling : parent.previousSibling;
if (sibling.namespaceURI == this.XFORMS_NS &&
sibling.localName == "item") {
return sibling;
}
return this.findNextSelectable(sibling, aDown);
}
if (parent.parentNode.namespaceURI == this.XFORMS_NS &&
parent.parentNode.localName == "itemset") {
var sibling2 = aDown
? parent.parentNode.nextSibling
: parent.parentNode.previousSibling;
if (sibling2.namespaceURI == this.XFORMS_NS &&
sibling2.localName == "item") {
return sibling2;
}
return this.findNextSelectable(sibling2, aDown);
}
return null;
]]>
is possible (anonymously)
// inside
var target = aEvent.originalTarget;
while (target && target != this) {
if (target.namespaceURI == this.XFORMS_NS &&
(target.localName == "item" || target.localName == "choices")) {
break;
}
target = target.parentNode;
}
if (target == this) {
return true;
}
this.hidePopup();
if (this._selected) {
this.updateInputField();
if (this.incremental) {
this._handleSelection();
}
// need to keep the xforms-select and xforms-deselect event
// dispatching after _handleSelection. That function might
// deselect this._selected if the selected item is a copyItem
// bound to a non-element node. We don't want to dispatch a
// xforms-select/deselect in that case since it really isn't
// considered to be a valid selection to begin with (causes
// a xforms-binding-exception).
if (this._lastSelectedItem != this._selected) {
if (this._lastSelectedItem) {
this.dispatchSelectEvent(this._lastSelectedItem, "xforms-deselect");
}
if (this._selected) {
this.dispatchSelectEvent(this._selected, "xforms-select");
}
this._lastSelectedItem = this._selected;
}
}
this.inputField.focus();
]]>
is possible (anonymously)
// inside
var target = aEvent.originalTarget;
while (target && target != this) {
if (target.namespaceURI == this.XFORMS_NS && target.localName == "item") {
if (this._selected) {
this._selected.setActive(false);
this._selected = null;
}
var item =
target.QueryInterface(Components.interfaces.nsIXFormsItemElement);
if (item) {
item.setActive(true);
this._selected = item;
}
break;
}
target = target.parentNode;
}
]]>
this.popup.style.visibility = "hidden";
this.popupOpen = false;
0) {
w = w + 12; // Adding some 'padding' for possible scrollbar
this.inputField.setAttribute("style", "width:" + w + "px;");
this._width = w + document.getBoxObjectFor(this.dropMarker).width;
}
this.popup.style.maxHeight = "10px";
this.popup.style.left = "0px";
this.popup.style.top = "0px";
}
]]>
popupHeight) {
targetY = y - popupHeight;
} else if (belowSelect < (y - pY)) {
style = style + "max-height:" + (y - pY - adjust) + "px;";
targetY = pY + adjust;
} else {
style = style + "max-height:" + belowSelect + "px;";
}
}
style = style + "left:" + x + "px;";
style = style + "top:" + targetY + "px;";
style = style + "width:";
if (this.selectionOpen) {
style = style + w + "px;";
} else if (this._width < 0) {
style = style + "auto;"
} else {
style = style + this._width + "px;";
}
style = style + "visibility:visible;";
this.popup.setAttribute("style", style);
this.popupOpen = true;
this._tmpSelected = this._selected;
if (this._selected) {
var el = this._selected.QueryInterface(Components.interfaces.nsIDOMElement);
if ("scrollIntoView" in el) {
el.scrollIntoView(false);
}
}
} else {
this.hidePopup();
return;
}
]]>
this.inputField.focus();
return true;
var ev = document.createEvent("Events");
ev.initEvent(aName, true, false);
var elm = aElement;
// per http://www.w3.org/TR/2005/PER-xforms-20051006/index-all.html#evt-select
// we send the event to the itemset if it is a parent.
if (elm.parentNode.localName == "itemset")
elm = elm.parentNode;
elm.dispatchEvent(ev);
return true;
null
if (!this._anonymousItemSetContent) {
this._anonymousItemSetContent =
document.getAnonymousElementByAttribute(this, "anonid", "insertion");
}
return this._anonymousItemSetContent;
null
if (!this._content) {
this._content =
document.getAnonymousElementByAttribute(this, "anonid", "content");
}
return this._content;
// this.content is null if anonymous content hasn't been created yet.
var content = this.content;
if (content) {
content.scrollIntoView(aTop);
}