1 Reply Latest reply on Dec 3, 2007 4:50 AM by m_hartnett

    cairngorm modellocator


      iam new to this post....
      iam working in flex environment with cairngorm architecture....
      i have a doubt in creating a modellocator....

      if an RIA increases ,is that we can have more than one modellocator...
      on creating more whethere it ill give a proper cairngorm structure.

      pls reply.....

      by mrithula.

        • 1. Re: cairngorm modellocator
          m_hartnett Level 3
          You should only have one ModelLocator.

          In a complex app I will usually contain references in my modellocator that point to other specific data models. All access to the data should be done through a single location in the modellocator.

          So if you want to maintain security info in its own object then create a security object that maintains the info you need and call it SecurityLocator.

          Then define it in the modelLocator as:
          public var securityLocator : SecurityLocator = new SecurityLocator();

          Then refer to the securityLocator through the modelLocator:

          A single locator maintaining references to other data models keeps the code organized and no one has to question what models are available.

          hope it helps