Skip to Content
0

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

Dec 12, 2016 at 12:55 PM

1k

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

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

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>
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Rahul,

I had also tried the above code and it gives me the same error. I am using Webide version 1,28.0 . Does that have any effect ?

Warm regards

Sanket

0
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).

0