This turned out to be a combination of things including data issues. But
on the check box what worked was:

 

 selected="{c1.active=='true'}"

 

I could have declared I tried that one before and it didn't work. Oh
well, it works now!

 

Thanks,

 

Frank

 

________________________________

From: [email protected] [mailto:[email protected]] On Behalf Of Frank
Griffin
Sent: Friday, March 27, 2009 9:46 AM
To: [email protected]
Subject: [AFFUG Discuss] CheckBox and XMLString

 

I have a one place in my application where my CheckBox and ComboBoxes
are not displaying the "Selected" value properly. As it happens this is
the only place where I am using an XMLString for the Data. Is there a
correlation?

 

I only need to read the initial value from the server once for my Form,
then after the user makes a change I update the database with another
HTTPService call using parameters. This is just a simple form. I don't
send the XML back to the server so I have no need to keep it updated
which is why I choose an XMLString in the first place.

 

Thanks!
 
Frank
 
 
 
 
The Checkbox:
 
<mx:FormItem id="factiveEdit" label="Active">
                    <mx:CheckBox id="active_CheckBox"
                        selected="{c1.active==1}" />
               </mx:FormItem>  
 
The VARs:
private var temp:XMLList;
               [Bindable] private var c1:XML;
 
 
The Result event from an HTTPService:
 
private function getResult(event:ResultEvent):void{
                                              var result:XML =
event.result as XML; 
                                              temp = result..chart as
XMLList;
                                              c1 = new
XML(temp.toXMLString());
                                              } 
 
 
The XML File:
 
<?xml version="1.0"?>
 
<charts>
        <chart>
                <chartid>         1</chartid>                 
               <name>Gross Purchases YTD by Class</name>
               <desc>Gross Purchases YTD by Class</desc>
               <tab>Financial</tab>
 
               <active>false</active>                
                <seq> 1</seq>                  
               <type>Chart</type>
               <series>Gross PO Amount</series>
               <transdate>All Dates</transdate>
               <datefrom>01/01/1901</datefrom>                       
               <dateto>01/01/1901</dateto>                   
                <cat>Field</cat>                      
               <cfieldname>Classification</cfieldname>
 
        </chart>
</charts>

 

 

 


------------------------------------------------------------- 
To unsubscribe from this list, simply email the list with unsubscribe in
the subject line 

For more info, see http://www.affug.com 
Archive @ http://www.mail-archive.com/discussion%40affug.com/ 
List hosted by FusionLink <http://www.fusionlink.com>  
-------------------------------------------------------------



-------------------------------------------------------------

To unsubscribe from this list, simply email the list with unsubscribe in the 
subject line



For more info, see http://www.affug.com

Archive @ http://www.mail-archive.com/discussion%40affug.com/

List hosted by http://www.fusionlink.com

-------------------------------------------------------------

Reply via email to