1. #1
    Ext User
    Join Date
    Apr 2007
    Posts
    17
    Vote Rating
    0
    Spider is on a distinguished road

      0  

    Default Problem with Ext.form.TextField's validationEvent config option

    Problem with Ext.form.TextField's validationEvent config option


    Hi

    I am creating a TextField using below code:
    {fieldLabel:'Project Code', name: 'caseId', allowBlank: false, msgTarget: 'side', validator: validateProjectId, validationEvent: blur},

    This causes my IE (6.0.2900.2180) to crash.

    When i change the validationEvent to onblur, it works in IE but there is a JS error in mozilla.
    I think the second behaviour is correct as the TextField do have a blur event.

    But can anyone tell the reason for IE's absurd behaviour.

    Thanks

  2. #2
    Ext User santosh.rajan's Avatar
    Join Date
    Sep 2007
    Location
    Kannur, Kerala, India
    Posts
    611
    Vote Rating
    0
    santosh.rajan is on a distinguished road

      0  

    Default


    set validationEvent: false, unless you really need it.
    Make everything as simple as possible, but not simpler.
    - Albert Einstein

  3. #3
    Ext User
    Join Date
    Apr 2007
    Posts
    17
    Vote Rating
    0
    Spider is on a distinguished road

      0  

    Default


    Thanks Santosh

    Correction first, in my original post i was actually referring to the first implementation and not the 'second behaviour'.

    Yes i can set validationEvent to false but i want to initiate validations on blur event.
    I think there will be no blur event if i set validationEvent to false.
    Is there any other way to do this.

    Thanks

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,182
    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


    validationEvent should be a string.

    validationEvent: 'blur'
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Ext User
    Join Date
    Apr 2007
    Posts
    17
    Vote Rating
    0
    Spider is on a distinguished road

      0  

    Default


    @aconran

    I agree with you and i did set validationEvent: 'blur'

    But with IE(6.0.2900.2180) whenever i open the window i get a message 'IE has encountered a problem and needs to close'. When i change the event to onblur(not a correct event name) it works perfectly fine in my version of IE.

    I also tested this on IE(7.0.5700.6) and got JS error saying 'this.el' is null or not an object at line 88 and char 2579.

    The code i am using for TextField is -
    {fieldLabel:'Project Code', name: 'caseId', allowBlank: false, msgTarget: 'side', validator: validateProjectId, validationEvent: blur}

    Currently i am using a workaround which works on both IE(above versions) and Mozilla(2.0.0.11) -
    {fieldLabel:'Project Code', name: 'caseId', allowBlank: false, msgTarget: 'side', listeners: {'blur': validateProjectId}}

    Please let me know your views

    Thanks

  6. #6
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    I suppose we could continue to guess without seeing more than a single config entry....

  7. #7
    Ext User
    Join Date
    Apr 2007
    Posts
    17
    Vote Rating
    0
    Spider is on a distinguished road

      0  

    Default


    @tryanDLS

    I am posting the code i am using, modified for readability.
    I have a window with a formpanel which inturn contains a tabpanel for three different tabs. The error is coming at the line marked red :

    Code:
                        win = desktop.createWindow({
                            id: 'add-win', 
                            title: 'Add New Project',
                            x: 10, y: 10, width: 740, height: 300,
                            iconCls: 'addNewProject',
                            border: false,
                            autoScroll: true,
                            maximized: true,
                            
                            items: new Ext.FormPanel({
                                id: 'add-form',
                                labelWidth: 400,
                                border: false,
                                frame: true,
                                hideBorders: true,
                                items: {
                                    xtype: 'tabpanel',
                                    tabPosition: 'top',
                                    border: true,
                                    activeTab: 0,
                                    defaults: {autoHeight: true, autoScroll: true, autoWidth: true}, 
                                    items: [{
                                        title: 'General',
                                        layout: 'form',
                                        frame: true,
                                        defaults: {autoHeight: true, autoScroll: true, autoWidth: true},
                                        items: [{
                                            xtype: 'fieldset',
                                            title: 'General Details',
                                            defaults: {width: 200, labelSeparator: ''},
                                            defaultType: 'textfield',
                                            items: [
                                                {fieldLabel:'Project Code', name: 'caseId', allowBlank: false, msgTarget: 'side', validator: validateProjectId, validationEvent: blur},
                                                {fieldLabel:'Project Name', name: 'caseName', allowBlank: false, msgTarget: 'side'},
                                                ...
                                            ]
                                        }]
                                    }, {
                                        ...2nd Tab
                                    },{
                                       ...3rd Tab
                                    }]
                                },
                                
                                buttons: [{
                                    text: 'Save', handler: projectSubmit, iconCls: 'save', tooltip: 'Add/Save the new Project', scope: this
                                }, ...]
                            })
                        });
    Please let me know if more information is required.

    Thanks

  8. #8
    Ext User
    Join Date
    Apr 2007
    Posts
    17
    Vote Rating
    0
    Spider is on a distinguished road

      0  

    Default


    @All

    Please let me know your views regarding config option validationEvent:'blur' problem i am facing.

    Sorry for being impatient.

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