Skip to Content

Link : cannot add direct child without default aggregation defined for control sap.m.objectattribute

Hi ,

I am trying to add Link to the objectattriute element in the following way.

But I get an error "cannot add direct child without default aggregation defined for control sap.m.objectattribute" . I am not sure what am i doing wrong here ?

link.png (92.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Dec 13, 2016 at 06:07 AM

    Hi,

    The aggregation customControl is defined in wrong way. It will just be: <customControl></customControl>. Please execute below code:

    <ObjectAttribute  >       
      <customContent>
             <Link text='abc' press='handleLink' />       
      </customContent>     
    </ObjectAttribute>
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Sanket Chimalwar

      Hi Sanket,

      You are right. I ran my code in 1.28 and 1.26 and it gave error. However, it does not give me error in 1.30.6 and higher ( tried 1.42 as well).