ArrayCollection As A dataProvider
I am loading an external XML file into an ArrayCollection,
then Binding a comboBox to that
<BooksOfTheBible>
<BookNumber>1</BookNumber>
<Abbreviation>Gen.</Abbreviation>
<BookName>Genesis</BookName>
</BooksOfTheBible>
<BooksOfTheBible>
<BookNumber>2</BookNumber>
<Abbreviation>Ex.</Abbreviation>
<BookName>Exodus</BookName>
</BooksOfTheBible>
<BooksOfTheBible>
<BookNumber>3</BookNumber>
<Abbreviation>Lev.</Abbreviation>
<BookName>Leviticus</BookName>
</BooksOfTheBible>
<BooksOfTheBible>
<mx:ComboBox rowCount="30" id="bookOfTheBible"
dataProvider="{bibleBooks}" labelField="BookName" />
The combo box fills fine with the BookName, but when an item
is selected, I would like to retreive the book number from the
ArrayCollection.
Is that possible? I have been looking through the help but I
have not yet found a way.
Thanks
Mathias
ArrayCollections created from XML will be collections of
Object instances. Object is a dynamic type, so the names of your
elements will be added (at runtime) to the Object instance.
You can access them like any other object property... i.e.
<mx:Label text="BookNumber:
{bookOfTheBible.selectedItem.BookNumber}" />
- or -
<mx:Label text="BookNumber:
{bookOfTheBible.selectedItem.['BookNumber']" />
Similar Messages
-
Access an object in a arraycollection set as dataprovider
Hi,
I'm having trouble accessing an object, which is inside an
arraycollection and that arraycollection is bound to a datagrid
dataprovider.
One item in the arraycollection looks like this for example:
(string) value1="foo"
(string) value2="bar"
(object) myobject=I am looking for a way to access an object in a bean
and make available to the page.
for example if i have a Bean called User and it
contains an attribute Called Company as an attribute
in User. Now I have User.getCompany(). and I can do
this
<%User user = request.getUser();
Company company = user.getCompany();
request.setAttribute("comp", company); %>
how do I do this with useBean ?You can access a JavaBean Object property of another JavaBean inside the JSP with the use of EL (Expression Language)
So if you are using JSP 2.0 or higher try this:
<jsp:useBean id="user" class="your.package.User" scope="request"/>
${user.company.id}I tested the above and it works.
Note that you need to set the Company object in the User object before trying to access it inside the JSP.
You can also set it in the JSP if you want, (before trying to access it), but its cleaner to do it in a Servlet.
Both User and Company must follow JavaBeans notation.
So in the above case the User object is something like this:
package your.package;
public class User{
private Customer customer;
public User(){}
public Customer getCustomer(){
return customer;
public void setCustomer(Customer customer){
this.customer = customer;
}And your Customer JavaBean is something like this:
package your.package;
public class Customer{
private int id;
public Customer(){}
public int getId(){
return this.id;
public void setId(int id){
this.id = id;
} -
Strange Behaviour on DataGrid with ArrayCollection as DataProvider
I have a Datagrid with an ArrayCollection as DataProvider, the arrayCollection is partially generated by a remoteObject call, the dataprovider seems to works at least until I try to edit the field...
By the RemoteObject I only receive an ArrayCollection with the field `ip`, but the datagrid looks for the fields ip, check and save...
If I add/edit this new field it works, but only under particular condition
The DataGrid:
<s:DataGrid id="datagrid" left="10" right="10" top="136"
dataProvider="{listaIPCheck}" bottom="10" requestedRowCount="4">
<s:columns>
<s:ArrayList>
<s:GridColumn dataField="ip" headerText="Asset"/>
<s:GridColumn dataField="check" headerText="Inventory"/>
<s:GridColumn dataField="save" headerText="Salvataggio"/>
</s:ArrayList>
</s:columns>
</s:DataGrid>
The Script:
[Bindable]private var listaIPCheck:ArrayCollection;
private function ro_resultHandler(event:Event=null):void
listaIPCheck = new ArrayCollection();
listaIPCheck = ro.getListUpdate.lastResult;
heap = 0;
// Read Below {POINT #1}
init3();
private function init3():void
// Read Below {POINT #2}
if (heap<listaIPCheck.length)
// omitted the initialization of the process p
p.addEventListener(NativeProcessExitEvent.EXIT, onExit);
try{
p.start(startupInfo);
}catch(e:Error){}
private function onExit(e:NativeProcessExitEvent):void {
// Read below {POINT #3}
Here is my code, now as you can see there are 3 line where I wrote to read below...
Let's assume to put this simple `for` instead of the commented line (once at a time)
for (var k:Number=0;k<listaIPCheck.length;k++)
listaIPCheck.getItemAt(k).check = "checkVal";
listaIPCheck.getItemAt(k).save = "saveVal";
This code always work in the 3 points, so at the end of the call the ArrayCollection is always filled with the new values, but the datagrid refresh the items only in POINT #1 and POINT #2
Why not in Point #3???Thank you Amy, but adding the properties in the server side did not work...
The workflow of the program is that:
1) I get the ArrayCollection (listaIPCheck) contatining some information (function ro_resultHandler)
2) I start an external process and grab the output data (function init3)
3) read and use the data from the process (function onExit)
Now the problem I have is regarding the refresh of the datagrid, this datagrid has the ArrayCollection (listaIPCheck) as DataProvider.
So:
- If I put the for loop instead of the comments ( // Read Below {POINT #1} ) or
( // Read Below {POINT #2} ) it works, the ArrayCollection is updated and the datagrid is refreshed
- Whereas if I put the for loop instead of ( // Read Below {POINT #3} ) , it won't work.. or at least, the ArrayCollection is correctly updated, but the datagrid is not refreshed at all and I have to use .refresh() -
ArrayCollection for dataProvider
Hello every one,
I'm a new french user here, so please be gentle :)
My problem is that i'm trying to get a good arraycollection
from my xml entirely in as3.
I've already created my advancedDataGrid, put columns on it,
I've also tried to put direct data on it and it works like
that:
var colDatas:ArrayCollection = new ArrayCollection(
[{COL1:"test",COL2:"toust"}]);
but my problem is that i don't understand how to get a
correct arrayCollection dynamicaly from my xml.
here is my XML:
?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DONNEES>
<WS COL1="CL" COL2="********" COL3="GENERAL" COL4="BOULOC"
COL5="31620" COL6="FRANCE" COL7="11" COL8="22" COL9="CONTACT"
COL10="A" srowid="" srecid="279" ligne="1" />
<WS COL1="AF" COL2="ABODINO33" COL3="ABODINO33" COL4="4
CHEMINS (LES)" COL5="12500" COL6="FRANCE" COL7="101" COL8="102"
COL9="888" COL10="A" srowid="" srecid="345" ligne="2" />
<WS COL1="CL" COL2="ALAIN66" COL3="ALAIN" COL4="PERPIGNAN"
COL5="66000" COL6="FRANCE" COL7="" COL8="" COL9="" COL10="A"
srowid="" srecid="428" ligne="3" />
<WS COL1="CL" COL2="BONNY31" COL3="BONNY" COL4="TOULOUSE"
COL5="31000" COL6="FRANCE" COL7="" COL8="" COL9="" COL10="A"
srowid="" srecid="426" ligne="4" />
</DONNEES>
and here is the code i wrote and which does'nt work:
public function modifDataList(pEvt:Event):void{
var dataXml:XML = new XML(pEvt.target.data);
var resultArray:Array = new Array();
var nbColumnsData:Number = dataXml.WS.length();
for(var j:Number = 0;j<nbColumnsData;j++){
var obj:Object = new Object();
var attribNb:Number = dataXml.WS[j].attributes().length();
for(var k:Number = 0;k<attribNb;k++){
obj[k]=dataXml.WS[k].attributes();
trace(obj[k]);
resultArray.push(obj);
var colDatas:ArrayCollection = new
ArrayCollection(resultArray);
advDataGrid.dataProvider= colDatas;
my goal is to make it dynamic because i don't receive the
same number of attributes with all xmls.
If you have any suggestion...
thank you all.Theory looks good. Where is it failing?
Tracy -
Help needed in converting ArrayList to ArrayCollection
I am converting an ArrayList (Java) to ArrayCollection of Flex .
Please help me in this , i dont know whether this is correct approach or not
I have a Created a User VO ActionScript class on flex with two properties as uname , pass .
[Bindable]
var result:ArrayCollection
private function displayDetails(event:ResultEvent):void
result = event.result as ArrayCollection;
<mx:DataGrid dataProvider="{result}">
<mx:columns>
<mx:DataGridColumn headerText="UserName" dataField="uname"/>
<mx:DataGridColumn headerText="Password" dataField="pass"/>
</mx:columns>
</mx:DataGrid>
This is from my Java DAO File :
ResultSet rs = stmt.executeQuery("select NAME , PASS from Users");
list = new ArrayList();
while (rs.next()) {
User user = new User();
user.setUname(rs.getString(1));
user.setPass(rs.getString(2));
list.add(user);
return list;
With the below code ,the displayed DataGrid is empty with no data , please help me where i am doung wrong
Do i need to do anything more ?? The data is coming well on to the lcds server console .
Please help .Hi Kiran,
Debugging solves most of the problems that you encounter ......you need to use a lot of debuggung so that you will come to know exactly what's
happening indeed...
So just put a break point at your displayDetails(event:ResultEvent):void function and try to watch the event variable and check the event.result
What is the datatype of the event.result ...Are you getting any data or is it null..???
Please make these observations and let me know...
Thanks,
Bhasker -
Hi All,
I've got a Spark DropDownList (I'm on Flex SDK 4.0, Flash Builder 4).
That DropDownList has an ArrayCollection as its dataProvider property, and in response to user gestures, I change the filterFunction on the ArrayCollection (and call ArrayCollection.refresh()) to update the list of items in the DropDownList. This works fine.
However, what I wasn't expecting was that neither my change event handler, nor my valueCommit event handler gets called when the selected item in the DropDownList changes due to the filterFunction filtering out items from the ArrayCollection.
In other words, let's say I have items A, B, and C in ArrayCollection (and thus, also as items in my DropDownList). Item A is currently selected, but I then set the ArrayCollection.filterFunction to something, and call ArrayCollection.refresh(). Items A and B are filtered out by the filterFunction, and it disappears from the DropDownList, causing item C (the next available item after A and B) to be selected. But, even though the selected item has changed, neither my change handler nor my valueCommit handler get called.
I know the handlers are working, because the change handler gets called when the user selects a new item from the DropDownList, and the valueCommit handler gets called when the selectedIndex is changed programmatically in code, as expected.
Is this a known issue? Is there an event I can listen to so I can know when the selected item has changed in this circumstance?
-JoshI'm not on a beta. I'll try post a short test case as soon as I am able, but I'm in the final week before a major project deadline and as a result I've got to stay pretty focused on that :-)
-
Updating the dataprovider of a datagrid
I have a datagrid with an arraycollection as the
dataprovider.In one of the columns there is a combobox used as the
itemeditor.I want the user to select values from the combobox and
when a submit button is clicked the datagrid dataprovider needs to
be updated.
Once the submit is pressed,he should not be able to change
the values using any of the comboboxes where he has already
selected some values.The only way I can see to do that would be to have the
database default to null values in all the columns, and then check
for that with your edit handler. We use managed collections at
work, which means a second collection would be required; one to
store the temporarily selected values, the other to stay connected
to the data in the dataBase. Edit the temporary collection, and
then when the Submit button is clicked, copy the temporary
collection over to the one linked collection. Maybe one of the more
experienced users on here has another solution? I don't know.
This is the kind of event handler I am talking about,
BTW: -
How to refresh mx:List when the data in dataProvider is changed
I have a mx:List that uses an ArrayCollection as a dataProvider. The ArrayCollection contains many Object, something like:
var o:Object = new Object();
o.label = "Apple";
o.price = "$1.00";
var o:Object = new Object();
o.label = "Kiwi";
o.price = "$0.20";
Now the dataProvider (ArrayCollection) is updated outside the mx:List, not through the itemEditor. I want the mx:List to show the changes in the
dataProvider (ArrayCollection), but currently it does not automatically show the changes. I could not find a refresh method in the List or dataProvider
to force the List to reload the data. Any suggestions?Hi John, have you tried arrayCollection.refresh()...where arrayCollection is dataProvider for your List.
Thanks,
Bhasker -
Hi, trying to use ArrayCollection as result container but
cant get it to populate a DataGrid
this is based on example on page 1153/4 of flex2_devguide.pdf
.. usual stuff
<mx:HTTPService id="gameRequest" url="data/gameList.xml"
showBusyCursor="true"/>
<mx:ArrayCollection id="gameArray"
source="gameRequest.lastResult.FMPDSORESULT.ROW"/>
<mx:Button label="getGames" click="gameRequest.send()"
x="722" y="14"/>
<mx:DataGrid x="10" y="104" width="796" height="380"
id="gameList" dataProvider="{gameArray}" >
etc..
- with ArrayUtil conversion also, as in example
<mx:ArrayCollection id="gameArray"
source="{ArrayUtil.toArray(gameRequest.lastResult.FMPDSORESULT.ROW)}"/>
In both case all I is see is the DataGrid filled with the
source value as a string ie
"{ArrayUtil.toArray(gameRequest.lastResult.FMPDSORESULT.ROW)}" then
no update after the send?
Data is ok because ignoring the ArrayCollection thus, loads
the data fine:
<mx:DataGrid x="10" y="104" width="796" height="380"
id="gameList"
dataProvider="{gameRequest.lastResult.FMPDSORESULT.ROW}" >
tried other similar examples for instance page 1142/3, copied
direct with only changes to load my data, with ArrayCollection
nothing, with dataProvider no problem
FYI Mac Flex 2
thanks for any help.Here you go, i just tested this so i know it works. Try doing
your data manipulation in script as its allot easier to tell whats
going on:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:HTTPService id="gameRequest" url="data/gameList.xml"
showBusyCursor="true" result="{parseGames(event)}"/>
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.utils.ArrayUtil;
import mx.collections.ArrayCollection;
private var gameArray:Array; //Stores assets to load //
private function parseGames(event:ResultEvent):void {
gameArray=
mx.utils.ArrayUtil.toArray(event.result.FMPDSORESULT.ROW);
debug.text= "array created!";
gameList.dataProvider= gameArray[0];
debug.text= "data grid populated!";
]]>
</mx:Script>
<mx:Button label="getGames" click="gameRequest.send()"
x="10" y="10"/>
<mx:DataGrid x="10" y="40" width="796" height="380"
id="gameList">
</mx:DataGrid>
<mx:Label x="113" y="14" text="debug" id="debug"/>
</mx:Application> -
Problem in arraycollection?
Hi,
I given an arraycollection as a dataprovider to a datagrid which was with some itemrenderers.
while retrieving the saved data from the grid i am copying some columns like
arraycoll[3]['name'] = 'saome name';
when i am assigning some value to a particular row item in the dataprovider arraycollection,
all the rows are updating with the same name.
for example: if an arraycollection has 3 items like
arrcoll:ArrayCollection = new Arraycollection([
{name:'sample1' id:1},
{name:'sample2' id:1},
{name:'sample3' id:1}
when i want to update the second name i.e.sample2 with sample4 and i assigned that value like
arrcoll[1]['name']='sample4';
all the items are effecting like
{name:'sample4' id:1},
{name:'sample4' id:1},
{name:'sample4' id:1}
So how can i update a single item in an arraycollection.
please provide me the solution
Regards
D.Mahesh BabuHere i am populating an arraycollection with the data which is coming from the database.
In this arraycollection i want to copy some items into the other arraycollection which is a dataprovider
to a datagrid.(I dont want to copy the complete row, but some items in a row)
so when i am copying like
for(var i:int=0;i<arrcoll2.length;i++)
arrcoll[i]['name']=arrcoll2[i]['name'];
So the problem is after the above loop was completed, all the rows in the arrcoll is filled with
the last row items of arrcoll2.
Another problem is in the datagrid i used an itemrenderer of richtexteditor to edit that cell.
so when i edit that cell and save the edited data to the dataprovider like
data[listData.dataField] = 'editedCellData';
all the cells of that column are updated with the same data.
So please provide me the solution. If u want anymore details please reply me soon.
Thanks -
Problem with Checkbox ItemRenderer in a DataGrid
Hello Everyone,
I'm using a datagrid with two columns, which is used as a data entry grid. The first column has a simple text input field and the 2nd column has a checkbox as an itemrenderer. On creationComplete event, I'm passing an arraycollection as the dataprovider for this datagrid. The arraycollection:
<mx:ArrayCollection id="psAC">
<mx:source>
<mx:Array>
<mx:Object PaText="line1" PaCheckbox="0" />
<mx:Object PaText="line2" PaCheckbox="0" />
<mx:Object PaText="line3" PaCheckbox="1" />
<mx:Object PaText="line4" PaCheckbox="0" />
<mx:Object PaText="line5" PaCheckbox="0" />
</mx:Array>
</mx:source>
</mx:ArrayCollection>
There is a datagrid (dGa) in the main application. On click of this, a pop up window comes up which has the same datagrid layout(i.e, 2 columns). And this is where the data is entered. Here, if the user checks the check box, I have assigned a value of '1' for the 2nd column of the arraycollection. THis code(below) works fine.
<datagrid in pop up window>
<mx:DataGridColumn headerText="Best Possible Action?" textAlign="center" width="200" editable="false">
<mx:itemRenderer>
<mx:Component>
<mx:CheckBox>
<mx:Script>
<![CDATA[
override public function set data(value:Object):void{
if(value.PaCheckbox == 1){
this.selected = true;
}else{
this.selected = false;
]]>
</mx:Script>
<!--<mx:change>
<![CDATA[
if(this.selected == true){
data.PaCheckbox = 1;
}else{
data.PaCheckbox = 0;
]]>
</mx:change>-->
</mx:CheckBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
But I would also need to set the PaCheckbox value to 0 or 1, based on teh check condition of the check box. I tried using change event (commented in the code above). But there I get an error: Cannot access a property or method of a null object reference. I checekd in debug mode, there the data object is null! Can you please help me on how to pass back the values(0 o 1) to my arraycollection, based on the checkbox's status?
Cheers,
Deepakheyo,
I solved it.....
i was missing this line of code super.data = value; in the ovverriden function...Once we have this line, the data object will have teh field names and their values in it, which can be accessed on the change event... -
Invoking a service from WAS to Tuxedo via Jolt
Hi..
I need to know how to establish a connection from WAS(websphere Application Server) to Jolt for invoking a service in Tuxedo..
And explain about it a little..
Thanks in advcance..I noticed a couple of other things....
1. A query result is a native data type to Flex, so your CF code does not need to use queryToArray
to cast the query variable to an array variable. Just do this....
<cfset ans.data = outagesRS />
2. Datagrids need to bind to ArrayCollections/Arrays. Your displayed inspection of the DATA element
shows as it being typed Object and not an Arraycollection or Array.
See if making the change above in #1 changes that DATA element inspection to being Arraycollection or Array
and makes it work.
If it still doesn't work, try one of these :
a) I'm not sure if binding to a cast will work, but try binding to the variable cast.....
{ (getOutagesResult.lastResult["DATA"] as ArrayCollection) }
and if that doesn't work...
b) You may need to set a result handler for your service, and then in the result handler set
a local bindable variable. In your script section ....
[Bindable]
private var AC_Outages:ArrayCollection = new ArrayCollection();
set your dataprovider to {AC_Outages}
Then in your result handler ..
AC_Outages = getOutagesResult.lastResult["DATA"] as ArrayCollection;
AC_Outages.refresh(); -
How to make items in a list word wrap as needed and be variable heights
I am trying to build a custom itemrenderer for the List control. The items in the list are variable lengths of text, some of the text items will have different colors determined at runtime base on some criteria (this works fine now with my custom itemrenderer). What I need is for the items to word wrap, and therefore for the list to display items of varying heights. Is this possible to do? All my attempts seem to have failed. If I can't do this with an item renderer any suggestions about how to do this? Thanks very much in advance to any of you gurus who are able to help me.
Trick here is not to specify any height for the renderer so that Flex will determine the height according to the content. Also set the variableRowHeight="true"
Here is a simple example
<mx:ArrayCollection id="dp">
<mx:Array>
<mx:Object label="some very long text"/>
<mx:Object label="some very loooooooooooooooooooooooooooooooooong text"/>
<mx:Object label="some very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text"/>
<mx:Object label="some very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text"/>
<mx:Object label="some very long text"/>
</mx:Array>
</mx:ArrayCollection>
<mx:List dataProvider="{dp}" variableRowHeight="true">
<mx:itemRenderer>
<mx:Component>
<mx:Canvas width="100%">
<mx:Text width="100%" text="{data.label}"/>
</mx:Canvas>
</mx:Component>
</mx:itemRenderer>
</mx:List> -
Call functions in parent(?) from popup window(?)
I'm not sure the terms parent or window in flex 4.
I want to call functions in parent from parent window.
it seems to be hard.
Help me please.
Thanks in advance.
========================== index.mxml ==========================
(root element : <mx:Application> - xmlns:mx="http://www.adobe.com/2006/mxml")
has Main.mxml in it
========================== Main.mxml ==========================
(root element : <s:NavigatorContent> - xmlns:s="library://ns.adobe.com/flex/spark" )
public function functInMain():void
//do something
protected function dataGrid_itemDoubleClickHandler(event:ListEvent):void
var arr:ArrayCollection = event.currentTarget.dataProvider;
var titleWindowInstance:Popup =
Popup(PopUpManager.createPopUp(this,
Popup,
true));
titleWindowInstance.rowData = arr.getItemAt(event.rowIndex);
PopUpManager.centerPopUp(titleWindowInstance);
========================== Popup.mxml ==========================
protected function buttonClickedInpopup():void
Application.application.parentDocument.functInMain(null);//<<- here I want to correctThanks.
Your callback function works ok
why calling public functin won't work?
here are neet examples.
index.mxml : front page
SearchEvents.mxml : inside index.mxml
UpdateEvent.mxml : poped up from SearchEvents.mxml
========index.mxml===========
<?xml version="1.0" encoding="utf-8"?>
<mx:Application pageTitle="CA Management"
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:i="test.*"
width="100%" height="100%" creationComplete="application1_creationCompleteHandler(event)" >
<mx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function application1_creationCompleteHandler(event:FlexEvent):void
myViewstack.selectedIndex = 0;
]]>
</mx:Script>
<mx:ViewStack width="100%" height="100%" id="myViewstack">
<s:NavigatorContent id="EventManagement" label="Event Management"><i:SearchEvents x="0" y="0"/></s:NavigatorContent>
</mx:ViewStack>
</mx:Application>
========SearchEvents.mxml=========
<?xml version="1.0" encoding="utf-8"?>
<s:NavigatorContent xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
x="113" y="163"
height="100%" width="750">
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.events.FlexEvent;
import mx.events.ListEvent;
import mx.managers.PopUpManager;
import mx.rpc.events.ResultEvent;
public function parentFunction(param:String):void{
Alert.show("parent function called with " + param);
protected function btnSearch_clickHandler(event:MouseEvent):void
var titleWindowInstance:UpdateEvent =
UpdateEvent(PopUpManager.createPopUp(this,
UpdateEvent,
true));
PopUpManager.centerPopUp(titleWindowInstance);
]]>
</fx:Script>
<s:Button x="637" y="70" label="Popup" id="btnSearch" click="btnSearch_clickHandler(event)"/>
</s:NavigatorContent>
========UpdateEvent.mxml=====
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:incl="incl.*"
showCloseButton="false"
title="Update Event" width="432" height="500"
xmlns:subscription="services.subscription.*"
xmlns:core="services.core.*"
horizontalAlign="left" xmlns:vo="vo.*"
>
<fx:Script>
<![CDATA[
import mx.core.Application;
protected function parentFunctionCall(event:MouseEvent):void
Application.application.parentFunction("param from popup");
]]>
</fx:Script>
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.controls.dataGridClasses.DataGridColumn;
import mx.core.Application;
import mx.events.FlexEvent;
import mx.formatters.*;
import mx.managers.PopUpManager;
import popup.*;
[Bindable] public var rowData:Object ;//to get the parent row
]]>
</fx:Script>
<s:Button label="parentFunctionCall" id="btnPar" click="parentFunctionCall(event)"/>
</mx:TitleWindow> -
Problem in Autocompletextinput?
Hi
Here I have attatched code for autocompletetextinput.I have download code from net.
It is working fine.Here my problem in I have wriiten code like this
mx:ArrayCollection id="id_array">
<mx:Object label="mahesh" data="babu"/>
<mx:Object label="mahesh1" data="babu1"/>
<mx:Object label="mahesh2" data="babu2"/>
</mx:ArrayCollection>
i have used this arraycollection id as dataprovider to ui:completionInput and i
have used lableField as data.It is not working.
Plz Help me.
Regards
D.Mahesh babuThe Flextras AutoCompleteComboBox is a commercial component. You can register and download the developer edition for free, but that is watermarked.
To remove the watermark you must purchase a license.
More about our licensing options are here:
http://www.flextras.com/?event=LicFAQ
http://www.flextras.com/?event=EULA
I modded the example to use an ActionScript generate ArrayCollection and it works as I would have expected. I suspect your issue is that you are not seeing the drop down, is that correct? The drop down will only show up if there are items in ArrayCollection that match your input string.
Using the data as the input field, if you type you must type s, u, r, e, s, h, or 1 for something to show up. If you type other characters, the data field does not match the filtering criteria. You can create your own filterFunction to modify the way the search behavior works.
I modified the example to use the ActionScript based dataProvider instead of the MXML based dataProvider. Here it is:
http://www.flextras.com/labs/ForMahesh/auto.html
I also added a second instance of our AutoCompleteComboBox, with the "Combo" portions turned on so you can bring up the full list of options if desired.
Modified source is here: http://www.flextras.com/labs/ForMahesh/srcview/index.html
Maybe you are looking for
-
Events and Photos not shown in full album view
In either Events and Photos (under Library) or Albums, when I click on an event or album, it pre-selects a photo (obviously one that I have set as the cover), but NOT the entire collection (as in the past). I used to be able to: 1) See the entire col
-
Hey i have a macbook and I have been playing around using the built in mic so far, but the quality just isnt what i want, I'm rapping and am looking to pick up a cheap microphone no more then 50$ if thats possible, and was wondering what is the best
-
Photoshop Touch crashes after selecting "Wrap" tool for the second time
As title says, when selecting "wrap" tool for the second time, Photoshop Touch crashes. It doesn't matter which images and even after reboot and clearing all the RAM, it constantly crashes only when selected for the second time. I'm using this on Gal
-
Will I be able to use my Mac mini backup on a different mini?
I backed up my Mac mini onto an external drive thru the Time Machine. Now I will be upgrading the memory and hard drive. So I will basically have a new computer. Can I reinstall my files as well as the settings onto the upgraded Mac mini? As if I
-
hi friends can any provide any oss note for # removal I tried all as to maintain all the characters in RSKC,ans RSALLOWEDCHAR table but it is not working,daily iam getting the # into my data Thanks in advance sridath