When the data view is read only or has no context it will put every widget in disabled state by setting the disabled property:
widget.set("disabled", true);
This will call the corresponding setter, which you will need to implement in your widget:
_setDisabledAttr: function(value) {
if (value) {
this.inputNode.setAttribute("disabled", "");
} else {
this.inputNode.removeAttribute("disabled");
}
this.inherited(arguments);
}
The getter will give you the current state:
this.get("disabled"); // returns whether this widget is disabled