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
Similar Posts:
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
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
Apr 25, 2011
I need to create a slideshow using data received from another view.I'm calling the slideshow's view like this:
<s:List id = "list" dataProvider = "{actions}"
change = "navigator.pushView (DetailsProduct, list.selectedItem) ">
<s:itemRenderer>
[code].....
View 1 Replies
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
Dec 29, 2010
I am using a spark list control with an itemrenderer. Whenever I set an itemrenderer's currentState, the moment I mouse out of the itemrenderer, it gets reset to its default state. How can I make an itemrenderer keep its currentState unless I explicitly tell it to change?
View 1 Replies
Feb 9, 2011
I am having an issue with my ItemRenderer, which I am using for a spark List. My code is the following:
I have this list:
<s:List
id="productSetList"
dataProvider="{ model.productSets }"
[Code]....
The thing is, if I scroll the list, and click on an item, it does not trace 'arthur' ! Why is this so ? I must trace that all the time that someone clicks in the list!
EDIT: If I remove change="model.selectSet( productSetList )" in the list, it works!! but I cannot remove that, some suggestions ? How can I switch that to another function?
View 2 Replies
Sep 1, 2011
I have a main application that contains a list, using a custom itemRenderer to display data.
I would like to be able to call a function, inside the itemRenderer, from the main application.
When running the app, we have a list with three persons, and a button. I want to call the function myItemRendererFunction() inside the itemRenderer, of the selected item in the list, all this, from the main app.
[Code]...
View 1 Replies
Oct 4, 2011
I have a list (LIST#1) of artists:
2Pac
Adele
Amerie
Beyonce
Jason Aldean
Shakira
The Trews
I also have a list (LIST#2) that has the values #,A-Z - how would I create an alphabet jump? So If a user clicked on "A" in LIST#2 that would automatically scroll to "Adele" at the top of LIST#1 - not filter so he/she could scroll up to view 2Pac or down to view The Tews if they were not in the view yet. Its a standard Flex Spark List with an ArrayCollection as the dataProvider - the artist field is called: "title" along with a unique id field that is not visible to the user.
private function alphabet_listChange(evt:IndexChangeEvent) : void {
var letter:String;
letter = evt.currentTarget.selectedItems[0].toString();
trace(currentDictionary[letter]);
ui_lstLibraryList.ensureIndexIsVisible(currentDictionary[letter]);
[Code] ......
View 2 Replies
May 3, 2011
I am trying to create a generic List, where I can pass the layout & item renderer as parameters.Since it is not possible to pass parameters to a MXML component's Constructor, I figured I should create my List in Actionscript.
[Code]...
I would prefer to have the List in MXML (because It will be easier using states later), but If I am forced to use pure Actionscript so I can instantiate it and pass in parameters, any help would go a long way.
View 1 Replies
Jun 29, 2011
In a flex project that I have that is designed to scale 100% to the web window, I have a spark list. And I have a simple itemrenderer that takes the data and displays a name, and a message. Just think of it like a simple instant messenger display. The problem is that for my msg_txt label I want to give it a width thats the width of the parent list thats holding it.I tried turning the horizontalScrollPolicy to off, also tried width="this.parent.parent.width}" (as well as this.parent.width) for the spark label inside the item renderer. and in the label i tried some things like left="0" right="0" maxWidth="{this.width}" but nothing really does the trick.How can I make this label have a max width of the list thats holding it, AND make sure it resizes if the size of the browser changes and the list size changes?heres the list:
<s:List id="chat_content" width="100%" height="100%"
alternatingItemColors="[#EEEEEE,#E6E6E6]" contentBackgroundColor="#EEEEEE"
horizontalScrollPolicy="off" itemRenderer="renderers.ActiveChatItemRenderer">
[code].....
View 2 Replies
May 26, 2010
I'm currently experimenting flex 4 skinning. I successfully skinned most of the components i need for my application, but i can't find a way to avoid this damn blue drop shadow which is displayed when u'r focused on a textfield or a combobox.
View 1 Replies
Sep 17, 2010
I'm trying to get a spark tab bar to have a selected tab that does not change color on mouseover. I'm trying to implement this by working with a skin based on the skin spark.skins.spark.TabBarButtonSkin, but despite turning off the shadows on the selected and overAndSelected states, it still shows a dark color on mouseover.
Here's the relevant skin:
<?xml version="1.0" encoding="utf-8"?>
<s:SparkSkin
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
[Code]....
View 1 Replies
Dec 10, 2011
I create a DataGrid to display a XML file and I have used XMLListCollection before. But when I modified the XML file, the DataGrid does NOT refresh itself automatically. I googled for this problem and found these links: refresh flex dataGrid
[Code]...
View 1 Replies
Mar 11, 2010
Im working at a DataGrid which has a custom itemRenderer with a checkbox and a Label inside. Im struggling adding the the values from a xml to the wright label dynamically... how can I make the connection from the datagrid's dataProvider (a xml doc) to the label and the checkbox? My itemRenderer loks a following:
<mx:Component id="ChoiceRenderer">
<mx:HBox width="100%" height="100%" horizontalAlign="center" verticalAlign="middle" horizontalScrollPolicy="off">
<mx:CheckBox/>[code].....
View 1 Replies
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
Jul 1, 2011
I have a renderer that looks like this:
[Code]...
Loading thumbnails using this method works perfectly. The issue happens when you scroll the List.
View 1 Replies
Feb 4, 2011
i have a problem using the itemRenderer functionality. When using an ArrayCollection the visible Data in the DataGrid using the itemRenderer will be rendered just fine. But if i start scrolling the entries are repeating in the cells using the renderer. The cells are not filled with date according to the id. What mistake i'm doing here.
I read a lot of the explainations like:
[URL]
here is the code for the set data function (itemRenderer is extending HBox):
override public function set data(value:Object):void {
_data = value;
if(data!=null)
[code]....
View 1 Replies
Sep 9, 2010
I am working on a Flex AdvancedDataGrid with a flat ArrayCollection dataProvider. The requirement is that when the root nodes is closed, the root row should show a subtotal data and when the root nodes is opened, not show the subtotal data.
View 1 Replies
Mar 1, 2011
i have a spark list component and a corresponding custom itemrenderer:
list component:
<s:List id="albumImagesList" itemRenderer="the.namespace.for.XYZImageRenderer" useVirtualLayout="false" width="400" height="160">
<s:layout>
<s:TileLayout requestedColumnCount="5"
[Code].....
it's all fine and dandy, the data gets populated correctly and i verified that the data.image_path property arrives safe and sound inside the itemrenderer.
my only problem is: the image is not displaying. i am not sure if it doesn't render at all or if it's just not visible somehow.
View 3 Replies
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
Nov 14, 2010
have been working on an air app for quite some time and in one of my mx:lists i have a custom renderer written in pure AS (no mxml). it extends the listitemrenderer mx componenet. in it i have overrode the createChildren() function to add some children of my own.
now, fort right-to-left text i want in this itemrenderer, i would like to add a spark:TextArea component in this createChildren() function
is there a way to do so?
this is the itemRenderer:
import flash.text.TextField;
import mx.controls.listClasses.ListItemRenderer;
[Code].....
View 2 Replies
Sep 19, 2011
I'm trying to make a horizontal list of labels with a space in-between them (for use as part of a ticker tape).Labels outside of a list have a transparent background but as part of either the ItemRenderer or List, they get a white background. My assumption is that this is part of the default styling applied to a Spark ItemRenderer.Question - Is there any way to totally get rid of all default visual stylings applied to an ItemRenderer?
protected var messages:ArrayCollection = new ArrayCollection( new Array("1", "2", "3", "etc") );
<s:List dataProvider="{messages}" itemRenderer="SimpleTextRenderer">
<s:layout >[code].....
View 1 Replies
May 26, 2011
Flex 3 List control had a itemRollOver event. Flex 4 List doesn't have it. Is there an equivalent or a workaround for this issue?
View 2 Replies
Jan 17, 2011
I'm writing a s:ItemRenderer to render some simple graphical components in my app. Each element can have multiple shapes that can be selected by the user, i.e. a certain element can be a square, or a circle, or a star, or whatever else.The simplest way I could think for doing this was to include all possible shapes in a s:Group and then manage their visible tag depending on what shape the user has selected. Is there a better way to do that? Also, if I encapsulate the group in a separate MXML component, how do I propagate the state of the itemRenderer (say "hovered") down to the MXML component that manages the shapes?Let's say you want to display three types of objects alternatively - the IR below with an AS snippet that turns visible to false for 2 out of the 3 objects definitely does the trick, but seems so ugly to me. In the mean time I found setCurrentState (stateName: String, playTransition:Boolean=true) to propagate the state down, so that's solved.[code]
View 1 Replies
Jun 28, 2010
I'm trying to animate a list as I delete the top row. All the examples I can find use itemsChangeEffect to bind to the effect, but this property exists only in MX lists, not spark lists.
Any idea how I can get the same effect done in Spark Lists?
I'm trying to remove the top most item in the list with a slight fade out effect before the rest of the items move up to replace the gap.
View 2 Replies
Mar 22, 2011
I've made a custom list itemRenderer with 2 buttons and a label. One button deletes the list entry (and thats not the problem) the second button would change the actual view.how I can change actual view within the itemrenderer ?
View 1 Replies
Apr 14, 2011
I have an application with a Google Map, an Area Chart, and an accordion containing a list.When the selection in the list is changed, the application fetches data from the server and updates the chart and map, repositioning the map to contain all markers within its viewport and kicking off a SeriesEffect to animate the chart data redraw.When a user changes selections and continues to mouse over the items in the list while the map and chart are redrawing, the labels on the item renderers disappear.The item renderer code is the following:
<s:ItemRenderer xmlns:fx = "http://ns.adobe.com/mxml/2009"
xmlns:s = "library://ns.adobe.com/flex/spark"
xmlns:mx = "library://ns.adobe.com/flex/mx"
[code]....
View 2 Replies
Apr 26, 2011
I would like my spark ItemRenderer to be able to render a varying number of graphical objects that depends on the user input. As an example, let's say that I want to render a set of ellipses on a line.I've been using MXML for my most recent batch of ItemRenderers and have loved every minute of it, but I'm not sure how to accomplish the above goal with an MXML IR. In Actionscript I can acquire the list of ellipses locations and draw them programmatically in the updateDisplayList method. Is there an equivalent in MXML?
View 1 Replies
Feb 27, 2012
I've got a DataGrid in my mobile application (I know, I know but there's currently not other solution for this), that numeric values. Depending on the value of a cell, the text gets colored. My big issue is that this doesn't work very for more than about 5 rows of data. I reckon the issue is that the set text function (in which I format the color) can't keep up with the amount of cell changes and formats the text based on the last updated cell of the row.I thought about a column item renderer so that the renderer only gets the value for that column, and not the whole data of the row.
Just for reference, this is my current item renderer (again, this works fine for few rows, for 5+ of fast changing data, this doesn't work any more, cells get formatted even though their data hasn't changed).[code]I just double-checked and have to revert my previous statement. A single row works fine, the second row already messes up the color formatting though. It seems as if the datagrid somehow throws together the values.
Doing the color formatting in the set data method shows the exact same effect;[code]My assumption about the grid messing up the ItemRenderer's data seems to be correct.A simple trace in the set data method (trace("old: " + _oldVal + "new : " + value[column.dataField]);) revealed that somehow, values of the next grid row (in case there are 2) get used as well as _oldVal gets the old value of the next row.
View 1 Replies