PDA

View Full Version : FormPanel not loading certain formfields after an edit



birmy
8 Apr 2008, 12:49 PM
Hello All,

I have a GridPanel that has some project details like Client Name, Project Name, Project Type etc. On double clicking the row, a FormPanel loads in a window that has additional details of the project. This form has text fields, comboboxes and HTML editor. The Grid loads fine, on double clicking the FormPanel loads fine and I am able to use the form.

The problem is after doing my necessary edits and saving the data, with the same row selected, double clicking the row now loads the formpanel with certain form fields missing.

In other words, on a freshly refreshed page the formpanel opens perfectly and for any row selected, and I am able to make necessary changes and save them to the DB. But on repeated edits for the same row without the page being refreshed the formpanel misses out on a couple of fields.

In some rare cases I also get this:

[Exception... "'Permission denied to get property HTMLDivElement.nodeType' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]

I have included my entire code for all the experts to look at. Please help me as I am clueless on why this happens.

birmy
8 Apr 2008, 12:50 PM
file: project.html







<html>
<head>
<title></title>

<script language="JavaScript" type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
<script language="JavaScript" type="text/javascript" src="../../ext-all.js"></script>
<script language="JavaScript" type="text/javascript" src="rowexpander.js"></script>
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" media="screen" />

<style type="text/css">
.icon-grid {
background-image:url(../grid.png) !important;
}
#button-grid .x-panel-body {
border:1px solid #99bbe8;
border-top:0 none;
}
.add {
background-image:url(../shared/icons/fam/add.gif) !important;
}
.refresh {
background-image:url(../shared/icons/fam/table_refresh.png) !important;
}
.option {
background-image:url(../shared/icons/fam/plugin.gif) !important;
}
.remove {
background-image:url(../shared/icons/fam/delete.gif) !important;
}
.save {
background-image:url(../shared/save.gif) !important;
}
.useradd {
background-image:url(../shared/icons/fam/user_add.gif) !important;
}
.emp {
background-image:url(../shared/icons/fam/user.gif) !important;
}
.empedit {
background-image:url(../shared/icons/fam/plugin_add.gif) !important;
}
</style>

<style type="text/css">
body .x-panel {
margin-bottom: 20px;
}

.icon-grid {
background-image: url(../shared/icons/fam/grid.png ) !important;
}

#button-grid .x-panel-body {
border: 1px solid #99bbe8;
border-top: 0 none;
}

.add {
background-image: url(../shared/icons/fam/add.gif ) !important;
}

.option {
background-image: url(../shared/icons/fam/plugin.gif ) !important;
}

.remove {
background-image: url(../shared/icons/fam/delete.gif ) !important;
}

.save {
background-image: url(../shared/icons/save.gif ) !important;
}

.edit {
background-image: url(../shared/icons/fam/edit.gif ) !important;
}

.details .x-btn-text {
background-image: url(../shared/icons/details.gif );
}
div#main{
padding-left: 20px;
}

</style>
</head>
<body>

<div id="topic-grid"></div>
<script type="text/javascript">
var jpageSize = 10;
var filerTxt = "jron";
var birmytest = "jron";

