PDA

View Full Version : Unable to show value in the textfield control



KSagar
21 Dec 2009, 6:55 AM
Hi All,

We are in the process of migration of application from extjs 2.x to 3.x. We have created one sample application which contains form with one textfield control on it. With references to extjs 2.x, this sample application works properly, but when it changes to extjs 3.x, textfield shows blank value. We tried to find and isolate the problem and found that the problem is located in ext-all.js file because when we give the reference of ext-all.js file from extjs 2.x, it application works as expected.



<HTML xmlns:FrmForm="x-schema:FormSchema.xml">
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">

<script type="text/javascript" src="ext-3.0/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext-3.0/ext-all.js"></script>
<link rel="stylesheet" type="text/css" href="ext-3.0/resources/css/ext-all.css" />


<link rel="stylesheet" type="text/css" href="css_file">

<script type="text/javascript" src="javascript_code_file"></script>
<script type="text/javascript" src="javascript_code_file"></script>
<script language="javascript">

var xFormx;
Ext.onReady(function(){
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'side';
xFormx = new Ext.sw.SmartForm({

plugins: new Ext.sw.SmartForm({form:'xFormx'}),
labelWidth: 75,
url:'' (http://www.extjs.com/forum/''),
frame:true,
bodyStyle:'padding:5px 5px 0',
width: 350,
defaults: {width: 230},
defaultType: 'textfield',
items:[
{
frame:true,
xtype:'fieldset',
labelAlign: 'left',
layout:'form',
autoHeight:true,
items:[
{
xtype:'textfield',
fieldLabel: 'First Name',
name: 'first',
allowBlank:false,
value:'522cbaac-6fe8-47c8-b12d-021c404ba65a'
}
],
id: ""
}
],

formId:'xFormx_form',
id:'xFormx',
initSmartForm: function(form){
},

startForm:function(){
xFormx_vp.render(Ext.getBody());
}
});

var xFormx_vp = new Ext.Viewport({
frame:true,
layout: 'fit',
border: false,
hideBorders: true,
items:{
id:'xFormx_pnl',
title:"Item: Stage1 0",
layout: 'fit',
region:'center',
frame:false,
bodyBorder:false,
boarder:false,
hideBorders: true,
autoScroll :true,
items:xFormx
},
id: 'xFormx_vp'
});

xFormx.startForm();
});
</script>
</HEAD>
<BODY class="HRBodyTop" id="body_xFormx">

</BODY>
</HTML>



Please help.