What is the best way to make the data in a custom class globally accessible to a multi-component application?
I have a custom component called userlogin that consists of a form and connects to a database. When a user correctly logs in, the database returns a number of fields of data that I then use to fill the properties of a custom class called User, this instantiation of User is called currentUser typed as User. Another component called menuBar is an application control bar that allows for various selections based on the users site access level (stored in the custom User class) as well as the user name to show who is currently logged in. The problem I am having is how do I access the data stored within this custom class? I have set the class itself to Bindable with a metatag and also set currentUser to bindable, however, the menuBar component does not recognize this. I am at a loss of how to access this data. I guess I could create a custom event dispatcher and send this class data with an event and listen for this event in the menuBar component, however, this does not seem like the best idea. In this way I would need to store twice as much data and consume more resources. Is there another way to use this custom class data? Thanks for any help Don