1. #41
    Ext User
    Join Date
    Mar 2007
    Location
    Kortenaken, Belgium
    Posts
    16
    Vote Rating
    0
    DaNCeT is on a distinguished road

      0  

    Default


    Quick suggestion, replace:
    Code:
    		// install event handlers on field render
    		field.on({
    			render:{single:true, scope:field, fn:function() {
    				this.remoteValidationTask = new Ext.util.DelayedTask(this.validateRemote, this);
    				this.el.on('keyup', this.filterRemoteValidation, this);
    			}}
    		});
    With:

    Code:
    		// install event handlers on field render
    		field.on({
    			render:{single:true, scope:field, fn:function() {
    				this.remoteValidationTask = new Ext.util.DelayedTask(this.validateRemote, this);
    				this.el.on(this.validationEvent, this.filterRemoteValidation, this);
    			}}
    		});
    If you don't, the remote validation will not always be triggered during the validationEvent set for your field.

  2. #42
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,132
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Yes, you're right; this way validator honors validation event set on field. Updating source.

  3. #43
    Ext User
    Join Date
    Mar 2007
    Location
    Kortenaken, Belgium
    Posts
    16
    Vote Rating
    0
    DaNCeT is on a distinguished road

      0  

    Default


    I'm having more issues with the remote validation atm, regarding validation of Combo (with source from transformed select) and with validating a datefield. Will keep you updated.

  4. #44
    Ext User
    Join Date
    Mar 2007
    Location
    Kortenaken, Belgium
    Posts
    16
    Vote Rating
    0
    DaNCeT is on a distinguished road

      0  

    Default


    I can't seem to enable the remote validation for a datefield or a combobox (not from a transformed, select, nor with a local store as config option).

    Any suggestions?

  5. #45
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,132
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Difficult to say... I validate combos and dates w/o problems...

    Is the request sent to server? What comes back?

  6. #46
    Ext User
    Join Date
    Mar 2007
    Location
    Kortenaken, Belgium
    Posts
    16
    Vote Rating
    0
    DaNCeT is on a distinguished road

      0  

    Default


    For some reason it's not sending a validation request to the server...

    I have tried various things, just to make sure it was not an interference with any other code, I took your example form and added this item:
    Code:
    {
    			fieldLabel:'Validate combo',
    			xtype:"combo",
    			id:"combovalidation",
    			name:"combovalidation",
    			mode:"local",
    			triggerAction:"all",
    			forceSelection:true,
    			enableKeyEvents:true,
    			allowBlank:false,
    			store: [[1, 'value 1'],[2, 'value 2'],[3, 'value 3'],['ExtJS', 'value ExtJS']],
                            plugins   : [Ext.ux.plugins.RemoteValidator],					
    			rvOptions : {
    				url:'validate.php'
    			}
    }
    The server is only sending a validation request when I type in the field (as it's triggering the keyup event).

    However when selecting a value, it's not validating.

    I have tried adding:
    Code:
    			validationEvent:'change',
    This never triggers the validation.

    And when trying this:
    Code:
    			validationEvent:'select',
    It triggers the validation only when clicking the triggerfield.

    As i need a combobox that mimics a native select (so I disable typing, and only allow the usage of the trigger field), it won't work.

    The same with the datefield, it never triggers the validation, my best guess is that it's a related problem...

  7. #47
    Ext User
    Join Date
    Mar 2007
    Location
    Kortenaken, Belgium
    Posts
    16
    Vote Rating
    0
    DaNCeT is on a distinguished road

      0  

    Default


    After digging a bit deeper I found out that the remote validation is being triggered like this:
    Code:
    this.el.on('keyup', this.filterRemoteValidation, this);
    However, adding this during config of the combobox does trigger the validation:
    Code:
                    	
                            listeners: {
                    		'select': function(combo, record, index) {
                    			combo.remoteValidationTask.delay(0);
                    		}
                    	}
    So the change I proposed yesterday is of no use, as the remote validation is being bound to this.el, instead of just this...

  8. #48
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,132
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Remote validation of combo on select does not make any sense as if some of the values in the list is invalid why it is there in the first place.

    It does make sense for user typed values in combo and in that case keyup triggers remote validation.

  9. #49
    Ext User
    Join Date
    Mar 2007
    Location
    Kortenaken, Belgium
    Posts
    16
    Vote Rating
    0
    DaNCeT is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    Remote validation of combo on select does not make any sense as if some of the values in the list is invalid why it is there in the first place.

    It does make sense for user typed values in combo and in that case keyup triggers remote validation.
    It does make sense if you want to build a secure form (hence the reason I chose for remote validation). The project I'm working at requires a very high level of security, and by validating the fields remotely I keep all field requirements away from 'those eyes'.

    Yes, I populate my como with values/text loaded at init, but since the source can easily be tampered with I validate ALL fields remotely, so also the combo boxes. This way I can assure the form is completely valid at submission...

  10. #50
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,132
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Well, then you need to hack it somehow, to add another events that trigger validation.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar