It works perfect for me.
I have another mxml that I dynamically load in with the same problem, I'm going 
to try it there too but it sure works.

Thanks for the help Brian.
Hiedra

De: Brian Raymes <brian.ray...@teotech.com>
Enviado el: viernes, 22 de enero de 2021 18:02
Para: users@royale.apache.org
Asunto: RE: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and 
Databinding)

Here is how I’m making that work. Dispatch an ADD_BEAN before adding the 
content to the PopUp. This wires it up for crux.

I’m also dispatching REMOVE_BEAN when the popup is closed to ensure it is 
removed when not needed.

var searchPopup:SearchPopup = new SearchPopup();
. . .
dispatchEvent(new BeanEvent(BeanEvent.ADD_BEAN, searchPopup));
. . .
popup = new PopUp();
popup.content = searchPopup;
addElement(popup);
popup.open = true;


Hope this helps.

Brian

From: Maria Jose Esteve <mjest...@iest.com<mailto:mjest...@iest.com>>
Sent: Friday, January 22, 2021 2:40 AM
To: users@royale.apache.org<mailto:users@royale.apache.org>
Subject: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding)


Hi,

I am experiencing an error similar to wkoch, the Databinding in a Popup does 
not work, in my case using crux.

I have an mxml, TopesDetPerson, that shows the detail of a record. My mvc model 
is injected and binded and it works perfectly if we insert it into the main 
mxml (SectionContent) but stops working if I create it programmatically. This 
is an excerpt from the build and upload code:



        private var popupLimitsDetail:PopUp;

        public function viewLimitsDetail():void

        {

            var pp:TopesDetPerson;

            if(!popupLimitsDetail)

            {

                popupLimitsDetail = new PopUp();

                popupLimitsDetail.modal = true;

                pp = new TopesDetPerson();

                popupLimitsDetail.content = pp;

                addElement(popupLimitsDetail);

            }



            if(!popupLimitsDetail.open)

                popupLimitsDetail.open = true;

        }



In TopesDetPerson.mxml:



        [Bindable]

        [Inject(source="personalModel", required="true")]

        public var personalModel:PersonalModel;

...

    <j:beads>

        <js:ContainerDataBinding />

    </j:beads>



The model is not injected, the [PostConstruct] is not received, does it not 
exist for crux if it is not on the canvas? Is there a way to "refresh crux" so 
that it recognizes the links that are added after its initial configuration?

I hope I have explained clearly 😝



Thx.

Hiedra



-----Mensaje original-----

De: wkoch <warren.r.k...@boeing.com<mailto:warren.r.k...@boeing.com>>

Enviado el: lunes, 18 de enero de 2021 18:21

Para: users@royale.apache.org<mailto:users@royale.apache.org>

Asunto: Re: Popup and Databinding



Sorry -- I wasn't clear -- both the ItemRendererDataBinding and 
ContainerDataBinding beads worked.  I went with ContainerDataBinding as Harbs 
is right.  It's a better fit.







--

Sent from: http://apache-royale-users.20374.n8.nabble.com/

Reply via email to