Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: 'Ext.fly(...)' is null or not an object

  1. #1

  2. #2
    Sencha - Services Team
    Join Date
    Mar 2007
    Location
    Foristell, MO
    Posts
    1,121

    Default

    What's the error?

  3. #3
    Sencha User forefront's Avatar
    Join Date
    Feb 2008
    Location
    Shanghai
    Posts
    60

    Default

    Error: 'Ext.fly(...)' is null or not an object
    How to use contentEl?It may be wrong.

  4. #4
    Sencha - Services Team
    Join Date
    Mar 2007
    Location
    Foristell, MO
    Posts
    1,121

    Default

    Have you traced the code through with Firebug to find out where the error happens?

  5. #5

    Default Same problem

    I have the same problem trying to open document from embedded view on the new tab, exactly as it happens in Notes Client.
    The view is defined in JSHeader for a form and rendered to a div. For the view I redefined the gridHandleRowDblClick function. It seems the problem is in the .show methode in last line:
    <code>
    var panelId = 'pnl-' + unid;
    var center = window.parent.ExtndeFarmerApp.ui
    var tpentry = center.tabPanel.getItem(panelId);
    var link = center.uiView.dbPath+ '/0/' + unid + mode;

    if(!tpentry){
    var iframe = Ext.DomHelper.append(document.body, {
    tag: 'iframe',
    frameBorder: 0,
    src: link,
    id: unid,
    style: {width: '100%', height: '100%'}
    });

    center.tabPanel.add({
    id: panelId,
    contentEl: iframe.id,
    title: 'Opening....' ,
    layout: 'fit',
    closable: true
    }).show();
    </code>
    The screenshoot from MS Script Debugger is here: http://88-199-36-170.tktelekom.pl/ErrExtNd1.gif

    Can somobody tell me, where is the problem? Or better, how can I open the document from embedded view in new tab on the tabpanel?

    Tomasz

  6. #6
    Ext User
    Join Date
    Apr 2007
    Location
    Melbourne, Australia
    Posts
    169

    Default

    Quote Originally Posted by Tomasz Frydryk View Post
    PHP Code:
          center.tabPanel.add({
            
    idpanelId,
            
    contentEliframe.id,
            
    title'Opening....' ,    
            
    layout'fit',
            
    closabletrue
         
    }).show(); 
    Maybe try something like this:

    PHP Code:
    var ctp center.tabPanel;
    var 
    newTab ctp.add({...};
    ctp.doLayout();
    ctp.setActiveTab(newtab); 

  7. #7

    Default

    Same error in line
    ctp.setActiveTab(newtab);
    The new tab is created, but is empty. The error seems to ocure before the document is opened or rendered.
    Another solution?

  8. #8
    Ext User
    Join Date
    Apr 2007
    Location
    Melbourne, Australia
    Posts
    169

    Default

    Quote Originally Posted by Tomasz Frydryk View Post
    Same error in line
    ctp.setActiveTab(newtab);
    The new tab is created, but is empty. The error seems to ocure before the document is opened or rendered.
    Another solution?
    How about:

    PHP Code:
    var panelId 'pnl-' unid;
    var 
    center window.parent.ExtndeFarmerApp.ui
    var tpentry center.tabPanel.getItem(panelId);
    var 
    link center.uiView.dbPath'/0/' unid mode;

    if(!
    tpentry){
      var 
    ctp center.tabPanel;
      var 
    newTab ctp.add({
        
    idpanelId,
        
    title'Opening....' ,
        
    layout'fit',
        
    closabletrue  
      
    };
      
    ctp.doLayout(); 
      
      var 
    iframe Ext.DomHelper.append(newTab.body, {
        
    tag'iframe',
        
    frameBorder0,
        
    srclink,
        
    idunid,
        
    style: {width'100%'height'100%'}
      });
      
    ctp.setActiveTab(newtab); 


    So in effect you are adding the iFrame to the panel's body element

  9. #9

    Default

    This time the error 'insertAdjacentHTML(...)' is null or not an object' ocures when calling
    var iframe = Ext.DomHelper.append(newTab.body, {....

    The QuickWatch shows that R object is null.
    The screenshoot is under http://88-199-36-170.tktelekom.pl/ErrExtNd2.gif

    Is it co uncommon to show document from embedded view in new Tab (exactly as in Notes Client), so nobody did it yet?

  10. #10
    Ext User
    Join Date
    Apr 2007
    Location
    Melbourne, Australia
    Posts
    169

    Default

    Quote Originally Posted by Tomasz Frydryk View Post
    This time the error 'insertAdjacentHTML(...)' is null or not an object' ocures when calling
    var iframe = Ext.DomHelper.append(newTab.body, {....

    The QuickWatch shows that R object is null.
    The screenshoot is under http://88-199-36-170.tktelekom.pl/ErrExtNd2.gif

    Is it co uncommon to show document from embedded view in new Tab (exactly as in Notes Client), so nobody did it yet?
    Hmmm it looks like 'newTab' is does not contained the added tab object only the configuration of the tab. I have added another line to grab the object from the tab panel after it has been added. This should return the object containing the 'body' element.


    How about:

    PHP Code:
    var panelId 'pnl-' unid;
    var 
    center window.parent.ExtndeFarmerApp.ui
    var tpentry center.tabPanel.getItem(panelId);
    var 
    link center.uiView.dbPath'/0/' unid mode;

    if(!
    tpentry){
      var 
    ctp center.tabPanel;
      
    ctp.add({
        
    idpanelId,
        
    title'Opening....' ,
        
    layout'fit',
        
    closabletrue  
      
    };
      
    ctp.doLayout(); 
      
    // *************** NEW
      
    var newTab ctp.getItem(panelId);
      var 
    iframe Ext.DomHelper.append(newTab.body, {
        
    tag'iframe',
        
    frameBorder0,
        
    srclink,
        
    idunid,
        
    style: {width'100%'height'100%'}
      });
      
    ctp.setActiveTab(newtab); 



Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •