Results 1 to 6 of 6

Thread: Old card not disappearing when switching to a new Panel with a bound Dataview

  1. #1
    Ext User
    Join Date
    Oct 2010
    Posts
    9
    Vote Rating
    0
      0  

    Default Old card not disappearing when switching to a new Panel with a bound Dataview

    I have a setup where I have a main panel that holds many "cards". These cards are Ext.Panel objects set to fullscreen: true, and centered: true with a vbox Layout. I had created about 3 cards already, and was able to switch between them just fine. For some reason the next card I created wouldn't work. What I mean by that is that when I switched to it, the previous card wouldn't disappear, and instead the two would be rendered simultaneously on the screen. In both the new and the old card I had a DataView connected to a Store as the sole item in the Ext.Panel object that functioning as my card. After several hours of debugging (trial and error), I finally figured out what was causing this behavior... not having an itemSelector defined in my DataView on the new card. Hopefully this knowledge can save other people some problems.

  2. #2
    Sencha User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,083
    Vote Rating
    968
      0  

    Default

    The panels are contained in a card layout, which extends a fit layout. There's no need to make them fullscreen.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Ext User
    Join Date
    Jul 2010
    Posts
    20
    Vote Rating
    0
      0  

    Default

    I am facing the exact same issue except I have the itemSelectors set and fullscreen is not set to true.

    I call the doLayout function on the card after switching and it semi-fixes the problem..

    Can someone provide guidance?

  4. #4
    Ext User
    Join Date
    Oct 2010
    Posts
    9
    Vote Rating
    0
      0  

    Default

    I've noticed that the same thing happens if there is something wrong with the XTemplate too. It also happens if the itemSelector you have isn't properly formatted. Try removing the "store:" config property from the DataView and see if that fixes the problem. If it does then you know it has something to do with the DataView/Template. Even when my itemView and template were messed up, if I removed the "store:" property then the card would suddenly render properly (by that, I mean that the previous card would properly animate away, and the new card's Toolbar that I had bound would appear). This will at least help narrow down the problem for you.

  5. #5
    Ext User
    Join Date
    Jul 2010
    Posts
    20
    Vote Rating
    0
      0  

    Default

    Great guidance! I'll look into it further and provide an update once I've pinpointed the issue.

    Thanks

  6. #6
    Ext User
    Join Date
    Jul 2010
    Posts
    20
    Vote Rating
    0
      0  

    Default

    Figured out the issue after a lot of debugging - hopefully this helps someone out there.

    The new Panels that I was creating conflicted with Panels in another card in that they had the same ID. This made my application go completely wack and no errors were thrown - make sure you use different ID's for all your panels. Since I was automatically generating them I didn't notice they were the same.

Similar Threads

  1. Animate template switching for DataView
    By fetchinson in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 30 Jun 2008, 9:27 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
  •