Flex - Filtering XMLListCollection?
Dec 23, 2011I'm trying to create some sort of rangking. For this, I'm using a multilevel xml which I create with a php file.
[Code]...
I'm trying to create some sort of rangking. For this, I'm using a multilevel xml which I create with a php file.
[Code]...
How to merge two xmllistcollection in Flex 3. Please note, addAll method is not available.
View 1 RepliesI have a MenuBar, which is using a XMLListCollection object as a dataProvider.I wish to add and remove elements from this collection at runtime.How to add / remove elements from XMLListCollection ?
View 2 RepliesI'm a Flex noob and I've been struggling with this problem for a last week, and I'm at my wits end.
I have opened the following XML file
<root>
<person>
<city-of-death>asdf</city-of-death>
<place-of-death>qwert</place-of-death>
</person>
[Code]...
I would be so incredibly grateful if someone could help. I am pulling out my hair!
What is the role of source for an ArrayCollection or XMLListCollection? Is it used just once - when constructing a new ArrayCollection or XMLListCollection object and is it copied to some internal data structure of that object?
Because nothing is updated when the source Array (or XMLList) is being modified and the documentation confirms it too: The underlying XMLList for this collection. The XMLListCollection object does not represent any changes that you make directly to the source XMLList object. Always use the XMLListCollection methods to modify the collection.
This property can be used as the source for data binding. When this property is modified, it dispatches the listChanged event.
I'm asking because Flex examples related to dataProviders always use some Array or XMLList as source of data for a data-driven component. And I wonder, if using Array or XMLList is necessary at all - when for example loading data from external PHP-script.
When the XMLListCollection is updated in the DataGrid, I want it to add the XML (bind it) into the Model. How would I do this? Or if not possible, how would I manually add XML into the Model?
This is a rough example of what I'm trying to do. Adding data to the DataGrid works fine; it just doesn't go into the Model when sending to the HTTPService.
<mx:Model id="model">
<root><colors>{collection}</colors></root>
</mx:Model>
<mx:XMLListCollection id="collection" />
[Code]....
I am trying to display content of xmllistcollection in different fields in my datagrid however unless I use an itemrenderer the value is not displaying in the grid. The xmllistcollection is populated from a webservice call. Inside my item renderer i use a custom namesspace to retrieve contents from the xmllistcollection
value.ns::firstName
However if I try something like
dataField = "ns::firstName"
In the datagrid without using an item renderer I get no data output.
I have a requirement of sorting the <ename> in the XML with in the branch. The XML goes like this:
<company>
<branch>
<name>finance</name>
[code]......
Is there anyway of type casting an ArrayCollection to xmllistcollection or to xmllist or can we covert ArrayCollection to xmllistcollection or to xmllist?
View 1 RepliesI've written the following custom component, SubNavBar.mxml:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" height="100" width="300"
creationComplete="init()">
<mx:Script>
[Code]...
Whenever the trace function runs in init(), the property menuItems returns null. I don't seem to have this problem with other variable types, like Boolean or String. Is this due to the size of the XMLListCollection object? How can I set up this SubNavBar custom component with XMLListCollection property and bind it to a control in the component?
(I'm using Cairngorm)I have a combobox that displays items form an XMLListCollection that's in my model.I want to only view the items (XML) whose "sent" properties is false.. like item.sent == 'false'.This filter must apply only to this specific combobox, not everything that's bound to the XMLListCollection source.And of course it must update and refresh the filter if the source changes..I'm trying to use filterFunction but don't understand how it works...
View 1 RepliesI want to show some data from an xml file inside a datagrid, so I do this:
<mx:AdvancedDataGrid id="dgDomains" dataProvider="{new XMLListCollection(xmlDomains..domain(deleted.toString() != '1'))}"
...
[code].....
i am working on a line chart on flex which enable me to view the progress of data according to the year. I have tried using a slider to filter but it doesn't seemed to work.
View 4 RepliesI have an Air app that downloads a data set of around 100`000 objects and puts the objects in an ArrayCollection.I would like to apply various filters to the data set in numerous screens throughout the app. am a little worried about possible performance issues if I make multiple copies of the collection. However, if I don't copy the collection any filters applied will be reflected in all the screens and this is not the behavior I need.
View 3 RepliesI have a advancedDatagrid with column headers having input text boxes for filtering.The column is filtered according to input text when I use characters as data inside that column.But when I use numbers in the column field,filtering does not happen.Can anyone tell me what went wrong.
View 1 RepliesI've got Flex 4, Zend and php. I've set up paging in my datagrid but how do I do server-side filtering? I have about millions of records so obviously can't do client side filtering.
View 1 RepliesI have some xml and I am trying to filter it using e4x. My e4x statement looks like this:
model.config.source.fees..fee.(@min<amount).@amount
My xml looks liks this:
<flex><fees>
<fee type="credit" min="0.00" max="200.00" amount="6.00"/>
<fee type="credit" min="200.01" max="370.00" amount="10.00"/>
</fees></flex>
When the e4x statement is run, I get an error message:
Error #1065: Variable @min is not defined.
But if I change my statement to model.config.source.fees..fee.@min it will return an xmllist of all the min attribute values, so min is defined, at least in that statement. Why doesnt the original statement work?
In Flex 4 I have a list where every product in it is rendered through an ItemRenderer. Now, when I filter the list I want to fadeout the products that are removed. I can't add the fadeout effect to the hideEffect of the item renderer since renderers are being reused. Anyone a valid (easy) solution on how the fadeout the products correctly.
View 1 RepliesI need to have a Text Area With Line Numbers, & once the Text File is Imported to the Text Area.. the user must be able to select the line numbers & see the filtered output.
I have implemented the same with Numeric steppers. I am in search of an enhanced component.
are there better Advanced Components for Textarea ? Any Advanced Textarea component with built-in Search/Replace/Filter Capabilities ?
I have an Image control in my Flex application:
<mx:Image id="img" source="@Embed('img.png')"
percentHeight="100" percentWidth="100" />
Because the image is scaled, there are a lot of scaling artifacts. Can I change the image to use a different type of filtering?
I want to build an application using air. The application should load the flashlog file and display the contents after performing some text filtering.But when i load the application this clears my flashlog.txt though my file mode is READ.I can understand that running my air application clears the flashlog and prepares it for new logging. Is there a workaround for this.I dont want to open the flashlog file everytime and check for traces from my web application
View 1 RepliesI am trying to filter an XML based on multiple parameters that I have as an input. I am trying to identify the parent nodes which have the matching records so that I can filter them out and process.
[Code]...
I have the following situation: have a screen with 4 charts, each being populated with 59 array collections. Each array collection has 2000+ data points. This construct needs to be filtered(by time), but the problem I'm encountering is the fact that it takes a long time for the filtering to finish (which is to expected given the amount of data points that need to filtered).
Filtering one chart at a time is not option, so I wanted to ask you what do you think would be the best approach? (should I use vector instead?). To generalize this question what would be the best way to filter large collections in flex/as3?
I've search all over today trying to find how to do this, and not being familiar with actionscript is starting to catch up to me. What I would like to accomplish is: I have a list of messages in a Datagrid coming from a dataprovider in another class, which in turn gets them from our Oracle DB. I need to all the user to set a visible state on the message, and then filter that out of the datagrid with the click of a button. I have the check box for hide, and it sets that value into the database. I can't figure out how to get the filterFunction to work with an array collection when the filter parameter is within the row data.Here is the code
public function filterResults():void {
modelLocator.notification.messageList.filterFunction = filterRows;
modelLocator.notification.messageList.refresh();
[code]....
filtering one list when an "Artist" is selected in the other..
I also want to play the next video when the "Next Video" button is selected..
Here is a link to an example with a few videos.. [URL]
View source is enabled so feel free to grab the code..
how to build this app step by step using Flash Catalyst and Flash BUilder..
Anyhow, I'm not just taking, I plan on giving back in a major way..
So if the "evangalists" aren't too busy with their datagrids showing the true power and ease of use that the Adobe Framework is capable of..
I wanted to put a search box in my flex app that would act just like google or google finance: you start typing and a drop down list just below starts filtering the results dynamically. Does anyone know how to do this in flex? I am using flex and php so as the user types it will pull results off the server dynamically.
View 1 RepliesI have been trying to sort an XMLListCollection following instructions like this for some time, without success. Here's the relevant code:
<fx:Declarations>
<s:HTTPService id="photoServ" url="pics.xml" resultFormat="e4x"/>
<s:XMLListCollection id="photoList" source = "{photoServ.lastResult.photo}"/>
[code]......
I have an XmlListCollection() with 73 columns and multiple rows. Is there a way to convert this to an Array()? I'm trying to access the "data" object sent through an rendererProvider and it appears comes across as null if it's not in an Array().
View 0 RepliesI 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]....
i am currently working on a datagrid, where i get the dataprovider as an arraycollection...now, i have to click a button to delete an item from the populated datagrid..but i want to also automatically delete this item from the xml document as well. as such , i would need to pass in xmllistcollection as the dataprovider but i do not know how to convert my arraycollection to xmllistcollection..
View 1 Replies