diff --git a/bricks/bricks.js b/bricks/bricks.js index ac9b146..7751e74 100644 --- a/bricks/bricks.js +++ b/bricks/bricks.js @@ -124,6 +124,9 @@ bricks.widgetBuild = async function(desc, widget, data){ var klassname = desc.widgettype; var base_url = widget.baseURI; while (klassname == 'urlwidget'){ + if (data){ + desc = bricks.apply_data(desc, data); + } let url = bricks.absurl(desc.options.url, widget); base_url = url; let method = desc.options.method || 'GET'; diff --git a/bricks/datarow.js b/bricks/datarow.js index 8bbd31b..4ac9f7d 100644 --- a/bricks/datarow.js +++ b/bricks/datarow.js @@ -35,7 +35,11 @@ bricks.DataRow = class extends bricks.HBox { if (header){ w = new bricks.BlankIcon({}); } else { - w = new bricks.UiCheck({name:this.checkField,value:this.user_data[this.checkField]}); + var v = 0 + if (this.user_data){ + v = this.user_data[this.checkField]; + } + w = new bricks.UiCheck({name:this.checkField,value:v}); w.bind('changed', this.get_check_state.bind(this)); } this.add_widget(w);