RE: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding)
I agree with Carlos – it sounds like a cache problem. Clear the cache in your browser, and try again. I’ve had to do that a lot lately as changes are not being seen in my output. Without ADD_BEAN, the popups are not wired for CRUX. That has been my experience, at least. I look forward to trying this out! It will simplify my code in many places! Brian From: Carlos Rovira Sent: Sunday, January 24, 2021 2:27 AM To: users@royale.apache.org Subject: Re: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding) Hi Maria Jose, I think that could be probably a false positive due to some catching. If there's no code the problem should arise. Can't see other explanation. Thanks El sáb, 23 ene 2021 a las 19:47, Maria Jose Esteve (mailto:mjest...@iest.com>>) escribió: Hi, "I have an X-file" Yesterday, after spending all afternoon with this problem, following Brian's directions, he added the dispatchers "ADD_BEAN" and "REMOVE_BEAN" and everything worked. Then he created a bead [1] for Jewel Popup and everything worked fine too. At night, after compiling the SDK, I cleaned up the bead code so that I could share it with you, but before that I did one last test: I unloaded the new bead (addBead) and tried again, “surprisingly” EVERYTHING WORKED WELL. Without bead, without ADD_BEAN, ... Does this have any explanation for you? @Brian could you verify in your code that the ADD_BEAN is indeed missing? I will be attentive to your opinions. [1] public class PopUpContentActiveCrux extends DispatcherBead { public function PopUpContentActiveCrux() {} private var viewBead:PopUpView; override public function set strand(value:IStrand):void { super.strand = value; viewBead = _strand.getBeadByType(PopUpView) as PopUpView; listenOnStrand("closePopUp", closePopUpHandler); listenOnStrand("showingPopUp", addContentListeners); } public function addContentListeners(event:Event):void { if(viewBead && viewBead.content) { dispatchEvent(new BeanEvent(BeanEvent.ADD_BEAN,viewBead.content)); viewBead.content.addEventListener("closePopUp", closePopUpHandler); } } protected function closePopUpHandler(event:Event = null):void { if(viewBead && viewBead.content) { dispatchEvent(new BeanEvent(BeanEvent.REMOVE_BEAN,viewBead.content)); viewBead.content.removeEventListener("closePopUp", closePopUpHandler); } } Thx Hiedra. De: Carlos Rovira mailto:carlosrov...@apache.org>> Enviado el: sábado, 23 de enero de 2021 16:35 Para: users@royale.apache.org<mailto:users@royale.apache.org> Asunto: Re: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding) Yeah, that would be very cool Maria Jose :) El vie, 22 ene 2021 a las 21:11, Maria Jose Esteve (mailto:mjest...@iest.com>>) escribió: Yes, it seemed to me too . I will clean the code and share it (maybe tomorrow). Hiedra. De: Carlos Rovira mailto:carlosrov...@apache.org>> Enviado el: viernes, 22 de enero de 2021 20:09 Para: users@royale.apache.org<mailto:users@royale.apache.org> Asunto: Re: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding) Cool, thanks Brian :) Maybe we could create a bead for PopUp to make if you use Crux to streamline the use... someone is encouraged to create this and contribute? :) El vie, 22 ene 2021 a las 20:03, Maria Jose Esteve (mailto:mjest...@iest.com>>) escribió: 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 mailto:brian.ray...@teotech.com>> Enviado el: viernes, 22 de enero de 2021 18:02 Para: users@royale.apache.org<mailto: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 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
Re: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding)
Hi Maria Jose, I think that could be probably a false positive due to some catching. If there's no code the problem should arise. Can't see other explanation. Thanks El sáb, 23 ene 2021 a las 19:47, Maria Jose Esteve () escribió: > Hi, "I have an X-file" > > Yesterday, after spending all afternoon with this problem, following > Brian's directions, he added the dispatchers "ADD_BEAN" and "REMOVE_BEAN" > and everything worked. Then he created a bead [1] for Jewel Popup and > everything worked fine too. > > At night, after compiling the SDK, I cleaned up the bead code so that I > could share it with you, but before that I did one last test: I unloaded > the new bead (addBead) and tried again, “surprisingly” EVERYTHING WORKED > WELL. Without bead, without ADD_BEAN, ... > > > > Does this have any explanation for you? > > @Brian could you verify in your code that the ADD_BEAN is indeed missing? > > > > I will be attentive to your opinions. > > [1] > > *public* *class* PopUpContentActiveCrux *extends* DispatcherBead > > { > > *public* *function* PopUpContentActiveCrux() {} > > > > *private* *var* viewBead:PopUpView; > > *override* *public* *function* *set* strand(value:IStrand):void > > { > > *super*.strand = value; > > viewBead = _strand.getBeadByType(PopUpView) *as* PopUpView; > > listenOnStrand("closePopUp", closePopUpHandler); > > listenOnStrand("showingPopUp", addContentListeners); > > } > > > > *public* *function* addContentListeners(event:Event):void > > { > > *if*(viewBead && viewBead.content) > > { > > dispatchEvent(*new* BeanEvent(BeanEvent.ADD_BEAN,viewBead. > content)); > > viewBead.content.addEventListener("closePopUp" > , closePopUpHandler); > > } > > } > > > > *protected* *function* closePopUpHandler(event:Event = null):void > > { > > *if*(viewBead && viewBead.content) > > { > > dispatchEvent(*new* BeanEvent(BeanEvent. > REMOVE_BEAN,viewBead.content)); > > viewBead.content.removeEventListener("closePopUp" > , closePopUpHandler); > > } > > } > > > > Thx > > Hiedra. > > > > *De:* Carlos Rovira > *Enviado el:* sábado, 23 de enero de 2021 16:35 > *Para:* users@royale.apache.org > *Asunto:* Re: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and > Databinding) > > > > Yeah, that would be very cool Maria Jose :) > > > > > > El vie, 22 ene 2021 a las 21:11, Maria Jose Esteve () > escribió: > > Yes, it seemed to me too . I will clean the code and share it (maybe > tomorrow). > > > > Hiedra. > > > > *De:* Carlos Rovira > *Enviado el:* viernes, 22 de enero de 2021 20:09 > *Para:* users@royale.apache.org > *Asunto:* Re: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and > Databinding) > > > > Cool, thanks Brian :) > > > > Maybe we could create a bead for PopUp to make if you use Crux to > streamline the use... > > someone is encouraged to create this and contribute? :) > > > > El vie, 22 ene 2021 a las 20:03, Maria Jose Esteve () > escribió: > > 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 > *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 > *Sent:* Friday, January 22, 2021 2:40 AM > *To:* users@royale.apache.org > *Subject:* [EXTERNAL] Popup and Databinding with Crux (RE: Popup and >
RE: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding)
Hi, "I have an X-file" Yesterday, after spending all afternoon with this problem, following Brian's directions, he added the dispatchers "ADD_BEAN" and "REMOVE_BEAN" and everything worked. Then he created a bead [1] for Jewel Popup and everything worked fine too. At night, after compiling the SDK, I cleaned up the bead code so that I could share it with you, but before that I did one last test: I unloaded the new bead (addBead) and tried again, “surprisingly” EVERYTHING WORKED WELL. Without bead, without ADD_BEAN, ... Does this have any explanation for you? @Brian could you verify in your code that the ADD_BEAN is indeed missing? I will be attentive to your opinions. [1] public class PopUpContentActiveCrux extends DispatcherBead { public function PopUpContentActiveCrux() {} private var viewBead:PopUpView; override public function set strand(value:IStrand):void { super.strand = value; viewBead = _strand.getBeadByType(PopUpView) as PopUpView; listenOnStrand("closePopUp", closePopUpHandler); listenOnStrand("showingPopUp", addContentListeners); } public function addContentListeners(event:Event):void { if(viewBead && viewBead.content) { dispatchEvent(new BeanEvent(BeanEvent.ADD_BEAN,viewBead.content)); viewBead.content.addEventListener("closePopUp", closePopUpHandler); } } protected function closePopUpHandler(event:Event = null):void { if(viewBead && viewBead.content) { dispatchEvent(new BeanEvent(BeanEvent.REMOVE_BEAN,viewBead.content)); viewBead.content.removeEventListener("closePopUp", closePopUpHandler); } } Thx Hiedra. De: Carlos Rovira Enviado el: sábado, 23 de enero de 2021 16:35 Para: users@royale.apache.org Asunto: Re: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding) Yeah, that would be very cool Maria Jose :) El vie, 22 ene 2021 a las 21:11, Maria Jose Esteve (mailto:mjest...@iest.com>>) escribió: Yes, it seemed to me too . I will clean the code and share it (maybe tomorrow). Hiedra. De: Carlos Rovira mailto:carlosrov...@apache.org>> Enviado el: viernes, 22 de enero de 2021 20:09 Para: users@royale.apache.org<mailto:users@royale.apache.org> Asunto: Re: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding) Cool, thanks Brian :) Maybe we could create a bead for PopUp to make if you use Crux to streamline the use... someone is encouraged to create this and contribute? :) El vie, 22 ene 2021 a las 20:03, Maria Jose Esteve (mailto:mjest...@iest.com>>) escribió: 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 mailto:brian.ray...@teotech.com>> Enviado el: viernes, 22 de enero de 2021 18:02 Para: users@royale.apache.org<mailto: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 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.
Re: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding)
Yeah, that would be very cool Maria Jose :) El vie, 22 ene 2021 a las 21:11, Maria Jose Esteve () escribió: > Yes, it seemed to me too . I will clean the code and share it (maybe > tomorrow). > > > > Hiedra. > > > > *De:* Carlos Rovira > *Enviado el:* viernes, 22 de enero de 2021 20:09 > *Para:* users@royale.apache.org > *Asunto:* Re: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and > Databinding) > > > > Cool, thanks Brian :) > > > > Maybe we could create a bead for PopUp to make if you use Crux to > streamline the use... > > someone is encouraged to create this and contribute? :) > > > > El vie, 22 ene 2021 a las 20:03, Maria Jose Esteve () > escribió: > > 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 > *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 > *Sent:* Friday, January 22, 2021 2:40 AM > *To:* 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; > > ... > > > > > > > > > > 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 > > Enviado el: lunes, 18 de enero de 2021 18:21 > > Para: 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/ > > > > > -- > > Carlos Rovira > > Apache Member & Apache Royale PMC > > *Apache Software Foundation* > > http://about.me/carlosrovira > > > -- Carlos Rovira Presidente Ejecutivo M: +34 607 22 60 05 http://www.codeoscopic.com Conócenos en 1 minuto! <https://avant2.es/#video> AVISO LEGAL: La información contenida en este correo electrónico, y en su caso en los documentos adjuntos, es información privilegiada para uso exclusivo de la persona y/o personas a las que va dirigido. No está permitido el acceso a este mensaje a
RE: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding)
Yes, it seemed to me too . I will clean the code and share it (maybe tomorrow). Hiedra. De: Carlos Rovira Enviado el: viernes, 22 de enero de 2021 20:09 Para: users@royale.apache.org Asunto: Re: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding) Cool, thanks Brian :) Maybe we could create a bead for PopUp to make if you use Crux to streamline the use... someone is encouraged to create this and contribute? :) El vie, 22 ene 2021 a las 20:03, Maria Jose Esteve (mailto:mjest...@iest.com>>) escribió: 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 mailto:brian.ray...@teotech.com>> Enviado el: viernes, 22 de enero de 2021 18:02 Para: users@royale.apache.org<mailto: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 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; ... 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 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/ -- Carlos Rovira Apache Member & Apache Royale PMC Apache Software Foundation http://about.me/carlosrovira
Re: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding)
Cool, thanks Brian :) Maybe we could create a bead for PopUp to make if you use Crux to streamline the use... someone is encouraged to create this and contribute? :) El vie, 22 ene 2021 a las 20:03, Maria Jose Esteve () escribió: > 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 > *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 > *Sent:* Friday, January 22, 2021 2:40 AM > *To:* 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; > > ... > > > > > > > > > > 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 > > Enviado el: lunes, 18 de enero de 2021 18:21 > > Para: 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/ > -- Carlos Rovira Apache Member & Apache Royale PMC *Apache Software Foundation* http://about.me/carlosrovira
RE: [EXTERNAL] Popup and Databinding with Crux (RE: Popup and Databinding)
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 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 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; ... 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 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/
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 Sent: Friday, January 22, 2021 2:40 AM To: 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; ... 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 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/