Flex :: Populate Combo Box With Xml Data?
Apr 3, 2012
here is the xml data :
<root>
<recommendedMaterials>
<value label="Aluminium" data="0" />
[Code].....
The problem is that the whole xml gets populated. I just want the labels. :(
View 1 Replies
Similar Posts:
Dec 21, 2005
I have two combo boxes. The first combo box's data is added through an XMLConnector object, the second combo box, I would like to populate through an on (change) event in the first combo box. The items in the second combo box would relate to the selection made in the first combo box.
I have attempted the following within the Actions for the first combo box:
on(change) {
switch(this.value) {
case "value1":
comboBox2.addItem({Label:"Label",Data:"Data"});
break;
} // end switch
} // end event
which is not working.
should an event be dispatched by comboBox1 and a listener be attached to comboBox2? I can't find any examples of this on the internet.. but i might be using the wrong search terms.
View 6 Replies
Dec 28, 2009
I have to populate an Advanced Data Grid which have the following fields: Continent->State->Society-->Actual Value-->Estimate Value I want to simulate a financial market so i have to change some of the values by asynchronous request from an HTTPService; If necessary i'll post the .as file, but it is generated automatically by Flex Builder.
Here's the code of the client side Flex/Air application:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
[Code].....
View 2 Replies
Oct 21, 2011
Suppose a text file contains the following data each separated by a line
Apple
Mango
Orange
Banana
Papaya
How do I read the text file in flash and then display it in a combo box in flash ?
View 1 Replies
Apr 6, 2010
Let's say I had an ArrayCollection like this:
public var ac:ArrayCollection= new ArrayCollection([
{item:"dog", group:"Animals"},
{item:"orange", group:"Fruits"},
[Code]....
How would I create a Tree component in Flex 3 that uses the groups as nodes, with the appropriate items listed under each node?
View 2 Replies
Nov 24, 2010
i use combo box to display a list of items. The box'x length is smaller whereas the items length is large. So if i mouse over it i need to display the whole item as a data tip
View 2 Replies
Jan 6, 2010
In Flex, how do I create a summary(say total of various domains) from the data provider and display in chart? Say this is my dataprovider.. I want to display the total estimate of each territory as a slice in piechart
private var dpFlat:ArrayCollection = new ArrayCollection([
{Region:"Southwest", Territory:"Arizona",
Territory_Rep:"Barbara Jennings", Actual:38865, Estimate:40000}, [code].....
View 1 Replies
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
Mar 8, 2012
i am trying to put data in to combo box from php page using http service .there are 2 data records in the php page but instead of displaying data it displays [object object] [object object] in the combo box list
here is the mxml code
@namespace s
"library://ns.adobe.com/flex/spark"; @namespace mx
"library://ns.adobe.com/flex/mx";
[Code]....
View 1 Replies
Apr 14, 2009
I m trying to populate a text field (modelT) with the text corisponding to the "data" part of the selectedItem in the combo box. The "data" shows up correctly when i use:
modelT.text = event.target.selectedItem.data;
But i'm trying to call it with a "if" statement (in red) so later on i can dynamically populate the text field from multiple combo box's. am i missing something simple, here is my code:
import fl.controls.ComboBox;import fl.data.DataProvider;import fl.managers.StyleManager;
var cPurpose:Array = [code]..........
View 5 Replies
Mar 16, 2010
I need to pass items through script. or taking from xml
View 1 Replies
Aug 6, 2006
I am going nuts with this combo box! I have a flash form with 3 textboxes a combo box, and a submit button. When I hit submit, I post to an aspx page. My 3 textboxes are inserting into my db fine, but I have not been able to retrieve the value of the combo box.I have a change handler on the combo box called "comboDropDown". I have 3 labels, and no data. In the ActionScript for my submit button I have:
on (release) {
function comboDropDown()
{
var vchUser1 = comboBox.selectedItem;[code]............
View 3 Replies
Aug 19, 2011
My XML looks as follows [code]In my folder I have the XML as shown. There are 6 images in the folder and the names are given as urls. I have a combo box on stage. Its name myCB. There is an image holder imgHolder_mc.I have two tasks.Populate the combo box with the imageNames.Based on the imageName selected the image in the image holder must change. The image must be retrieved using the image url.[code]how I can bind this to my combo box and select images according to the selection I made in combo box.
View 1 Replies
Feb 27, 2007
I would like to be able to dynamically populate a dynamictext field (assuming that's the best component to use) with anarray of data from PHP.I have attached my PHP code and my Flash Code.The PHP code is working fine and generating the array.The first part of the AS code is working as I can see thepop-up window with the PHP array in it. However, I can't figure outhow to get the array to display in the dynamic text box.I have created a dynamic text box in flash with nothing inthe 'instance name' box and 'events' in the var box.
View 1 Replies
Jan 21, 2011
i've searched for several hours, and didn't find an answer for my problem. i'm trying to place comboboxes in a datagrid filled with DYNAMIC data. (the number and the content of these comboboxes always change. i don't know in advance how many columns there are, where i need to use comboboxes. so every single combobox gets a unique dataprovider, which comes from an external source, WHEN the program runs.)
-i found MANY threads discussing this problem, but solving via crappy mxml files, filling the comboboxes inside the sourcecode by hand. i want to point out, that isn't good for me.
-i found a better solution, in which they used some sort of custom itemrenderer to get the data from the internet. (kind of a country chooser thing) but sadly that wasn't good enough, because the number and name of the countries in the world are static more or less, they don't change. so their renderer class didn't depend on any parameters from the main algorithm.
but in my program i calculate the data in my own actionscript objects, then fill an arraylist with that. so at the beginning i load the desired data from the net, and when i get the response of the urlrequest, AFTER that i start to populate the datagrid/combobox.
i can fill any datagrid or combobox without trouble, but to put that combobox inside a datagrid cell seems to be impossible.it drives me crazy. i managed to do this in several languages before, c#, java, even php+html, but in flex it looks way too complicated then it should be.
[Code]...
View 2 Replies
Mar 24, 2007
I'm in the process of expanding an admin area for a website (coded with PHP and MySQL) and would like to get my client list into a flash combo box. the main columns I would need would be the account and the company name... In a regular example would be
<select name='client'>
<option value='2460'>Client 1</option>
<option value='2461'>Client 2</option>
</select>
If I could get this I should be away...
View 2 Replies
Feb 23, 2007
ive managed to get info from a mysql database into flash in a combo box. i have a text field and i want it to load in the corresponding data when a new title is selected in the combo box.
View 1 Replies
Jan 23, 2007
I would like load values from mySQL to select from in a combobox. I would love to do this the most simple way w/o php, but that
View 3 Replies
Oct 15, 2009
I use several controls with combo boxes and data grids, which I fill using a HTTPService which returns some XML. However in the XML there are some telephone numbers starting with a plus sign (ie. +123456). However in the combo boxes and the data grids the plus sign doesn't show (so it would display as 12345646).
It doesn't matter if I use CDATA or not. When I change the value I saw the following:
[Code]...
View 3 Replies
Jul 13, 2004
I'm trying to insert some data into my DB from two Combo Boxes in Flash. I'm not quite sure how to go about it. I have no idea how to give the combo box a 'var' value like we do for a regular textfield. I have other pages where I have regular text fields that work fine as I can specify the 'var' value in the properties but not for combo boxes. I'm new to actionscript so please bear with me.
Action Script for my button:
Code:
on (press) {
loadVariablesNum
("http://localhost/Test/acadForm.asp",0, "post");
[code]....
View 1 Replies
Mar 23, 2009
I have a combobox and when selected i would like to show the data in an input text box. The text box appears on another frame and i was advised to make the combo box invisible after i used it and retain its presence on the timeline. I thought i would be able to duplicate the combobox i needed and place it on the frame with the input text box, but this didnt work, neither did duplicating the actions. Been trying for the last couple of hours and have hit a brick wall, hoping someone can point me in the general direction.
View 1 Replies
Mar 20, 2012
Im a bit of a novice with flash and have become stuck while trying to achieve what should be a simple task. I am trying to read in XML data and display the lables in a combo box and then display the corresponding data in a text field below. So that when for example "Vintage Red Wine" is selected in the combo box, the description for that wine will then be shown in the textfield below.Most of the code is functional. The combo box displays the information i want. The only thing that doesnt want to work is the text field which should show the wine decriptions.
Here is my XML data:
<?xml version="1.0" encoding="utf-8"?>
<Wines>
[code].....
View 3 Replies
Mar 10, 2011
It might be something simple I'm doing wrong.I have an array populated by XML in a function by doing the following inside the function:
first_special.addItem({label: xmlMenuFile.item.headers[i],data:
xmlMenuFile.item.descriptions[i],data2: xmlMenuFile.item.hints[i]});
The problem I'm having is trying to figure out a way so that the "data2" will fill the text field "hint_txt" on ROLL_OVER of that items name in the list.I've tried to placing an event listener into the function that populates the combo box .this populates the combo box label and data with the Loaded XML File. This works
function changeHandler(ev:Event):void
{
menuText_mc.heading1_txt.text = ev.currentTarget.selectedItem.label;[code]......
View 3 Replies
Sep 8, 2009
I'm trying to setup a DataGrid that contains a column of combo boxes. The values of the combo boxes are defined by data specific to that row. I cannot get this to work though, I'm asking for a solution to this, either fixing what I have below or a recommendation on a different way.One of the columns of my DataGrid has an object derived from a ComboBox for an ItemEditor. The itemEditor is set like this:
<mx:DataGridColumn editorDataField="selectedItem" dataField="type" editable="true" >
<mx:itemEditor>
<mx:Component>
[code].....
View 1 Replies
Jul 11, 2009
I am getting return type as array from PHP. When I populate in my datagrid, the values are not coming...
var appSes:Array = event.result as Array
dg.dataProvider = appSes;
I am getting the values, from PHP is there anything other than this i have to do.
<local:CheckBoxDataGrid id="dg"
allowMultipleSelection="true" x="118" y="142" width="507">
<local:columns>
<mx:DataGridColumn dataField="firstName" headerText=" " width="20" sortable="false" itemRenderer="CheckBoxRenderer" >
[Code] .....
View 1 Replies
Nov 11, 2009
I want to load data from a external XML file, using a HTTPService, and on the ResultEvent of the same HTTPService i want him to populate a ArrayCollection with the data from the XML.
I think a ArrayCollection is the ideal for this XML.
XML
<?xml version="1.0" encoding="utf-8"?>
<PhotoGalleryData>
<Photo>
[Code].....
View 2 Replies
Jan 17, 2010
I'm just starting to learn flex and AS3I'm trying to get information into a datagrid that originates from a mathmatical formula. For example if I have 100 and I subtract 5 from it and continue to do so until it reaches 0 so my grid would be something like:
100 | -5
95 | -5
90 | -5
[code].....
View 1 Replies
Aug 11, 2010
I use this arrayCollection to populate a Flex 3 Datagrid. I'd also like to use this arrayCollection to populate a comboBox with the Name node.
In the arrayCollection, I've got the Name listed twice. I've got two rows in the Datagrid.
If I set the ComboBox's labelfield to Name, then the Name will be listed twice in the ComboBox menu. Is there a way to use this arrayCollection and have each Name listed only once in the comboBox?
I can always make another loop and array collection for the Name, but I was wondering if there were a better way.
var i:uint;
for (i=0; i<myArray.length; i++){
myDGArray = [
[Code]....
View 1 Replies
Mar 8, 2011
I have a remote object returned and I am trying to populate it into combobox.
<s:RemoteObject id="ro" result="result(event)" destination="echoServiceDestination">
private var statesData:ArrayCollection;
[Code]....
View 1 Replies
Aug 28, 2010
I'm developing a Flex application and am having some trouble working with asynchronous calls. This is what I would like to be able do:
[Bindable] var fooTypes : ArrayCollection();
for each (var fooType : FooType in getFooTypes()) {
fooType.fooCount = getFooCountForType(fooType);[code]....
The issue I'm running into is that both getFooTypes and getFooCountForType are asynchronous calls to a web service. I understand how to populate fooTypes by setting a Responder and using ResultEvent, but how can I call another service using the result?
View 1 Replies