PDA

View Full Version : FormPanel.removeAll () doesn't work



mlc
9 Mar 2009, 7:10 AM
Hi,

i have a Ext.FormPanel and i want to clear this content but removeAll () doesn't work.

firefox message: removeAll is not a function.

please help.

best regards

9 Mar 2009, 7:13 AM
it works for me!

9 Mar 2009, 7:14 AM
see:
http://tdg-i.com/extjsinaction/chapter05/5.9_piecing_together_our_complex_form.html

and paste in firebug:
Ext.getCmp('ext-comp-1002').removeAll()

mlc
9 Mar 2009, 11:51 PM
the example works but my code ....


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>test</title>
<link rel="stylesheet" type="text/css" href="ext-2.2/css/ext-all.css" />
<script type="text/javascript" src="ext-2.2/ext-base.js"></script>
<script type="text/javascript" src="ext-2.2/ext-all.js"></script>
</head>
<body>

<script type="text/javascript">

Ext.onReady(function() {

searchPanel = new Ext.FormPanel
({
title: 'test',
renderTo: Ext.getBody (),
id: 'test',
layout: 'form',
border: false,
cls: 'header1',
bodyStyle: 'padding: 5px;',
width: 220,
defaultType: 'textfield',
defaults: {
allowBlank: false,
width: 100
},
items: [{id: '1', fieldLabel: 'dsf', value: '45', maskRe: /\d+$/}]
});

});

</script>
</body>
</html>and paste Ext.getCmp ('test').removeAll (); to Firebug i become
"TypeError: Ext.getCmp("test").removeAll is not a function"

what is wrong???

kind regards

Animal
10 Mar 2009, 12:49 AM
It's not in Ext 2.2.

mlc
10 Mar 2009, 2:14 AM
/:) ok.
i have updated my ext to 2.2.1 now and its works fine! B)