Skip to content

Commit f28e471

Browse files
committed
Fixes #150.
1 parent 60b2f2d commit f28e471

File tree

8 files changed

+50
-9
lines changed

8 files changed

+50
-9
lines changed

dist/Jsonix-all.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5877,11 +5877,11 @@ Jsonix.Context = Jsonix
58775877
}
58785878
for (index = 0; index < this.modules.length; index++) {
58795879
module = this.modules[index];
5880-
module.buildTypeInfos(this);
5880+
module.registerElementInfos(this);
58815881
}
58825882
for (index = 0; index < this.modules.length; index++) {
58835883
module = this.modules[index];
5884-
module.registerElementInfos(this);
5884+
module.buildTypeInfos(this);
58855885
}
58865886
for (index = 0; index < this.modules.length; index++) {
58875887
module = this.modules[index];

dist/Jsonix-min.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,11 +2384,11 @@ c.registerTypeInfos(this)
23842384
}for(d=0;
23852385
d<this.modules.length;
23862386
d++){c=this.modules[d];
2387-
c.buildTypeInfos(this)
2387+
c.registerElementInfos(this)
23882388
}for(d=0;
23892389
d<this.modules.length;
23902390
d++){c=this.modules[d];
2391-
c.registerElementInfos(this)
2391+
c.buildTypeInfos(this)
23922392
}for(d=0;
23932393
d<this.modules.length;
23942394
d++){c=this.modules[d];

nodejs/scripts/jsonix.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5877,11 +5877,11 @@ Jsonix.Context = Jsonix
58775877
}
58785878
for (index = 0; index < this.modules.length; index++) {
58795879
module = this.modules[index];
5880-
module.buildTypeInfos(this);
5880+
module.registerElementInfos(this);
58815881
}
58825882
for (index = 0; index < this.modules.length; index++) {
58835883
module = this.modules[index];
5884-
module.registerElementInfos(this);
5884+
module.buildTypeInfos(this);
58855885
}
58865886
for (index = 0; index < this.modules.length; index++) {
58875887
module = this.modules[index];

nodejs/scripts/tests/GH150/A.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var A = {
2+
name: 'A',
3+
typeInfos: [
4+
{
5+
localName: 'BaseType',
6+
propertyInfos: [{name: 'value', typeInfo: '.ValueType', type: 'er' }]
7+
}, {
8+
localName: 'ValueType',
9+
propertyInfos: [{name: 'data'}]
10+
}
11+
],
12+
elementInfos: [{elementName: 'value', typeInfo: '.ValueType'}]
13+
};
14+
module.exports.A = A;

nodejs/scripts/tests/GH150/B.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
var B = {
2+
name: 'B',
3+
dependencies: ['A'],
4+
elementInfos: [{elementName: 'eulav', typeInfo: 'A.ValueType', sh: {lp:'value', ns: ''}}]
5+
};
6+
module.exports.B = B;

nodejs/scripts/tests/GH150/GH150.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
var Jsonix = require("../../jsonix").Jsonix;
2+
var A = require("./A.js").A;
3+
var B = require("./B.js").B;
4+
5+
module.exports = {
6+
"A_B" : function(test) {
7+
var context = new Jsonix.Context([A, B]);
8+
var baseType = context.getTypeInfoByName('A.BaseType');
9+
test.ok(baseType.structure.elements.value);
10+
test.ok(baseType.structure.elements.eulav);
11+
test.done();
12+
},
13+
"B_A" : function(test) {
14+
var context = new Jsonix.Context([B, A]);
15+
var baseType = context.getTypeInfoByName('A.BaseType');
16+
test.ok(baseType.structure.elements.value);
17+
test.ok(baseType.structure.elements.eulav);
18+
test.done();
19+
}
20+
};

nodejs/scripts/tests/issues.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module.exports = {
1010
"GH96" : require('./GH96/GH96'),
1111
"GH111" : require('./GH111/GH111'),
1212
"GH135" : require('./GH135/GH135'),
13-
"GH141" : require('./GH141/GH141')
13+
"GH141" : require('./GH141/GH141'),
14+
"GH150" : require('./GH150/GH150')
1415
}
1516
};

scripts/src/main/javascript/org/hisrc/jsonix/Jsonix/Context.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ Jsonix.Context = Jsonix
8282
}
8383
for (index = 0; index < this.modules.length; index++) {
8484
module = this.modules[index];
85-
module.buildTypeInfos(this);
85+
module.registerElementInfos(this);
8686
}
8787
for (index = 0; index < this.modules.length; index++) {
8888
module = this.modules[index];
89-
module.registerElementInfos(this);
89+
module.buildTypeInfos(this);
9090
}
9191
for (index = 0; index < this.modules.length; index++) {
9292
module = this.modules[index];

0 commit comments

Comments
 (0)