flex3 菜单栏:“启用”中的绑定 财产
这是错误还是我的错?
<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>
无论如何,登录和注销按钮始终保持活动状态。 但是,如果我切换“用户”和“作业”菜单,“用户”菜单的问题就会消失,并且“打开”和“关闭”按钮现在始终处于活动状态......对我来说似乎是一个错误。
除了弹性菜单栏之外还有其他选择吗? 这不是一个很好的组件..
is this a bug or my fault?
<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 Login and Logout buttons remain always active, no matter what. If I switch the User and the Job menus, though, the problem disappears for the User menu and the Open and Close buttons are always active now... seems a bug to me.
Is there any alternative to the flex menubar? It's not such a great component..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决了。 这确实是一个错误..或者更好,它没有按应有的方式实现(就像其他一切一样..绑定工作!!)
按照本教程修复问题并总体增强菜单栏:
http://frishy.blogspot.com/2007/12/制作-flex-menus-easier.html
Solved it. It's indeed a bug.. or better, it's not implemented as it should be (as everything else is.. with bindings working!!)
Follow this tutorial to fix the problem and generally enhance the menubar:
http://frishy.blogspot.com/2007/12/making-flex-menus-easier.html