-
16 Aug 2010 6:55 AM #561
Hi, excellent plugin but I've found a weird issue when I try to change one of the properties of a textfield (allowBlank etc) or execute a method (setValue, isValid etc) I don't get the usual behavior. For example I use setValue from a blur event of another field, code:
These fields are create before the column model and then they are assigned to they columns as editors...
The same happens with other validations that i need to check and I do either on blur or select... If I use setValue and print the object using firebug, the object seems to have the new value but it keeps showing the old value.Code:var txtCalle = new Ext.form.TextField({ allowBlank: false , inputType: 'text' , listeners:{ blur: function ( textField ){ txtAvenida.allowBlank = true; txtAvenida.validate(); } } }); var txtAvenida = new Ext.form.TextField({ allowBlank: false , inputType: 'text' , listeners:{ blur: function ( textField ){ txtCalle.allowBlank = true; txtCalle.validate(); } } });
Somehow the items are not re-rendering as they should or something I don't get to see is happening. i'm using vr 2.3.0.
Please any help you can give me is appreciated.
-
16 Aug 2010 7:52 AM #562
... no chance then.i don't want to load the store with all the fields initially
The reason why i don't want to load all fields in store is because the time taken is more to load the all recordJozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
16 Aug 2010 7:58 AM #563
@towanime, RF is simple, quick editor for a store record. If you need a special behavior it is not for you. Also, I have no idea where you put fields you create in the code above. The thing is that RF doesn't accept any external fields but it creates its own on the basis of store and column model configuration.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
7 Oct 2010 12:45 PM #564
Combo editor with lazy arrayStore does not work
Combo editor with lazy arrayStore does not work
Hello all, this is great plugin, tx for it ! I just have one issue with column with arraystore combobox editor and lazy loading.
all is ok when I define the editor store using "new" keyword like that:
but when I use the "lazy - xtype" option for the store, the combobox is renderred, but no options are avaiable to choose:PHP Code:{
header: 'Industry',
dataIndex: 'industry',
width: 75,
sortable: true,
mode: 'local',
editor: {
xtype: 'combo',
store: new Ext.data.ArrayStore({
id: 0,
fields: ['id', 'industry'],
data: [
['1', 'Automotive'],
['2', 'Computer']
]
}),
displayField: 'industry',
valueField: 'id',
triggerAction: 'all',
mode: 'local',
editable: false,
lazyRender: true,
forceSelection: true
}
I don't know where to start and what to check to resolve it, do you guys have any idea ? I need to use the lazy because this config for column is dynamic and comes in json from backend ( and I do not want to rewrite the parser to proceed editor with "new" )PHP Code:{
header: 'Industry',
dataIndex: 'industry',
width: 75,
sortable: true,
mode: 'local',
editor: {
xtype: 'combo',
store: {
id: 0,
xtype: 'arraystore',
fields: ['id', 'industry'],
data: [
['1', 'Automotive'],
['2', 'Computer']
]
},
displayField: 'industry',
valueField: 'id',
triggerAction: 'all',
mode: 'local',
editable: false,
lazyRender: true,
forceSelection: true
}
regards
Vladimir
-
27 Nov 2010 5:50 AM #565
Using Grid RecordForm and java (Seam Framework)
Using Grid RecordForm and java (Seam Framework)
hi everyone,
I want to use this component in java (and seam framework) using webService technology,
I have a form in which user is going to add some rows in a grid (i have some lookUp columns too) and then I'm going to collect the data entered by user ,convert it to an object known by my webService and then do the service call.
and I am newbie in java and ExtJs (used to code in .NET).
any helps would be appreciated.
Thanks for your time
eg.
book (object)
--------------
Id -> long
Title -> string
Author -> string
and this is my service
---------------------
RegisterBooks(List<book> lst);
-
30 Nov 2010 9:37 AM #566
RecordForm (and all Ext and extensions) are server-side language agnostic so you can use anything on the server.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
5 Dec 2010 12:29 PM #567
add new record insertIds
add new record insertIds
Hi Saki, hi to all,
I tested http://recordform.extjs.eu/
I added new record and this is the response in firebug:
{"success":true,"insertIds":["24406"]}
But the new inserted record did not set to the returned insertIds.
When I tried to edit the newly inserted record, firebug responsed:
cmd saveData
data [{"company":"Test321","compID":null}]
objName company
same result when i tried to run in my local computer. It did not set the idName to the newly returned insertIds.
is there anything I need to add/change at the commitChanges function below?
this is the part requestCallback:PHP Code:// {{{
,commitChanges:function() {
var records = this.store.getModifiedRecords();
if(!records.length) {
return;
}
var data = [];
Ext.each(records, function(r, i) {
var o = r.getChanges();
if(r.data.newRecord) {
o.newRecord = true;
}
o[this.idName] = r.get(this.idName);
data.push(o);
}, this);
var o = {
url:this.url
,method:'post'
,callback:this.requestCallback
,scope:this
,params:{
cmd:'saveData'
,objName:this.objName
,data:Ext.encode(data)
}
};
Ext.Ajax.request(o);
} // eo function commitChanges
// }}}
PHP Code:switch(options.params.cmd) {
case 'saveData':
var records = this.store.getModifiedRecords();
Ext.each(records, function(r, i) {
if(o.insertIds && o.insertIds[i]) {
r.set(this.idName, o.insertIds[i]);
delete(r.data.newRecord);
}
});
this.store.commitChanges();
break;
case 'deleteData':
Ext.Msg.show({
title:'Deletion Successful'
,msg:'Successfully deleted.'
,icon:Ext.Msg.INFO
,buttons:Ext.Msg.OK
});
break;
}
-
5 Dec 2010 4:21 PM #568
If you're running Ext 3.x you do not need to do anything as 3+ Ext versions contain complete infrastructure of CRUD operations. You would only use the form creation code, not the grid records saving, from RecordForm example.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
5 Dec 2010 8:45 PM #569
I'm using Ext 2.3.0....
If I will use Ext 3.x, then I need to change a lot of things...
but for now, do anyone has a solution for Ext 2.3.0 upon adding new record - newly returned insertIds will set the idName values to the newRecords
Thanks,
-
6 Dec 2010 1:48 AM #570
First of all, this has nothing to do with the RecordForm plugin itself, it's related only to the example.
OK, the logic of setting ids is pretty simple (in requestCallback function):
so you can put a breakpoint in this block to see what's really happening.PHP Code:
switch(options.params.cmd) {
case 'saveData':
var records = this.store.getModifiedRecords();
Ext.each(records, function(r, i) {
if(o.insertIds && o.insertIds[i]) {
r.set(this.idName, o.insertIds[i]);
delete(r.data.newRecord);
}
});
this.store.each(function(r) {
r.commit();
});
this.store.modified = [];
// this.store.commitChanges();
break;
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video


Reply With Quote