Ext.onReady(function() {
Ext.BLANK_IMAGE_URL = '../../resources/images/default/s.gif';
Ext.QuickTips.init();

function formatDates(value) {
return value ? formatDate(new Date(value["time"]), "yyyy-MM-dd HH:mm:ss a") : '';
//alert(value);
}

function refreshData(){
store.reload();
grid.render();
}

var NewAccount = Ext.data.Record.create([
{name: 'project_id'},
{name: 'client_id'},
{name: 'client_name'},
{name: 'employee_id'},
{name: 'employee_name'},
{name: 'project_name'},
{name: 'project_date'},
{name: 'project_frequency'},
{name: 'project_type'},
{name: 'project_desc'},
{name: 'project_status'}
]);

var expander = new Ext.grid.RowExpander({
tpl : new Ext.Template(
'<table width="100%" border="0" class="x-tab-panel-header">',
'<tr class="long">',
'<td align="left">Project Name:&nbsp<b>{project_name}</b></td>',
'<td align="left">Project Date:&nbsp<b>{project_date}</b></td>',
'<td align="left">Project Frequency:&nbsp<b>{project_frequency}</b></td>',
'</tr>',
'<tr>',
'<td align="left">Project Type:&nbsp<b>{project_type}</b></td>',
'<td align="left">Project Status:&nbsp<b>{project_status}</b></td>',
'<td align="left">Client Name:&nbsp<b>{client_name}</b></td>',
'</tr>',
'</table>'
)
});



var store = new Ext.data.GroupingStore({
reader: new Ext.data.JsonReader({
root: 'results',
totalProperty: 'totalCount',
id: 'project_id'
},NewAccount),
proxy:new Ext.data.HttpProxy({
url: 'project.php?action=View'
}),
sortInfo:{field: 'project_date', direction: "desc"},
groupField:'client_name',
remoteSort: true
});

var cm = new Ext.grid.ColumnModel([
{
id: 'project_id',
header: "Project ID",
dataIndex: 'project_id',
width: 100
//hidden:true
},{
id: 'client_name',
header: "Client Name",
dataIndex: 'client_name',
width: 100
//hidden:true
},{
id: 'project_name',
header: "Project Name",
dataIndex: 'project_name',
width: 100
//hidden:true
},{
id: 'project_date',
header: "Project Date",
dataIndex: 'project_date',
width: 100
//hidden:true
},{
id: 'project_frequency',
header: "Project Frequency",
dataIndex: 'project_frequency',
width: 100
//hidden:true
},{
id: 'project_type',
header: "Project Type",
dataIndex: 'project_type',
width: 100
//hidden:true
},{
id: 'project_status',
header: "Project Status",
dataIndex: 'project_status',
width: 100
//hidden:true
},
expander
]);

cm.defaultSortable = true;

var grid = new Ext.grid.GridPanel({
el:'topic-grid',
width:1052,
height:450,
title:'Project Info',
iconCls:'icon-grid',
plugins: expander,
collapsible: true,
store: store,
cm: cm,
trackMouseOver:true,
stripeRows: true,
loadMask: true,
view: new Ext.grid.GroupingView({
forceFit:true,
groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
}),
viewConfig: {
forceFit:true,
enableRowBody:true
},
tbar:['-',{
text:'Add Project',
tooltip:'Add a new project',
iconCls:'add',
handler: function(){jron_add(store);}
},'-', {
text: 'Delete Project',
tooltip:'Delete the selected project',
iconCls:'remove',
handler: function(){jron_del(store, grid);}
},'-', {
text: 'Edit Project',
tooltip:'Edit the selected project',
iconCls:'edit',
handler: function(){doEdit(store, grid);}
},{
text: 'Refresh Data',
tooltip: 'Click to Refresh',
handler: refreshData,
iconCls: 'refresh'
}],
bbar: new Ext.PagingToolbar({
pageSize: jpageSize,
store: store,
displayInfo: true,
displayMsg: 'Displaying users {0} - {1} of {2}',
emptyMsg: "No users to display",
items:[]
})
});

grid.render();

var tb = grid.getTopToolbar();
tb.addSeparator();

filterBtn = new Ext.Toolbar.MenuButton({
iconCls: 'x-btn-text-icon option',
cls: 'x-btn-text-icon',
text: 'Filter',
tooltip: 'Filter Results By...',
menu: {items: [
new Ext.menu.CheckItem({ text: 'Client Name', value: 'client_name', checked: false, group: 'filter', checkHandler: onItemCheck }),
new Ext.menu.CheckItem({ text: 'Project Name', value: 'project_name', checked: false, group: 'filter', checkHandler: onItemCheck }),
new Ext.menu.CheckItem({ text: 'Project Type', value: 'project_type', checked: false, group: 'filter', checkHandler: onItemCheck })
]},
minWidth: 105
});

tb.add(filterBtn);

var filter = new Ext.app.SearchField({
width:240,
store: store,
paramName: 'q'
});

tb.add(filter);

function onItemCheck(item, checked)
{
if (checked){
filterBtn.setText(item.text + ':');
filerTxt = item.value;
}
}

store.on('beforeload', function() {
store.baseParams = {filterValue: filter.getValue(),filterTxt: filerTxt};
});

store.load({params:{start:0, limit:jpageSize}});

grid.on('rowdblclick', function(gridPanel, rowIndex, e){
var selectedId = store.data.items[rowIndex].id;
new jron_edit(store,selectedId,NewAccount,store.data.items[rowIndex].data);
});













function doEdit(dataStore, gridPanel){

var m = gridPanel.getSelections();
if(m.length > 0)
{
if(grid.selModel){
var selId = grid.selModel.getSelected().id;
var requestID = {empID:selId};
var rec = grid.selModel.getSelected().data;
store.baseParams = {tabler: birmytest};
new jron_edit(store, selId,NewAccount,rec);


}
else{
Ext.MessageBox.alert('Some Alert', 'Some Alert2');
}
}
else
{
Ext.MessageBox.alert('Error', 'Please select at least one record.');
}
/*
if(grid.selModel){
var selId = grid.selModel.getSelected().id;
new jron_edit(store, selId,NewAccount,grid.selModel.getSelected().data);
}
else{
Ext.MessageBox.alert('Some Alert', 'Some Alert2');
}
*/
}
});

