If it's coming through as a String you might need to do:
<mx:FormItem id="factiveEdit" label="Active">
<mx:CheckBox id="active_CheckBox"
selected="{c1.active=='1'}" />
</mx:FormItem>
OR
<mx:FormItem id="factiveEdit" label="Active">
<mx:CheckBox id="active_CheckBox"
selected="{Number(c1.active)==1}" />
</mx:FormItem>
On Fri, Mar 27, 2009 at 9:46 AM, Frank Griffin <[email protected]>wrote:
> 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>
> -------------------------------------------------------------
--
Darin Kohles
RIA Developer