3 Replies Latest reply on Feb 9, 2008 4:58 PM by blaasvaer

    Display HTML in SOME control!????

      It seems rocket science. I don't know why. But I've spent 12 hours trying to do this very simple and logic step in Flex Builder 2:
      Place a text control on a canvas, use a HTTPService to call a .aspx file that outputs pure basic html and load it into the text control and have it render as were it a plain html page in a browser. This would seem basic stuff when developing a website, but it seems to become very complicated in Flex Builder 2.

      Now, am I approaching this totally wrong or just using this stuff in a 'wrong' way. I've managed to place a DataGrid on the canvas and via HTTPService retrieve XML and use the content for displaying a menu like DataGrid. This works fine. My plan is to; add the ID to an invisible columns and use that as a parameter with a HTTPService to retrieve a specific page from the database based on that parameter. But that will be the next fun (or study in rocket science) I'll throw myself over.

      Now are there ANY tutorials out there that specifically show how to manage this? I've seen tutorials on basically ANYTHING, but nothing that come close to such a basic, obvious and logical task. ANY help, hint or point in the right direction would be welcome. Be aware that I HAVE read the Getting Started, and built all the apps. Browsed the Developers Guide, read the whole internet, and nearly put Google out of air in search for ANY help. So now I decided to actually ASK for help. And I really hope someone can point me in the right direction ... should be VERY easy to achieve.
        • 1. Re: Display HTML in SOME control!????
          blaasvaer Level 1
          Well, reading Peter Ent's answer in another post (see answer below) makes some kind of sence. Shame. Thougt that Flex would replace the whole world of other tools for developing webapps (wishful thinking : ) ).

          Answer from Peter Ent
          The Flash Player has a very limited number of HTML tags it can handle - table is not one of them. Since Flex is just a way to build Flash Player content you are limited by what the Flash Player can do.

          We don't supply a full browser/HTML rendering engine in the Flash Player because it would make the Flash Player a multi-megabyte download (eg, 11-12 MBytes); right now the Player has a small footprint which enables it to be downloaded by virtually everyone.

          The Adobe AIR player (see labs.adobe.com) does have a full HTML component and can run Flex programs. The caveat is that the apps are not run in the browser, but on the local machine. The end-user has to download the AIR player in order to use it.

          You can also check out Alex's blog ( http://blogs.adobe.com/aharui/) and scroll down to "HTML and Flex"
          • 2. Re: Display HTML in SOME control!????
            Gregory Lafrance Level 6
            This is one of those threads that will likely get quite long, but here goes. As Peter described, the Flash Player does not have a full HTML rendering enigine as the player download would be much less compact. Also, Adobe AIR will provide a full HTML component.

            You are trying to do something based on the way things have been done to date. Nothing wrong with that, and you could argue that Flex is deficient in this area. But looking at the bigger picture of what RIA UIs are looking like as they evolve to be more visually complex and "rich", I think in general HTML is in general being handed its hat and is being show to the door, in favor of Flex/AIR.

            • 3. Re: Display HTML in SOME control!????
              blaasvaer Level 1
              I'd have to agree on that one. I've been wondering for many years why we still (well, I know it's because of the lack of standards) handtweek html-code to get stuff into a browser. Back in the old days that's how you'd layout a print document (surrounding text with formatting tags). But with the wordprocessor that became sort of obsolete. We've had WYSIWYG editors around for quite some time now, but none that wouldn't let you tweek the code.

              I think, being absolutely new to Flex, I tried to make it do what I'm used to be doing. I think I'll have to get my head around Flex, instead of getting Flex around my head.

              I do see a great future for Flex development. Absolutely a path I'm taking.