Ext.app.SearchField = Ext.extend(Ext.form.TwinTriggerField,{
initComponent : function(){
if(!this.store.baseParams){
this.store.baseParams = {};
}
Ext.app.SearchField.superclass.initComponent.call(this);
this.on('specialkey', function(f, e){
if(e.getKey() == e.ENTER){
this.onTrigger2Click();
}
}, this);
},

validationEvent:false,
validateOnBlur:false,
trigger1Class:'x-form-clear-trigger',
trigger2Class:'x-form-search-trigger',
hideTrigger1:true,
width:180,
hasSearch : false,
paramName : 'query',

onTrigger1Click : function(){
if(this.hasSearch){
this.el.dom.value = '';
var o = {start: 0, limit:jpageSize};
this.store.baseParams = this.store.baseParams || {};
this.store.baseParams[this.paramName] = '';
this.store.reload({params:o});
this.triggers[0].hide();
this.hasSearch = false;
}
},

onTrigger2Click : function(){
var v = this.getRawValue();
if(v.length < 1){
this.onTrigger1Click();
return;
}
if(v.length < 2){
Ext.Msg.alert('Invalid Search', 'You must enter a minimum of 2 characters to search the user');
return;
}
if(filerTxt == 'jron'){
Ext.Msg.alert('Invalid Search', 'You must select a property to filter');
return;
}
this.store.baseParams[this.paramName] = v;
var o = {start: 0, limit:jpageSize};
this.store.reload({params:o});
this.hasSearch = true;
this.triggers[0].show();
this.focus();
}
});

////////////////////////////////////////////////////

birmy
8 Apr 2008, 12:51 PM
file: project.html continued...






var jron_add = function(dataStore){

var Clients = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url:'project.php?action=ViewClients'
}),
reader: new Ext.data.JsonReader({
root: 'results',
id: 'client_id'
}, [ 'client_id', 'client_name']
),
remoteSort: false
});

var Employees = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url:'project.php?action=ViewEmployees'
}),
reader: new Ext.data.JsonReader({
root: 'results',
id: 'employee_id'
}, [ 'employee_id', 'employee_name']
),
remoteSort: false
});

var formPanel = new Ext.form.FormPanel({
//baseCls: 'x-plain',
//labelWidth: 250,
//bodyStyle:'padding:5px',
monitorValid:true,
url:'project.php?action=createDemouser',

labelAlign: 'top',
frame:true,
bodyStyle:'padding:5px 5px 0',
width: 600,

items: [{
layout:'column',
items:[{
columnWidth:.5,
layout: 'form',
items: [{
xtype:'textfield',
fieldLabel: 'Project Name',
name: 'project_name',
anchor:'95%'
},new Ext.form.ComboBox({
fieldLabel: 'Project Type',
hiddenName:'project_type',
editable: false,
store: new Ext.data.SimpleStore({
fields: ['value', 'text'],
data : [['Regular','Regular'],['AdHoc','AdHoc']]
}),
valueField:'value',
displayField:'text',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText: 'Select Type',
selectOnFocus:true,
allowBlank:false
}),new Ext.form.ComboBox({
fieldLabel: 'Project Status',
hiddenName:'project_status',
editable: false,
store: new Ext.data.SimpleStore({
fields: ['value', 'text'],
data : [['Active','Active'],['Inactive','Inactive']]
}),
valueField:'value',
displayField:'text',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText: 'Select Status',
selectOnFocus:true,
allowBlank:false
})]
},{
columnWidth:.5,
layout: 'form',
items: [new Ext.form.ComboBox({
fieldLabel: 'Client Name',
name: 'client_name',
hiddenName: 'client_id',
store: Clients,
valueField: 'client_id',
displayField: 'client_name',
editable: false,
mode: 'remote',
triggerAction: 'all',
emptyText: 'Select Client',
selectOnFocus: true,
allowBlank: false
}),new Ext.form.ComboBox({
fieldLabel: 'Project Frequency',
hiddenName:'project_frequency',
editable: false,
store: new Ext.data.SimpleStore({
fields: ['value', 'text'],
data : [['Daily','Daily'],['Weekly','Weekly'],['Bi Weekly','Bi Weekly'],['Monthly','Monthly'],['Quarterly','Quarterly'],['Yearly','Yearly'],['Other','Other']]
}),
valueField:'value',
displayField:'text',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText: 'Select Frequency',
selectOnFocus:true,
allowBlank:false
}),new Ext.form.ComboBox({
fieldLabel: 'Project Assigned To',
name: 'employee_name',
hiddenName: 'employee_id',
store: Employees,
valueField: 'employee_id',
displayField: 'employee_name',
editable: false,
mode: 'remote',
triggerAction: 'all',
emptyText: 'Select Employee',
selectOnFocus: true,
allowBlank: false
})]
}]
},{
xtype:'htmleditor',
id:'project_desc',
fieldLabel:'Project Notes',
height:100,
anchor:'98%'
}],


buttons: [{
text: 'Add Project',
handler: function(){
if(formPanel.form.isValid()){
formPanel.form.submit({
waitTitle:'Connecting',
waitMsg:'In processing...',
failure: function(form, action){
Ext.MessageBox.alert('Error Message:', 'Server not reachable.<br> Error:' + action.result.errorInfo + '');
},
success: function(form, action){
Ext.MessageBox.alert('Project Added Sucessfully', action.result.info);
window.hide();
dataStore.load({params:{start:0, limit:jpageSize}});
}
});
}
else{
Ext.MessageBox.alert('Errors', 'Please fix the errors noted.');
}
}
},{
//text: 'Cancel',
//handler: function(){window.hide();}
text:'Reset',
handler: function(){formPanel.form.reset();}
}]
});

var window = new Ext.Window({
title: 'Add Project',
width: 550,
height:620,
minWidth: 300,
minHeight: 250,
modal: true,
layout: 'fit',
plain:true,
bodyStyle:'padding:5px;',
buttonAlign:'center',
items: formPanel
});
window.show();
};

//////////////////////////////////////////////////////////////////


var jron_del = function(dataStore, gridPanel){
var m = gridPanel.getSelections();
var nimal = gridPanel.selModel.selections.keys;
var birmy = gridPanel.selModel.selections.items;
alert(birmy);
if(m.length > 0)
{
Ext.MessageBox.confirm('Message', 'Do you really want to delete them?',
function(btn) {
if(btn == 'yes')
{





var jsonData = "[";
for(var i = 0, len = m.length; i < len; i++){
//var ss = "{\"project_id\":\"" + m[i].get("project_id") + "\"}";
var ss = "\"" + m[i].get("project_id") + "\"";
if(i==0)
jsonData = jsonData + ss ;
else
jsonData = jsonData + "," + ss;
dataStore.remove(m[i]);
}
jsonData = jsonData + "]";




Ext.MessageBox.show({
msg: 'Deleting rows: ' + nimal,
progressText: 'Deleting...',
width:300,
wait:true,
waitConfig: {interval:200}
})



Ext.Ajax.request({
url: 'project.php?action=deleteDemouserP', //url to server side script
method: 'POST',
//params:Ext.util.JSON.encode(nimal),//the unique id(s)





//params:nimal,//the unique id(s)
params:{start:0, limit:jpageSize, pid:jsonData},


/*
callback: function (options, success, response) {
if (success) { //success will be true if the request succeeded
Ext.MessageBox.hide();
var alertcontent=ConvertResponseText(response.responseText,"",false,false);
Ext.MessageBox.alert("Deleted!",alertcontent);
} else {
Ext.MessageBox.hide();
Ext.MessageBox.alert("Some Alert,???",response.responseText);
}
},

*/
//the function to be called upon failure of the request (server script, 404, or 403 errors)
failure:function(response,options){
Ext.MessageBox.hide();
ReturnValue = Ext.MessageBox.alert("Failed!","??????!??????!");
},
success:function(response,options){
Ext.MessageBox.hide();
//datastore.load();
}
})// end Ajax request









//dataStore.load({params:{start:0, limit:jpageSize, delData:jsonData}});
dataStore.load();
}
}
);
}
else
{
Ext.MessageBox.alert('Error', 'To process delete action, please select at least one item to continue');
}
};


