}
if(!this.parentNode) // give it somewhere to live so that dojo won't complain
- this.parentNode = document.createElement('div');
+ this.parentNode = dojo.create('div');
this.onload = onload;
if(this.widgetValue == null)
* For widgets that run asynchronously, provide a callback for finishing up
*/
_widgetLoaded : function(value) {
+
if(this.readOnly) {
- this.baseWidgetValue(this.getDisplayString());
+
+ /* -------------------------------------------------------------
+ when using widgets in a grid, the cell may dissapear, which
+ kills the underlying DOM node, which causes this to fail.
+ For now, back out gracefully and let grid getters use
+ getDisplayString() instead
+ -------------------------------------------------------------*/
+ try {
+ this.baseWidgetValue(this.getDisplayString());
+ } catch (E) {};
+
} else {
+
this.baseWidgetValue(this.widgetValue);
if(this.idlField.name == this.fmIDL.pkey && this.fmIDL.pkey_sequence)
this.widget.attr('disabled', true);