cancel
Showing results for 
Search instead for 
Did you mean: 

ComponentContainer does not return aggregations?

0 Kudos

Hi all,

I have create a custom component which is actually a VBox which contains 2 sap.m elements: SearchField and Popover.

In my view, i used this:

<core:ComponentContainer id="testSearchField" name="components.SearchFieldPopover"/>

In the controller.js, I needed to control the SearchField element in the "components.SearchFieldPopover".

I was able to do: this.getView().byId("testSearchField")

but I cannot get the individual element (SearchField and Popover) by using:

this.getView().byId("testSearchField").getAggregation()


How do I control the individual element in this case?



Regards,

Chris

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

this.getView().byId("testSearchField").getComponent().getAggregation("rootControl");

0 Kudos

Hi Maksim,

I have tried but it returns a string "__component0" when doing:

this.getView().byId("testSearchField").getComponent()


Did i miss out something ?

former_member182372
Active Contributor
0 Kudos

so, what about this.byId("__component0")? what does it return?