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 703C310977 for ; Thu, 18 Apr 2013 01:11:17 +0000 (UTC) Received: (qmail 97802 invoked by uid 500); 18 Apr 2013 01:11:16 -0000 Delivered-To: apmail-flex-dev-archive@flex.apache.org Received: (qmail 97720 invoked by uid 500); 18 Apr 2013 01:11: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 97426 invoked by uid 99); 18 Apr 2013 01:11:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Apr 2013 01:11:16 +0000 Date: Thu, 18 Apr 2013 01:11:16 +0000 (UTC) From: "Mark Kessler (JIRA)" To: dev@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (FLEX-28883) List.requireSelection doesn't always work 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-28883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Kessler reassigned FLEX-28883: ----------------------------------- Assignee: Mark Kessler > List.requireSelection doesn't always work > ----------------------------------------- > > Key: FLEX-28883 > URL: https://issues.apache.org/jira/browse/FLEX-28883 > Project: Apache Flex > Issue Type: Bug > Components: Spark: List > Affects Versions: Adobe Flex SDK Previous > Environment: Affected OS(s): All OS Platforms > Affected OS(s): All OS Platforms > Browser: Other (specify version) > Language Found: English > Reporter: Adobe JIRA > Assignee: Mark Kessler > > Steps to reproduce: > 1. Create a ListCollectionView and a filterFunction to it. > 2. Create a List set requireSelection to 'true' and apply the collection as the dataProvider to a List. > 3. Filter the collection so that all items are removed. > 4. Filter the collection so that items are added again. > > Actual Results: The list shows the items without any selection. > > > Expected Results: Due to 'requireSelection' being set to 'true', if the List displays items, one should be selected. > > > Workaround (if any): This is due to 'requireSelection' only being applied once in commitProperties after it is set. > commitProperties lines 907-920 > if (requireSelectionChanged) > { > requireSelectionChanged = false; > > if (requireSelection && > selectedIndex == NO_SELECTION && > dataProvider && > dataProvider.length > 0) > { > // Set the proposed selected index here to make sure > // commitSelection() is called below. > _proposedSelectedIndex = 0; > } > } > > When a collection is reset or refreshed the 'requiredSelection' property should be checked and if true 'requireSelectionChanged' should be set to 'true' so that selection is forced again in 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