Using the data binding on each button in a ToggleButtonBar

Can someone tell me if it is possible to use the data binding on the individual buttons in a ToggleButtonBar and, if so, how?

I want to be able to use the data binding for each individual button in the ToggleButtonBar 'enabled' property, but is not possible using MXML because the ToggleButtonBar takes a data provider to display labels for each button and, obviously, I can't set the "enabled" on the values of dataprovider property because they are not objects Button. For example, I'm not allowed to do something like this:

< mx:ToggleButtonBar id = "tbb".
toggleOnClick = 'true '.
itemClick = "clickHandler (event)."
creationComplete = "tbb.selectedIndex = 1" >

< mx:Button label = "A" active = "{...}" / >
< mx:Button label = "B" enabled = "{...}" / >
< mx:Button label = "C" enabled = "{...}" / >

< / mx:ToggleButtonBar >

Ah! The ToggleButtonBar. Liaison. MXML. mysterious. Not obvious. But yes, we CAN do...
First, you will need to get the buttons to toggle. Did you know that they are actually ButtonBarButtons? Once you get an instance of each of them, you can do the binding in MXML.

Each button LINK below the ViewStack is bound to a ToggleBarButton.
When you click a related button below, the LINK button above it will have its enabled enabled/disabled property. Then a link fires, setting the enabled property of the related ToggleBarButton.

This example requires that you know advance how toggle buttons and buttons, you have, so it will not evolve well. Whenever you add a button, you will need to enter hard in the 'getButtons' function, which implements the ButtonBarButton instances. But if you have a known quantity of buttons, no problem.

Tags: Flex

