* For widgets that run asynchronously, provide a callback for finishing up
*/
_widgetLoaded : function(value) {
- if(!this.readOnly) {
+
+ if(this.readOnly) {
+
+ /* -------------------------------------------------------------
+ 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);
var recv_link = dojo.query('[name=receive_link]', row)[0];
- if(li.state == 'on-order') {
+ if(li.state() == 'on-order') {
recv_link.onclick = function() {
self.receiveLi(li);
openils.Util.hide(recv_link)