return "http://www.w3.org/2002/xforms";
return "http://www.mozilla.org/projects/xforms/2005/type";
var ev = document.createEvent("UIEvents");
ev.initUIEvent(aType, true, true, window, 1);
this.dispatchEvent(ev);
return true;
var ev = document.createEvent("Events");
ev.initEvent(aEventName, true, false);
aTarget.dispatchEvent(ev);
return true;
if (!this._control)
this._control = this.getControlElement();
return this._control;
return null;
this._control = null;
null
var value = this.accessors.getValue();
return value != null ? value : "";
if (!this.hasAttributeNS(this.MOZTYPE_NS, "deferredrefresh"))
this.delegate.widgetAttached();
this._delegate = null;
this._accessors = null;
if (!this._delegate) {
this._delegate =
this.QueryInterface(Components.interfaces.nsIXFormsDelegate);
}
return this._delegate;
null
null
return true;
return true;
return false;
return this.accessors.getValue();
this.control.value = this.stringValue;
return true;
this.setMediatype();
if (this.hasAttribute("mediatype")) {
this.setAttributeNS(this.MOZTYPE_NS, "mediatype",
this.getAttribute("mediatype"));
}
// the label control hides/unhides anonymous content based on the
// the value we set it to. The control assumes that if the value
// comes from a binding or linking attribute that the value we are
// setting it to will be null
var externalValue = this.hasAttribute("ref") ||
this.hasAttribute("bind") ||
this.hasAttribute("src");
if (externalValue) {
this.control.value = this.accessors.getValue();
} else {
this.control.value = null;
}
return true;
var parent = this.parentNode;
if (parent.namespaceURI != this.XFORMS_NS)
return;
switch (parent.localName) {
case "input":
// XXX: probably we should check base type (see a bug 316691)
switch (parent.getAttribute("type")) {
case "http://www.w3.org/2001/XMLSchema#boolean":
var value = parent.accessors.getValue();
if (value == "true" || value == "1") {
parent.accessors.setValue("false");
} else {
parent.accessors.setValue("true");
}
}
case "secret":
case "textarea":
case "output":
case "upload":
case "range":
case "trigger":
case "submit":
case "select":
case "select1":
parent.focus();
break;
}
this.advanceFocusToParent();
var text = aTextNode.nodeValue;
var location = text.indexOf(aAccesskey);
var span = this.ownerDocument.createElementNS(this.XHTML_NS, "span");
if (location > -1) {
// We create a range around the character we want and surround
// it with an html:span.
var range = this.ownerDocument.createRange();
range.setStart(aTextNode, location);
range.setEnd(aTextNode, location + 1);
span.setAttribute("class", "xf-accesskey-inline");
range.surroundContents(span);
} else {
// If we didn't find the accesskey, append it to the end.
span.setAttribute("class", "xf-accesskey-appended");
span.textContent = aAccesskey;
if (aTextNode.nextSibling) {
aTextNode.parentNode.insertBefore(span,
aTextNode.nextSibling);
} else {
aTextNode.parentNode.appendChild(span);
}
}
this.control.disabled = aDisable;
this.control.focus();
return true;
return "";
this.QueryInterface(Components.interfaces.nsIXFormsCaseElement).
widgetAttached();
if (!this._control)
this._control = this.getControlElement();
return this._control;
this.control.selected = aEnable;
return true;
this.control.readonly = this.accessors.isReadonly();
this.control.focus();
return true;
return this.control.value;
if (!this._uploadElement) {
this._uploadElement =
this.QueryInterface(Components.interfaces.nsIXFormsUploadElement);
}
return this._uploadElement;
null
this.control.value = aString;
return {
get value(){ return ""; },
set value(val){},
set readonly(val){},
focus: function(){}
};
if (!this._anonymousRepeatContent) {
this._anonymousRepeatContent =
document.getAnonymousElementByAttribute(this, "anonid", "insertion");
}
return this._anonymousRepeatContent;
null
this.setMediatype();
this.setMediatype();