///////////////////////////////////////////////////////////////////////


var jron_edit = function(dataStore, selectedId, NewAccount, rec){

var Clients = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url:'project.php?action=ViewClients'
}),
reader: new Ext.data.JsonReader({
root: 'results',
id: 'client_id'
}, [ 'client_id', 'client_name']
),
remoteSort: false
});

var Employees = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url:'project.php?action=ViewEmployees'
}),
reader: new Ext.data.JsonReader({
root: 'results',
id: 'employee_id'
}, [ 'employee_id', 'employee_name']
),
remoteSort: false
});


var formPanel = new Ext.form.FormPanel({
//baseCls: 'x-plain',
//labelWidth: 250,
//bodyStyle:'padding:5px',
monitorValid:true,
url:'project.php?action=editDemouser&id=' + selectedId + '',

labelAlign: 'top',
frame:true,
bodyStyle:'padding:5px 5px 0',
width: 600,


items: [{
layout:'column',
items:[{
columnWidth:.5,
layout: 'form',
items: [{
xtype:'textfield',
fieldLabel: 'Project Name',
name: 'project_name',
value: rec['project_name'],
autocomplete: 'off',
anchor:'95%'
},new Ext.form.ComboBox({
fieldLabel: 'Project Type',
hiddenName:'project_type',
editable: false,
store: new Ext.data.SimpleStore({
fields: ['value', 'text'],
data : [['Regular','Regular'],['AdHoc','AdHoc']]
}),
valueField:'value',
value: rec['project_type'],
displayField:'text',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText: 'Select Type',
selectOnFocus:true,
autocomplete: 'off',
allowBlank:false
}),new Ext.form.ComboBox({
fieldLabel: 'Project Status',
hiddenName:'project_status',
editable: false,
store: new Ext.data.SimpleStore({
fields: ['value', 'text'],
data : [['Active','Active'],['Inactive','Inactive']]
}),
valueField:'value',
value: rec['project_status'],
displayField:'text',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText: 'Select Status',
selectOnFocus:true,
autocomplete: 'off',
allowBlank:false
})]
},{
columnWidth:.5,
layout: 'form',
items: [new Ext.form.ComboBox({
fieldLabel: 'Client',
name: 'clientname',
hiddenName: 'client_id',
store: Clients,
valueField: 'client_id',
value: rec['client_name'],
editable: false,
displayField: 'client_name',
typeAhead: true,
mode: 'remote',
triggerAction: 'all',
emptyText: 'Select Client',
selectOnFocus: true,
autocomplete: 'off',
allowBlank: false
}),new Ext.form.ComboBox({
fieldLabel: 'Project Frequency',
hiddenName:'project_frequency',
editable: false,
store: new Ext.data.SimpleStore({
fields: ['value', 'text'],
data : [['Daily','Daily'],['Weekly','Weekly'],['Bi Weekly','Bi Weekly'],['Monthly','Monthly'],['Quarterly','Quarterly'],['Yearly','Yearly'],['Other','Other']]
}),
valueField:'value',
value: rec['project_frequency'],
displayField:'text',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText: 'Select Frequency',
selectOnFocus:true,
allowBlank:false
}),new Ext.form.ComboBox({
id:'employee-combo',
fieldLabel: 'Project Assigned To',
name: 'employee_name',
hiddenName: 'employee_id',
store: Employees,
valueField: 'employee_id',
value: rec['employee_name'],
displayField: 'employee_name',
editable: false,
mode: 'remote',
triggerAction: 'all',
emptyText: 'Select Employee',
selectOnFocus: true,
autocomplete: 'off',
allowBlank: false
})]
}]
},{
xtype:'htmleditor',
id:'project_desc',
fieldLabel:'Project Notes',
height:100,
value: rec['project_desc'],
autocomplete: 'off',
anchor:'98%'
}],

buttons: [{
text: 'Update Client',
handler: function(){
if(formPanel.form.isValid()){
formPanel.form.submit({
waitTitle:'Connecting',
waitMsg:'In processing...',
failure: function(form, action){
Ext.MessageBox.alert('Error Message:', 'Server not reachable.<br> Error:' + action.result.errorInfo + '');
},
success: function(form, action){
Ext.MessageBox.alert('Project Updated Sucessfully', action.result.info);
window.hide();
dataStore.load({params:{start:0, limit:jpageSize}});
}
});
}
else{
Ext.MessageBox.alert('Errors', 'Please fix the errors noted.');
}
}
},{
//text: 'Cancel',
//handler: function(){window.hide();}
text:'Reset',
handler: function(){formPanel.form.reset();}
}]
});

