Page 1 of 1

Problem with AppGiniHelper v2021.07.29

Posted: 2021-10-11 15:58
by balfons
Good afternoon!

I'm using AppGini v5.97 and recently updated my AppGini Helper from v2020.10.26 to v2021.07.29 and have found this problem:

I'm using Collapsible Panels in a couple of table views. This is the code:

var dv = AppGiniHelper.DV;
dv.addGroup("grp_ambient", "Improvement", ["corrective_action", "emergency"], Variation.primary);
dv.addGroup("grp_riskop", "Risks", ["risks", "opportunity"], Variation.primary);

var info= new AppGiniLayout([12, 0])
.add(1, [ "grp_contimp", "grp_riskop");

tab2 = dv.addTab("items", "Items", "file")
.add(info);

With v2020.10.26 collapsible panels work ok but with v2021.07.29 I get this error:
Captura de pantalla 2021-10-11 175553.png
I have tried deleting this group but the error occurs with all groups. Did you noticed this error? Do you have a solution/workaround?

Thanks in advance

Re: Problem with AppGiniHelper v2021.07.29

Posted: 2021-10-11 16:01
by balfons
Here attached the pic with the error:
Captura de pantalla 2021-10-11 175553.png
Captura de pantalla 2021-10-11 175553.png (13.35 KiB) Viewed 2283 times

Re: Problem with AppGiniHelper v2021.07.29

Posted: 2021-10-11 19:24
by jsetzer
Sorry for the problem. I did not get any bugreport before, but I am going to check this on Wednesday.

Re: Problem with AppGiniHelper v2021.07.29

Posted: 2021-10-12 05:53
by jsetzer
.add(1, [ "grp_contimp", "grp_riskop");
There is closing square bracket missing ].

Don't know if this is the reason, but please fix and report back.

Re: Problem with AppGiniHelper v2021.07.29

Posted: 2021-10-13 08:21
by balfons
Hi Jan!

thanks for your response. I have fixed the bracket missing but the error still appears.

Thanks again

Re: Problem with AppGiniHelper v2021.07.29

Posted: 2021-10-13 09:04
by jsetzer
I am going to check this today. Stay tuned.

Are there more errors in console than the one I can see above? Did you disable caching or reloaded browser page without cache?

Re: Problem with AppGiniHelper v2021.07.29

Posted: 2021-10-13 09:30
by balfons
No, just this one. I always work with private windows and open a new window when doing some changes.

Thanks

Re: Problem with AppGiniHelper v2021.07.29

Posted: 2021-10-13 10:11
by jsetzer
Your code

I have only added the missing square brackets und removed empty lines

Code: Select all

var dv = AppGiniHelper.DV;
dv.addGroup("grp_ambient", "Improvement", ["corrective_action", "emergency"], Variation.primary);
dv.addGroup("grp_riskop", "Risks", ["risks", "opportunity"], Variation.primary);
var info= new AppGiniLayout([12, 0]).add(1, [ "grp_contimp", "grp_riskop" ]);
tab2 = dv.addTab("items", "Items", "file").add(info);

From lines 2 and 3 I can see you are adding groups named "grp_ambient" and "grp_riskop".

But in line 4 you are refering to a group named "grp_contimp" which I cannot see from your code. If it does not exist, the library cannot find and modify it.

Maybe you have just forgotten to replace all occurrences after renaming the group. Can you check with correct (=existing) group name, please.

And if this still does not work, please try with #groupname instead:

Code: Select all

// ...
var info= new AppGiniLayout([12, 0]).add(1, [ "#grp_ambient", "#grp_riskop" ]);
// ...

PS: Please use [ code ] your code [ /code ]-tags when posting here for better readability

Re: Problem with AppGiniHelper v2021.07.29

Posted: 2021-10-19 10:55
by balfons
Hi Jan!
First of all I apologise for posting a wrong code. Now I have created a small project to test this feature. Following your last post, my code now is this one (code for table1-dv.js):

Code: Select all

// file: hooks/table1-dv.js

//To prevent displaying buttons text

$j("button[name=nextRecordDV],button[name=previousRecordDV]").each(function(){var n=$j(this).text(),a=$j(this).find("i.glyphicon");span=$j("<span/>").append(n).addClass("visible-xs"),$j(this).html("").append(a).append(span)});

var dv = AppGiniHelper.DV;
dv.ready(function () {
    dv.compact();
});

dv.addGroup("grp_ambient", "Improvement", ["corrective_action", "emergency"], Variation.primary);
dv.addGroup("grp_riskop", "Risks", ["risks", "opportunity"], Variation.primary);

var info= new AppGiniLayout([12, 0]).add(1, ["#grp_ambient", "#grp_riskop" ]);

tab1 = dv.addTab("main", "Principal", "ok")
		.add(["id", "name"]);
tab2 = dv.addTab("items", "Items", "file")
		.add(info);

And the detail view of table1 is like this:
table1-dv1.png
table1-dv1.png (16.29 KiB) Viewed 2122 times
table1-dv2.png
table1-dv2.png (19.15 KiB) Viewed 2122 times
So, with AppGini Helper version 20211026 and adding # before groupnames the tab Items is now displayed but not correctly.

Thanks again!