Menu

Inherit presentation details for child classes

Nico
2021-11-18
2021-11-23
  • Nico

    Nico - 2021-11-18

    Hi,
    I try to inherit a new attribute in Class Functional_CI to be presented on all its child classes, without success.
    I created a new link class to link FAQs to CIs and vice versa.
    I only get the FAQs tab presented in the CI if i declare it directly in its class. I imagined it's ok to just declare it in the class "FunctionalCI" as follows:

          <presentation>
            <details>
              <items>
                <item id="NM_faq_list" _delta="define">
                  <rank>99</rank>
                </item>
              </items>
            </details>
          </presentation>
    

    So, is it correct to have this new attribute to be declared in every single subclass where it is expected to be seen?
    Thanks for any hint,
    regards, Nico

     
  • Vincent @ Combodo

    Yes presentation is never inherited, it must be specified in each and every sub-class, as the rank and defined columns can totally differ in the various sub-class

     
    • Jeffrey Bostoen

      Jeffrey Bostoen - 2021-11-18

      It's not 100% correct I think, depending how you define "inherited"?

      I have subclasses which do "inherit" the presentation from the main class.
      But: the presentation can NOT be "inherited" and altered at the same time.
      https://github.com/jbostoen/itop-jb-networkdevices/blob/main/datamodel.jb-networkdevices.xml

       
  • Nico

    Nico - 2021-11-23

    Thanks for your replies.
    I implemented it by adding all presentation declarations to each class needed.

     

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.