Flex3 menubar: bindings on properties

Is this a mistake or my mistake?

<mx:MenuBar width="100%" labelField="@label" itemClick="menuItemClickHandler(event)">
        <mx:XMLList>
            <menuitem label="User" >
                <menuitem label="Log In" showDialog="LoginDialog" enabled="{model.FlowUserState == 0}" />
                <menuitem label="Log Out" dispatchEvent="LogoutEvent" enabled="{model.FlowUserState >= 1}" />
            </menuitem>
            <menuitem label="Job">
                <menuitem label="Open" showDialog="OpenJobDialog" enabled="{model.FlowUserState >= 1}" />
                <menuitem label="Close" enabled="{model.job_id != null}" dispatchEvent="CloseJobEvent" />
                <menuitem label="New" enabled="{model.FlowUserState >= 4}" />
                <menuitem type="separator"/>
                <menuitem label="info" enabled="{model.job_id != null}" />
                <menuitem label="status codes" enabled="{model.job_id != null}"/>
            </menuitem>
        </mx:XMLList>

the entry and exit buttons remain active, no matter what. If I switch the "User" and "Work" menus, the problem will disappear for the "User" menu, and now the "Open" and "Close" buttons are always active ... seems to be a mistake for me.

Is there an alternative to a flexible menu? This is not such a wonderful component.

+3
source share
1 answer

I decided. This is really a mistake .. or better, it is not implemented as it should be (since everything else ... works with bindings !!)

, : http://frishy.blogspot.com/2007/12/making-flex-menus-easier.html

+2

Source: https://habr.com/ru/post/1714597/


All Articles