How to make columns toggle in Children Tab work?

This sub-forum is for discussing all topics related to AppGini Helper JavaScript Library, provided by bizzworxx as a third-party AppGini plugin.
Post Reply
ppfoong
Veteran Member
Posts: 49
Joined: 2021-07-13 16:46

How to make columns toggle in Children Tab work?

Post by ppfoong » 2024-09-06 05:38

Referring to this guide:
https://www.appgini.de/docs/Javascript- ... tabbed_1_2

Is the code to be put in tv.js file instead of dv.js file? As stated in the sample code in the above webpage...

Code: Select all

// file: hooks/TABLENAME-tv.js
AppGiniHelper.dv.getChildrenTabs().enableToggle();
The Tablename refers to the table displayed in the children tab, is this correct?

Anyhow, let's say I have 2 tables, table1 and table2, with table1 having 1 field joined to id of table2.

I have tried creating the following files with just 1 line of code, but none of them working. The toggle is not showing up.
- table1-tv.js
- table1-dv.js
- table2-tv.js
- table2-dv.js

If I put the code in tv.js file, this error message appears in console:
Uncaught ReferenceError: AppGiniHelper is not defined
AppGini Version 24.17
AppGiniHelper Javascript Library Version 2023.01.04.2

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1881
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: How to make columns toggle in Children Tab work?

Post by jsetzer » 2024-09-06 07:03

You are right, there seems to be a mistake in the code fragment of the docs for this feature. I will have to check it.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.14 Revision 1665 + all AppGini Helper tools

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1881
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: How to make columns toggle in Children Tab work?

Post by jsetzer » 2024-09-06 07:13

Place for your code

Children tabs are inside detail views. So, changing children tabs only makes sense in detail view and therefore modifying code belongs to hooks/TABLENAME-dv.js.

As mentioned above, I am going to check documentation and code the next days.

---

Error message
Uncaught ReferenceError: AppGiniHelper is not defined
Whenever you want to change anything in table view, due to lazy loading of table view, you have to wait for the page to be loaded completely.

See here:
http://www.appgini.de/docs/Javascript-L ... index.html


Otherwise you cannot guarantee that every resource (including scripts) has been loaded in time. The error message indicates your script started running before AppGiniHelper.min.js has been loaded into your browser.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.14 Revision 1665 + all AppGini Helper tools

Post Reply