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
New Tab
Re: New Tab
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:
(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/
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"]);
(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
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<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 readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: New Tab
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
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
Re: New Tab
(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:
(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:
- Where did you put the code? filename?
- What is the name of the table? (case sensitive!)
- Can you please double check the spelling of your fields "nombre" and "prefijo" (case sensitive!).
Especially check uppercase- and lowercase characters please.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<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 readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: New Tab
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
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
Re: New Tab
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
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<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 readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: New Tab
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
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
Re: New Tab
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:
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:
- = warning (yellow)
- = error (red)
- = 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
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<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 readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: New Tab
I already cleared the cache and now it works fine
Thanks
Thanks
Re: New Tab
@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 ) 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.
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 ) 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
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<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 readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: New Tab
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
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<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 readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools