<?xml version="1.0"?>
<!-- This module loads an image. -->
<mx:Module width="100%" height="100%"
xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Image source="trinity.gif"/>
</mx:Module>
I have such 10 modules. Is there any Method in Module Class where i 开发者_JAVA技巧can hide and show based on user login.
Sure you can hide them, but I've found it more useful in our biggish Flex app, I think we're currently at 83 modules, I load the modules based on the users permissions, and then render everything that's been downloaded. Of course everyone gets the main "login" module, but it checks their credentials, figures out what they have rights to and loads only those modules. This practice also makes the app slightly more secure, since you can't hack what you haven't loaded.
精彩评论