1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    8
    Vote Rating
    0
    cmujica2 is on a distinguished road

      0  

    Default Possible error in select field with scroll or renderer

    Possible error in select field with scroll or renderer


    -In Sencha touch 1.1
    -Tested in Iphone 4, Samsung Galaxy 5, Samsung Galaxy Ace, Google Chrome

    SCREEN 1
    the first step I choose 1/3 area (EUROPA), then the DESTINY is populated with 3 items , I choose one (the ultimate of list), then VESSEL is populated with 10 items, I chose the ultimate (because I supose the problem is scroll). in this step all is ok
    screen1.png

    SCREEN 2
    the second step is change the combobox AREA, I chose LEJANO ORIENTE, the DESTINY is populated with one item and the device displays empty, if I press "done", the item appears correctly. (in google chrome if I drag to down the item appear). *you know in the smart phone the interface is different to chrome, in the device the item display totally empty, here appear "middle" item*
    screen2.png
    SCREEN 3
    If in the second screen I choose item (pressing "done" in the device or drag down in chrome) the next step is choose VESSEL when the same problem appears.
    screen3.png

    SCREEN 4
    the correct screen
    screen4.png
    the code

    Code:
            SL.views.mainDocuments = new Ext.form.FormPanel({
                id: 'mainDocuments',
                items: [
                    {
                        xtype: 'fieldset',
                        items: [
                            {
                                xtype: 'selectfield',
                                name: 'selectwad',
                                label: 'Area',
                                store: docAMStore,
                                displayField: 'area',
                                valueField: 'area',
                                listeners: {
                                    change: function() {
                                        var fl = SL.views.mainDocuments.getValues();
                                        docDestinyStore.setProxy({
                                            type: 'scripttag',
                                            url:  address+'/documents.aspx?e='+exporter+consignee+'&model=0&t='+type+'&a='+fl.selectwad,
                                            reader: {
                                                type: 'json',
                                                root: 'items'
                                            }
                                        });
                                        SL.views.mainDocuments.items.get(1).items.get(0).enable();
                                        SL.views.mainDocuments.items.get(1).items.get(0).reset();
                                        SL.views.mainDocuments.items.get(2).items.get(0).reset();
                                        SL.views.mainDocuments.items.get(2).items.get(0).disable();
                                        docDestinyStore.load();
                                        SL.views.mainDocuments.items.get(1).items.get(0).setValue('');
                                    }
                                }
                            }
                        ]
                    },
                    {
                        xtype: 'fieldset',
                        items: [
                            {
                                xtype: 'selectfield',
                                name: 'selectdd',
                                label: 'Destiny',
                                store: docDestinyStore,
                                disabled: true,
                                displayField: 'Destiny',
                                valueField: 'Destiny',
                                listeners: {
                                    change: function() {
                                        var fl = SL.views.mainDocuments.getValues();
                                        docVesselStore.setProxy({
                                            type: 'scripttag',
                                            url:  address+'/documents.aspx?e='+exporter+consignee+'&model=00&t='+type+'&a='+fl.selectwad+'&d='+fl.selectdd,
                                            reader: {
                                                type: 'json',
                                                root: 'items'
                                            }
                                        });
                                        SL.views.mainDocuments.items.get(2).items.get(0).enable();
                                        SL.views.mainDocuments.items.get(2).items.get(0).reset();
                                        docVesselStore.load();
                                        SL.views.mainDocuments.items.get(2).items.get(0).setValue('');
                                    }
                                }
                            }
                        ]
                    },
                    {
                        xtype: 'fieldset',
                        items: [
                            {
                                xtype: 'selectfield',
                                name: 'selectvd',
                                label: 'Vessel',
                                store: docVesselStore,
                                disabled: true,
                                displayField: 'motonave',
                                valueField: 'motonave'
                            }
                        ]
                    },
                    {
                        xtype: 'button',
                        text: 'Search',
                        ui: 'confirm',
                        handler: function() {
                            var frm = SLs.views.mainDocuments.getValues();
                            Ext.getBody().mask('Loading...', 'x-mask-loading', false);
                            documentsStore.setProxy({
                                type: 'scripttag',
                                url:  address+'/documents.aspx?e='+exporter+consignee+'&model=000&t='+type+'&a='+frm.selectwad+'&m='+frm.selectvd+'&d='+frm.selectdd,
                                reader: {
                                    type: 'json',
                                    root: 'items'
                                }
                            });
                            documentsStore.load();
                             SL.views.viewport.setActiveItem(SercoLogistics.views.documentsListContainer,  { type: 'slide', direction: 'left'});
                            SL.views.documentsList.scroller.scrollTo({x:0, y:0});
                            Ext.getBody().unmask();
                        }
                    }
                ],
                dockedItems: [
                    SL.views.mainDocumentsTopBar,
                    SL.views.mainDocumentsBottomBar
                ]
            });
    Tips: -The data return by json is correct
    -I think that I have scroll problem, but i cant move the SelectField scroll to top
    -I added a empty field in the combobox's and I try set this Value but the problem persist
    -If I start on the screen 2, the problem does not arise because what happens is that when the combobox is used with many elements above and choose one of the first far then I think that is the scroll down, then when in the same combobox is filled with few elementsof the sample problem or problem scroll painting

    Thank you in advance
    sorry my english
    ----
    Resumen en español

    Amigos mi problema es que tengo 3 combobox los cuales estan enlazados entre si ante un evento de cambio, cuando primero elijo una secuencia en donde los campos son llenados con muchos datos y luego elijo alguno de los finales de la lista (por ejemplo en VESSEL). Luego cuando pruebo otra secuencia (cambiar el primer combobox para que los demas se llenen con otros datos nuevamente) en donde los datos sean mucho menores, pienso que el scroll se queda pegado al final (como en la anterior seleccion) entonces de alguna manera esconde esta nueva seleccion en donde los elementos son 1 o 2, se que el elemento esta ahí pero no lo dibuja bien

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,015
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I'm not sure what the issue is. The images aren't showing.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread