You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Hugo Ferreira <hf...@gmail.com> on 2020/12/02 01:43:39 UTC
outerDocument on Jewel DataGridItemRenderer
Hi,
Intelissense shows the option of outerDocument inside of a
DataGridItemRenderer and this can be compiled, allowing to comunicate with
the main MXML where the DataGrid is in.
However at runtime, there is no link to this variable (it's null).
Searching on all the code base, I saw that this was only implemented on
DataGrid and AdvancedDataGrid of MX components.
My question is: There is a better approach on Jewel to communicate from an
ItemRender to outside to send data or this is missing and we should
implement outerDocument on Jewel DataGridItemRender compoent ?
Re: outerDocument on Jewel DataGridItemRenderer
Posted by Carlos Rovira <ca...@apache.org>.
Hi
I think outerDocument is a bad approach, but you have "parent" (although
could not be exactly the parent you need due to more nesting), or the bead
yishay pointed.
Anyway I prefer send event as a better way to decouple components. Check
this example of the renderer in TodoMVC:
https://github.com/apache/royale-asjs/blob/develop/examples/jewel/todomvc/src/main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml
notice that the trick is in using bubbling:
public function TodoEvent(type:String, ...
super(type, true);
El mié, 2 dic 2020 a las 5:47, Yishay Weiss (<yi...@hotmail.com>)
escribió:
> I’ve used this with success
>
>
> C:\dev\flexjs\royale-asjs\frameworks\projects\Core\src\main\royale\org\apache\royale\core\ParentDocumentBead.as
>
>
>
> From: Hugo Ferreira<ma...@gmail.com>
> Sent: Wednesday, December 2, 2020 3:44 AM
> To: Apache Royale Development<ma...@royale.apache.org>
> Subject: outerDocument on Jewel DataGridItemRenderer
>
> Hi,
>
> Intelissense shows the option of outerDocument inside of a
> DataGridItemRenderer and this can be compiled, allowing to comunicate with
> the main MXML where the DataGrid is in.
> However at runtime, there is no link to this variable (it's null).
> Searching on all the code base, I saw that this was only implemented on
> DataGrid and AdvancedDataGrid of MX components.
>
> My question is: There is a better approach on Jewel to communicate from an
> ItemRender to outside to send data or this is missing and we should
> implement outerDocument on Jewel DataGridItemRender compoent ?
>
>
--
Carlos Rovira
Apache Member & Apache Royale PMC
*Apache Software Foundation*
http://about.me/carlosrovira
RE: outerDocument on Jewel DataGridItemRenderer
Posted by Yishay Weiss <yi...@hotmail.com>.
I’ve used this with success
C:\dev\flexjs\royale-asjs\frameworks\projects\Core\src\main\royale\org\apache\royale\core\ParentDocumentBead.as
From: Hugo Ferreira<ma...@gmail.com>
Sent: Wednesday, December 2, 2020 3:44 AM
To: Apache Royale Development<ma...@royale.apache.org>
Subject: outerDocument on Jewel DataGridItemRenderer
Hi,
Intelissense shows the option of outerDocument inside of a
DataGridItemRenderer and this can be compiled, allowing to comunicate with
the main MXML where the DataGrid is in.
However at runtime, there is no link to this variable (it's null).
Searching on all the code base, I saw that this was only implemented on
DataGrid and AdvancedDataGrid of MX components.
My question is: There is a better approach on Jewel to communicate from an
ItemRender to outside to send data or this is missing and we should
implement outerDocument on Jewel DataGridItemRender compoent ?