PDA

View Full Version : Problem with Textfield



dimebag
26 Dec 2011, 11:55 AM
Hi,

I´ve got a problem with textfields, here a small example showing the problem. I always get "me.el is null":


<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

<link id="extjs-theme-base" rel="stylesheet" type="text/css" href="http://dime.dynalias.com/ext-4.1.0-b1/resources/css/ext-all.css">
<script type="text/javascript" src="http://dime.dynalias.com/ext-4.1.0-b1/ext-all-dev.js"></script>

<script type="text/javascript" src="http://dime.dynalias.com/ext-4.1.0-b1/src/diag/layout/Context.js"></script>
<script type="text/javascript" src="http://dime.dynalias.com/ext-4.1.0-b1/src/diag/layout/ContextItem.js"></script>

<script type="text/javascript">

Ext.onReady(function(){

Ext.define('MyPanel', {
extend: 'Ext.panel.Panel',
initComponent: function (config) {

this.items = [

Ext.create ('Ext.form.field.Text', {

fieldLabel: 'Host',
id: 'Login-Host',
anchor: '100%'
})
];

// calls parent constructor
this.callParent(config);
}
});

Ext.create ('MyPanel', {

renderTo: 'panel123',
title: 'Panel',
width: 300,
height: 300
});
});

</script>

</head>

<body>
<div id="panel123">Panel</div>
</body>
</html>

mitchellsimoens
26 Dec 2011, 1:31 PM
I am not getting any 'me.el is undefined' error.

dimebag
26 Dec 2011, 11:04 PM
In IE it does, but not in FF and Chrome (latest versions).

Please check: http://codefreun.de/extjs/textfield.jsp

mitchellsimoens
27 Dec 2011, 5:59 AM
Just tried in IE6 and IE9 and no errors.

skirtle
27 Dec 2011, 6:10 AM
Using the URL dimebag provided I'm seeing the error he describes in:

Chrome 16
FF 9
Opera 11.60

All running on Ubuntu. Haven't tried IE.

I can provide the full stacktrace if that'd help.

mitchellsimoens
27 Dec 2011, 6:20 AM
I can too but I cannot reproduce locally. DOCTYPE is the same now, using the ext-all-dev.js (there has been issues on which one before).... In fact, I just copied and pasted and it works when changing the location of the JS files to local but using the ones on codefreun.de it doesn't work.

dimebag
3 Jan 2012, 2:52 AM
I can reproduce it locally by serving the ExtJS-lib via Apache HTTP while using my code within Eclipse