Similar Questions

  • How to use the data binding on a cluster?

    Hello

    I just discovered the data binding and used it on some primitive controls/indicators. I love the cleanliness of the approach (no additional querying and son required!)

    Now, this page gives to think I can link a cluster with a shared too variable. However, when I right click-> properties, I see that the tabs appearance and Documentation (and I know that I did not accidentally choose an element inside the cluster, because (1) there is a typedef strict, and said the title of (2) 'The Cluster Properties' dialog box). Where can I find the data binding tab?

    Thank you

    Hi JKSH,

    What you're doing is possible if you make the file .ctl as the definition of type rather than a strict definition of type. With a strict definition of type all instances of the same .ctl file link that is why you cannot use data binding.

  • How do you use the data binding feature in Visio to you connect to a server and automatically fill a form of server?

    LD would be able to obtain current data on my network for my network diagram. Thank you!

    Hello

    I suggest you to send your request from the link and check.

  • ListView xml by using the data source does not?

    Hello

    When I use the data for loading XML source, listview displays data only if there is at least 2 element in the XML file.

    import bb.cascades 1.0
    import bb.data 1.0
    NavigationPane {
        id: nav
        Page {
    
            id: emp
            titleBar: TitleBar {
                visibility: ChromeVisibility.Visible
            }
            onCreationCompleted:
                                    {
                                        dataSource1.load(); //load the xml when page is created
                                    }
            actions: [
    
                ActionItem {
                    title: qsTr("Create List")
                    ActionBar.placement: ActionBarPlacement.OnBar
                    onTriggered: {
                        dialog.open();
                    }
                }
            ]
            Container {
                topPadding: 30.0
                leftPadding: 20.0
                rightPadding: 20.0
    
              ListView {
                  id:list1
                dataModel:dataModel
                 listItemComponents: [
                            ListItemComponent {
    
                                StandardListItem {
    
                                     title: {
                                    qsTr(ListItemData.name)
                                }
                                }
                            }
                        ]
    
                }
    
            }
    
                 } //page
    
        attachedObjects: [
             GroupDataModel {
                        id:dataModel
                    },
                     DataSource {
                          id: dataSource1
                          source: "models/employeelist.xml"
                         query: "/root/employee"
                        type: DataSourceType.Xml
                          onDataLoaded: {
                          dataModel.clear();
                           dataModel.insertList(data);
                          }
                        },
            Dialog {
                id: dialog
                Container {
                    background: Color.Gray
                    layout: StackLayout {
                    }
                    verticalAlignment: VerticalAlignment.Center
                    horizontalAlignment: HorizontalAlignment.Center
                    preferredWidth: 700.0
                    leftPadding: 20.0
                    rightPadding: 20.0
                    topPadding: 20.0
                    bottomPadding: 20.0
                    Container {
                        background: Color.White
                        horizontalAlignment: HorizontalAlignment.Center
                        preferredWidth: 700.0
                        preferredHeight: 50.0
                        Label {
                            text: "Add Employee List"
                            textStyle.base: SystemDefaults.TextStyles.TitleText
                            textStyle.color: Color.DarkBlue
                            horizontalAlignment: HorizontalAlignment.Center
                            textStyle.fontSizeValue: 4.0
                        }
                    }
                    Container
                    {
                        topPadding: 30.0
                        layout: StackLayout {
                            orientation: LayoutOrientation.LeftToRight
                        }
                        Label {
                        text: "Employee Name "
                    }
                    TextField {
                        id:nametxt
                    }
                }
               Container {
                   topPadding: 30.0
                        layout: StackLayout {
                            orientation: LayoutOrientation.LeftToRight
                        }
                        Button {
                           text: "OK"
                   onClicked:
                       {
                   var name=nametxt.text;
                   if(nametxt.text=="")
                   {
                        _model.toastinQml("Please enter a name");
                   }
                   else
                   {
    
                       _model.writeEmployeeName(name); //writing name to the employeelist.xml
    
                       nametxt.text="";
                       dialog.close();
                     dataSource1.load(); //loading the xml
                     }
    
                       }
                            preferredWidth: 300.0
                        }
                Button {
                     text: "Cancel"
                     onClicked:
                         {
                             dialog.close();
                         }
                            preferredWidth: 300.0
                        }
                             }
                }
            }
        ]
    
    }//navigation
    

    When I add a name to the first time to the XML, the list shows nothing. Then, when I add a new name, it displays the list.

    Why is it so? Is there a any mistake I made?

    Help, please!

    Thanks in advance

    Diakite

    It seems that there is a problem reported on the DIT that was refitted with internal BlackBerry MKS defect tracking system. Until this issue is reviewed by our internal teams, please use the solution suggested by the Rapporteur for the question by introducing an "if" statement before inserting data to the DataModel:

                    if (data.name) {
                        empDataModel.insert(data);
                    } else {
                        empDataModel.insertList(data);
                    }
    
  • the advantage of using the date dimension.

    Hi gurus,
    I have a table of facts with 5 different dates as the shipping date, the order date.
    My question is
    Case 1. in fact, table I store date_keys (substitution integers) and create several date dimensions (alas) for each type of date as a date_dimension alias for the shipping date, an alias for the date of the order etc (in the model of declaration).

    Case 2: I just avoid using the date and just store date dimension (no integers) in fact table.
    In this way I will save 5 joints in 5 dimensions of different date.
    Note: I have need of these 5 participates in the declaration of model that will be used to create reports, not in the model ETL in dimension model ETL that one date will be there, but we must create on alias the dimension date for each type of report date.

    So, I was wondering what is the advantage of using the date dimension?

    It is more a question of design/statement of a question of ETL/ODI;).

    The advantage of the dimension is that you can select or aggregate data by year, weekends, quarter, month, day of the week...
    If you only keep the date, you had all these complexes of the formula in logic or calculated items columns (assuming you are using OBIEE). Performances will be affected and the code will be duplicated in many places.

    Hope that it answers the question.

    Jerome

  • How to use the same script for several buttons

    Hello

    I have just started using flash if any help would be great!

    I create a blockbuster game, I have a grid of 20 buttons and I need (individually) to turn blue on red and click double click. I managed to do it with the first using this code;

    --------------------------------------------

    var click: Boolean = false;

    BN1.addEventListener (MouseEvent.CLICK, bn1click);

    function bn1click(event:MouseEvent):void {}

    clicked = true;

    var newColorTransform:ColorTransform = bn1.transform.colorTransform;

    {if (clicked)}

    newColorTransform.color = 0 x 064258;

    }

    BN1. Transform.ColorTransform = newColorTransform;

    }

    /////////////

    BN1.doubleClickEnabled = true;

    var doubleclicked:Boolean = false;

    BN1.addEventListener (MouseEvent.DOUBLE_CLICK, bn1dclick);

    function bn1dclick(event:MouseEvent):void {}

    DoubleClicked = true;

    var newColorTransform:ColorTransform = bn1.transform.colorTransform;

    {if (clicked)}

    newColorTransform.color = 0xac1e23;

    }

    BN1. Transform.ColorTransform = newColorTransform;

    }

    --------------------------------------------

    Now, I'll have trouble doing the same thing to work for the rest of the buttons, they are each named bn2, bn3 etc. They need to work individually and stay blue/red when clicked. I tried to list them as addEventListener orders but not with not a lot of success!

    Any help would be greatly appreciated, thank you!

    Tomo

    To do this is to use arrays to follow the buttons and their properties.

    var buttonList:Array = new Array (bn1, bn2, bn3);

    var clickedList:Array = new Array();

    var doubleClickedList:Array = new Array();

    Then use a loop for to assign functions and properties for each button:

    var thisMany:int = buttonList.length; This will give you the number of items in the buttonList array

    for (var i: int = 0; i

    buttonList [i] .addEventListener (MouseEvent.CLICK, btnClick); assign the function click on each button

    buttonList [i] .addEventListener (MouseEvent.DOUBLE_CLICK, btnDClick); assign the double-click function

    clickedList.push (false);  Add a value of false for each key in this table

    doubleClickedList.push (false);

    buttonList [i] .doubleClickEnabled = true; Set the property of double-tap for each button

    }

    function btnClick(event:MouseEvent):void {}

    var thisButton:int = buttonList.indexOf (event.target);  know which button has been clicked as an element in the table

    clickedList [Ceboutonselectionnel] = true;  Change the value in the table

    var newColorTransform:ColorTransform is buttonList [Ceboutonselectionnel].transform.colorTransform;.

    {if (clickedList [thisButton])}

    newColorTransform.color = 0 x 064258;

    }

    buttonList [Ceboutonselectionnel].transform.colorTransform = newColorTransform;

    }

    function btnDClick(event:MouseEvent):void {}

    var thisButton:int = buttonList.indexOf (event.target);

    doubleClickedList [Ceboutonselectionnel] = true;

    var newColorTransform:ColorTransform is buttonList [Ceboutonselectionnel].transform.colorTransform;.

    {if (doubleClickedList [thisButton])}

    newColorTransform.color = 0xac1e23;

    }

    buttonList [Ceboutonselectionnel].transform.colorTransform = newColorTransform;

    }

    Now you can have any number of buttons, just add their instance names in the table above.

  • Using the scissors tool on each anchor with ease?

    Hello

    I wonder if there is an easy way to have the result as if I used the scissors tool on each anchor point of a path. By clicking on each anchor point is a tedious job.

    1. Select the paths.

    2. Select > object > guidelines handles.

    3 edition > cut.

    4. Remove.

    5 Edition > paste in front.

    Also, look at the control panel. There is a button of scissors he who (decades later) can finally cut several anchor points selected at a glance.

    JET

  • Could not send an individual column by using a data binding

    Hello
    I have a data set (testdatalink) link to access the table of database SQL Server reading
    now in my Toad or sql prompt I quried the table using this data binding

    Select * from sqltable@testdatalink;
    With this I have no problem
    But when I ask a specific column as
    Select col1 from sqltable@testdatalink;
    or when I try to update a column
    It says COL1 IS not a VALID IDENTIFIER;
    My final requirment is to update a column in this table of SQL server based on certain conditions.

    I tried to give a name, alis, but no use.
    Please let me know if is there any method of reference in the columns of the table

    Thanks in advance

    Published by: DharV on August 10, 2011 02:45

    If the columns are lowercase in Sukkelserver, you must

    Select 'col1' of reading @...

    --------
    Sybrand Bakker
    Senior Oracle DBA

  • FaceTime uses the data

    FaceTime uses the data when it is off wifi?

    Yep, it will use the cell data. About 3 MB of / minute.

  • migration from 10g to 12 c using the data pump in

    Hi, while I used the data pump at the level of the schema before, I'm relatively new to the full database import.

    We are trying a full database migration to 10.2.0.4 to 12 c using the complete method of database data pump over db link.

    the DBA has indicated to avoid move SYSAUX and SYSTEM objects. but initially during the documentation review, it appeared that these objects are not exported since the TRANSPORTABLE given target = system NEVER. If anyone can confirm this? done import and export log refers to the objects I thought would not:

    ...

    19:41:11.684 23 FEBRUARY 15:Estimated TABLE_DATA 3718 objects in 77 seconds

    19:41:12.450 23 February 15: total estimation using BLOCKS method: 52,93 GB

    19:41:14.058 23 February 15: object DATABASE_EXPORT/TABLESPACE of treatment type

    20:10:33.185 23 February 15: ORA-31684: TABLESPACE object type: 'UNDOTBS1' already exists

    20:10:33.185 23 February 15: ORA-31684: TABLESPACE object type: 'SYSAUX' already exists

    20:10:33.185 23 February 15: ORA-31684: TABLESPACE object type: 'TEMP' already exists

    20:10:33.185 23 February 15: ORA-31684: TABLESPACE object type: 'USERS' existing

    20:10:33.200 23 FEBRUARY 15:96 objects TABLESPACE finished in 1759 seconds

    20:10:33.208 23 February 15: treatment of type of object DATABASE_EXPORT/PROFILE

    20:10:33.445 23 FEBRUARY 15:7 PROFILE items finished in 1 seconds

    20:10:33.453 23 February 15: treatment of DATABASE_EXPORT/SYS_USER/USER object type

    20:10:33.842 23 FEBRUARY 15:1 USER objects ended in 0 seconds

    20:10:33.852 23 February 15: treatment of DATABASE_EXPORT/SCHEMA/USER object type

    20:10:52.368 23 February 15: ORA-31684: USER object type: 'OUTLN' already exists

    20:10:52.368 23 February 15: ORA-31684: USER object type: 'ANONYMOUS' already exists

    20:10:52.368 23 February 15: ORA-31684: USER object type: 'OLAPSYS' already exists

    20:10:52.368 23 February 15: ORA-31684: USER object type: 'MDDATA' already exists

    20:10:52.368 23 February 15: ORA-31684: USER object type: 'SCOTT' already exists

    20:10:52.368 23 February 15: ORA-31684: USER object type: 'LLTEST' already exists

    20:10:52.372 23 FEBRUARY 15:Finished objects USER 1140 in 19 seconds

    20:10:52.375 23 February 15: object DATABASE_EXPORT/ROLE of treatment type

    20:10:55.255 23 February 15: ORA-31684: object ROLE type: 'SELECT_CATALOG_ROLE' already exists

    20:10:55.255 23 February 15: ORA-31684: object ROLE type: 'EXECUTE_CATALOG_ROLE' already exists

    20:10:55.255 23 February 15: ORA-31684: object ROLE type: 'DELETE_CATALOG_ROLE' already exists

    20:10:55.256 23 February 15: ORA-31684: object ROLE type: 'RECOVERY_CATALOG_OWNER' already exists

    ...

    the most insight.

    The schema SYS, CTXSYS and MDSYS ORDSYS are not exported using exp/expdp

    DOC - ID: Note: 228482.1

    I guess that he has already installed a 12 c software and created an itseems database - so when you have imported you have this "already exists."

    Every time the database is created and the software installed by default system, sys, sysaux will be created.

  • JDeveloper 12.1.2 has a problem with links when you use the data bean control

    Build JDEVADF_12.1.2.0.0_GENERIC_130608.2330.6668

    The problem that I am facing is:

    I used the data bean control to create our user interface. After that I dragged my jsff page data control, links have been created.

    I opened the XML pagedef to my page. On the Bindings tab and executable, I added a few links more by clicking on the Green plus sign. After I saved my changes, I noticed that some other links have been replaced by a link to the different executable files.

    This behavior occurs almost everytime I have edit links. Does anyone else see this problem?

    It looks like another instance of the bug described in https://java.net/jira/browse/ADFEMG-156

    This bug is fixed in 12.1.3. If you need the fix in 12.1.2 you should open a SR with support.oracle.com and ask a backport.

    Timo

  • How to use the date with the report parameter format

    Hi all

    How to use the date format with this tag function,

    <? param@begin:P_FROM_DATE? > <? $P_FROM_DATE? >

    This date of form source of report and setting is coming as this 2012/11/01 00:00:00.

    So now I need this in MY-DD-YYYY marker. I tried like this..? param@begin:P_FROM_DATE? > <? $format - date: P_FROM_DATE; ' DD-MON-YYYY '? >

    but its giving error. Can someone pls how to convert to the format of date custom.

    Thanks and greetings
    Srikkanth.M

    Problem solved.

    REF this link

    Date Format of XML

  • Can I use the data dictionary tables based on RLS policy?

    Hello guys, I use the package level security line to limit certain lines to some users.

    I created several roles, I want to just enable certain roles to see all the columns, but the other roles, I'm not that they see all the lines. I mean to do this I use the session_roles table data dictionary however it did not work.

    What to do in order to not allow rows of user roles?
    Can I use the data dictionary tables in RLS?


    Thank you very much.

    Polat says:
    What to do in order to not allow rows of user roles?
    Can I use the data dictionary tables in RLS?

    Ensure that:

    SQL> CREATE OR REPLACE
      2    FUNCTION no_sal_access(
      3                           p_owner IN VARCHAR2,
      4                           p_name IN VARCHAR2
      5                          )
      6      RETURN VARCHAR2 AS
      7      BEGIN
      8          RETURN '''NO_SAL_ACCESS'' NOT IN (SELECT * FROM SESSION_ROLES)';
      9  END;
     10  /
    
    Function created.
    
    SQL> BEGIN
      2    DBMS_RLS.ADD_POLICY (
      3                         object_schema         => 'scott',
      4                         object_name           => 'emp',
      5                         policy_name           => 'no_sal_access',
      6                         function_schema       => 'scott',
      7                         policy_function       => 'no_sal_access',
      8                         policy_type           => DBMS_RLS.STATIC,
      9                         sec_relevant_cols     => 'sal',
     10                         sec_relevant_cols_opt => DBMS_RLS.ALL_ROWS);
     11  END;
     12  /
    
    PL/SQL procedure successfully completed.
    
    SQL> GRANT EXECUTE ON no_sal_access TO PUBLIC
      2  /
    
    Grant succeeded.
    
    SQL> CREATE ROLE NO_SAL_ACCESS
      2  /
    
    Role created.
    
    SQL> GRANT SELECT ON EMP TO U1
      2  /
    
    Grant succeeded.
    
    SQL> CONNECT u1@orcl/u1
    Connected.
    SQL> select ename,sal FROM scott.emp
      2  /
    
    ENAME             SAL
    ---------- ----------
    SMITH             800
    ALLEN            1600
    WARD             1250
    JONES            2975
    MARTIN           1250
    BLAKE            2850
    CLARK            2450
    SCOTT            3000
    KING             5000
    TURNER           1500
    ADAMS            1100
    
    ENAME             SAL
    ---------- ----------
    JAMES             950
    FORD             3000
    MILLER           1300
    
    14 rows selected.
    
    SQL> connect scott@orcl
    Enter password: *****
    Connected.
    SQL> GRANT NO_SAL_ACCESS TO U1
      2  /
    
    Grant succeeded.
    
    SQL> connect u1@orcl/u1
    Connected.
    SQL> select ename,sal FROM scott.emp
      2  /
    
    ENAME             SAL
    ---------- ----------
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    
    ENAME             SAL
    ---------- ----------
    JAMES
    FORD
    MILLER
    
    14 rows selected.
    
    SQL> 
    

    SY.

  • Execution plan will change if I use the variable binding instead of the literal value?

    Hi guys,.

    Suppose I have a select "... Of... WHERE ID = 2 and... "if I go to use the variable binding instead of the literal value 2," SELECT... " Of... WHERE ID =: p_id and... ", the execution plan change?
    I test multiple statements, the plan does not change, but I don't know if it would even as well as in some other cases.
    Someone at - it ideas?

    Thank you very much.

    Anneso wrote:
    Hi, sorry for the unclear post, it's 11 GR 2.

    As Sybrand already mentioned, there are a lot of change that came in the implementation of the bind variable in some versions of Oracle db. Since you're on 112, it is still true with the introduction of Adaptive Cursor Sharing . Please have a read on it since the post below written by the development of Oracle optimizer group.
    http://blogs.Oracle.com/optimizer/entry/why_are_there_more_cursors_in_11g_for_my_query_containing_bind_variables_1

    Aman...

  • Using the data of EBS in BI Publisher

    Question: Is it possible to directly use EBS data in BI Publisher? If so, can you point me to the documentation?

    Here's the scenario:

    Imagine that our company uses Oracle E-Business Suite. All the columns, tables and diagrams Oracle related to BSE. It is the backbone of our company data. Couldn't live without it.

    We're also crazy to OBIEE, especially BI Publisher. We have people who are experts in BI Publisher.

    The CEO of the company would like to enjoy the mountains of data available in EBS, but also the expertise of the people who are trained and skilled in BI Publisher, using the data of EBS directly in BI Publisher. The Director-general provided us with a budget and staffing appropriate to perform a single installation of all structures must be added, or middle, for this to happen.

    Objective of the Chief Executive Officer is for data additions and revisions in EBS will be included automatically in the reports BI Publisher. Assuming that between Monday and Tuesday, none of the structural changes that occurred in any of the EBS diagrams, tables or columns, assuming that everything we have done is add and/or modify data from BSE, then the BI Publisher reports must reflect the Monday data Monday and, without having to do anything in the meantime, reflect the Tuesday data just sitting Tuesday and running the editor of BI reports Tuesday morning. Not every day to rebuild XML files or something like that. Just clean and totally transparent use of the EBS data it gets added and updated during the normal course of business.

    In general, what steps do we need to carry out - in EBS, in the XML Editor (if any) and BI Publisher - to directly use the data of EBS in BI Publisher on a daily basis as described above?

    Ideally, I like just go to the Admin page in BI Publisher and add EBS as a new data source, or perhaps to use the section of the integration of the Admin page, as we would with discoverer or workspace of Hyperion and Shared Services. But I know that's not as simple as that.

    Can you help clarify?

    Thank you!

    "Ideally, I like just go to the Admin page in BI Publisher and add EBS as a new data source, or perhaps to use the section of the integration of the Admin page, as we would with discoverer or workspace of Hyperion and Shared Services. '" But I know that's not as simple as that. »

    I don't know why you don't think it's as simple as that, but it is. Add a new JDBC data source, assign it to BEEP roles, create templates of data/queries against this data source and you're ready to go.

    To use the multi-org views, you need to set the org_id in forward initiation of the report.

    What version of BEEP are you using? We have the last BEEP 11 g, we use eBS (R12) as the security model, Teradata is our main source of data, but almost all the reports uses the security context for the multi-org eBS to limit the data of Teradata, based on the security profile of the user as defined in eBS.

    I hope this helps.

    Thank you
    Sunder

Maybe you are looking for

  • Satellite A660-1DW will not update to W7 SP1

    Hello I have a problem my A660-setting 1DW up-to-date Windows 7 SP1. The service pack was never offered by Windows update and after having a look at this [Microsoft Website | http://support.microsoft.com/kb/2498452#method4] it seems that this driver

  • As the seller to buy Skype credits

    Hi, can you advise me if there is any program allowing subsidiary of seller to sell Skype cheaper than those official credit in Indonesia? Please notify. Thank you and best regards.

  • With EEPROM 93LC46 SPI communication

    Hello great NOR readers, I tried to contact my 93LC46 via SPI EEPROM device but did not have much success. I use the NI USB-8451 box to interface with him. The 93LC46 device is active high chip select so I took the example of the 'General SPI write a

  • Need help with internet connection

    Hi I'm new to this forum, I need help. Recently I reformat my hard drive and also to recharge my windows XP OS. However, it cannot be connected to the internet. I have check and found that there is no connection of the network adapter on my laptop. I

  • HP Pavilion DV6 3120 to hard drive error

    Hello I have HP Pavilion DV6 3120 is, product # LE529EA #ABV. Whenever I start it goes to blackscreen with 'Smart HD error found imminent failure. I hope you guys could give me a link for the hard drive just so I can replace it. Thank you