You found a bug! We've classified it as a bug in our system. We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User blessan's Avatar
    Join Date
    May 2010
    Posts
    316
    Vote Rating
    1
    blessan is on a distinguished road

      0  

    Default [CLOSED-184] Nestedlist breaking on back button click

    [CLOSED-184] Nestedlist breaking on back button click


    I am trying to create an app. My code structure is basically the kitchen sink. In one of my card panels I have a nested list. And works fine for the sencha nested list demo. But I edited it to include a form panel. It corectly renders the first time. But once I hit back button and try to go back in, my form panel does not render and when I click back button from there I loose my nested list panel too.

    I searched and found this post.
    http://www.sencha.com/forum/showthre...ght=nestedlist

    Am I facing a bug or is there anything wrong with my code.

    Code:
    Ext.regModel('User', {
        fields: [
            {name: 'name',     type: 'string'},
            {name: 'password', type: 'password'},
            {name: 'email',    type: 'string'},
            {name: 'url',      type: 'string'},
            {name: 'rank',     type: 'string'},
            {name: 'value',    type: 'int'},
            {name: 'enable',   type: 'boolean'},
            {name: 'cool',     type: 'boolean'},
            {name: 'color',    type: 'string'},
            {name: 'team',     type: 'string'},
            {name: 'secret',   type: 'boolean'}
        ]
    });
            
    Ext.regModel('Ranks', {
       fields: [
           {name: 'rank',     type: 'string'},
           {name: 'title',    type: 'string'}
       ]
    });
    var ranksStore = new Ext.data.JsonStore({
               data : [
                    { service : 'women',  title : 'Women\'s Hair Cut'},
                    { service : 'men', title : 'Men\'s Hair Cut'},
                    { service : 'children', title : 'Children'}
               ],
               model : 'Ranks',
               autoLoad : true
               //autoDestroy : true
            });
    var servicesForm = new Ext.form.FormPanel({
        url   : 'postUser.php',
        standardSubmit : false,
        cls:'serviceFormBase',
        items: [
            {
                xtype: 'fieldset',
                cls:'serviceForm',
                defaults: {
                    required: true,
                    labelAlign: 'left'
                },
                items: [ {
                    xtype: 'select',
                    name : 'chkService',
                    cls:'serviceSlt serviceTop',
                    label: 'Service',
                    valueField : 'service',
                    displayField : 'title',
                    store : ranksStore
                }, {
                    xtype: 'numberfield',
                    name: 'chkServicePrice',
                    cls:'serviceSlt serviceMiddle',
                    label: 'Price',
                    maxValue : 20,
                    minValue : 2
                }, {
                    xtype: 'numberfield',
                    cls:'serviceSlt serviceBottom',
                    name: 'chkServiceDiscount',
                    label: 'Discount',
                    maxValue : 20,
                    minValue : 2
                }]
            }]
    });
    
    var morePanel = new Ext.Panel({
        floating:true,
        items:[
            {
            xtype: 'toolbar',
            dock: 'top',
            maxHeight:45,
            ui:'dark',
            items: [
                {
                    xtype: 'button',
                    cls:'checkoutDateButton checkoutAptButton',
                    ui: 'action',
                    text: 'Date',
                    handler: function() {
                        alert('Date');
                    }
                },
                {
                    xtype: 'button',
                    cls:'checkoutTicketButton checkoutAptButton',
                    ui: 'action',
                    text: 'Ticket',
                    handler: function() {
                        alert('Ticket');
                    }
                }
            ]
            }
        ]
    });
    
    /*++ Nested list when OPEN button is clicked ++*/
    var openNestedList = new Ext.NestedList({
        cls:'openNestedList',
        items: [{
            cls:'openNestedListItem',
            html: '<div class="ticketList"><p class="ticketListName">Angela Cox<span>$58.99</span></p><p>Ticket #5</p><p>7/15/2008</p><p>Open</p></div>',
            items: [{
                cls:'clientName',
                text: 'Angela Cox'
            },{
                cls:'clientName soapTop',
                text: 'Products<span class="soapAmount">$59.88</span>'
            },{
                cls:'clientName soapMiddle',
                text: 'Services<span class="soapAmount">$59.88</span>',
                title:'Services',
                items: servicesForm
            },{
                cls:'clientName soapBottom',
                text: 'Gift Certificates<span class="soapAmount">$59.88</span>'
            },{
                cls:'clientName soapTop',
                text: 'Sub Total<span class="soapAmount soapAmountNI">$59.88</span>'
            },{
                cls:'clientName soapMiddle',
                text: 'Tax<span class="soapAmount soapAmountNI">$59.88</span>'
            },{
                cls:'clientName soapMiddle',
                text: 'Payment<span class="soapAmount">$59.88</span>'
            },{
                cls:'clientName soapBottom',
                text: 'Balance<span class="soapAmount soapAmountNI">$59.88</span>'
            },{
                xtype:'panel',
                cls:'checkoutButtons',
                items:[
                   {
                    xtype: 'button',
                    style:'display:inline-block;',
                    cls:'checkoutButton',
                    width:120,
                    height:35,
                    text: 'Checkout',
                    handler: function() {
                        alert('Ticket');
                    }
                   },
                   {
                    xtype: 'button',
                    style:'display:inline-block;',
                    cls:'checkoutButton',
                    width:120,
                    height:35,
                    text: 'Void',
                    handler: function() {
                    }
                   }
                ]
                
            }
            ]
        },{
            cls:'openNestedListItem',
            html: '<div class="ticketList"><p class="ticketListName">John Doe<span>$58.99</span></p><p>Ticket #6</p><p>27/15/2008</p><p>Open</p></div>',
            items: [{
                cls:'clientName',
                text: 'John Doe'
            }]
        },{
            cls:'openNestedListItem',
            html: '<div class="ticketList"><p class="ticketListName">Evylyn Salt<span>$58.99</span></p><p>Ticket #8</p><p>27/15/2010</p><p>Open</p></div>',
            items: [{
                cls:'clientName',
                text: 'Evylyn Salt'
            }]
        }],
        listeners:{
            "listchange": function(list,listItem) {
                console.info('dock',listItem);
                list.toolbar.setTitle(listItem.title?listItem.title:'Checkout');
            },
            "render": function(list) {
                list.toolbar.setTitle('Checkout');
                list.toolbar.height = 45;
            }
        }
    });
    
    modules.Checkout = new Ext.Panel({
        xtype:'panel',
        layout:'card',
        style:'background-color:white;',
        //html:'<div id="calendar">test</div>',
        items:openNestedList,
        dockedItems: [
        {
            xtype: 'toolbar',
            dock: 'bottom',
            maxHeight:45,
            ui:'dark',
            items: [
                {
                    xtype: 'button',
                    cls:'checkoutOpenButton checkoutAptButton',
                    ui: 'action',
                    text: 'Open',
                    handler: function() {
                        alert('open');
                    }
                },
                {
                    xtype: 'button',
                    cls:'checkoutAptButton',
                    ui: 'action',
                    text: 'Appt',
                    handler: function() {
                        alert('Appt');
                    }
                },
                {
                    xtype: 'button',
                    cls:'checkoutClientButton checkoutAptButton',
                    ui: 'action',
                    text: 'Client',
                    handler: function() {
                        alert('Client');
                    }
                },
                {
                    xtype: 'button',
                    cls:'checkoutMoreButton checkoutAptButton',
                    ui: 'action',
                    text: 'More',
                    handler: function() {
                        //alert('More');
                        console.info('more',morePanel);
                        morePanel.showBy(this,'fade');
                    }
                }
            ]
        }/*,
        {
            xtype: 'toolbar',
            dock: 'top',
            maxHeight:45,
            title: 'Checkout',
            layout: {
                pack: 'justify',
                align: 'center' // align center is the default
            }
        }*/]
    });
    This should work in the kitchen sinck example by adding modules.Checkout to the structure.js

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Thank you for the report, we're currently checking into your issue.

  3. #3
    Sencha User blessan's Avatar
    Join Date
    May 2010
    Posts
    316
    Vote Rating
    1
    blessan is on a distinguished road

      0  

    Default


    Basically its the formpanel causing the problem. I removed the form panel and added the textfield, numberfield separately as items and it worked fine.

  4. #4
    Sencha User blessan's Avatar
    Join Date
    May 2010
    Posts
    316
    Vote Rating
    1
    blessan is on a distinguished road

      0  

    Default


    Hi is there any progress for a fix for this bug?

  5. #5
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Nested Lists are getting some love, hopefully it will be ready for the next release.

  6. #6
    Sencha User blessan's Avatar
    Join Date
    May 2010
    Posts
    316
    Vote Rating
    1
    blessan is on a distinguished road

      0  

    Default


    Oh thats great. When can I expect the next release? next week?

  7. #7
    Ext User
    Join Date
    May 2010
    Posts
    8
    Vote Rating
    0
    ibrahimokuyucu is on a distinguished road

      0  

    Default numberfield

    numberfield


    is causing problems.
    I do have a form with a numberfield xtype and it ignores required=true parameter, automatically gets the focus and breaks other things. Simply changing xtype to textfield fixed all of the issues.
    Not to mention it didn't bring the numpad on iphone.
    One other question/request related to form fields is;
    I couldn't find an easy way to set arbitrary attributes of fields through Ext.Field class. For example; there's no maxLength property for the Ext.Field class and if I want to set it myself, I guess I have to get a reference to underlying Dom element and then set attribute. It would be nice to have a public method or config property for setting custom/random attributes to fields.
    Thanks Sencha team. Keep up the good work.

  8. #8
    Sencha User blessan's Avatar
    Join Date
    May 2010
    Posts
    316
    Vote Rating
    1
    blessan is on a distinguished road

      0  

    Default


    Number field is causing trouble. Its a bug. There is a fix in the next release I think.

  9. #9
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,187
    Vote Rating
    119
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    NestedList has had a complete refactor and will be included in the 0.94 build.

    The NestedList is now capable of binding to a TreeStore. The last card that it moves to could be a form panel to provide editing capabilities. You would do this by implementing getDetailCard.

    getDetailCard will return a "final" card to attach to any leaf node within the tree structure.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  10. #10
    Ext User
    Join Date
    May 2010
    Posts
    8
    Vote Rating
    0
    ibrahimokuyucu is on a distinguished road

      0  

    Default sweet

    sweet


    when should we expect 0.94?
    Also top priority is auto scroll to hide URL bar.
    If you look at an application in safari with URL bar visible + top nav bar + tab bar then there's no space left for content. Remaning real estate is minimal, you can barely fit a email/pass field. It looks good when user adds it to home screen but its not always guaranteed.
    looking fwd to next release.

Similar Threads

  1. [CLOSED-184] Editable Grouping Grid
    By mihaip007 in forum Ext Designer: Bugs
    Replies: 5
    Last Post: 12 Aug 2010, 5:43 AM
  2. Nestedlist back button breaks after setCard method us used.
    By blessan in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 11 Aug 2010, 3:45 AM
  3. NestedList back button only remembers text and items?
    By jsm174 in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 6 Aug 2010, 11:13 AM
  4. Nestedlist breaking when item is a form panel
    By blessan in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 29 Jul 2010, 7:34 PM
  5. Calling a method on click from browser's back button
    By snappersdad in forum Ext 2.x: Help & Discussion
    Replies: 18
    Last Post: 9 Feb 2009, 1:23 PM

Thread Participants: 4

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi