1. #1
    Ext User
    Join Date
    Aug 2010
    Posts
    5
    Vote Rating
    0
    KirthiRaman5 is on a distinguished road

      0  

    Exclamation Why is ManagedIframe such a mystery?

    Why is ManagedIframe such a mystery?


    I almost spent a week in attempt to make a demonstration of iframe work with ExtJS (3.x). Sometimes I ran into circles. I noticed that Doug Hendricks had posted solutions to many frustrated users. However, I am still failing to make a demo page work. I took the samples from http://www.sencha.com/forum/showthre...el-%281.2.7%29 and I tried everything.

    When I run adviframes.html (in the sample advDemo22.zip in the above link) and I get uncaught exception that border layout does not have center region. But adviframes.js does have center region defined as tabpanel.

    Why isn't there one sample that someone can just use? If I cannot use iframe, the chances of using ExtJS in our new project is zero, because all our applications have navigation menu (as tree) on left and iframe in the center right.

    Any pointers to a working example that does not need too many tweaks?

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,360
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    try contacting the author of that component.

  3. #3
    Sencha User laurentParis's Avatar
    Join Date
    Aug 2010
    Location
    paris
    Posts
    246
    Vote Rating
    2
    laurentParis is on a distinguished road

      0  

    Default


    are you include all files needed by sample ?

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,503
    Vote Rating
    52
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Are you sure you need the complexity of a ManagedIframe?

    Couldn't you just use an iframe DOM element?

    And are you even sure you need to use iframes at all? I can't see very much good use for them.

  5. #5
    Sencha - Community Support Team mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,053
    Vote Rating
    17
    mschwartz will become famous soon enough mschwartz will become famous soon enough

      0  

    Default


    Quote Originally Posted by Animal View Post
    Are you sure you need the complexity of a ManagedIframe?

    Couldn't you just use an iframe DOM element?

    And are you even sure you need to use iframes at all? I can't see very much good use for them.
    Ext Window with iframe in it and a "print" button. The print button handler calls the iframe's window.print() function.

    There's a use right there.

  6. #6
    Sencha User
    Join Date
    Aug 2010
    Posts
    7
    Vote Rating
    0
    dnickels is on a distinguished road

      0  

    Default


    I'm currently working on a prototype app that requires iframes. I tried using the ManagedIframe component, but ran into problems and ultimately decided against using it. A portion of the problems that I experienced were due to the documentation for the component not being up-to-date. Also, example code that I found in various forum posts didn't always work (I think because some examples were for older versions of the component than what I was using (?)). Then again - it could have just been me (I've only been using Ext JS for a little over 2 weeks :-). When trying to use the ManagedIframe though, I quickly felt like I was spinning my wheels and was spending too much time trying to learn the component relative to the amount of time allocated for the task.

    What I finally decided upon was a simple, custom IFrameComponent (based on a posting by jack.slocum in the thread at http://www.sencha.com/forum/showthre...ithin-TabPanel). This has worked quite well for me so far.

    As an FYI, I found that when I tried to use the ManagedIframe component in a portal type application (based on the Ext JS portal example), I would have exceptions thrown whenever I dragged-and-dropped portlets containing ManagedIframe's on the portal panel. The exceptions wouldn't get thrown immediately upon the first drag-and-drop; if I move a portlet back-and-forth between two positions on the portal, eventually after somewhere between 11 - 20 moves, I would start to get exceptions being thrown. I did a search at the time and found a posting by the author of the control that stated that similar exceptions were caused by some sort of change that had been made to the Ext "caching" mechanism in a recent version. Unfortunately, I didn't bookmark the URL and can't find it any longer.

  7. #7
    Ext User
    Join Date
    Aug 2010
    Posts
    5
    Vote Rating
    0
    KirthiRaman5 is on a distinguished road

      0  

    Default


    There were minor issues that I did not notice, otherwise example provided by Doug Hendricks really works. If one is using Ext3.x then the Portal, PortalColumn and Portlet are under ux.

    <script type="text/javascript" src="../ux/Portal.js"></script>
    <script type="text/javascript" src="../ux/PortalColumn.js"></script>
    <script type="text/javascript" src="../ux/Portlet.js"></script>

  8. #8
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,503
    Vote Rating
    52
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    What I'm getting at, is that if all you need is an iframe containing an HTML document, then configure your Panel (or subclass thereof) with

    Code:
        bodyCfg: {
            tag: 'iframe',
            src: 'http://foo',
            style: {
                border: '0 none',
                margin: '0'
            }
       }

  9. #9
    Ext JS Premium Member Lloyd K's Avatar
    Join Date
    Oct 2007
    Location
    Brighton, United Kingdom
    Posts
    655
    Vote Rating
    1
    Lloyd K is on a distinguished road

      0  

    Default


    I'm unsure what the issue is? You just include miframe.js or miframe-debug.js and create an Ext.ux.ManagedIFramePanel and voila. Oh and here's the docs:

    http://uxdocs.theactivegroup.com/
    - Lloyd K

    I blog about code from time to time: http://codeology.lloydkinsella.net/

Similar Threads

  1. [Solved] Ext.data.Store mystery
    By chesstrix in forum Ext 2.x: Help & Discussion
    Replies: 22
    Last Post: 11 Jun 2009, 12:29 AM
  2. Ext.ux.panel.DDTabelPanel - mystery icon - IE6
    By arthurakay in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 22 May 2009, 5:34 AM
  3. the mystery of the missing menu icons!
    By ismoore in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 25 Jun 2007, 3:46 AM
  4. handling dwr calls and mystery remove function
    By young_matthewd in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 5 Mar 2007, 6:38 AM

Thread Participants: 6

Tags for this Thread