New Tab

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
User avatar
cesteban
Veteran Member
Posts: 52
Joined: 2018-04-18 09:56

New Tab

Post by cesteban » 2020-12-01 16:14

Hi,

I am learning to use the AppGini Helper JavaScript Library and I try to add a Tab but nothing appears, I'm also using the compaction and It's working well

My code is:

dv.compact ();
var dv = new AppGiniDetailView ();
var tab = dv.addTab ("nombre", "Title", "icon");


Thank you

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

Re: New Tab

Post by jsetzer » 2020-12-01 16:21

Please check the console output of your browser's developer tools. I guess there will be at least one (red) error message:

Reason: You are using dv-variable before declaring it. This should raise a javascript error and following code will not be executed at all, usually.

Try this instead:

Code: Select all

// file: hooks/TABLENAME-dv.js
var dv = AppGiniHelper.DV;
dv.compact();
var tab1 = dv.addTab("tab1", "Title 1", "cog", ["field1", "field2"]);

(1) replace TABLENAME by the real name of your table
(2) replace field1 and field2 by your fieldnames. You can add more fields, of course, comma-separated and wrapped in "double quotes"
(3) "icon" is just a placeholder for the name of the icon you want to add to the tab caption.
Here is an overview of available icons: https://glyphicons.bootstrapcheatsheets.com/
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.10 Revision 1579 + all AppGini Helper tools

User avatar
cesteban
Veteran Member
Posts: 52
Joined: 2018-04-18 09:56

Re: New Tab

Post by cesteban » 2020-12-01 16:36

I think AppGini Helper JavaScript Library is having trouble with two fields which are from images (fotogirl, fotogde)
I am not including these fields in the Tab that I am creating

This is my code

var dv = AppGiniHelper.DV;
dv.compact();
var tab1 = dv.addTab("tab1", "Title 1", "cog", ["nombre", "prefijo"]);

This is what I found on the console

AppGiniHelper.min.js:7 AppGini Helper JavaScript Library
AppGiniHelper.min.js:7 Version 2020.10.26.1
AppGiniHelper.min.js:7 AppGiniHelper | ChangeHandler for field 'fotochica': Fieldtype not supported: file
_0x28da4a.<computed> @ AppGiniHelper.min.js:7
AppGiniHelper.min.js:7 AppGiniHelper | ChangeHandler for field 'fotogde': Fieldtype not supported: file
_0x28da4a.<computed> @ AppGiniHelper.min.js:7
DevTools failed to load SourceMap: Could not load content for http://sebusca.com.mx/consultorio/resou ... ox.min.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://sebusca.com.mx/consultorio/resou ... ap.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

Regards

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

Re: New Tab

Post by jsetzer » 2020-12-01 16:58

(1) First two lines are for information, only.
(2) Messages starting With "AppGiniHelper | " come from the lib, the others not.
(3) The yellow messages are warnings, only. They are not errors nor exceptions.
They are for information and debugging purposes and not critical for execution of the code.
(4) remember to clear browser cache after changing js or css when reloading the page

Questions for narrowing down:
  1. Where did you put the code? filename?
  2. What is the name of the table? (case sensitive!)
  3. Can you please double check the spelling of your fields "nombre" and "prefijo" (case sensitive!).
    Especially check uppercase- and lowercase characters please.
PS: Please, when posting in this forum, wrap code fragments in [ code ] [ / code ] for better readability.
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.10 Revision 1579 + all AppGini Helper tools

User avatar
cesteban
Veteran Member
Posts: 52
Joined: 2018-04-18 09:56

Re: New Tab

Post by cesteban » 2020-12-01 17:05

I double checked the names of the fields and they are fine (nombre and prefijo)

I am sure the file corresponds because I am using compaction and if done right with this table

The ones that seem very strange to me is that two fields (fotochica and fotogde) that I am not using in the Tab, are the ones that mark an error

Regards

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

Re: New Tab

Post by jsetzer » 2020-12-01 17:09

Are you really sure those two fields "fotochica" and "fotogde" raise an error (red message) or is it a warning (yellow message)?
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.10 Revision 1579 + all AppGini Helper tools

User avatar
cesteban
Veteran Member
Posts: 52
Joined: 2018-04-18 09:56

Re: New Tab

Post by cesteban » 2020-12-01 17:13

Sorry,

I only see that it marks as an error in each of these fields and it seems that they are linked to AppGiniHelper

AppGiniHelper.min.js:7 AppGiniHelper | ChangeHandler for field 'fotochica': Fieldtype not supported: file
AppGiniHelper.min.js:7 AppGiniHelper | ChangeHandler for field 'fotogde': Fieldtype not supported: file

Regards

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

Re: New Tab

Post by jsetzer » 2020-12-01 17:24

I have checked the code:

Those irritating messages "ChangeHandler for field 'FIELANAME': Fieldtype not supported" can be ignored. They are warnings (no errors, no exceptions) and I am going to remove those warnings in the next release.

So, There must be a different reason for the tab-problem.

Did you clear browser-cache on reload?


Just in case this is not clear enough:
chrome_pcZIAJ8lsW.png
chrome_pcZIAJ8lsW.png (10 KiB) Viewed 2570 times
  1. = warning (yellow)
  2. = error (red)
  3. = exception (red + additional information)
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.10 Revision 1579 + all AppGini Helper tools

User avatar
cesteban
Veteran Member
Posts: 52
Joined: 2018-04-18 09:56

Re: New Tab

Post by cesteban » 2020-12-01 17:33

I already cleared the cache and now it works fine

Thanks

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

Re: New Tab

Post by jsetzer » 2020-12-01 17:46

@all: especially for starters I recommend reading the troubleshooting guide here:
https://appgini.bizzworxx.de/support/troubleshooting/

There is also a block about browser cache and so much more which will help you with the first steps. This will save you ( and us :P ) a lot of time.

If you are new to database modeling I also recommend reading the best-practice guide here:
https://appgini.bizzworxx.de/support/best-practice/

It is certainly not obligatory to model and name tables and columns the way I recommend, but the naming conventions have helped me in my work for years. They have proven to be very useful at least for me and my teams in the past.
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.10 Revision 1579 + all AppGini Helper tools

User avatar
cesteban
Veteran Member
Posts: 52
Joined: 2018-04-18 09:56

Re: New Tab

Post by cesteban » 2020-12-01 18:55

Thanks a lot

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

Re: New Tab

Post by jsetzer » 2020-12-18 13:59

You are welcome. Take care!
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.10 Revision 1579 + all AppGini Helper tools

Post Reply