Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 45DAB200B65 for ; Wed, 17 Aug 2016 09:24:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 44750160A8C; Wed, 17 Aug 2016 07:24:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 88000160A86 for ; Wed, 17 Aug 2016 09:24:46 +0200 (CEST) Received: (qmail 25732 invoked by uid 500); 17 Aug 2016 07:24:45 -0000 Mailing-List: contact users-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@flex.apache.org Delivered-To: mailing list users@flex.apache.org Received: (qmail 25717 invoked by uid 99); 17 Aug 2016 07:24:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Aug 2016 07:24:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E44AF18052A for ; Wed, 17 Aug 2016 07:24:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.313 X-Spam-Level: ** X-Spam-Status: No, score=2.313 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_NONE=-0.0001, URI_HEX=1.313] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id BD6NLHNnaU9E for ; Wed, 17 Aug 2016 07:24:43 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 6DC185FBBE for ; Wed, 17 Aug 2016 07:24:42 +0000 (UTC) Received: from mjoe.nabble.com (unknown [162.253.133.57]) by mwork.nabble.com (Postfix) with ESMTP id 8864F3A4CACA3 for ; Wed, 17 Aug 2016 00:24:41 -0700 (MST) Date: Wed, 17 Aug 2016 00:24:02 -0700 (PDT) From: OK To: users@flex.apache.org Message-ID: <1471418642116-13327.post@n4.nabble.com> In-Reply-To: <1471382225561-13321.post@n4.nabble.com> References: <1471382225561-13321.post@n4.nabble.com> Subject: Re: default Index for ComboBox or DDL when DataProvider data comes from a webservice MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Wed, 17 Aug 2016 07:24:47 -0000 CodeGirl wrote > So I put an event dispatch at the getResults of the webservice call and > then added an eventListener and when the event was fired telling me that > the data was loaded, I then assigned the selectedIndex. But again, > nothing was selected. Any Ideas? Maybe the data is received successfully from your service but the dataProvider of the ComboBox is not populated at the time you try to set the selectedIndex. You could try to populate the dataProvider 'manually' after receiving the data from your service and set the selectedIndex afterwards. protected function myResultHandler(event:ResultEvent):void { colorsCB.dataprovider = event.my.data.object; colorsCB.selectedIndex = colors.lookupNdxByID(defaultColor); } Olaf -- View this message in context: http://apache-flex-users.2333346.n4.nabble.com/default-Index-for-ComboBox-or-DDL-when-DataProvider-data-comes-from-a-webservice-tp13321p13327.html Sent from the Apache Flex Users mailing list archive at Nabble.com.