1 Reply Latest reply on Apr 3, 2007 10:49 AM by kdennis4

    ComboxBox Display not showing value

    kdennis4 Level 1
      I'm sure that this is a quick fix in my code... A user selects a Category Type that is populated from a dropdown, which then calls a CFC to return the Product Values for that Category. Here is what I have:

      private var acProductType:ArrayCollection = new ArrayCollection();
      public var pType:Object;

      private function comboSelection(event:Event):void {
      pType = cboProducts.selectedItem;

      private function receiveProducts(event:ResultEvent):void {
      //upon receipt of results set the array collection to the result set received
      acProductType = event.result as ArrayCollection;
      //if there are no records tell the user so he/she is not surprised and thinks there is something wrong;
      if (acProductType.length == 0) {
      //trace("I've arrived in the no states found spot");
      Alert.show("No records were found.");

      <mx:RemoteObject id="dpProducts"
      fault="Alert.show(event.fault.faultDetail,'Error');Alert.show(event.fault.faultString,'Er ror');">
      <mx:method name="getByType" result="receiveProducts(event)"/>

      First ComboBox:
      <mx:ComboBox change="comboSelection(event)" name="cboProducts" id="cboProducts">
      <mx:String>-- SELECT ONE --</mx:String>

      Second ComboBox:
      <mx:ComboBox id="cboProductType" dataProvider="{acProductType}" labelField="name"/>

      It's outputing: "object Object"???

      Any help would be greatly appreciated!