var window = new Ext.Window({
title: 'Edit Project',
width: 565,
height:620,
minWidth: 300,
minHeight: 250,
modal: true,
layout: 'fit',
plain:true,
bodyStyle:'padding:5px;',
buttonAlign:'center',
items: formPanel
});
window.show();
};


</script>
</body>
</html>

birmy
8 Apr 2008, 12:52 PM
GridPanel JSON: project.php?action=View






({"totalCount":"5","results":[{"project_id":"1","client_id":"2","client_name":"Poise","employee_name"
:"Pavan Kumar","employee_id":"2","project_name":"CNN Homepage Links","project_date":"04\/04\/2008","project_frequency"
:"Daily","project_type":"Regular","project_desc":"&amp;nbsp;Get CNN Links from the CNN.com homepage.
&lt;br&gt;","project_status":"Active"},{"project_id":"2","client_id":"1","client_name":"Maxim","employee_name"
:"Birmy Nimal","employee_id":"1","project_name":"Email Products Report","project_date":"04\/04\/2008"
,"project_frequency":"Weekly","project_type":"Regular","project_desc":"Email Campaigns","project_status"
:"Active"},{"project_id":"3","client_id":"1","client_name":"Maxim","employee_name":"Pavan Kumar","employee_id"
:"2","project_name":"Monthly Scorecard","project_date":"04\/04\/2008","project_frequency":"Monthly","project_type"
:"Regular","project_desc":"&nbsp;EW.com Monthly Scorecard.<br>","project_status":"Active"},{"project_id"
:"4","client_id":"3","client_name":"Sports Star","employee_name":"Pavan Kumar","employee_id":"2","project_name"
:"SI.com Keywords Report","project_date":"04\/04\/2008","project_frequency":"Weekly","project_type":"Regular"
,"project_desc":"<P>&nbsp;<\/P>","project_status":"Active"},{"project_id":"5","client_id":"1","client_name"
:"Maxim","employee_name":"Birmy Nimal","employee_id":"1","project_name":"Google Yahoos","project_date"
:"04\/08\/2008","project_frequency":"Weekly","project_type":"Regular","project_desc":".&amp;nbsp;SERPs
.","project_status":"Active"}]})








FormPanel JSON: project.php?action=ViewEmployees






({"totalCount":"3","results":[{"employee_id":"1","employee_name":"Birmy Nimal"},{"employee_id":"2","employee_name"
:"Pavan Kumar"},{"employee_id":"3","employee_name":"Anoop Karunakarans"}]})




FormPanel JSON: project.php?action=ViewClients








({"totalCount":"3","results":[{"client_id":"1","client_name":"Maxim"},{"client_id":"2","client_name"
:"Poise"},{"client_id":"3","client_name":"Sports Star"}]})

birmy
8 Apr 2008, 12:56 PM
My Screenshots

birmy
8 Apr 2008, 11:37 PM
any help please?? am sooo dead!!

devnull
9 Apr 2008, 8:39 AM
Try using 'closeAction: "hide"', or making sure that none of the form elements have id's. By default the window is destroyed each time it is closed, which can cause problems in the underlying dom if id's are used anywhere.

enterco
9 Apr 2008, 12:01 PM
Try using 'closeAction: "hide"', or making sure that none of the form elements have id's. By default the window is destroyed each time it is closed, which can cause problems in the underlying dom if id's are used anywhere.


I have a problem similar to the one described by birmy. I had an tabpanel with a simple GridPanel, which I transformed into a EditorGridPanel, with textfields and combos. I use "closeaction: 'hide'".

This is the behaviour I observed:
1. All is fine if i use only GridPanel
2. Everything is fine if I use EditorGridPanel with textfields only, no matter how many times i close/open the EditorGrid in the tab
3. When I add a combo in a cell, firebug pops up a message like birmy's, and the combos are usable only at the first tabpanel display. At any subsequent reopening, the combo's can't be used. I have to reload the page to make it work again, or to remove the close option.

johnstontrav
25 Jun 2008, 4:09 PM
I have this problem too. Has anyone tracked down a solution?