Flex :: Spark DropDownList SelectedItem Didn't Update After DataProvider Changed?

Dec 26, 2010

I have two dataProvider's for one DropDownList. The following code can be compiled and run.

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

[code].....

View 1 Replies


Similar Posts:


Actionscript :: DataGrid: Update Each Row DataProvider Is Changed?

Mar 24, 2010

In a DataGrid, how can I force data() of all itemRenderers on visible rows to be called when I've made an update to the dataProvider.I'n the following the Grid isn't updated after pressing doSomething. If I have a large list the update is done when scrolling down and then back up again, or in the case of the TreeGrid i open/close a node.

<?xml version="1.0" ?>
<mx:VBox
xmlns:mx="http://www.adobe.com/2006/mxml"[code].....

View 2 Replies

Flex :: Set SelectedItem In DropDownList?

Sep 10, 2011

I am making some simple project and I have problem with selectedItem. I have sth like this

<s:State name="Form" enterState="makesService.send()"/>

so when I enter this state I take makes from database and populate them to dropdownlist.

but I have also button and on click event I'm changing state to this Form and I want to select specific make from the dropdownlist but I can't. I'm not sure whether I'm doing sth wrong or the problem is that I'm selecting item just before the dropdownlist became populated.

e.x. List of make consist of Audi and BMW and when I click button I want to open this state Form in which this dropdownlist exist with selected value e.x. BMW.

View 1 Replies

Flex :: Blank Entries In A DropDownList Using An IList As A DataProvider

Jan 22, 2011

I'm dynamically creating an IList to use as a dataprovider for a DropDownList in Flex.

The code is creating the IList correctly, and I can access the data inside just fine.

However, when I set the dataprovider for my DropDownList, it only shows blank entries for each item in the list.[code]...

View 1 Replies

Flex :: Datagrid - Pass A GridItemRenderer The DropDownList's DataProvider?

Oct 26, 2011

I need to display DropDownLists in a column of a DataGrid in my Flex application. Here is what I am doing:

First, I have a item renderer function that creates a custom item renderer, and passes it a property that is an IList that will be used as the dataProvider of the dropDownList:

private function rendererFunction(item:Object):ClassFactory {
var itemRenderer:ClassFactory = new ClassFactory(AudActionDropDownIR);
itemRenderer.properties = {AudActionData: AudActionData};

[Code]....

First, how can I call the init function when the renderer is created? Second, when I set the column's itemRendererFunction="rendererFunction", the app will not launch, a white screen comes up. But when I set itemRenderer="components.AudActionDropDownIR", the app will launch, but of course there is no data in the dropdown list.

View 1 Replies

AS3 :: Flex - How To Know If Dataprovider Or Its Content(s) Is Changed

Jan 10, 2011

I'm implementing some kind of combobox control (by extending spark.components.supportClasses.DropDownListBase)

Now, inside this control; I need to know:

If the dataprovider is changed/assigned. (which I can do... the first approach below works); if any item in the dataprovider collection has changed.

I tried 2 methods that did not do the trick...

1ST APPROACH:

2ND APPROACH:

UPDATE: Edited above.. The first approach lets me know if the dataprovider is changed but not if any item is updated in the dataprovider collection. The second approach does not work at all..

View 1 Replies

Flex :: Spark DropDownList As ItemEditor Within AdvancedDataGrid?

Mar 11, 2011

I'm trying to use the Spark DropDownList as itemEditor in an AdvancedDataGrid. Howerver, I've stumbled onto two issues:Clicking on a item in the DropDownList changes the selected row in the ADG. You can see this behavior by compiling the code from below and executing the following steps.The value changes from "A" to "C" and Row 3 is the selected row in the ADG. It looks like the mouse click in the DropDownList is also handled by the ADG itself which changes the selected row accordingly. I couldn't figure out a way to prevent this. The expected behavior would be that row 1 is still selected after the DropDownList has been closed.Clicking on the scrollbar of the DropDownList closes the DropDownList. (I just found the solution to this problem in the relatated questions while writing this: Scrollbars in dropdownlist inside DataGrid itemEditor not working)

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

[code].....

View 2 Replies

Actionscript 3 :: Flex Databinding With SelectedItem Property Of The Combobox Update Many Times

Jan 23, 2010

well, I have a combobox which I have bind his selectedItem property to a value object object, like this

<fx:Binding source="styles_cb.selectedItem.toString()" destination="_uniform.style"/>
<fx:Declarations>
<fx:XML id="config_xml" xmlns="" source="config.xml" />
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<mx:ComboBox x="66.15" y="63.85" editable="false" id="styles_cb" dataProvider="{config_xml.styles.style}" />

the value object is a custom class with some setters and getters, and I want to set a property based of the value of the selectedItem of the combo, so inside the value object I have something like this

[Bindable]
public function set style(value:String):void
{
_style = value;
trace(value);
}

my problem is that each time I change the combobox selection which in fact change the style property of the value object it does it 3 times, if I trace the value of the setter it actually do the trace 3 times, why?? how can I avoid this? I'm doing something wrong? or there is a better way to do it,

View 2 Replies

Actionscript 3 :: Flex Databinding With SelectedItem Property Of The Combobox Update Many Times?

May 22, 2008

well, I have a combobox which I have bind his selectedItem property to a value object object, like this

<fx:Binding source="styles_cb.selectedItem.toString()" destination="_uniform.style"/>
<fx:Declarations>
<fx:XML id="config_xml" xmlns="" source="config.xml" />

[code].....

View 3 Replies

Flex :: Apply Image States In Spark Dropdownlist?

May 9, 2011

I have a spark dropdownlist and I have applied custom skin on it to display images in it instead of labels.

<s:DropDownList id="id_cbLineType"
skinClass="assets.skins.SkinDropDownImageList"
itemRenderer="spark.skins.spark.DefaultComplexItemRenderer"

[code].....

View 2 Replies

Flex :: Get A Spark DropDownList SkinClass And TypicalItem To Live Happily Together?

Aug 31, 2010

How does one go about calling a skinClass on a DropDownList component without compromising the typicalItem functionality?

[Code]...

View 1 Replies

Actionscript 3 :: Flex 4 Remove Selected Item From Spark DropDownList

Jun 30, 2011

My stakeholder has a request to remove the currently selected item from the DropDownList control(s) in the application. For example a drop down with [item1, item2, item3, item4] if item2 is selected then the only items in the drop down will be [item1, item3, item4]

Using Flash Builder 4 with Flex 4.0 sdk

View 2 Replies

ActionScript 3.0 :: Skipping Line - Changed It A Little Bit To Make It Run. Anyway, It Still Didn't Run?

Nov 12, 2010

I got some problems with my code, here is my code:

Code:
public function left_hand_sides(a:String):Array{
var res:Array = new Array();
var r:Array = new Array();[code]........

when I debug this piece of code, I find some weird things happened. It didn't run the way I think it should be. I googled some info about variable scope in AS 3 and find out some interesting info. So I changed it a little bit to make it run. Anyway, it still didn't run. When I debug line by line, until

Code:
if(r[1] == a)
res.push(r[0]);

View 6 Replies

Flex :: Repeater With Dataprovider Flickers A Bit When There Is An Update

Dec 16, 2009

i have the following code:
<mx:Repeater id="user" dataProvider="{data}">
<mx:VBox styleName="repeaterVBox">
<mx:Text text="{user.currentItem.a}. {user.currentItem.b}"

[Code]....

the dataProvider 'data' updated itself every 3 seconds, so every 3 seconds that is a flicker of some sort, i see for a really short time an empty area and then it gets redrawn again. is there a way to make the update somewhat faster ?

View 1 Replies

Flex :: Get The ItemRenderer Of A Spark List From Its DataProvider Object?

Oct 26, 2010

In Flex I can create an ItemRenderer to represent each item in the Lists DataProvider but how do I access the instance of the ItemRenderer via the DataProviders Object? Something like myList.getItemRenderer(dp.getItemAt(10));

View 2 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

Flash :: Way To Auto-update A Dataprovider In Flex List?

Feb 3, 2011

Is there a way so that every time the list is changed (data add, data deleted, etc.), the list will re-update or "refresh?"

View 2 Replies

Flex :: Spark - Skins ArrayCollection As Dataprovider To An ItemRenderer Of A List?

May 4, 2011

Objective:I would like to pass Skins to an itemRenderer (which is a Button) of a List, and be able to skin every button in that List.This is what I have:

List:

<s:List itemRenderer="renderers.ItemRenderer" dataProvider="{collectionWorkspace}" />

ArrayCollection:

<s:ArrayCollection id="collectionWorkspace">
<comp:Layout1 />[code]...

I get an error (fixed for clarification):Error: Skin for Application....Button1 cannot be found.

View 1 Replies

Flash :: Detect When Flex Spark List's Data Has Changed

Oct 6, 2010

I need to detect when a Flex Spark List (spark.components.List) data has changed so that I can programmatically change its scrollbar. I know that List is a an EventDispatcher but it's unclear which event I'd register for.

Edit: My List's dataProvider is an ArrayCollection that elements are added too. So the dataProvider is never replaced. I considered listening to the backing ArrayCollection, but it's possible the List will react to the change after my listener, which alters the scrollbar. Thus my listener's changes will be superseded by that of the List.

View 1 Replies

Flex :: Keep A List From Scrolling On DataProvider Refresh/update/change?

Jun 30, 2011

I have a simple list and a background refresh protocol.When the list is scrolled down, the refresh scrolls it back to the top. I want to stop this.I have tried catching the COLLECTION_CHANGE event and validateNow(); // try to get the component to reset to the new datalist.ensureIndexIsVisible(previousIndex); // actually, I search for the previous data id in the IList, but that's not importantThis fails because the list resets itself after the change).I hate to use a Timer, ENTER_FRAME, or callLater(), but I cannot seem to figure out a way.The only other alternatives I can see is sub-classing the List so it can catch the dataProviderChanged event the DataGroup in the skin is throwing.

View 4 Replies

Flex :: Combining A Multiple Strings And Arrays To One DataProvider For Spark List

Dec 21, 2010

what I need to do is combine 5 arrays with 5 individual strings (which have come from a JSON webservice) into one single list item in FlashBuilder Burrito. [code]I've pulled these out successfully and each one traces in the debugger, although as I need them all in the same list I'm struggling to establish them as a dataprovider together.If I push the strings and arrays together it is impossible to read properly, as the main Titles are at a different level to any descriptors for the products which are in the arrays.

View 1 Replies

Flex :: Spark Datagrid With Checkbox Does Not Update Correctly?

May 26, 2011

The checkboxes are updated correctly when I select one or more datagrid rows but when I select a checkbox for the first time the checkbox does not refresh until the pointer moves out of the datagrid row. How can I fix this?

[Code]...

View 3 Replies

Actionscript 3 :: Flew Spark Dropdownlist - Add Separator Between Item?

Jan 20, 2012

I am trying to create a dropdown that can display both past state and possible state for a customer.But I want to make add a separator between past and possible state.Actually to do that I add an item like "-----" on the dataprovider.But the look and feel is not good and this item may be selected.My ideal approach is something like that:

View 2 Replies

ActionScript 3.0 :: XMLListCollection Dataprovider Update?

Feb 6, 2011

I have a tree with a dataprovider that is an XMLListCollection. The source of the dataprovider is the result of a HTTPService:

Code:
<s:HTTPService id="xmlService" showBusyCursor="true" result="handlexmlResult(event)" resultFormat="e4x" fault="xmlService_faultHandler(event)"/>

[code]....

View 0 Replies

Flash - Update 100+ Variables If Something Is Changed In A Different Class?

Jun 10, 2010

I have a class Grid which produces a graph paper like grid on in the drawing area. I then have 5 other classes for different shapes to draw with; Line, Polygon, Ellipse, Curve, Arc Now, these 5 classes use an instance of Grid because Grid has a resolution and a scale. Inside Grid I have:

public function set resolution(x:Number):void {
_gap = (modBy10(x) / 10);
_scale = (modBy10(x) / (this.resolution * _scale));

[code]....

I'm just lost for a solution on how to update every instance of my 5 drawing classes when Grid is changed.For instance, Polygon is made up of multiple instances of Line, Line(length, angle) where "length" is in either in, ft, cm, or m. If the user wishes to change the scale from say 10ft per 100px resolution to 20ft per 80px.. Is there an easier way than re-drawing every Line inside Polygon?

View 2 Replies

AS2 :: Xml : Update/store Changed XML Node Value In Flash?

Jan 14, 2011

I've succesfully loaded and parsed this XML file, using XMLParser and AS2:

<Resources>
<item author="Julian" date="28/12/2010" time="01:18" id="876" like="8" dislike="5">
<Text>Sample paragraph</Text>
</item>

[code].....

Now, what I need, is to increase and store the "like" and "dislike" values with the click of a button, but I don't know how to modify and store them in the existing nodes (eg., without adding new ones).Do I need to use PHP, or can AS2 handle it by itself?

View 1 Replies

ActionScript 2.0 :: [MX2004] Update Textfield Only When Changed?

May 18, 2004

I have 2 textfields...They have to be related to each other so when I change the data in one of them, the other changes too (not identically... calculations and stuff) And when I change the second one the, first one has to change accordingly... like a 2-way thing Has that something to do with listeners mby?

View 3 Replies

ActionScript 3.0 :: Update A List Component Pushing New Items Inside His DataProvider Object?

Dec 4, 2009

I'm trying to update a List component pushing new items inside his DataProvider object.

I've tried with a:
MY_LIST.invalidateList();
MY_LIST.validateNow();

but the list doesn't change, anyone has some suggestions?

View 2 Replies

Flash - Spark List SelectedIndex Doesn't Update?

Sep 8, 2011

when i use nextSlide() and prevSlide(), which are executed when i click on two buttons. SelectedIndex works when i click on the elements in the List. What am i doing wrong? do i have to dispatch some events? Are there any tricks to doing it with buttons?This is my playlist class

public class Playlist extends List
{
private var dispatcher:Dispatcher;

[code]......

View 2 Replies

Flex :: Flash SecurityError About Sandbox. Force To LoadPolicyFile But It Didn't Work

Mar 1, 2011

i have a crossdomain.xml on my server. but it not in "/". and i use loadPolicyFile to load this crossdomain.xml.

Security.allowDomain("*")
Security.allowInsecureDomain("*");
Security.loadPolicyFile(AddressContext.getCurrentEnv().split("rest")[0]+"crossdomain.xml")

the PolicyFile's url is like this :[URL]and my restful webservices address is like this : [URL]crossdomain.xml include my flash's host url.the weird thing is flash still tried to load the [URL] like this first is right and response 200. the second response 400 .finally, the flash still told me SecrityError#2048

View 1 Replies







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