Skip to content

Commit

Permalink
Fixed issue where the On View Change microflow wouldn't trigger if a …
Browse files Browse the repository at this point in the history
…new ViewRender object had to be created.
  • Loading branch information
Rvthof committed Aug 26, 2015
1 parent 47c05e1 commit 07608f9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/calendar/widget/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ define([
errordiv = dom.div("Data source type 'Microflow with context object' is selected, but no microflow was specified for property 'Dataview data source microflow'");
} else if (this.dataSourceType === "mf") {
errordiv = dom.div("Data source type 'Microflow' is selected, but no microflow was specified for property 'Data source microflow'");
} else if (this.dataSourceType === "contextmf_viewspecific") {
errordiv = dom.div("Data source type 'Microflow with context object (Retrieve events for each view)' is selected, but no microflow was specified for property 'Dataview data source microflow'");
}

domStyle.set(errordiv, {
Expand Down Expand Up @@ -611,7 +613,7 @@ define([
}
});
} else {
this._createViewChangeEntity(eventData, lang.hitch(this, function (eventData, viewrenderObj) {
this._createViewChangeEntity(lang.hitch(this, function (eventData, viewrenderObj) {

this._mxObj.addReference(ref, viewrenderObj.getGuid());
this._setVariables(viewrenderObj, eventData, this.viewStartAttr, this.viewEndAttr);
Expand Down Expand Up @@ -648,19 +650,19 @@ define([
}
});
} else {
this._createViewChangeEntity(eventData, this._handlePaginatedObjects);
this._createViewChangeEntity(this._handlePaginatedObjects);
}
} else {
// No dataview context
this._createViewChangeEntity(eventData, this._handlePaginatedObjects);
this._createViewChangeEntity(this._handlePaginatedObjects);
}
}
},

_createViewChangeEntity: function (eventData, callback) {
_createViewChangeEntity: function (callback) {
mx.data.create({
entity: this.viewChangeEntity,
callback: lang.hitch(this, callback, eventData),
callback: lang.hitch(this, callback),
error: function (err) {
console.warn('Error creating object: ', err);
}
Expand Down
Binary file modified test/Widgets/Calendar.mpk
Binary file not shown.
Binary file modified test/[Test] Calendar Widget.mpr
Binary file not shown.

0 comments on commit 07608f9

Please sign in to comment.