Flex :: Force All Tree Itemrenderers To Refresh?

Apr 6, 2010

I have item renderers in an mx.controls.Tree that I need to refresh on demand.

I have code in the updateDisplayList that fires for only some of the visible nodes no matter what I do. I've tried triggering a change that they should all be listening for; I have tried clearing and resetting the dataProvider and the itemRenderer properties.

private function forceCategoryTreeRefresh(event : Event = null) : void
{
trace("forceCategoryTreeRefresh");

[Code]....

The nodes refresh properly when I scroll them into view (e.g. the .data gets set), but I cannot force the ones that already exist to refresh or reset themselves.

View 2 Replies


Similar Posts:


Flex :: Force A Tree Itemrenderer To Redraw During A Drag And Drop Operation?

Jun 11, 2010

I have a tree control with a custom item renderer. The item renderer has different states that should be set while an item is being dragged over the item renderer. I understand from reading this post [URL] that the 'right way' to do this is to override the 'getCurrentState' method and append some text. I do that.

Now in my tree control I handle the drag over event and get a reference to the itemrenderer that is being dragged over and I set the boolean 'dragOver' property to true. Now I just need to force my itemRenderer to redraw. I can't figure that out. A workaround, is to just set the currentState of the itemRenderer.

how can I force my itemRenderer to refresh? (and I've tried calling validateNow, invalideDisplayList/Properties/Size, to no avail)

<?xml version="1.0" encoding="utf-8"?>
<s:MXTreeItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[Code]....

View 1 Replies

Flex :: Unable To Refresh Tree Control With New Branches From Successful RemoteObject Call

Feb 2, 2010

I'm trying to populate a mx:tree component with values that I'm getting from BlazeDS. The returned data from BlazeDS is fine it's an ArrayCollection of Folder value objects.I've been instructed to use Cairngorm for this project. I'm pretty new to Flex and Cairngorm. According to the limited documentation that I've read online I should populate the model with data so I've stuck the array collection there.What I'm stuck with is trying to update the tree component. I feel that I need some way to notify the container component for the tree that the data (i.e. the subfolders) is available on the model. I was hoping that it would be possible to fire a function in the container component to add the subfolders as children of the selected node (I could chuck this on the model before the remote object call I guess) then fire tree.invalidateList() and tree.validateNow(). Any ideas?

View 1 Replies

Way To Force File Refresh

Jul 9, 2003

I use "loadvars" to get the dynamic info for a flash homepage from a ".txt" file. How can I force browsers to download a fresh copy of ".txt" files every access?

View 4 Replies

ActionScript 3.0 :: Force A Refresh To A Swf File?

Sep 17, 2010

I'm using a .png Menu/Sub Menu from FireWorks to go to a particular swf file and then to an anchor within the swf file.But when I click on the same menu item and different sub menu item it doesn't go to another anchor within the same swf file. If I navigate away and then click fresh on the link that didnt work, it works.It seems to think it's at the right place and ignores the link.

View 12 Replies

Force Cookies Refresh - Memory Cleanup?

Apr 3, 2009

Just finished some swf files update, but as computers retain information (cookies) if site as been visited before, im not sure that everybody will see the update. How can i prevent this?

View 1 Replies

ActionScript 3.0 :: Force Flash To Refresh Its Xml Data?

Oct 24, 2008

How do you force Flash to refresh its xml data?

I have a Flash app that uploads an xml file using URLLoader() and URLRequest(). But this file gets overwritten every 10-30 minutes with fresh data. The only way I've found so far to view changes in the xml data is to refresh my web page (F5 or Ctrl-->F5). Short of turning to Javascript, isn't there some way for Flash to refresh its xml data?

View 3 Replies

Professional :: Two Widgets Be Connected So That One Can Force The Other's Data To Refresh

May 31, 2011

I'm very new to Flash, but I have an app that uses mult widgets. What I need to know is if one of my widgets data changes can I force another widget on the screen to force it to refresh its data.

View 1 Replies

Actionscript :: Simple Event Chaining / How ToI Force A Display Refresh

Jan 28, 2011

I'm attempting to take a process that previously ran multiple remote object calls in parallel and make them run in serial.I know it's a hackish approach (bandaid!), but so far my approach has been to take this for-loop that started each parallel request:[code]Where _pause_queue is a private global boolean for the class. In the fault-handler and response-handler functions, it is set back to false, so that the infinite where-loop is released and the for loop will continue.This is functional, but the UI only updates after the while-loop ends, which causes the negative side effect that it looks like the application is hung while waiting for a response.

Is there something I can put inside the while loop to allow flash to update the display? In VB (ugh!) I would use DoEvents, but I don't know of an equivalent for Actionscript.Alternately, is there a way to add a simple queueing system short of completely rewriting the application? This is legacy code and I'm on a tight deadline so I'd like to modify it as little as possible. (Otherwise I would rewrite it from the ground up and use Swiz to get the Event Chaining.)

View 3 Replies

Flash :: Flex 4.5: Tree - Make A Flex Tree Component Display The Children Of A Sprite In A Hierarchical Way

Nov 19, 2011

I'm trying to make a Flex Tree Component display the children of a sprite in a hierarchical way. Moreover, dragging the items on the FlexTree would resort and reparent the items. I have special Elements set as Folders. This would allow other elements to be added there as a children by dragging an element on the tree and dropping it there. I have a failed attempt which works, but breaks when I try to add folders. Basically, it fails at reparenting the items by dragging and resorting folders and that Does anyone know of a component or something which can do this, has anyone have created any of this or could anyone give me a clue?

View 1 Replies

Flex :: Fire Tree ItemClick Event On Setting Tree.selectedItem In Air?

Oct 30, 2009

I am working on Air application,i had a problem on Tree control.Iam adding nodes for the tree dynamically, while adding nodes to the tree i am setting Tree.selectedItem as present added node. after that i need to fire Tree.itemClick event handler method also.how can i call event handler method as a common method. in Flex3

View 1 Replies

Flex :: Scroll When Tabbing Through Itemrenderers?

Jan 18, 2012

To allow you to tab through itemrenderers in spark you simply set hasFocusableChildren="true". However when you tab to a row/tile which is not visible, it doesn't automatically scroll the List.

What's the easiest way of making this happen?

View 1 Replies

Flex 4 List ItemRenderer - Different Itemrenderers For Different Rows?

Jun 28, 2010

I'm creating a list of scores for a game. now most of the list i need to have the same ItemRenderer. but in one specific row of the list where the user who's playing is listed, it should show different information and with different background color. how can i achieve this ?

I already tried to resolve the issue with states, i created 2 states, one state called 'mine' and the 2nd state called 'others'.

the problems that i got is that when users click on one of the list rows that state changes to i donno clicked or something and that's why i assumed that states are not the right action for me.

View 3 Replies

Flex :: Get The Itemrenderers To Divide The List Width Between Them?

Mar 22, 2011

I have a List class with an itemrenderer. How can I get the itemrenderers to divide the List width between them? Normally, I would think this would be a easy as giving the renderers a percent width but that no worky.

Application:

<?xml version="1.0" encoding="utf-8"?>
<s:Application
minHeight="600"[code]..............

View 1 Replies

ActionScript 3.0 :: Flex - Complexity Of ItemRenderers In Lists

May 14, 2008

I'm building fairly simple item renderers, in fact, here's the code for one of them...

Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
implements="mx.controls.listClasses.IListItemRenderer"

[Code].....

It's a really simple renderer that has an image and some text sitting next to it, or just the text if no image is in that item's data provider. There is also some basic rollover, rollout and click functionality...

So my question: Why is it that if my list needs to scroll it gets messed up? By "messed up" I mean that the text changes from being to the right of the image (when image is present) to moving over top of the image, as if it isn't realizing that the image is there. There's also sometimes an issue of the item renderer shrinking down so there is no longer anything even visible in the box (just some black with a grey border on the bottom about 5 - 10 pixels big...

I'm wondering if maybe my item renderer is too complex? I'm having the same issue with text working like that in another renderer, but no images, just text placed in certain positions (as well as some strage blue tints showing up at the top or bottom depending on how I am scrolling)

By the way... here is the MXML where I am initializing my list...

Code:
<mx:Canvas width="100%" height="100%" id="list">
<mx:List
width="100%"

[Code].....

View 1 Replies

Flex :: Where Should SetStyle Logic Go In Itemrenderers's Override Methods

Aug 4, 2011

I have following itemrenderer

[Code]...

My question is Should above logic go in updtaeDisplayList or remain in set data() itself. The output is smae from both. Whats the performance impact difference if we consider it from lifecycle perspective.(The heavy computations should be pushed towards the end of the frame rendering)

View 1 Replies

Flex :: Delete Itemrenderers In A Spark Listform For Mobile?

Oct 4, 2011

I've got a spark ListForm with a custom mxml itemRenderer,all the itemRenderer has is[code]...

View 1 Replies

Flex :: Change Dataprovider In Spark List That Has Itemrenderers?

Mar 13, 2012

In flex 4.5, I have an application that has a BorderContainer that loads a spark list (mxml style - _myList and the borderContainer is stored in a library outside of the parent application) that loads an arrayCollection with an itemRenderer (I should note said itemRenderer is not an inline renderer - on selection of an item in the list, the itemRenderer expands, loads a particular control within the item renderer based on data passed from the selected item in the list) and allows the user to perform a search. This works all well and good on startup/load, until I try to change the dataProvider for the list (my app allows users to switch data sources which then creates a new dataProvider with new variables). I have tried:

[Code]...

View 1 Replies

Actionscript :: Define Multiple ItemRenderers In A Flex List?

Jun 9, 2009

Basically I want to override some function in the flex/actionscript list class which creates a new ItemRenderer and passes it the required data ready to be displayed. I need to do this because I wish to show a different renderer based on the type of data being displayed. Is there such a function?

I don't really want to pass the list a single itemRenderer which calls its addChild function depending on the type of data it has - It just doesn't seem right.

View 1 Replies

Actionscript 3 :: Flex 4.6 Mobile - ItemRenderers And Application Data?

Mar 20, 2012

A question about ItemRenderers: let's say I have an ArrayCollection that is my application data sitting inside a global object. I them populate a sparks list with this data, setting the ArrayCollection as the dataProvider.

So each ItemRenderer gets a copy of an item sitting in the array. You can override the "set data" method to set the data something more domain-specific. The problem is that the data is a copy of the original item.

Now let's say we want to add some data to the item while inside the ItemRender. For example, it could call a method on the item telling it to load some details about itself, or maybe we allow the user to modify something on the item.

Obviously, we can't do any of this if we are operating on a copy because it will be thrown away as soon as the ItemRenderer is destroyed and the original object doesn't know anything about what happened.

So what's the best practice? Should I just use the itemIndex of the renderer to pull out the original item from my global array like this:

{globalArrayCollection}.getItemAt(this.itemIndex) But it seems kind of clunky to me. Is there a best practice for dealing with this?

View 2 Replies

Flex :: Using A Container Powered By Itemrenderers - Make The Rendering Not Stall?

Feb 19, 2010

I'm developing on Flex 4. I have a datagrid container and custom itemrenderer with a text field, a button and a few boxes. Every time some data is displayed, the app stalls for a second or two before rendering completely. Is there any way to make it render more fluidly or render one after another...?

View 1 Replies

Flex :: Value In Datagrid Itemrenderers Set Data Method Doesn't Return The Correct Data?

Jan 10, 2012

I've got a Gridcolumn in a Datagrid (Spark). The Column's dataprovider is a Number value that gets updated via Binding.Now, without an item renderer the cell displays the correct values.If I set an item renderer, I can't access the values in this renderer.My renderer looks like this, so nothing really do here (for now) but to trace the value, but the value is always NaN.

<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%" >[code].......

without the renderer, the column displays the correct values, so apparently the DefaultGridItemRenderer works fine.As requested, here is my Datagrid;

<s:DataGrid id="dataGrid" dataProvider="{_listItems}">
<s:columns>
<s:ArrayList>[code]..........

_listItems is an ArrayList with instances of a model class, which has (amongst others) a property called change of type Number.

View 1 Replies

Professional :: Refresh Button Does Not Refresh Flash Website

Sep 30, 2010

I had an issue with my index.html testing on IE and the preloader just stalls on "loading 0%". he told me that locally the progress event doesn't have time to load and to try uploading it to your server and see if it works. It worked just fine. Rah Rah Kglad.
 
So today I'm fine tuning the swf/ fla to clean it up. Reduced some picture sizes and deleted unused files and reduced the swf from 4000 KB to 350 KB Rah Rah Gene. replaced the swf in Dreamweaver and re-uploaded with Filezilla. Rah ah Filezilla.
 
Everything working great and my preload went from 23 seconds to less than 3. So I'm real happy except for one small issue. Firefox and IE both do this. If I hit the refresh button, it stalls on "loading 0%" once again just like it did locally.
 
If I hit the refresh several times it WILL refresh randomly....2 times refresh......10 times refresh etc.
 
[URL]
 
Spoke to my hosting company who said everything seems fine on the server. BTW he said Chrome did NOT have this issue Rah Rah Chrome.

View 1 Replies

Flex :: Force Flex Apps To Load On A Local Domain?

Jan 11, 2010

I have a situation where I need my swf to load from a domain. Currently my flex set up always loads a SWF from file [URL]...

View 1 Replies

ActionScript 3.0 :: Embedded Video - When I Click A Button On The Tree, It Runs The Respective Frames Then Returns To The Tree?

Jul 5, 2010

I have a intro to a picture of a tree which has buttons on it. The intro is an embedded flv video (not using the FLV component). The video starts on frame one and runs to frame 2. The tree is on frame 3.When I click a button on the tree, it runs the respective frames then returns to the tree. When the tree appears, the sound of the video is playing in the background.How can I make this stop?

Code:
stop();
MovieClip(lion_mov).stop();
//video Mouse Click[code].....

Frame 3 just includes all the mouse clicks for the tree.

View 1 Replies

Flex :: Actionscript 3 - Delete Node Of Type Object From Flex Tree Component?

Feb 11, 2011

I have a tree with nodes , and a delete button , first user select the node and click this delete button , I want this node to be removed from the tree , Its not XML , every node in tree is of type Object

{label:'folder',children:[{label:'file1'}]}

I tried delete myTree.selectedItem (but compiler wont let me do it) also tried myTree.selectedItem = null (just unselects the item)and also how can I access reference to parent object of myTree.selectedItem ?

View 3 Replies

Flex :: Override Child Node Controls In A Flex Tree Control?

Aug 20, 2010

I am currently developing a dynamic LineChart in FLEX 4.I am implementing a Tree control next to my LineChart, which will filter the LineChart dataprovider and lineseries. The tree control has several branches and ultimately 5 children (leaf nodes) at the bottom of the last branch.I need the leaf node/children to be displayed as checkboxes inside the tree control.As I understand,this will require overrides in the TreeItemRenderer class.This is where I am a little confused on how to implement that.Currently I can distinguish between leaf and branches using this code, in my main MXML component.I added this because it may be helpful to some beginning FLEXdevelopers, such as myself, who cannot easily find this functionality documented well:

private function treeClick(e:ListEvent):void {
_selectedItem = Tree(e.currentTarget).selectedItem;
if(mainTree.dataDescriptor.isBranch(_selectedItem)) {[code].....

I am looking at the TreeItemRenderer override class from the following example here: In the example, they override the "createChildden" super function to add checkboxes to the tree control.My question is, can I override the createChildren function directly in my MXML component, and not have to use an entire class file to override this functionality? Must I re-invent the wheel to do this?Also, how can I distinguish that my treeItem is a leaf node and not a parent, in the override function? I only want to add checkboxes to the leaf nodes, how can I differentiate? The following example adds checkboxes to all branches and leaf nodes, but I want to add checkboxes only to leaf node/children. How would you approach that?

override protected function createChildren( ): void
{
super.createChildren( );[code]............

Here is my tree tag:

<mx:Tree id="mainTree" dataProvider="{treeData}" itemRenderer="TreeCheckBoxItemRenderer" labelField="@label" showRoot="false" width="100%" height="100%" itemClick="treeClick(event)" />

View 1 Replies

Actionscript 3 :: How To Position ItemRenderers

Nov 22, 2011

I'm quite new to flex and ActionScript and I'd like to create a custom component acting as a calendar (using a Sprite), in which the calendar events are represented as rectangles the user can interact with (click to get information about the event, drag and drop for setting start and end dates...). It seems that using a subclass of DataGroup is a good way to do it, but some things are obscure to me.For example, how should I use the Sprite? as a child of the DataGroup? Also, the calendar events will be drawn using a custom ItemRenderer, and I will have to use a BasicLayout in my DataGroup, but where should I tell that an ItemRenderer should draw its rectangle in the Sprite at the corresponding (x,y) coordinates?

View 1 Replies

Flex :: Itemrenderer - Referencing And Setting A Single Item Renderer Instance In A Flex Tree At Runtime?

Oct 17, 2010

Anyone know how to change a single instance of an item renderer for a Flex tree item at runtime? To reiterate, I'm not trying to change the entire tree's item renderer like this:tree.itemRenderer = new ClassFactory(ItemRenderer2);I'm trying to change the item renderer of a single tree item like this (the following code does not work):tree.selectedItem.itemRenderer = new ClassFactory(ItemRenderer2);To put it more simply, does anyone know how to reference an instance of an item renderer and set it to a new item renderer class? I've tried using the Tree's itemToItemRenderer() method with no success.

View 1 Replies

Flex :: Setting Background-color For Flex Tree Component?

Oct 21, 2010

I have a Flex Tree component in my app. I set the icons for open and close.
BUT I can't find something about changing the default background-color from white to something different.

obviously there is no background-color setable in css...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved