Flex :: Combobox Not Updating With Bindable Data

Jan 28, 2011

My Combobox is not alway updating when I update the ArrayCollection.[code]...

the first time it updates the combobox fine and sometimes it works the 2nd, 3rd, etc time is might update the combo box. After it stops updating the combobox, it never does until I restart the app. I have verified that the ArrayCollection is updated via the debug data, it is just the combobox is not updating the display.

View 1 Replies


Similar Posts:


Flex :: ComboBox LabelFunction Not Refreshing With Updating Of An ArrayCollection?

Aug 11, 2010

My first issue is that when my ArrayCollection only has one item, for some reason I cannot select that first item. The change function set on the mxml never gets called when I try to select that one item. If I set a prompt, it works. I know that the item is not already selected because when debugging, the selected item shows null. I do not want to use a prompt. I want the first item in the ArrayCollection to be selected automatically. So if there is only one item, I want the selected item to be that. FYI - I am using a labelFunction to format the data in the Array Collection. why I cannot select the first item or set the first item in the ArrayCollection to be the selected item?

My bigger issue is that when my Array Collection gets updated, my label function must not be refreshing because when I first open the dropdown, it has specfic data. When the Array Collection gets updated and I open the dropdown again, I see the old data in the dropdown, yet it doesn't exist anymore.

So let's say I have a ComboBox that has a datasource of an array collection of one state code and it's state name. Their is a labelFunction that puts a dash in between the state code and the state name. Their is no prompt, so the ComboBox would look like GA - Georgia and when you open the dropdown, that would be all that is there. I want that item to be selected automatically. why the old data shows up when opening the dropdown after the array collection was updated with new data?

<mx:ComboBox labelFunction="getFormattedNpaNxxCollectionList()"
dataProvider="arrayColl" change="doSomething()"/>
public function getFormattedNpaNxxCollectionList(item:Object):String
{
return StringUtil.substitute("{0} - {1}", item.stateCode, item.stateName);
}

View 1 Replies

Flex :: Data Binding - Update Multiple Bindable Properties In Specific Order?

Apr 20, 2011

I have a situation where I need to update a DropDownList's dataProvider and selectedItem in a specific order. See the following code ...

<s:DropDownList id="dropDownList"
dataProvider="{someDataProvider}"
selectedItem="{someSelectedItem}" />

In my case, some user interaction produces new values for the bindable variables "someDataProvider", and "someSelectedItem". However, when flex renders the DropDownList, the control's selected value is empty.

The reason for this is that the DropDownList's "selectedItem" property gets bound before the "dataProvider" property. The "dataProvider" needs to be bound first for "selectedItem" to be valid, this is because the new "selectedItem" points into the new "dataProvider".

what is the best practice for updating bindable properties in a specific order? I've come up with a few ways (e.g. using a valueCommit handler), but I wanted to see what the community had to say.

View 2 Replies

Flex :: Data Binding To A [Bindable] Property Of A Variable (unable To Detect Warning)?

Apr 1, 2012

I have the following code:

<fx:Script>
<![CDATA[
import shared.GlobalsManager;

[code].....

View 1 Replies

Flex :: First Value Should Be Selected When Loading The Data In ComboBox?

Aug 27, 2010

I had a comboBox and loading the datadynamically from the server. i need to display the first value in comboBox as a selected value and based on the value data should be populated on the grid.

View 2 Replies

Flex :: Data Binding - ComboBox And XML List

Mar 19, 2011

I have a bit of a problem (since I'm not used to binding with AS3), the thing is that I want to do this kind of data binding:

<mx:Application xmlns:mx="[URL]"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
[Code] .....

But the ComboBoxes are being created dynamically with AS3, everything is working except I cant bind the second ComboBox dataProvider to be the XMLList in the first ComboBox's selectedItem.

View 3 Replies

Actionscript 3 :: Bindable Getter Function Of Singleton Instance Never Being Called In A Data Binding Expression

Oct 26, 2011

I have a singleton class that looks something roughly like this (only with more bindable public properties):

public class Session extends EventDispatcher
{
private var _Id:String;
private static const _instance:Session = new Session( SingletonLock );
private static const SESSID_CHANGED:String = 'SessionIdChanged';

[Code]...

The abnormal behavior I'm discovering is that the event listeners registered through registerOnSessionChange are indeed being called when the session Id changes, but the MXML data binding expression is not updating. I've tried all combinations of dispatching the event during the capture phase, and making it not cancelable, but to no avail. My understanding of [Bindable (event= ...)] is that the MXML should update the url string when the event specified is dispatched, so what am I doing wrong or misunderstanding?

Note: I realize there are lots of different ways of doing the singleton pattern in Actionscript, but unless the way I am doing it is actually causing my problem somehow,

View 2 Replies

Flex :: Data Binding - How To Adjust ComboBox Width

Sep 15, 2009

In Flex 3, I've created a ComboBox within an MXML component similar to the following:

<mx:ComboBox id="comboBox" dataProvider="{_choices}" />
<mx:Script> <![CDATA[
import mx.collections.ArrayCollection;
// etc...
public function get choices():ArrayCollection { return _choices; }
[Code] .....

In the parent MXML application, I'm modifying the contents of the choices property:
myComponentId.choices.removeAll();
myComponentId.choices.addItem({data: "NY", label: "New York"});
myComponentId.choices.addItem({data: "CA", label: "California"});
// etc...

The binding is working in that the ComboBox is automatically picking up the new contents added at runtime, however it is not adjusting its width. The initial width of the ComboBox is wide enough only to show the initial item "All" declared in the component. However, I want and would have expected the ComboBox to re-size automatically during binding to be able to show "California", but it isn't. How can I get the ComboBox to update its width after I have added new wider labels to its dataProvider?

View 4 Replies

Flex :: Access Data Of A ComboBox With An ArrayCollection DataProvider?

Nov 10, 2009

[code]...

Here am getting array of groups(groupName,GroupID each row ) from a RemoteObject and displaying in a ComboBox. I am selecting the groups with selectedIndex as 0,1,2,3, but I want my groupIDs of correspoding groupnames,which am bringing to client side.

How can I get actual the groupId of the selected group?

View 1 Replies

Javascript :: Flex - Populate Combobox With ArrayCollection With Data

Mar 7, 2012

I am developing a panel in Photoshop with Flex and Extendscript. I am pretty close to getting this to work, but with my Flex skills I am having a little issue with the Array I am pulling in from the jsx file. The array is displayed fine in the alert box, but somewhere between my split and creating new collection something is wrong.

Here is my Flex

protected function loadData():void {
var grabFolderNames:SyncRequestResult = CSXSInterface.instance.evalScript("labNames");
var list:String = grabFolderNames.data;

[Code]....

View 2 Replies

Flex :: Which Event Is Fired After The Data Is Loaded Into Datagrid Or Combobox

Feb 26, 2011

Which event is fired after the data is loaded into datagrid or combobox ? (Assuming the dataprovider is set to the datagrid).

View 1 Replies

Actionscript 3 :: Flex : Access The Implicit Event Dispatcher Of A Bindable Flex Object?

Mar 4, 2010

If I create an object like so:

class Foo {
[Bindable] public var property: String;
}

The class Foo has an implicit event dispatcher to handle property change events. How can I access that without making Foo explicitly extend EventDispatcher?

View 1 Replies

Flex :: 3 - Flex: Affecting Function Result On Bindable Boolean Not Generating Databinding Event

Mar 14, 2011

I have a small question. I am probably misunderstanding something, but when I do :

[Code]....

View 1 Replies

Flex :: Watching A Bindable Property?

Sep 8, 2009

In my flex app I have a public bindable property.I want it so that every time the value of that property changes, a function gets triggered. I tried using ChangeWatchers, but it seems those only apply to built-in components like a text box change.i would like to do that same behavior with a property that changes at runtime.

View 4 Replies

Flex :: Make A Property Bindable?

Dec 1, 2009

I have a class like this. Property "isPag" is based on filed "ecboardid", I found that when ecboardid is changed, UI controls seem not be able to detect that "isPag" is also changed. So, how to make a property like this bindable?[code]...

View 3 Replies

Flex :: Make A Wrapped Property Bindable?

May 20, 2011

I have Class1 with a read-only bindable property called age:

public class Class1 {
private var _age:int;
[Bindable(event="ageChanged"]

[Code]....

Of course the [Bindable] tag there doesn't make sense. But how can I achieve the same effect?

I believe I can dispatch some sort of ageChanged event from Class2 up to Class1 and then have an event handler in Class1 dispatch another local ageChanged event to which I bind Class2's age property.

View 2 Replies

Flex :: ChangeWatcher On A [Bindable] Variable Not Working?

May 26, 2011

I have a Number variable, named isConflict, whose value is passed in from a parent. I would like to put a ChangeWatcher on this item so that a function named changeBGColor will run whenever the value is changed. Within my creationComplete function of init, i have the following:

var isConflictWatch:ChangeWatcher = BindingUtils.bindSetter(changeBGColor, this, "isConflictChain");

View 1 Replies

Flash :: ActionScript 3 Bindable MetaData Tag Without Flex?

May 31, 2011

I am just just curious as to whether the [Bindable] metadata tag in ActionScript 3 can only be used within the Flex framework, or can it be used in "regular" ActionScript projects where Flex isn't used?

View 1 Replies

Make An MXML Variable Bindable In Flex 3?

Jun 14, 2011

Is it possible to use the Bindable compiler setting when using mxml?

I've got a string that I want to make bindable:

<mx:String id="myString">My Text</mx:String>

I could make it bindable in Actionscript, like this:

[Code]...

But it threw a lot of warnings-- other classes were already marked bindable in my App.

View 1 Replies

Python :: Ways To Implement Flex [Bindable] In Other Languages

Sep 5, 2010

ActionScript allows you to mark a variable as [Bindable], causing any changes to that variable to have immediate effect all over your application.How would you implement this feature in your favourite programming language?

View 1 Replies

Flex :: [Bindable] Metadata Tag Instantiate An Object By Default?

May 27, 2011

I'm studying a demo code and it seems to me that an instance of a class is never instantiated, in particular I have this line:

[Code]....

View 1 Replies

Actionscript 3 :: Bindable Property Change Event In Flex?

Sep 20, 2011

I've got a component called Box.as that has following two properties, and have their getters & setters defined:

private var _busy:Boolean;
private var _errorMessage:String;

In MXML that uses this component I define it like this:

<components:Box skinClass="skins.components.BoxSkin"
busy="{presenter.boxBusy}"
errorMessage="{presenter.boxErrorMessage}"/>

Where presenter variable is defined here in MXML and a Presenter class has boxBusy and boxErrorMessage variables defined as bindable property change events:

[Bindable(event="propertyChange")]
function get boxBusy():Boolean;
function set boxBusy(value:Boolean):void;

[Code]....

PROBLEM is that whenever I change boxErrorMessage for the presenter, I see the affect in MXML but nothing happens at all when I change boxBusy. Is there something extra I need to do with boolean variable?

View 1 Replies

Flex :: Flash Builder 'Access Of Undefined Property Bindable'

Jun 2, 2011

I have inherited an Adobe AIR application, and am attempting to debug it through Flash Builder 4.5. Within Flash Builder, when I look at one of the MXML files, I see warnings for each use of the [Bindable] tag:[code]And there are no missing semi-colons on the lines preceding each warning as per the suggestion in this blog post.The project is configured to use Flex SDK 3.6.Additionally the file will not load in the designer, with this warning:Design mode: Error during component layout. Choose Design > Refresh to refresh design mode.At runtime I am seeing a blank window - which I assume is the result of the bindings not being triggered. Is this tag not available in Flex SDK 3.6?

View 1 Replies

Flex :: Setting A Custom ItemRenderer In A ComboBox On Specific List Items After Combobox Creation?

Nov 8, 2010

I'm trying to set a specific list item in a mx combobox to have a custom item renderer, the problem is that I cannot do this via mxml, it needs to be done via actionscript at a later stage, eg: combobox gets created, combobox gets populated, user does other tasks, combobox needs to set one or more items in the combobox to have icons (via item renderer)..

I can do this via the onChange event, but it only applies the icon when the combobox is opened and there is a slight delay so you can see the icon being added.

View 1 Replies

Validate Combobox In Flex Before Save Has To Select Some Item In A Combobox?

Mar 16, 2011

How can I validate there's a selected item in a ComboBox before saving? If there's no selected item, how can I set focus on the ComboBox?

View 2 Replies

ActionScript 3.0 :: Updating External Data Every Second?

Sep 10, 2009

if I'm loading external data I'd just use an XML file and load it once. In this situation, the external data will be updated very periodically, and I'd like for the Flash app to grab the most recent data either on the update of the external data, or if that's not possible, every second or so.

View 4 Replies

Data Integration :: Updating And XML File Through Flash?

Dec 11, 2006

I have an interface with two textfields and a combobox or a list. I want a user to be able to select a subject in the combobox and to input information in the two text fields. Once the user hits the send button, I want the input information appended to an existing XML file. Depending on the selction in the dropdown menu it should be appended to a specific node in the XML.

View 2 Replies

Data Integration :: Updating Flash From A Dynamically Changing XML File?

Dec 4, 2006

Creating a non-interactive status display: I want to have theflash display reflect data in a server-based XML-file. So far thisis easy. But I want the display to change everytime the XML filechanges-- in order to reflect status changes. I've used anXMLConnector and specified it and the trigger in the first frame.The Flash code catches and shows the XML values initially . Butwhen I edit the XML file, the new values are never picked up byFlash- its almost as though the values are cached. How do I getFlash to regularly be updated from a changing XML file? I've alsotried putting the trigger in a loop- but that doesn't workeither.

View 8 Replies

Flex :: Unable To Bind The SelectedIndex Of A DropDownList To The SelectedIndex Member Of A Bindable Class

Feb 8, 2012

I am unable to bind the selectedIndex public property of a spark DropDownList to it's original source in the view's presentation model.

For the purposes of replicating this issue with as few lines as possible I have two views, and one presentation model. The code follows.

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

[code]...

Debugging the application I find that selectedIndex in the presentation model always remains at the default value assigned regardless of which item I selected from the DropDownList. For the sample code above this is -1.How can I bind the selectedIndex in the presentation model such that it is updated appropriately when the selected item DropDownList changes?

View 1 Replies

Flex :: Bindable - Error "1195: Attempted Access Of Inaccessible Method IsShowingPower Through A Reference With Static Type Components"

Jul 8, 2010

I have a class called which is called ChartInfo,and it has a getter and setter methods as:

[Code]....

It will always give error like: 1195: Attempted access of inaccessible method isShowingPower through a reference with static type components.charting:ChartInfo.

View 2 Replies







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