Return-Path: X-Original-To: apmail-flex-dev-archive@www.apache.org Delivered-To: apmail-flex-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 709AEF12E for ; Wed, 17 Apr 2013 03:15:17 +0000 (UTC) Received: (qmail 61142 invoked by uid 500); 17 Apr 2013 03:15:16 -0000 Delivered-To: apmail-flex-dev-archive@flex.apache.org Received: (qmail 61111 invoked by uid 500); 17 Apr 2013 03:15:16 -0000 Mailing-List: contact dev-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list dev@flex.apache.org Received: (qmail 61073 invoked by uid 99); 17 Apr 2013 03:15:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Apr 2013 03:15:16 +0000 Date: Wed, 17 Apr 2013 03:15:16 +0000 (UTC) From: "Justin Mclean (JIRA)" To: dev@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FLEX-25906) ComboBox textInput not cleared when dataprovider changes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLEX-25906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Justin Mclean updated FLEX-25906: --------------------------------- Labels: easytest (was: ) > ComboBox textInput not cleared when dataprovider changes > -------------------------------------------------------- > > Key: FLEX-25906 > URL: https://issues.apache.org/jira/browse/FLEX-25906 > Project: Apache Flex > Issue Type: Bug > Components: Spark: ComboBox > Affects Versions: Adobe Flex SDK 4.1 (Release) > Environment: Affected OS(s): All OS Platforms > Affected OS(s): All OS Platforms > Browser: Firefox 3.x > Language Found: English > Reporter: Adobe JIRA > Labels: easytest > > Steps to reproduce: > 1.Create a UI containing a spark ComboBox whose dataprovider can change based on user interaction > 2.Select an item from the combobox > 3. Change the dataprovider for the combobox to a collection that does not contain the selected item. For example if the selected index was 4 change the dataprovider to a collection with a length of 3 or less. > > Actual Results: > The selectedIndex and selectedItem properties update as expected but the text in the textInput still displays it's original value. > > > Expected Results: > The text property of the textInput should be cleared or set to null if selectedItem is no longer valid. > > > Workaround (if any): > > The problem is caused by the fact that the change to the dataprovider causes selectedItem to become undefined before the updateLabelDisplay() method of ComboBox is called. This will result in displayItem being undefined and thus prevent the update to textInput.text on line 677. > The workaround is to create a component that extends ComboBox and override the commitProperties() function. In the overridden function, check if selectedIndex == -1 and if so manually set the text to "" before calling super.commitProperties. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira