Adobe Dreamweaver Forums



Last 10 THreads :         Re: Colour differences on the web (Last Post : Lundberg02@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: sRGB vs. Adobe (1998) RGB (Last Post : Neil_Keller@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: Using 2 Curves Layers when 1 is enough. Good idea/bad idea? (Last Post : Ramón_G_Castañeda@adobeforums.com - Replies : 0 - Views : 1 )           »          cs4 full screen mode isn't saved in workspaces, unlike cs3 (Last Post : eddie caruso - Replies : 0 - Views : 1 )           »          delete all channels previously created by "save selection" (Last Post : Paul_R@adobeforums.com - Replies : 1 - Views : 2 )           »          Emailing Content of CFML page (Last Post : Fetch - Replies : 2 - Views : 3 )           »          cfapplication in Application.cfc (Last Post : tgoold - Replies : 5 - Views : 6 )           »          Table cell - text formatting question (Last Post : Walt F. Schaefer - Replies : 8 - Views : 9 )           »          Can I make a 4 state CSS Sprite nav bar. (Last Post : Team Liquid Fire - Replies : 6 - Views : 7 )           »          Re: Paint, erase, burn and dodge won't work for me in CS4 (Last Post : John Joslin - Replies : 0 - Views : 1 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-20-2008, 02:55 AM
glen08
 
Posts: n/a
Diggs:
Default Process XML data in DataTipFunction

I'm using AdvancedDataGrid. My dataTipFunction is defined as:

private function showTip(item:Object):String{
var tempString:String = item.toString;
return tempString;
}

It shows something like this in the tip window:

<product id="10">
<manufacturer>Coke</manufacturer>
<brand>Diet Coke</brand>
<pack>12x12oz-Can</pack>
<invoice>1.00</invoice>
<price>2.00</price>
<quantity>50</quantity>
<type>Soda</type>
<location>A-1</location>
<in_stock_date>2008-11-20</in_stock_date>
<sell_by_date>2009-10-10</sell_by_date>
</product>

I only want to extract one value without tags. I changed the DataTipFunction
to:

private function showTip(item:Object):String{
var tempString:String = item.production.brand;
return tempString;
}

ReferenceError: Error #1069: Property product not found on
mx.controls.advancedDataGridClasses.AdvancedDataGr idColumn and there is no
default value.
at
com.bao.components::SodaShop/showTip()[C:\Users\Jim\flex3workspace\src\com\bao\c
omponents\SodaShop.mxml:18]
at
mx.controls.advancedDataGridClasses::AdvancedDataG ridColumn/itemToDataTip()[C:\w
ork\flex\dmv_automation\projects\datavisualisation \src\mx\controls\advancedDataG
ridClasses\AdvancedDataGridColumn.as:1443]
...

Is there an easy way to parse XML in DataTipFunction?



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-20-2008, 04:23 PM
glen08
 
Posts: n/a
Diggs:
Default Re: Process XML data in DataTipFunction

It's easy. I like Adobe's XML parser.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 11:30 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk