jazz_sencha
18 Mar 2011, 7:25 PM
Hi ,
I have a window which have a tab panel having three tabs and in one of them , i have a form panel, So while loading the window, I am giving a DWR call to get the banker record inside the Onrender method of the window panel and trying to load the response object to the form panel
the code looks like this:
onRender: function(ct, position) {
BankerService.getBanker(bankerid, function(ExtForm){
//banker the ref object for the tab panel
//details ref object from the banker form panel
//banker is the java model (bean class) which has all the banker values
this.banker.details.getForm().loadRecord(ExtForm.data.banker);
}.createDelegate(this));
}
In the reponse object i was able to get all the values inside the render function, but the values are not getting set into the from panel variables. Below is the code block for the form panel
ILC.ui.bankerDetailForm = Ext.extend(Ext.FormPanel,{
initComponent:function() {
var config = {
ref: '/details',
frame:true,
bodyStyle: 'padding: 0px 5px 0px 5px;',
//width:680,
items: [{
layout:'column', //Layout defined for the from panel
items:[{ //First Column starts here
columnWidth:.5,
layout: 'form',
anchor:'96%',
labelWidth: 133,
bodyStyle: 'padding:5px;',
items: [{ // Column -1 : Row -1
xtype: 'fieldset',
title: 'Installation Information',
autoHeight: true,
readOnly: true,
items :[
{
xtype: 'displayfield',
fieldLabel: 'bankerNumber',
name: 'bankNumber',
id:'mNumber'
},
{
xtype: 'displayfield',
fieldLabel: 'Lat/Long',
name: 'lattitude',
},
.........
This code is not throwing any errors or warnings.. but the form is just not getting populated.
Any pointers would be of great help.
Thanks
jazz
I have a window which have a tab panel having three tabs and in one of them , i have a form panel, So while loading the window, I am giving a DWR call to get the banker record inside the Onrender method of the window panel and trying to load the response object to the form panel
the code looks like this:
onRender: function(ct, position) {
BankerService.getBanker(bankerid, function(ExtForm){
//banker the ref object for the tab panel
//details ref object from the banker form panel
//banker is the java model (bean class) which has all the banker values
this.banker.details.getForm().loadRecord(ExtForm.data.banker);
}.createDelegate(this));
}
In the reponse object i was able to get all the values inside the render function, but the values are not getting set into the from panel variables. Below is the code block for the form panel
ILC.ui.bankerDetailForm = Ext.extend(Ext.FormPanel,{
initComponent:function() {
var config = {
ref: '/details',
frame:true,
bodyStyle: 'padding: 0px 5px 0px 5px;',
//width:680,
items: [{
layout:'column', //Layout defined for the from panel
items:[{ //First Column starts here
columnWidth:.5,
layout: 'form',
anchor:'96%',
labelWidth: 133,
bodyStyle: 'padding:5px;',
items: [{ // Column -1 : Row -1
xtype: 'fieldset',
title: 'Installation Information',
autoHeight: true,
readOnly: true,
items :[
{
xtype: 'displayfield',
fieldLabel: 'bankerNumber',
name: 'bankNumber',
id:'mNumber'
},
{
xtype: 'displayfield',
fieldLabel: 'Lat/Long',
name: 'lattitude',
},
.........
This code is not throwing any errors or warnings.. but the form is just not getting populated.
Any pointers would be of great help.
Thanks
jazz