开发者

Modules in Flex

开发者 https://www.devze.com 2022-12-31 01:42 出处:网络
<?xml version=\"1.0\"?> <!-- This module loads an image. --> <mx:Modulewidth=\"100%\" height=\"100%\"
 <?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.

0

精彩评论

暂无评论...
验证码 换一张
取 消