-
14 Feb 2008 10:36 AM #11
-
14 Feb 2008 11:39 AM #12
I thing this occur because I send js and css files as a gz format (make an experiment)
I will try to fix it tomorrow,
Thanks,
-
14 Feb 2008 2:16 PM #13
nice extension

Best regards
-
14 Feb 2008 7:52 PM #14
Great ))
Great ))
I will use your extension in my project... thanks for saving time on share it...
I hope that my sharing have same interest for other than this extension ))
thanks a lot
-
25 Feb 2008 8:28 PM #15
Problem LOV Field in grid
Problem LOV Field in grid
hi mr madrabaz,
i've been using LovField in form and it's perfect. but problem came up when i using it in grid.
when the lov window show and i select 1 record and then click 'select' button, nothing show in lovField value. but if i click again, the old value is show in lovField. here's my code. could u help me out with this. thanks a lot!
PHP Code:// image url
Ext.BLANK_IMAGE_URL = '../resources/images/default/s.gif';
Ext.onReady(function(){
// data store for LOV
var dsLov = new Ext.data.GroupingStore({
proxy: new Ext.data.HttpProxy({
url: "lov.php",
method: 'POST'
}),
baseParams: {task: 'read'},
reader: new Ext.data.JsonReader({
root: 'results',
},[
{name: 'nopeg'},{name: 'nama'}
]),
sortInfo: {field: 'nama'}
});
// column model for LOV
var cmLov = new Ext.grid.ColumnModel([{
id:'nopeg',
header: 'NOPEG',
dataIndex: 'nopeg',
width: 80
},{
id:'nama',
header: 'Nama',
dataIndex: 'nama',
width: 200
}]);
// grid for LOV
var grdLov = new Ext.grid.GridPanel({
store: dsLov,
cm: cmLov,
width: 500,
height: 150
});
// LOV Field
var lovField = new Ext.ux.form.LovField({
view: grdLov,
lovTitle: 'Find Employee',
valueField: 'nopeg',
displayField: 'nopeg'
});
var ds = new Ext.data.GroupingStore({
proxy: new Ext.data.HttpProxy({
url: "lov.php",
method: 'POST'
}),
baseParams: {task: 'read'},
reader: new Ext.data.JsonReader({
root: 'results',
},[
{name: 'nopeg'},{name: 'nama'}
]),
sortInfo: {field: 'nama'}
});
ds.load();
var cm = new Ext.grid.ColumnModel([{
id:'nopeg',
header: 'NOPEG',
dataIndex: 'nopeg',
width: 80,
editor: lovField
},{
id:'nama',
header: 'Nama',
dataIndex: 'nama',
width: 200,
editor: new Ext.form.TextField({
allowBlank: true
})
}]);
var grd = new Ext.grid.EditorGridPanel({
store: ds,
cm: cm,
width: 500,
height: 300,
clicksToEdit: 1
});
grd.render('grid-example');
});
-
26 Feb 2008 3:03 AM #16
@pregool : I'll check it tomorrow
-
8 Mar 2008 2:26 PM #17
If you need to pass parameters when loading grid in LOV field (if you needs to load your grid by POST or need to use PagingToolbar), patch is simple:
Then (near 211 line) find:PHP Code:Ext.ux.form.LovField = Ext.extend(Ext.form.TriggerField, {
/**
* .....
* LovFields Parameters goes here
* .....
*/
// Request params for loading grid
requestParams: false,
and insert parameters to store load:PHP Code:// Store Load
if (!this.isStoreLoaded) {
this.view.store.load();
this.isStoreLoaded = true;
} else if (this.alwaysLoadStore === true) {
this.view.store.reload();
}
How to use:PHP Code:// Store Load
if (!this.isStoreLoaded) {
this.view.store.load(this.requestParams);
this.isStoreLoaded = true;
} else if (this.alwaysLoadStore === true) {
this.view.store.reload(this.requestParams);
}
2madrabazPHP Code:{
....// other config options
xtype: 'xlovfield',
id: 'project-customer',
fieldLabel: 'Customer',
requestParams: {params:{start: 0,
limit: Config.Pager.OnPage.CUSTOMERS}},
....// other config options
}
Thank you for sharing such useful extension. It very simplifies my work.
-
10 Mar 2008 12:37 AM #18
2 madrabaz
Is this the way to set value in the LOV field?
I mean - when I'm creating the "Edit" form I need to set value in this field.
I update your extension and add two methods:
I must use this methods only after render, because hidden field creates when render component.PHP Code:setHiddenValue: function(aHiddenValue)
{
this.hiddenField.setAttribute('value', aHiddenValue);
},
setDisplayValue: function(aDisplayValue)
{
this.setValue(aDisplayValue);
}
So, the problem:
All values correctly fills (hidden and display fields, I see it in Firebug) after render using this methods, but when I opens grid - record no selects automatically. And field validation error occurs (component don't understand, that values not human selected, but filled by my script)
What I must do also?P.S. Sorry my english.
-
12 Mar 2008 8:03 PM #19
-
22 Apr 2008 2:48 AM #20
I really "lov" this extension! Very nice!
Just one thing: when you click into LOV Grid text area (in the form), it shows a javascript error (tested on IE7 and FF).
Regards.



Reply With Quote