Results 1 to 2 of 2

Thread: Cannot read property 'dom' of null

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    3
    Vote Rating
    0
      0  

    Default Cannot read property 'dom' of null

    In some cases I need to reinitialize my Sencha Touch app. Till now I just used location.reload()to do this. However this is really bad for the user experience as the whole HTML page, JS and CSS will be reloaded, too.So I'm looking for an easy and clean way to reset and reinitialize my app without reloading the whole page.
    I tried to do something like Ext.Viewport.removeAll(true, true) to remove all view components from the viewport. But this results in some errors, when you masked the viewport before or if you showed some dialogs before. Sencha keeps some references to objects created while masking the view or showing a dialog, that won't be present any more after removing all components from the viewport:
    Ext.Msg.alert()
    Ext.Viewport.removeAll(true,true)
    Ext.Msg.alert()// => will raise `TypeError: Cannot read property 'dom' of null`How do you reinitialize your app without reloading the whole page? Is there any way to do it "the nice" way?



  2. #2
    Ext Team Member
    Join Date
    Sep 2017
    Posts
    603
    Vote Rating
    -295
      -1  

    Default

    Thank you for your question- I have passed this on to a team member that should be able to help you. Thank you for your patience!

Similar Threads

  1. cannot read property 'id' of null
    By hyde007 in forum Sencha Touch 2.x: Q&A
    Replies: 4
    Last Post: 11 Jul 2016, 4:52 AM
  2. [FIXED] Cannot read property 'isFocusable' of null or 'focus' of null
    By SebTardif in forum Ext 5: Bugs
    Replies: 3
    Last Post: 20 Mar 2015, 7:27 AM
  3. Cannot read property 'writeTo' of null
    By Somo in forum Ext 5: Q&A
    Replies: 2
    Last Post: 30 Jul 2014, 6:44 AM
  4. Cannot read property 'dom' of null after login
    By tysoncadenhead in forum io: Discussion
    Replies: 0
    Last Post: 25 Apr 2013, 6:23 PM
  5. Cannot read property 'xxx' of null
    By rgilkes in forum Sencha Touch 1.x: Discussion
    Replies: 6
    Last Post: 12 Oct 2011, 7:45 AM

Posting Permissions

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