PDA

View Full Version : Setting the owner of a Container rendered to HTML



Polt
5 Jun 2014, 3:28 PM
Hi!

I rendered an Ext.container.Container to a
<div></div> that is part of a row expander row in my grid using:


myContainer.render(divElement);

Question:
How do I set the container's ownerCt to be the grid that the container was rendered to?

Why I want to do that:
I want to use the control-method im my controller to react to events of the various components that are members of my container.

Can anyone give me pls a hint on how to achive that?
Thank you in advance!

skirtle
6 Jun 2014, 10:24 PM
It depends on the version but assuming you're on 4.2...

You don't need to set an ownerCt, that has other implications beyond the simple component query relationship you need.

An owner-to-child relationship is established via the method getRefItems.

A child-to-owner relationship is established via the method getRefOwner.

See the source to understand how they work, then override as required.