Shining77
28 Nov 2010, 2:58 AM
I want to implement a new vtype with params additionally to the form field value for a database check with dates
like this:
Ext.apply(Ext.form.VTypes, {
'dateAvailable': function(val) {
Ext.Ajax.request({
url: 'datecheck',
method: 'POST',
params: 'date=' + val,
success: function(o) {
...
The params shall be in my case a type as String and an id as Integer.
But how can I implement these two params in the Ext.apply?
The problem is: Both param values are not globally, but in an Ext.extend from Window as config-Parameters. The form who uses this new vtype is also in it in the initComponent-method
Here the code:
App.publisherRevenueShareEdit.window = Ext.extend(App.ux.window, {
type: null
,id: null
...
,initComponent: function() {
this.items = [{
xtype : 'form'
...
,items: [{
xtype: 'datefield',
...,
vtype: dateAvailable
}
...
var win = new App.publisherRevenueShareEdit.window({type: 'Test', id: 1});
Can anybody help me?
like this:
Ext.apply(Ext.form.VTypes, {
'dateAvailable': function(val) {
Ext.Ajax.request({
url: 'datecheck',
method: 'POST',
params: 'date=' + val,
success: function(o) {
...
The params shall be in my case a type as String and an id as Integer.
But how can I implement these two params in the Ext.apply?
The problem is: Both param values are not globally, but in an Ext.extend from Window as config-Parameters. The form who uses this new vtype is also in it in the initComponent-method
Here the code:
App.publisherRevenueShareEdit.window = Ext.extend(App.ux.window, {
type: null
,id: null
...
,initComponent: function() {
this.items = [{
xtype : 'form'
...
,items: [{
xtype: 'datefield',
...,
vtype: dateAvailable
}
...
var win = new App.publisherRevenueShareEdit.window({type: 'Test', id: 1});
Can anybody help me?