Flex :: Accessing The XML Nodes In ItemRenderer?
Mar 10, 2010
[Bindable]public var headingData1:Object = new Object();
<mx:HTTPService id="srv" url="components.xml" resultFormat="object" result="getHeadings(event);"/>
private function getHeadings(evt:ResultEvent):void{
[Code]....
View 2 Replies
Similar Posts:
Aug 16, 2010
I have an itemrenderer used by multiple datagridcolumns and I need to have some condition in the itemrenderer based on the headertext of the datagrid column. Can I access the headertext property from within the itemrenderer?
My itemrenderer extends the LinkButton control and implements the IDropInListItemRenderer interface.
View 1 Replies
Apr 16, 2010
I am using E4X to bind some values from xml in flex 3.There is a problem when xml tag's (or attribute's) name has special character in it: having xml content
var xml:XML = <tag>
<special-name att="val" />
</tag>
special-name could not be accessed using xml.special-name.@att because it is interpreted as subtraction, on the other hand using square bracket notation xml['special-name'].@att breaks binding chain.
View 1 Replies
Mar 18, 2009
I'm fairly new to XML and Flash, and am having some trouble accessing some deeper nodes in the XML feed that I'm using for my project. See details below. I can access the headline fine, but it's anything below that - the timestamp and the excerpt that I'm having trouble accessing. For now, I'm just starting with the timestamp.[code]...
View 2 Replies
Dec 7, 2010
I'm having a problem accessing the XML nodes contained in the trace statements below. I've included a portion of the XML for clarity. I'm able to trace out the entire XML but not individual nodes of interest. I presume the problem is namespace related but the values I want appear to be in the local namespace.
ActionScript Code:
function parseXML(e:Event):void {
e.target.removeEventListener(Event.COMPLETE, parseXML);
[code].......
View 6 Replies
Mar 1, 2010
I have a dataGrid with a custom dataGridColumn having as itemRenderer MyItemRenderer. My problem is that I want from MyItemRenderer to access informations in the dataGridColumn. More exactly I would like for an itemRenderer I would like to know the associated dataGridColumn.
View 1 Replies
Oct 3, 2006
I'm trying to access some information in XML. I got the first few nodes working, but for the life of me, I can't figure out how to get to the nested nodes. I've tried everything i can think of. I thought it would have to do with nested for loops, but i couldn't get it to work. What am I missing? I've been pretty successful with simple XML, and this is relatively simple too, but more than I'm used to at this point... If there is a better way to do any of this, I'm all ears (or all eyes in this case )
[Code]...
View 7 Replies
Jul 21, 2010
I have an s:List with a custom itemRenderer and a dataprovider. What I would like to do is access the generated instances of the item renderer but I have no idea how.
Here is the code for the list:
<s:List id="layersList"
borderVisible="false"
allowMultipleSelection="true"
[Code]....
layersList.renderers[selectedIndex] or layersList.selectedItems[0].renderer. In order to access some of its internal objects. Like in the event I would want to listen events dispatched in the renderer instance from the List's parent.
View 1 Replies
Dec 8, 2011
I develop a piece of code that brings me to an xml, all Nodes i use this code:
for(var i=0; i< menu_xml.childNodes.length; i++){
corrent_node = menu_xml.childNodes[i].length;corrent_item.action = corrent_node.attributes.action;corrent_item.variables = corrent_node.attributes.variables;corrent_item.name.text = corrent_node.attributes.name;
[code]....
What I need is for each of the nodes highlighted in green to return the child Nodes. Example: when I move the mouse over the menu Indoor lighting, the results should be: Indoorlighting | LED 10W> 3W LED> LED 6W
View 10 Replies
Jan 26, 2006
For those unfamiliar with tree structures, tree structures are usually dynamic lists where every node has a pointer to two other nodes. They are arranged so it makes for faster searching and stuff and are very useful in programming languages that offer direct access to heap memory. Although I don't know if there would be benefits of making tree structures in AS would be of any help but I decided to have a go at it anyway. Since there are no pointers in flash I tried to just replace pointers to nodes with nodes themselves. Such things usually work in java I think because the language just automatically makes pointers for variables.
[Code]...
View 3 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
Oct 17, 2010
Anyone know how to change a single instance of an item renderer for a Flex tree item at runtime? To reiterate, I'm not trying to change the entire tree's item renderer like this:tree.itemRenderer = new ClassFactory(ItemRenderer2);I'm trying to change the item renderer of a single tree item like this (the following code does not work):tree.selectedItem.itemRenderer = new ClassFactory(ItemRenderer2);To put it more simply, does anyone know how to reference an instance of an item renderer and set it to a new item renderer class? I've tried using the Tree's itemToItemRenderer() method with no success.
View 1 Replies
Feb 26, 2011
I have implemented drag and drop between 2 AdvancedDataGrid, but the default behaviour from Flex displays the row data during the drag using the grid item renderer showing all 5 columns.
Instead, I would like to display an icon / image or my own custom item renderer during the drag and drop.
View 2 Replies
Sep 25, 2010
I want to create a list of progress bars and update the list accordingly.I have group data in an Array as
<mx:Array id="arr">
<mx:Object label="Group One" min="0" max="200" currentValue="60" />
<mx:Object label="Group Two" min="0" max="300" currentValue="50" />[code]....
The values in the array object indicate name of group,minimum,maximum and current value for the group (to be used in progressbar).I used the list with "mx.controls.ProgressBar" as itemRenderer as
<mx:List width="100%" dataProvider="{arr}"
itemRenderer="mx.controls.ProgressBar"/>
Now what I need is whenever currentValue field of Array "arr" changes i want to update the progressbar "progress" value to currentValue (where min and maximum value of progressbar are stored in Array "arr").
View 3 Replies
May 11, 2011
How can we navigate within an itemRenderer? For example, in Views we use the View.navigator (ViewNavigator) to push and pop views, there is no such feature in ItemRenderer.
Navigation within a View (Easy)
<s:View>
<s:HGroup >
<s:Button label="Questionnaire" click="navigator.pushView(view.QuestionnaireCategory1View)"/>
</s:HGroup>
Navigation within a Item Renderer (Impossible?)
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
[code]...
View 2 Replies
Jun 21, 2011
I have a List which has TextInput as itemRenderers for all its items. Upon application launch the items are rendered in the TextInputs correctly. The data is being populated from an Array of Objects.
What I want is, after the data has been populated in the ItemRenderers, I want to have an additional item renderer (TextInput of course)...so that if the user wants to enter another item, he can put it in the additional textInput.
And I also want to add the additional itemRenderer each time the user has added a new item and taps ENTER on the newly added item.
Below is my itemRenderer, there is the clearTxt_enterHandler handler..but I wonder how to add another itemRenderer upon "Enter".
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
[Code].....
View 1 Replies
Jul 17, 2009
> <root>
>
> <module c_name="Executive Library">
> <node cd_title="Document One"
> cd_link="http://localhost/userMana/upload/feature.xml"/>
[code]....
I am able to read the module name, but how can i read the cd_title, when the label field is different.
View 1 Replies
Sep 2, 2009
A web service return to my flex3 client this custom exception:
<SOAP-ENV:Fault xmlns:ro="urn:Gov2gLibrary" xmlns:SOAP-ENV="[URL]" xmlns:xsd="[URL]" xmlns:xsi="[URL]" xmlns:HNS="[URL]" xmlns:SOAP-ENC="[URL]" xmlns:v1="[URL]">
<faultcode>E2gError</faultcode>
<faultstring>abc</faultstring>
<detail><HNS:ROException>
[Code] .....
This is obviously a part of the FaultEvent object I get when the remote call fail, so I'm trying to access "T2gMsg" subnode values like this:
protected function onFaultEvent(e:FaultEvent):void {
var obj:Object = e.fault;
var err:XMLList = obj.element.detail.children()[0].children();
// now I have in err the "Messages" list, subnode of ROException,
// so I should cycle to read one message at time:
for each (var x:XML in err.children()) {
//?
}
How to read ID, Severity etc values. I think something like "x.ID" should work but it's not, while x.child("ID") or x.elements("ID") return null. What can I do?
View 3 Replies
Feb 18, 2010
I write a code which is return the following XML which contain in a string type variable.
[code]...
Now i want to multiply all the nodes with 3 and again store in that string type variable. how can i do this?
View 1 Replies
Oct 22, 2010
I have XML below
<node id="id1"/><node id="id2"/>...
<edge id="eid1" fromId="id1" toId="id2"/>
<edge id="eid2" fromId="id3" toId="id1"/>
<edge id="eid3" fromId="id2" toId="id4"/>
Now I need get all edge base on nodeId,
nodeId = id1 -> eid1, eid2
nodeId = id2 -> eid1, eid3
nodeId = id3 -> eid2
nodeId = id5 -> Null
View 2 Replies
Jul 8, 2009
Is it possible to put an itemrenderer on the DataGrid itself rather than a datagridcolumn? I could only find examples for datagridcolumn. I want a generic itemrenderer on all the items in a datagrid...
View 1 Replies
Jul 15, 2009
i used iteamreander in datagrid . if i select checkbox in grid automatically select another checkbox why? plz explain My xml data is more then 50 records.
<mx:DataGrid change="calculate()" id="calamount" x="0" y="3" width="327"
height="337" variableRowHeight="true"
dataProvider="{xml_coupon.lastResult.Teamcoupon.match_details}" >
[code]....
View 1 Replies
Aug 12, 2009
I have an AC with several questions and assoicated answers. These must be shown in a DG, and the idea is that the rows and colums of the DG are bound to the AC. For example, if the answer to question1 is Yes, the Yes-button must be true, and both the others must be false (as in normal radiobuttongroup behaviour). But when I change a button by clicking it, the actions datafield of the AC should change accordingly. Am I clear enough here?
It is ment for dynamic questionnaires.
<?xml version = "1.0"?>
<mx:Application xmlns:mx = "http://www.adobe.com/2006/mxml">
<mx:Script>
[Code].....
View 2 Replies
Nov 27, 2009
I have this DataGrid:
<mx:DataGrid id="myDataGrid">
<mx:columns>
<mx:DataGridColumn dataField="colA" headerText="Column A:" width="40"
[code].....
View 1 Replies
Dec 24, 2009
What is the Difference between ItemRenderer and ItemEditor?And When ItemRenderer is initializing and loading?
View 1 Replies
Feb 15, 2010
I've created a custom ItemRenderer extending UIComponent and implementing IListItemRenderer. This renderer contains a Text-Object to display the value.
For editing I'm using the standard ItemEditor (TextInput).
Now, when I want to edit a value, I click on a cell and the editor is created. But instead of displaying the value which was displayed in the renderer, "[object Object]" is displayed.
View 1 Replies
Mar 3, 2010
I am using a custom componenet based off of text as an itemRenderer for a dataGrid that is displaying an XMLList. I want to be able to re-use this itemRenderer for multiple columns, how do I access the dataGridColumn so I know which field to assign to the text value?
super.data gives me the whole XML item, super.parentDocument gives me the whole DataGrid
View 1 Replies
Mar 18, 2010
I have a custom item renderer which I use for my DataGrid. The DataGrid has specified selectionColor, rollOverColor and themeColor. The Problem is that the custom item renderer, does ignore those colors, and doesn't give any Feedback...
I tried to add the lines:
setStyle("selectionColor", 0xEDF1F7);
setStyle("rollOverColor", 0xE1F5DE);
setStyle("themeColor", 0x3569B0);
But with no effect...
View 1 Replies
Mar 25, 2010
I have a advanceddatagrid that has around 15 columns. Some are string, some are numbers. I have shown 4 columns below. The number columns have formatting done for zero precision and 2 digits precision. The itemRenderer is just to show Blue Color if the number is +ve and Red Color if the number is -ve. It looks something like below
<mx:columns>
<mx:AdvancedDataGridColumn dataField="Name" textAlign"left"/>
<mx:AdvancedDataGridColumn dataField="Time" textAlign="right"/>
<mx:AdvancedDataGridColumn dataField="Score" textAlign="right" formatter="{zeroPrecisionFormatter}" sortable="true" itemRenderer="ColorRenderer" />
[Code] ....
How can I save and reload the Formatter and ItemRenderer data. I am having trouble saving the formatter and itemrenderer and reloading it again. How can I reshuffle the columns but can preserve all the properties of it to through sharedobject and recover it again.
View 1 Replies
Apr 14, 2010
Is it possible to use a renderer for for a treecolumn in an advanceddatagrid and still keep the hierarchal functionality? If I use a renderer provider I lose the the arrow for the tree dropdown. I want to keep the tree functionality and change the display of the column.(and not just the folder image)
<mx:AdvancedDataGridRendererProvider column="{titleCol}" depth="1"
renderer="com.something.titleColumnRenderer"/>
titleColumnRenderer:
[code].....
View 2 Replies