Ext is not defined

81 views
Skip to first unread message

David Ojeda

unread,
Apr 21, 2008, 4:46:50 PM4/21/08
to GWT-Ext Developer Forum
Hello,
I posted this in GWT Forums, but they told me I should post here... So
here it goes:

I am experiencing some trouble using GWT-Ext in hosted mode. I have an
application that uses GWT classes, GWT-Ext and GWT-Extux. Today I
found out using Firebug that there are some JavaScript errors:

Ext is not defined
[Break on this error] Ext.ux.Multiselect = Ext.extend(Ext.form.Field,
{
Multiselect.js (line 3)
Ext is not defined
[Break on this error] Ext.namespace("Ext.ux");
DDView.js (line 5)
Ext is not defined
[Break on this error] Ext.ux.MultiMonthCalendar =
Ext.extend(Ext.Component, {
MultiMonthCalenda... (line 16)
Ext is not defined
[Break on this error] Ext.namespace('Ext.ux.grid');
BufferedGridDragZ... (line 14)
Ext is not defined
[Break on this error] Ext.namespace('Ext.ux');
BufferedGridToolb... (line 21)
Ext is not defined
[Break on this error] Ext.namespace('Ext.ux.grid');
BufferedGridView.... (line 19)
Ext is not defined
[Break on this error] Ext.namespace('Ext.ux.data');
BufferedJsonReade... (line 11)
Ext is not defined
[Break on this error] Ext.namespace('Ext.ux.grid');
BufferedRowSelect... (line 11)
Ext is not defined
[Break on this error] Ext.namespace('Ext.ux.grid');
BufferedStore.js (line 11)
Ext is not defined
[Break on this error] Ext.ux.ManagedIFrame = function(){
ext-ux-miframe.js (line 49)

My application works with Firefox and hosted mode, but not with IE. My
Module HTML and XML are:
<html>
<head>
<title>title</title>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />

<script type="text/javascript"
src="la.package.Module.nocache.js"></script>

<!--include the Ext CSS, and use the gray theme-->
<link rel="stylesheet" type="text/css" href="js/ext/resources/css/
ext-all.css"/>
<link id="theme" rel="stylesheet" type="text/css" href="js/ext/
resources/css/xtheme-gray.css"/>

<link rel="stylesheet" type="text/css" href="css/digitel-
ext.css" /

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

<script type="text/javascript" src="js/ext/adapter/ext/ext-
base.js"></script>
<script type="text/javascript" src="js/ext/ext-all.js"></script>
</head>

<body>
<iframe id="__gwt_historyFrame" style="width:0;height:0;border:
0"></iframe>
<table cellspacing="0" cellpadding="0" border="0" width="100%"
align="center">
<tr>
<td align="center" id="headerSlot"></td>
</tr>
<tr>
<td align="center" id="contentSlot"></td>
</tr>
<tr>
<td align="center" id="footerSlot"></td>
</tr>
</table>
</body>
</html>

<module>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>

<!-- Specify the app entry point class. -->
<entry-point class='la.package.Module'/>

</module>

I figured that the 'Ext' is not defined error could be caused by the
order of the javascript. I tried putting the
la.package.Module.nocache.js script as my final script, which
apparently solves the error. However, in hosted mode nothing is
rendered and it only displays a white screen:
...
<head>
<title>title</title>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />

<!--include the Ext CSS, and use the gray theme-->
<link rel="stylesheet" type="text/css" href="js/ext/resources/css/
ext-all.css"/>
<link id="theme" rel="stylesheet" type="text/css" href="js/ext/
resources/css/xtheme-gray.css"/>

<link rel="stylesheet" type="text/css" href="css/digitel-
ext.css" /

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

<script type="text/javascript" src="js/ext/adapter/ext/ext-
base.js"></script>
<script type="text/javascript" src="js/ext/ext-all.js"></script>

<script type="text/javascript"
src="la.package.Module.nocache.js"></script>
</head>
...

I am using gwt-1.4.61 (linux), gwtext-2.0.1, and gwtextux-0.1.1
Could anyone please help me on this one?

Thanks a lot!

David Ojeda

leo_BsAs

unread,
Apr 22, 2008, 8:32:18 AM4/22/08
to GWT-Ext Developer Forum
Hi David,

"I figured that the 'Ext' is not defined error could be caused by the
order of the javascript."
Yes, thre browser need to load first the Ext resources...

I noticed that you didn't post a complete module definition (perhaps
you want to resume), but this a piece of code taken from the GWT-EXT
tutorial (http://gwt-ext.com/wiki/index.php/
Tutorial:Introduction_to_GWT-Ext_2.0#Configuring_Your_Application)

<module>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<!-- Inherit the GWTExt Toolkit library configuration. -->
<inherits name='com.gwtext.GwtExt' />
<!-- Specify the app entry point class. -->
<entry-point class='com.mycompany.mypackage.client.HelloWorld' />
<stylesheet src="js/ext/resources/css/ext-all.css" />
<script src="js/ext/adapter/ext/ext-base.js" />
<script src="js/ext/ext-all.js" />
</module>

"However, in hosted mode nothing is
rendered and it only displays a white screen"
Perhaps, as the resources are relative, they are not relative to the
host... :-/

I hope it helps...
regards,

Leo

David Ojeda

unread,
Apr 22, 2008, 10:49:02 AM4/22/08
to GWT-Ext Developer Forum
Hi Leo,
thanks for your attention.
Yes, in fact that is not my complete module definition. I revised it
according to the tutorial, removing the javascripts from the html and
declaring them on the module xml. My current configuration is:

Module XML:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<module>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name="com.google.gwt.user.User"/>
<inherits name="com.google.gwt.i18n.I18N"/>
<inherits name="com.gwtext.GwtExt"/>
<inherits name="com.gwtextux.GwtExtUx"/>

<!-- Specify the app entry point class. -->
<entry-point class="la.integra.ui.gwt.client.ConfModule"/>

<stylesheet src="js/ext/resources/css/ext-all.css"/>
<stylesheet src="js/ext/resources/css/xtheme-gray.css"/>


<script src="js/ext/adapter/ext/ext-base.js"/>
<script src="js/ext/ext-all.js"/>

<servlet class="la.integra.ui.gwt.server.ServiceLoggerImpl" path="/
gwt/services/ServiceLogger"/>
<servlet
class="la.integra.ui.gwt.server.ServicePropertiesEditorImpl" path="/
gwt/services/ServicePropertiesEditor"/>

</module>

The html is:
<html>
<head>
<title>Modulo de Configuraci&oacute;n. Integra</
title>
<script language='javascript'
src='la.integra.ui.gwt.ConfModule.nocache.js'></script>
</head>

<body>
<iframe id="__gwt_historyFrame" style="width:0;height:0;border:0"></
iframe>
</body>
</html>

With this configuration, everything works ok on hosted mode but the
'Ext' is not defined remains.

I could not move the script declaration to the body since it doesn't
work in hosted mode, I raised the loglevel of the shell and it seems
that the request for the module javascript is never made. I also
watched the logs when the javascript order is [ext, my module]. There
are a lot of requests but one request never occurs:
[TRACE] Request 40: http://localhost:8888/la.integra.ui.gwt.ConfModule/hosted.html

Leo: what do you mean by "Perhaps, as the resources are relative, they
are not relative to the
host..."?
Maybe you mean that when using hosted mode the resources are not
found? I don't think this is the problem since changing the order of
the javascript fixes the problem on hosted mode.

Best regards,
David

leo_BsAs

unread,
Apr 22, 2008, 11:17:42 AM4/22/08
to GWT-Ext Developer Forum
David... reviewing your exception trace, I think that your problem is
that the gwt-ext-ux library is old... (you said that you're using
gwtextux-0.1.1). Try to use the last one, (not from "Latest Builds"
link, download it from the gwt-ext-ux project - the zipped project).
I'm using the gwtextux-0.2.
Perhaps that is the solution.

Let me know...

Leo

David Ojeda

unread,
Apr 22, 2008, 11:36:43 AM4/22/08
to gwt...@googlegroups.com
Leo, I tried your suggestion but it didn't solve the problem. Perhaps I should also upgrade to gwt-ext 2.0.3?
Although I fear that something else could break, I will try to upgrade. But first, I will try the sample applications on browser and hosted mode. I'll keep you updated...

Thanks a lot...
David

dazhu

unread,
Apr 30, 2008, 5:00:21 AM4/30/08
to GWT-Ext Developer Forum
Hi Leo

I am currently using gwt-ext-ux in version 0.2 , but i still got the
exact wrong message in normal web mode , but it is fine in hosted
mode. I don't know why, is it possible that it is caused by the
compatibility problem between gwt-ext-ux and gwt-ext ? because i am
using gwt-ext in version 2.0.2 not the latest 2.0.3
On Apr 22, 11:17 pm, leo_BsAs <aito...@yahoo.es> wrote:
> David... reviewing your exception trace, I think that your problem is
> that thegwt-ext-ux library is old... (you said that you're using
> gwtextux-0.1.1). Try to use the last one, (not from "Latest Builds"
> link, download it from thegwt-ext-ux project - the zipped project).
> > > > I posted this inGWTForums, but they told me I should post here... So
> > > > here it goes:
>
> > > > I am experiencing some trouble usingGWT-Ext in hosted mode. I have an
> > > > application that usesGWTclasses,GWT-Ext andGWT-Extux. Today I
> > > > I am usinggwt-1.4.61 (linux), gwtext-2.0.1, and gwtextux-0.1.1
> > > > Could anyone please help me on this one?
>
> > > > Thanks a lot!
>
> > > > David Ojeda- Hide quoted text -
>
> - Show quoted text -

David Ojeda

unread,
Apr 30, 2008, 9:58:26 AM4/30/08
to gwt...@googlegroups.com
Hello,

I have not tried yet upgrading tu gwt-ext 2.0.3 since it could take some time and I don't have any right now... Please let me know if you try this...

Thanks,
David

khadaa

unread,
Jun 4, 2008, 10:39:41 PM6/4/08
to GWT-Ext Developer Forum
David, did you solve this problem? if yes, please write how to solve
this problem.

Thanks,

khadaa



On Apr 30, 9:58 pm, "David Ojeda" <david.oj...@gmail.com> wrote:
> Hello,
>
> I have not tried yet upgrading tu gwt-ext 2.0.3 since it could take some
> time and I don't have any right now... Please let me know if you try this...
>
> Thanks,
> David
>
> ...
>
> read more »

kg

unread,
Jun 16, 2008, 9:24:17 AM6/16/08
to GWT-Ext Developer Forum
Hi All.
I has same problem("Ext is not definded") but i change order in module
definition (*.gwt.xml) and now everything is OK.
My module:
<module>
<entry-point class='somepackage.EntryPoint />

<stylesheet src="js/ext/resources/css/ext-all.css" />
<stylesheet src="js/ext/resources/css/xtheme-gray.css" />

<script src="js/ext/adapter/ext/ext-base.js" />
<script src="js/ext/ext-all.js" />

<source path="somepackage/client" />
<public path="public" />

<inherits name='com.gwtextux.GwtExtUx' />

</module>

--
KG

On 5 Cze, 04:39, khadaa <khada...@gmail.com> wrote:
> David, did you solve this problem? if yes, please write how to solve
> this problem.
>
> Thanks,
>
> khadaa
>
> On Apr 30, 9:58 pm, "David Ojeda" <david.oj...@gmail.com> wrote:
>
> > Hello,
>
> > I havenottried yet upgrading tu gwt-ext2.0.3 since it could take some
> > time and I don't have any right now... Please let me know if you try this...
>
> > Thanks,
> > David
>
> > On Thu, May 1, 2008 at 4:30 AM, dazhu <tangda...@gmail.com> wrote:
>
> > > Hi Leo
>
> > > I am currently using gwt-ext-ux in version 0.2 , but i still got the
> > > exact wrong message in normal web mode , but it is fine in hosted
> > > mode. I don't know why, is it possible that it is caused by the
> > > compatibility problem between gwt-ext-ux and gwt-ext? because i am
> > > using gwt-extin version 2.0.2notthe latest 2.0.3
> > > On Apr 22, 11:17 pm, leo_BsAs <aito...@yahoo.es> wrote:
> > > > David... reviewing your exception trace, I think that your problem is
> > > > that thegwt-ext-ux library is old... (you said that you're using
> > > > gwtextux-0.1.1). Try to use the last one, (notfrom "Latest Builds"
> > > > link, download it from thegwt-ext-ux project - the zipped project).
> > > > I'm using the gwtextux-0.2.
> > > > Perhaps that is the solution.
>
> > > > Let me know...
>
> > > > Leo
>
> > > > On Apr 22, 11:49 am, David Ojeda <david.oj...@gmail.com> wrote:
>
> > > > > Hi Leo,
> > > > > thanks for your attention.
> > > > > Yes, in fact that isnotmy complete module definition. I revised it
> > > > > I couldnotmove the script declaration to the body since it doesn't
> > > > > work in hosted mode, I raised the loglevel of the shell and it seems
> > > > > that the request for the module javascript is never made. I also
> > > > > watched the logs when the javascript order is [ext, my module]. There
> > > > > are a lot of requests but one request never occurs:
> > > > > [TRACE] Request 40:
> > >http://localhost:8888/la.integra.ui.gwt.ConfModule/hosted.html
>
> > > > > Leo: what do you mean by "Perhaps, as the resources are relative, they
> > > > > arenotrelative to the
> > > > > host..."?
> > > > > Maybe you mean that when using hosted mode the resources arenot
> > > > > found? I don't think this is the problem since changing the order of
> > > > > the javascript fixes the problem on hosted mode.
>
> > > > > Best regards,
> > > > > David
>
> > > > > On Apr 23, 7:32 am, leo_BsAs <aito...@yahoo.es> wrote:
>
> > > > > > Hi David,
>
> > > > > > "I figured that the 'Ext' isnotdefinederror could be caused by
> > > the
> > > > > > order of the javascript."
> > > > > > Yes, thre browser need to load first theExtresources...
>
> > > > > > I noticed that you didn't post a complete module definition (perhaps
> > > > > > you want to resume), but this a piece of code taken from theGWT-EXT
> > > > > > tutorial (http://gwt-ext.com/wiki/index.php/
> > > > > > Tutorial:Introduction_to_GWT-Ext_2.0#Configuring_Your_Application)
>
> > > > > > <module>
> > > > > > <!-- Inherit the core Web Toolkit stuff.
> > > -->
> > > > > > <inherits name='com.google.gwt.user.User' />
> > > > > > <!-- Inherit the GWTExt Toolkit library configuration.
> > > -->
> > > > > > <inherits name='com.gwtext.GwtExt' />
> > > > > > <!-- Specify the app entry point class.
> > > -->
> > > > > > <entry-point
> > > class='com.mycompany.mypackage.client.HelloWorld' />
> > > > > > <stylesheet src="js/ext/resources/css/ext-all.css" />
> > > > > > <script src="js/ext/adapter/ext/ext-base.js" />
> > > > > > <script src="js/ext/ext-all.js" />
> > > > > > </module>
>
> > > > > > "However, in hosted mode nothing is
> > > > > > rendered and it only displays a white screen"
> > > > > > Perhaps, as the resources are relative, they arenotrelative to the
> > > > > > host... :-/
>
> > > > > > I hope it helps...
> > > > > > regards,
>
> > > > > > Leo
>
> > > > > > On Apr 21, 5:46 pm, David Ojeda <david.oj...@gmail.com> wrote:
>
> > > > > > > Hello,
> > > > > > > I posted this inGWTForums, but they told me I should post here...
> > > So
> > > > > > > here it goes:
>
> > > > > > > I am experiencing some trouble usingGWT-Extin hosted mode. I have
> > > an
> > > > > > > application that usesGWTclasses,GWT-ExtandGWT-Extux. Today I
> > > > > > > <!--include theExtCSS, and use the gray theme-->
> > > > > > > I figured that the 'Ext' isnotdefinederror could be caused by
> > > the
> > > > > > > order of the javascript. I tried putting the
> > > > > > > la.package.Module.nocache.js script as
>
> ...
>
> więcej >>

khadaa

unread,
Jun 23, 2008, 12:07:27 AM6/23/08
to GWT-Ext Developer Forum
Thank you very very very much...

I like kg.......!!!
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages