Greetings,
I am reading the docs on Data Objects and their relationship with CFC files.
I see that when I create a CFC file at /application/preside_objects and then refresh both Preside and MySQL, the table appears in the list of DB tables. Cool!
However, should I expect it also to appear in the Preside GUI as below? Presently, nothing is showing up. I am logged in as sysadmin.
An object existing is not enough to have it show in the Data manager UI. The docs for datamanager are here:
https://docs.preside.org/devguides/datamanager.html
A good place to start is this page and then “Data Manager Basics”.
After that, you may wish to take things further by looking at the Customizing Data Manager section for more in depth customisation. For instance, you do not need to use that admin UI at all - instead providing custom menu navigation to the datamanager screens for your object ( Configuring admin menu items).
The bare minimum you will need for your object to appear in that listing page is the @datamanagerGroup
annotation on the component (see Preside Documentation :: Data Manager Basics):
/**
* @datamanagerGroup someGroup
*/
component {
}
Thank you very much. Bear with me please …
I see the documentation says “That is all there is to it. You now how a full CRUD interface for your object”.
Yet,
- What exactly is a group as outlined above?
- Where in the GUI do I set one up?
I’m looking in the docs but don’t see it.
Thanks for your patience.
In the “Basics” page in the docs, it mentions creating i18n for your “group”. A group is nothing more than a grouping in the datamanager UI. i.e. each of these blocks is a group:
Your “object” will then appear in the configured group in this UI.
I discovered that the preside-objects folder and the groups folder didn’t exist in the specified path. I created it, moved my properties file into it and now it shows in Data Manager.
There are a couple of ‘Not Found’ items remaining however:
unfortunately the images are from your google mail account and we can’t see them.
I discovered that the preside-objects folder didn’t exist in the specified path. I created it, moved my properties file into it and now it shows in Data Manager.
There are a couple of ‘Not Found’ items remaining however:
This is my author.cfc at /application/preside-objects:
This my author.properties file at /application/i18n/preside-objects/
This my author.properties file at /application/i18n/groups:
And this the MySQL DB table:
You’ve saved that “groups/blog.properties
” file (the group name) as groups/author.properties
Indeed. I renamed it to blog.properties, did an fwreinit and still get the “Not Found”. I’m think I’m close but must not be understanding something quite right.
curious. will be something annoying for sure. Tip, you can do micro reinits for particular parts of the system:
?fwreiniti18n=true
(just i18n)
?fwreinitforms=true
(just forms)
?fwreinitstatic=true
(just sticker configuration)
- etc.
https://docs.preside.org/devguides/reloadingapplication.html
Also available in the developer console (if you haven’t found that yet - when in the admin, hit the ` key).
https://docs.preside.org/devguides/configurableconsolekey.html
Thank you. Those two ‘Not Found’ items … What exactly is preside looking for and not finding?
This is the i18n language system. It is looking for entries in a .properties
file in an /i18n
folder (and potentially sub folder). You can debug this by opening the developer console and typing debug i18n
and refresh the page. This will display the URI that is trying to be translated in the form. It should be something like preside-objects.groups.author:title
. This would expect a file /application/i18n/preside-objects/groups/groups.properties
with a title=Groups
.
Looks like you’re missing the i18n/preside-objects/groups
subfolder (and have just put in i18n/groups
?
Thank you. Folders under i18n are not being created during installation. I have to create them myself. Is this to be expected?
I deleted all things Preside and did a fresh install with the same results.
Yes, expected. I think you may be misreading the docs and the comments here. You need:
/i18n/preside-objects/groups/{somegroup}.properties
Not:
/i18n/groups/{somegroup}.properties