As the title say, i'm actually trying to learn how to add or remove tabs from classes and i saw that we need to use the APIs but i don't really understand how to use them so if anybody is willing to help me i would be very grateful !
Thanks in advance,
Efroza
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There's an undocumented feature (might not be officially supported) to create extra tabs with regular fields. In a similar way that you create a field set, you can use the prefix "tab:" for the ID of the tab you want to create ( <item id="tab:somename">). Not sure if there's an example around.
Last edit: Jeffrey Bostoen 2021-10-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Maybe if you play around with the fields of type:
- AttributeLinkedSetIndirect
- AttributeLinkedSet
I was looking at the "core definitions" of iTOP and the FunctionalCI and PhysicalDevice classes use those when referencing things like Contacts, Netwrok Devices, etc.
Not sure if simply instantiating those types of fields will actually create a tab as I couldn't find any reference to them in the Presentation section of said classes.
It's likely that these "structural" behaviors are defined deeper within the source code. I'll dig around, but no promises.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone,
As the title say, i'm actually trying to learn how to add or remove tabs from classes and i saw that we need to use the APIs but i don't really understand how to use them so if anybody is willing to help me i would be very grateful !
Thanks in advance,
Efroza
Hello,
To learn how to create a module take a look here : Customizing iTop [iTop Documentation]
I'm afraid there are no tutorials for now on how to create a new tab in an existing object ?
You need to override the DisplayBareRelations method for the desired object. Take a look at \SynchroDataSource::DisplayBareRelations as an example !
Hello Pierre,
well i'll check that then thank you !
Last edit: Efroza 2021-10-11
@Efroza what kind of tab would you like to add?
Hello Jeffrey,
i would like to start adding tabs with "regular" fields
There's an undocumented feature (might not be officially supported) to create extra tabs with regular fields. In a similar way that you create a field set, you can use the prefix "tab:" for the ID of the tab you want to create (
<item id="tab:somename">
). Not sure if there's an example around.Last edit: Jeffrey Bostoen 2021-10-12
Okay will definitely check that then, i mean it's still something that i can try so thank you !
Maybe if you play around with the fields of type:
- AttributeLinkedSetIndirect
- AttributeLinkedSet
I was looking at the "core definitions" of iTOP and the FunctionalCI and PhysicalDevice classes use those when referencing things like Contacts, Netwrok Devices, etc.
Not sure if simply instantiating those types of fields will actually create a tab as I couldn't find any reference to them in the Presentation section of said classes.
It's likely that these "structural" behaviors are defined deeper within the source code. I'll dig around, but no promises.
Those attribute types do create a tab, but are exclusively meant for links.