2 Replies Latest reply on Jul 29, 2008 4:34 AM by Roger Albuquerque

    Mounting a full application by XMLSocket

    Roger Albuquerque
      Good morning to all ...

      The challenge is to receive XMLSocket server with a string
      basic components in a MXML for an application and thus render the screens dynamically.

      Communication between Flex and Server XMLSocket I already did and works well.

      Example

      var myApplication:String = "<?xml version='1.0' encoding='utf-8'?> " +
      "<mx:Form x='30' y='25' width='473' height='417' xmlns:mx=' http://www.adobe.com/2006/mxml'> " +
      "<mx:FormItem label='Label'>" +
      "<mx:Button label='Button'/>" +
      "</mx:FormItem> " +
      "<mx:FormItem label='Label'>" +
      "</mx:Form>";

      and starting this string mount a application.

      Thank you
      --------------------------

      Bom dia a todos...

      O desafio é receber via XMLSocket server uma string com os
      componentes basicos em um MXML para uma aplicação e assim renderizar as telas dinamicamente.

      A comunicação entre Flex e Server XMLSocket eu ja fiz e funciona bem.

      Exemplo

      var myApplication:String = "<?xml version='1.0' encoding='utf-8'?> " +
      "<mx:Form x='30' y='25' width='473' height='417' xmlns:mx=' http://www.adobe.com/2006/mxml'> " +
      "<mx:FormItem label='Label'>" +
      "<mx:Button label='Button'/>" +
      "</mx:FormItem> " +
      "<mx:FormItem label='Label'>" +
      "</mx:Form>";

      e apartir desta string montar uma applicação.

      Obrigado
        • 1. Re: Mounting a full application by XMLSocket
          EDendramis Level 1
          Umm.... I haven't seen a way to do this after working almost a year in Flex. I know you can have Flex compile at runtime (ie wait until the page is loaded then compile it, but thats slow). Also, loading a page at runtime is going to cause things to slow down.

          Any reason why you want to do it this way?
          • 2. Re: Mounting a full application by XMLSocket
            Roger Albuquerque Level 1
            I need to load the mxml in runtime, my application will only have the <mx:Application>, the rest will all be dynamic.

            In undertaking work that we have a coreVM and several customers as Ajax, C #. NET, Java, running this way, our rule of this separate business, customers are only surrender of screens, and now the challenge is to develop in Flex.

            In seeking a resolution, passed by multiple sites in one of them found
            a very interesting article.

            In this article the author says he wrote a small component called
            MXMLLoader. The objective of the component, is to create an interface
            MXML markup loaded at runtime. The source of property
            component accepts an XML string or an object containing the source MXML.

            Ok tests, plus the componete still incomplete,
            I believe that with the help of everyone we can improve and use the
            compomente, to find another solution.

            It follows the Blog URL:
            http://mannu.livejournal.com/311003.html # cutid1

            The source this with the broken link, which has low of following URL:
            http://manishjethani.com/blog/2008/04/02/the-mxmlloader-component/

            Thank you

            Roger Albuquerque