Skip to content

Commit 0e60f4a

Browse files
committed
Vesion 2.0.0: dynamic page loading
1 parent 303799a commit 0e60f4a

22 files changed

+13
-188
lines changed

src/DataviewLoader/DataviewLoader.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<property key="pageContent" type="form" required="true">
99
<caption>Result page</caption>
1010
<category>Behavior</category>
11-
<description>The page to load and display.</description>
11+
<description>The page to load and display. Result page or Result page mf are required.</description>
1212
</property>
1313
<property key="pageMF" type="microflow" required="false">
1414
<caption>Result page mf</caption>
1515
<category>Behavior</category>
16-
<description>Will be used if filled instead of the selected form</description>
16+
<description>Will be used if filled instead of the selected form. Result page or Result page mf are required.</description>
1717
<returnType type="String" />
1818
</property>
1919
<property key="refreshAction" type="enumeration" defaultValue="No">
@@ -29,7 +29,7 @@
2929
<property key="refreshtAttr" type="attribute" required="false">
3030
<caption>Reload on attribute</caption>
3131
<category>Refresh</category>
32-
<description>On which attribute </description>
32+
<description>On which attribute changes must the reload be triggered?</description>
3333
<attributeTypes>
3434
<attributeType name="Boolean" />
3535
</attributeTypes>

src/DataviewLoader/widget/DataviewLoader.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ define([
118118
// Attach events to HTML dom elements
119119
_setupEvents: function () {
120120
//logger.debug(this.id + "._setupEvents");
121+
if(this.fadeContent){
122+
dojoClass.add(this.divContent, "loaderfade");
123+
}
121124
},
122125

123126
// Rerender the interface.
@@ -128,10 +131,6 @@ define([
128131
dojoStyle.set(this.divContent, "display", "none");
129132
dojoStyle.set(this.divLoader, "display", "block");
130133

131-
if(this.fadeContent){
132-
dojoClass.add(this.divContent, "loaderfade");
133-
}
134-
135134
if (this.domNode.offsetParent !== null || !this.visibilityCheck) {
136135
this._loadAndShowcontent();
137136
}
@@ -262,7 +261,10 @@ define([
262261
this.subscribe({
263262
guid: this._contextObj.getGuid(),
264263
callback: dojoLang.hitch(this, function (guid) {
265-
if(this._loadingStarted == false){
264+
if(this._loadingStarted == false){
265+
if(this.pageMF) {
266+
this._pageInitiated = false;
267+
}
266268
if(this.refreshAction == "Attribute" && this.refreshtAttr && this._contextObj.get(this.refreshtAttr)){
267269
console.log(this.id + ".Refresh triggered on attribute change.");
268270
this._updateRendering();

src/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<package xmlns="http://www.mendix.com/package/1.0/">
3-
<clientModule name="DataviewLoader" version="1.6.2" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="DataviewLoader" version="2.0.0" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="DataviewLoader/DataviewLoader.xml" />
66
</widgetFiles>

test/.mendix-cache/base_data

-950 KB
Binary file not shown.

test/.mendix-cache/base_rev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
25
1+
27

test/.mendix-cache/base_ver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.9.1
1+
6.9.1

test/.svn/wc.db

0 Bytes
Binary file not shown.

test/DataviewLoader.mpr

599 KB
Binary file not shown.

test/userlib/antisamy-1.5.3.jar.CommunityCommons.RequiredLib

Whitespace-only changes.

test/userlib/com.google.guava-14.0.1.jar.CommunityCommons.RequiredLib

Whitespace-only changes.

0 commit comments

Comments
 (0)