Custom Configuration tables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Custom Configuration tables
Hi. I'm trying to find a template which add a configuration link (see attached image) to each instance of it. So my question... is there a Template that make this or do i have to create my custom template?. If that's so, how do i accomplish that?
Thank you for your time.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Eddison,
if you want to create your custom Configuration Table I think you need to use a custom extension and create a custom template. I also have Configuration Tables in my Java extensions. Just create a new extension using the extension sdk, there you can define Configuration Tables for your needs.
For a Java Extension you would accomplish that via these annotations:
@ThingworxConfigurationTableDefinitions(tables = {
@ThingworxConfigurationTableDefinition(name = "ConfigTable", description = "", isMultiRow = false, ordinal = 0, dataShape = @ThingworxDataShapeDefinition(fields = {
@ThingworxFieldDefinition(name = "TableRow", description = "", baseType = "STRING", ordinal = 0, aspects = { }) })) })
Regards,
Keijo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Eddison,
if you want to create your custom Configuration Table I think you need to use a custom extension and create a custom template. I also have Configuration Tables in my Java extensions. Just create a new extension using the extension sdk, there you can define Configuration Tables for your needs.
For a Java Extension you would accomplish that via these annotations:
@ThingworxConfigurationTableDefinitions(tables = {
@ThingworxConfigurationTableDefinition(name = "ConfigTable", description = "", isMultiRow = false, ordinal = 0, dataShape = @ThingworxDataShapeDefinition(fields = {
@ThingworxFieldDefinition(name = "TableRow", description = "", baseType = "STRING", ordinal = 0, aspects = { }) })) })
Regards,
Keijo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank You very much for the help, Keijo. I'm gonna work on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Keijo, Now i'm facing an issue, after installing the extension i check the configuration table and it shows perfectly, but if i click "Cancel Edit" the configuration link disappear, i attached two images related to this.
Also, sometimes when i reinstall the extension (with updated configuration) it takes the old one (Without the changes)
Thank You.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
When you install a new version of your extension you have to consider two things:
- You need to update the package version e.g. 1.0.0 --> 1.0.1 (in metadata.xml of your extension, in eclipse under Thingworx Extension Project Properties)
- You have to restart the tomcat server after installing the new version
After this it should take the new extension version. I believe the disappearance of the Configuration Table should be repaired as well.
Let me know if it works
Keijo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It didn't work at all. The configuration link doesn't disappear anymore, but i added a new configuration table and changed the version of the extension but the configuration section doesn't get updated when installing.
This is the Java code where I add the configuration table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Did you restart your tomcat?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
is it fully necessary?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
As far as i know, yes. Otherwise it always will take the old extension version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Well, i can't restart tomcat right now, as soon as i can i'll try it and tell you if it worked.. Thank you very much, Keijo.
