flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Kessler (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FLEX-14522) enable/disable items within the building phase of the ButtonBar component not possible
Date Wed, 26 Jun 2013 01:16:20 GMT

     [ https://issues.apache.org/jira/browse/FLEX-14522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mark Kessler resolved FLEX-14522.
---------------------------------

       Resolution: Implemented
    Fix Version/s: Adobe Flex SDK Next

Created new enabledField.  During child button creation, it will now check for a enabled property
from the dataprovider and assign it to the buttons.

SDK compiled successfully.
Passed mustella components/ButtonBar.
Passed checkintests.

Tested with below application.


<?xml version="1.0" encoding="utf-8"?>
<!---
   Test application
-->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               creationComplete="onCreationComplete();" > 

    <fx:Script>
        <![CDATA[
        import mx.collections.ArrayCollection;

        [Bindable]
        protected var aButtonList:ArrayCollection = new ArrayCollection();

        protected function onCreationComplete():void
        {
            aButtonList.addItem({label:"Button 1", enabled:true, toolTip:"tool test 1"});
            aButtonList.addItem({label:"Button 2", enabled:"bob's your uncle", toolTip:"tool
test 2"});
            aButtonList.addItem({label:"Button 3", enabled:false, toolTip:"tool test 3"});
            aButtonList.addItem({label:"Button 4", toolTip:"tool test 4"});
        }


        ]]>
    </fx:Script>

    <s:layout>
        <s:VerticalLayout horizontalAlign="center" verticalAlign="middle" gap="0" />
    </s:layout>

    <mx:ButtonBar id="buttonBar" dataProvider="{aButtonList}" />

</s:Application>

                
> enable/disable items within the building phase of the ButtonBar component not possible
> --------------------------------------------------------------------------------------
>
>                 Key: FLEX-14522
>                 URL: https://issues.apache.org/jira/browse/FLEX-14522
>             Project: Apache Flex
>          Issue Type: Improvement
>          Components: mx: Button Bar
>    Affects Versions: Adobe Flex SDK 3.0 (Release)
>         Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Language Found: English
>            Reporter: Adobe JIRA
>            Assignee: Mark Kessler
>            Priority: Minor
>             Fix For: Adobe Flex SDK Next
>
>
>       Steps to reproduce:
> 1. create the application like this:
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >
>     <mx:Script>
>     	<![CDATA[
>     		[Bindable] private var arr:Array = 
>     		[
>     			{label:"Button 1"},
>     			{label:"Button 2"},
>     			{label:"Button 3"}
>     		]; 
>     	]]
>       >
>     </mx:Script>
>     <mx:ButtonBar id="buttonBar"   dataProvider="{arr}" />
> </mx:Application>
> 2. try to disable items by default (within the building phase of the component) using
objects like this:
>    {label:"Button 1", enabled:false},
> 3. compile 
>  
>  Actual Results: 
> --> all items are enabled
>  
>  
>  Expected Results:
>  --> item with the label "Button 1" should be disabled !
>  
>  Workaround (if any):
> --> try using a viewstack as dataprovider like so:
>  
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >
> 	<mx:ViewStack id="viewStack">
> 	    <mx:VBox label="One" enabled="false" />
> 	    <mx:VBox label="Two" />
> 	    <mx:VBox label="Three" />
> 	</mx:ViewStack>
> 	    <mx:ButtonBar id="buttonBar2" dataProvider="{viewStack}" />
> </mx:Application>
>     

--
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

Mime
View raw message