flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From modjkl...@comcast.net
Subject Re: AW: AW: how to updateDisplayList() in custom headerRenderer? (help!)
Date Tue, 02 Dec 2014 18:40:32 GMT
Thanks everyone. I thought I was missing out on something basic in Flex to be able to programmatically
update a TextInput field in a header renderer. But, turns out it is not that easy. 

So, what I ended up creating an event listener in the header renderer when the header renderer
is added to the stage (and removing it when removed from stage). Then in the main application
when I want to update the TextInput field, dispatch an event. This works well. 

The other thing that should work, which I didn't try, might be to create a global variable
in the main app that is bindable, and have the header renderer access that (as I believe Alex
alludes to below) in mxml such as <s:TextInput text="{myCondition}".../>. 

----- Original Message -----

From: "Alex Harui" <aharui@adobe.com> 
To: "users, apache" <users@flex.apache.org> 
Sent: Tuesday, December 2, 2014 9:36:41 AM 
Subject: Re: AW: AW: how to updateDisplayList() in custom headerRenderer? (help!) 

On 12/2/14, 3:45 AM, "Krüger, Olaf" <OKrueger@edscha.com> wrote: 

>I tried it also and also tried some other ways but nothing works. I've no 
>idea how to get it working with an headerRenderer, sorry. 
>Perhaps Alex could help? 

Maybe I’m not understanding the problem, but in general, the #1 rule for 
item renderers is to tie their visuals to the data property or an 
associated property. IOW, the item renderer should be watching a model 
and/or its properties for changes. Trying to push changes notification 
down through the DG into the renderers is difficult or impossible. 


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message