1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    1
    Vote Rating
    0
    alexunocuatro is on a distinguished road

      0  

    Default Unanswered: how to make a login with a cross-domain request?

    Unanswered: how to make a login with a cross-domain request?


    Hi, I am trying to make a login for my app, and i do not understand the poor documentation, i need help...
    can somebody help me?, give me and example or something please!!... thanks..
    this is my code...
    View
    Code:
    Ext.define('Scanner.view.Main', {    extend: 'Ext.Container',
    
    
        requires: [
            'Ext.TitleBar'
        ],
    
    
        config: {
            ui: 'dark',
            layout: {
                type: 'vbox'
            },
            scrollable: false,
            items: [
                {
                    xtype: 'titlebar',
                    docked: 'top',
                    scrollable: false,
                    title: 'Scanner'
                },
                {
                    xtype: 'fieldset',
                    id: 'login',
                    ui: 'dark',
                    scrollable: false,
                    instructions: 'Ingresa los datos',
                    title: '<center>Login</center>',
                    layout: {
                        align: 'center',
                        pack: 'center',
                        type: 'vbox'
                    },
                    items: [
                        {
                            xtype: 'textfield',
                            id: 'usuario',
                            label: 'Còdigo Mensajero:',
                            maxLength: 15,
                            placeHolder: 'A2S3D4'
                        },
                        {
                            xtype: 'passwordfield',
                            flex: 1,
                            id: 'password',
                            label: 'Clave Mensajero:',
                            name: '',
                            maxLength: 15,
                            placeHolder: '******'
                        },
                        {
                            xtype: 'button',
                            id: 'sentButton',
                            ui: 'confirm-round',
                            text: 'Acceso'
                        }
                    ]
                }
            ]
        }
    
    
    });
    Controller
    Code:
    Ext.define('Scanner.controller.Controller', {    extend: 'Ext.app.Controller',
    
    
        requires: [
            'Ext.MessageBox'
        ],
    
    
        config: {
            refs: {
                sentButton: '#sentButton',
                usuario: '#usuario',
                password: '#password'
            },
    
    
            control: {
                "sentButton": {
                    tap: 'sendParametters'
                }
            }
        },
    
    
        sendParametters: function(button, e, options) {
            if(this.getUsuario().getValue() === "" || this.getPassword().getValue() === ""){
                Ext.Msg.alert('Informaciòn Usuario', 'Falta Informaciòn Requerida', Ext.emptyFn);
            }
    //I do not what to do here... here is where i guess that i should to send the parameters but i do not how
    //can somebody help me?
    
    
    
    
        }
    
    
    });
    Store
    Code:
    Ext.define('Scanner.store.MyJsonPStore', {    extend: 'Ext.data.Store',
    
    
        requires: [
            'Scanner.model.MyModel'
        ],
    
    
        config: {
            model: 'Scanner.model.MyModel',
            storeId: 'MyJsonPStore',
            proxy: {
                type: 'jsonp',
                url: 'http://sicom.linux-si.com/cgi-bin/webapps/sicom/scanner.py',
                reader: {
                    type: 'json'
                },
                writer: {
                    type: 'json'
                }
            }
        }
    });
    Model
    Code:
    Ext.define('Scanner.model.MyModel', {    extend: 'Ext.data.Model',
    
    
        config: {
            fields: [
                {
                    name: 'messenger_code',
                    type: 'string'
                },
                {
                    name: 'password',
                    type: 'string'
                },
                {
                    name: 'action',
                    defaultValue: 'LOGIN',
                    type: 'string'
                }
            ]
        }
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,795
    Answers
    3467
    Vote Rating
    834
    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


    Why are the docs poor because of this question? I don't get that comment from you.

    Does your server support CORS or JsonP?
    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

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