Menu

Adding a new tab in a class or removing an existing one

Efroza
2021-10-11
2021-10-26
  • Efroza

    Efroza - 2021-10-11

    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

     
  • Pierre Goiffon

    Pierre Goiffon - 2021-10-11

    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 !

     
  • Efroza

    Efroza - 2021-10-11

    Hello Pierre,

    well i'll check that then thank you !

     
  • Efroza

    Efroza - 2021-10-11
     

    Last edit: Efroza 2021-10-11
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2021-10-12

    @Efroza what kind of tab would you like to add?

     
  • Efroza

    Efroza - 2021-10-12

    Hello Jeffrey,

    i would like to start adding tabs with "regular" fields

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2021-10-12

    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
  • Efroza

    Efroza - 2021-10-13

    Okay will definitely check that then, i mean it's still something that i can try so thank you !

     
  • Marco Lima

    Marco Lima - 2021-10-26

    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.

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2021-10-26

    Those attribute types do create a tab, but are exclusively meant for links.

     
    👍
    1

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.