This content has been marked as final. Show 2 replies
As paulfeuer says you will need to make a call to your server that returns a remote object or xml. Obviously your remote object or xml is built based on the security of the user.
For your security issue you should have a Model object that holds all your security data (and a lot of other data). The model object should be Bindable. This is a singleton object.
All your objects that need to be disabled and enabled can have their enable property manipulated by binding their value to values in your Model.
We are a J2EE shop as well and this is how we maintain our security,
If you want a better understanding of Model design pattern you should also take a look at Cairngorm micro-architecture for Flex. It is written by some Adobe guys and implements MVC design pattern.
Here is a great article on Cairngorm. It explains the ModelLocator pattern very well.
In my opinion, data binding is one of the most important concepts to understand in Flex. By binding all your enable properties to a single location (your model) your entire application can be configured from a single source. No if statements at all.
For dynamically creating XML we use JDOM.