ext-all.js inclusion screws up GWT

119 views
Skip to first unread message

sebMarc

unread,
Oct 15, 2007, 3:39:12 PM10/15/07
to GWT-Ext Developer Forum
Hi all,

I have a sample GWT project (version 1.4.60) under eclipse with GWT
designer installed.
I'd like to extend the application with nice GWT-Ext controls.

I followed the documentation, downloaded ext 1.1.1 and GWT-ext,
updated everything.
The application could not be simpler:
public class testmodule implements EntryPoint {
private Button clickMeButton;
public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get();

clickMeButton = new Button();
rootPanel.add(clickMeButton);
clickMeButton.setText("Click me!");
clickMeButton.addClickListener(new ClickListener() {
public void onClick(Widget sender)
{
VerticalPanel p = new VerticalPanel();
TextArea t = new TextArea();
t.setText("SEBASTIEN");
p.add(t);
p.setVisible(true);
RootPanel.get().add(p);
}
});
}
}


It works well with the following html:
<html>
<head>
<title>Wrapper HTML for testmodule</title>
<meta name='gwt:module' content='com.msci.test.testmodule'/>
<link type="text/css" rel='stylesheet' href='testmodule.css'/>
<link rel="stylesheet" type="text/css" href="js/ext/resources/css/
ext-all.css"/>
<link rel="stylesheet" type="text/css" href="js/ext/resources/
css/xtheme-aero.css" />

<script type="text/javascript" src="js/ext/adapter/yui/yui-
utilities.js"></script>
<script type="text/javascript" src="js/ext/adapter/yui/ext-yui-
adapter.js"></script>

</head>
<body class="xtheme-aero">
<script language="javascript" src="gwt.js"></script>
<iframe id="__gwt_historyFrame" style="width:0;height:0;border:0"></
iframe>

</body>
</html>

But as soon as i add:
<script type="text/javascript" src="js/ext/ext-all.js"></script>

It stops working, without any message.

In debug mode it starts and blocks on the following trace:
[TRACE] The development shell servlet received a request for
'hosted.html' in module 'com.msci.test.testmodule'

If i remove <script type="text/javascript" src="js/ext/ext-all.js"></
script>
it works and the next trace is as follow:
[TRACE] Translatable source found in...
[TRACE] jar:file:/var/mscidev/GWT/gwt-linux-1.4.60/gwt-user.jar!/com/
google/gwt/emul/

etc...

In both cases, it seems to be using:
[DEBUG] Using Mozilla install at /var/mscidev/GWT/gwt-linux-1.4.60/
mozilla-1.7.12

I have to say that after a couple of hours of trial and errors i am
quite lost and any help would be most appreciated...

Thanks,

Sebastien Marc.

sebMarc

unread,
Oct 15, 2007, 6:05:37 PM10/15/07
to GWT-Ext Developer Forum
Just tried at home on Windows with latest version of GWT Designer got
the following message while trying to displace a message box:
'$wnd.Ext.EventObject.BACKSPACE' is null or not an object

Code is as follow:
public class Test implements EntryPoint {


private Button clickMeButton;
public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get();

clickMeButton = new Button();
rootPanel.add(clickMeButton);
clickMeButton.setText("Click me!");
clickMeButton.addClickListener(new ClickListener() {
public void onClick(Widget sender) {

MessageBox.alert("Title", "hello World example");
}
});
}
}


Seb.

sebMarc

unread,
Oct 15, 2007, 6:41:16 PM10/15/07
to GWT-Ext Developer Forum
Found the mistake on Windows. The ext-all.js library was not placed at
the right location.

Linux issue remain though :-).

Seb.


Artur Chyży

unread,
Oct 17, 2007, 2:47:43 AM10/17/07
to GWT-Ext Developer Forum
Did you try adding stylesheets and javascript to your
module.gwt.xml ??
For example my module looks like this:

<module>

<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<inherits name='org.gwm.GwtWindowManager'/>
<inherits name="org.gwtwidgets.WidgetLibrary" />
<inherits name="com.gwtext.GwtExt" />
<!-- Specify the app entry point class. -->
<entry-point class='sompackage.client.Main'/>

<stylesheet src='resources/css/xtheme-aero.css'/>
<stylesheet src='resources/css/ext-all.css'/>

<script src="adapter/yui/yui-utilities.js"></script>
<script src="adapter/yui/ext-yui-adapter.js"></script>

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

</module>

It works without a problem. Can you try this ?

sebMarc

unread,
Oct 17, 2007, 5:28:54 AM10/17/07
to GWT-Ext Developer Forum
THANKS!!!! Thanks for the tip Artur

I always though you had to includes stylesheets and javascript in the
html, not in the gwt.xml file.

If i copy them to the .gwt.xml file, it still does not work. If i move
them from the html to the .gwt.xml, it all works!.

Too bad i cannot buy you a good beer or a glass of wine, unless you
are not far from Geneva in switzerland!.

Seb.

Sanjiv Jivan

unread,
Oct 17, 2007, 7:37:10 AM10/17/07
to gwt...@googlegroups.com
Thanks Artur. I'll add a note to the Getting Started instructions. Was there a reason behind this suggestion? Is this a known quirkiness with GWT hosted mode on linux?

Thanks,
Sanjiv

GWT-Ext Widget Library :   http://code.google.com/p/gwt-ext/

On 10/17/07, sebMarc <sebasti...@mscibarra.com> wrote:

THANKS!!!! Thanks for the tip Artur

I always though you had to includes stylesheets and javascript in the
html, not in the gwt.xml file.

If i copy them to the .gwt.xml file, it still does not work. If i move
them from the html to the .gwt.xml, it all works!.

Too bad i cannot buy you a good beer or a glass of wine, unless you
are not far from Geneva in switzerland!.

Seb.



On Oct 17, 8:47 am, Artur Chyży < artur.ch...@gmail.com> wrote:
> Did you try adding stylesheets and javascript to your
> module.gwt.xml ??
> For example my module looks like this:
>
> <module>
>
>         <!-- Inherit the core Web Toolkit stuff.                  -->
>         <inherits name='com.google.gwt.user.User'/>
>         <inherits name=' org.gwm.GwtWindowManager'/>
>         <inherits name="org.gwtwidgets.WidgetLibrary" />
>         <inherits name="com.gwtext.GwtExt" />
>         <!-- Specify the app entry point class.                   -->
>         <entry-point class='sompackage.client.Main'/>
>
>         <stylesheet src='resources/css/xtheme-aero.css'/>
>         <stylesheet src='resources/css/ext- all.css'/>

Artur Chyży

unread,
Oct 18, 2007, 5:24:50 AM10/18/07
to GWT-Ext Developer Forum
Seb, no problem. I'm happy it works.... and unfortunately i'm for
Warsaw, Poland

Sanjiv,
I'm not aware of such thing..... but i use gwt only on linux so can't
really say if this is only a gwt linux problem..

but interesting is that you can define such things (css and scripts)
in module.gwt.xml file... so gwt guys thought it would be useful for
someone

also i recommend firebug (firefox plugin).. it helped me with
resolving this... and also for me it's useful to look at html source
or DOM... sometimes it's good to look at assembler code of web app :)

Artur

On Oct 17, 1:37 pm, "Sanjiv Jivan" <sanjiv.ji...@gmail.com> wrote:
> Thanks Artur. I'll add a note to the Getting Started instructions. Was there
> a reason behind this suggestion? Is this a known quirkiness with GWT hosted
> mode on linux?
>
> Thanks,
> Sanjiv
>
> GWT-Ext Widget Library : http://code.google.com/p/gwt-ext/
>

> On 10/17/07, sebMarc <sebastien.m...@mscibarra.com> wrote:
>
>
>
> > THANKS!!!! Thanks for the tip Artur
>
> > I always though you had to includes stylesheets and javascript in the
> > html, not in the gwt.xml file.
>
> > If i copy them to the .gwt.xml file, it still does not work. If i move
> > them from the html to the .gwt.xml, it all works!.
>
> > Too bad i cannot buy you a good beer or a glass of wine, unless you
> > are not far from Geneva in switzerland!.
>
> > Seb.
>
> > On Oct 17, 8:47 am, Artur Chyży <artur.ch...@gmail.com> wrote:
> > > Did you try adding stylesheets and javascript to your
> > > module.gwt.xml ??
> > > For example my module looks like this:
>
> > > <module>
>
> > > <!-- Inherit the core Web Toolkit stuff. -->
> > > <inherits name='com.google.gwt.user.User'/>
> > > <inherits name='org.gwm.GwtWindowManager'/>
> > > <inherits name="org.gwtwidgets.WidgetLibrary" />
> > > <inherits name="com.gwtext.GwtExt" />
> > > <!-- Specify the app entry point class. -->
> > > <entry-point class='sompackage.client.Main'/>
>
> > > <stylesheet src='resources/css/xtheme-aero.css'/>

> > > <stylesheet src='resources/css/ext-all.css'/>

joti

unread,
Oct 29, 2007, 5:48:16 PM10/29/07
to GWT-Ext Developer Forum
*Moving* (_not_ copying) them to module.gwt.xml worked for me too. At
second a reasonable idea because it cleans up in the html file and the
extstuff is rather dependency-like than html stuff.

But at first sight: Tiring and hard to find and not too documented.
Big thanks to all of you especially Artur for discussing this here and
coming up with a solution, I'll include you in my next toast when I'm
out for a beer. :D

Joti

Sanjiv Jivan

unread,
Oct 29, 2007, 9:15:34 PM10/29/07
to gwt...@googlegroups.com
I located the GWT bug that seems related to this : http://code.google.com/p/google-web-toolkit/issues/detail?id=1545&q=linux

The notes on that bug report show other workarounds. However the script injection in the module file seems like the best solution. I'll update the Getting Started docs with this information.

Sanjiv

lintchung

unread,
Dec 10, 2007, 3:42:23 PM12/10/07
to GWT-Ext Developer Forum
hi i have the same problem

[ERROR] Unable to load module entry point class
com.bluestreak.project.client.main (see associated exception for
details)
com.google.gwt.core.client.JavaScriptException: JavaScript TypeError
exception: '$wnd.Ext.EventObject.BACKSPACE' is null or not an object
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
481)

and i work on windows not linux i thank its not a problem of os i
will tell you if i found this bug

also if any person have solution plz contact me thanks.

On Oct 29, 8:15 pm, "Sanjiv Jivan" <sanjiv.ji...@gmail.com> wrote:
> I located the GWT bug that seems related to this :http://code.google.com/p/google-web-toolkit/issues/detail?id=1545&q=l...
>
> The notes on that bug report show other workarounds. However the script
> injection in the module file seems like the best solution. I'll update the
> Getting Started docs with this information.
>
> Sanjiv
>

Sanjiv Jivan

unread,
Dec 10, 2007, 8:13:52 PM12/10/07
to gwt...@googlegroups.com
Do you see any warnings on missing files in the GWT console window? If not, can you post the JS files that you've included in your host html page. All the ones mentioned in the Getting Started doc ( http://code.google.com/p/gwt-ext/wiki/GettingStarted  ) should be included.

Sanjiv

Merah mohamed amine

unread,
Dec 11, 2007, 9:58:43 AM12/11/07
to gwt...@googlegroups.com
hi Sanjiv i put all js files and i put an js file who contain alert message (native java script) in all the path where i have ext librairie


i mean

    <script type="text/javascript" src="js/ext/adapter/yui/alert.js"></script>
    <script type="text/javascript" src="js/ext/adapter/yui/alert.js"></script>
    <script type="text/javascript" src="js/ext/alert.js"></script>
and i have an alert message its means that the path is including in my page also

i check all my class
    <script type="text/javascript" src="js/ext/adapter/yui/yui-utilities.js"></script>
        <script type="text/javascript" src="js/ext/adapter/yui/ext- yui-adapter.js"></script>
        <script type="text/javascript" src="js/ext/ext-all.js"></script>
and its ok 

also i try with a project who its work and if i coment
  <!--  <script type="text/javascript" src="js/ext/adapter/yui/yui-utilities.js"></script>-->
 or
<!--   <script type="text/javascript" src="js/ext/ext- all.js"></script>-->

i have the same error JavaScript TypeError exception: '$wnd.Ext.EventObject.BACKSPACE' is null or not an

but and when i coment

 <!--   <script type="text/javascript" src="js/ext/adapter/yui/ext-yui-adapter.js"></script>-->
i have this error  '$wnd.Ext' is null or not an object

in coclusion this bug is  when
   <script type="text/javascript" src="js/ext/adapter/yui/yui-utilities.js"></script>
   <script type="text/javascript" src="js/ext/ext-all.js"></script>

not found for x raison wrong path or wrong file , corrupt files exttttttttttt

this problems start when i try to add versioning with clearcase plugin for IBM maybe hi corupt my files i still search the raison and i will tell you if i found any thing have good day

PS: strenge think, in web mode its work  !!!!!!!!!!!!!!

Merah mohamed amine

unread,
Dec 13, 2007, 3:29:47 PM12/13/07
to gwt...@googlegroups.com

Hi

 I remove all clear case (ibm versioning plugin ) and its work fine  i dont want to spend more time on this bug

 

But I have an other probs I fill a EditorGrid with data witch it retrieve from an rpc call but because rpc call are asynchrone

 

My programs continue her execution but when he instantiate the EditorGrid

gridUsers = new EditorGrid( "grid-example2", "560px", "200px" , storeUsers, columnModelUsers );

i have  null pointer exception storeUsers because the data of myrpc call not yet retrieve and my store is not yet instantiate

 

My question is how i can  retrieve data from an rpc call to fill my EditorGrid ??? there is no example in showCase with rpc call

 

Thanks

1world

unread,
Dec 17, 2007, 3:30:07 PM12/17/07
to GWT-Ext Developer Forum
Your grid instantiation should take place in the onSuccess() method of
the asynchronous call.

j

On Dec 13, 3:29 pm, "Merah mohamed amine" <lintch...@gmail.com> wrote:
> Hi
>
> I remove all clear case (ibm versioning plugin ) and its work fine i dont
> want to spend more time on this bug
>
> But I have an other probs I fill a EditorGrid with data witch it retrieve
> from an rpc call but because rpc call are asynchrone
>
> My programs continue her execution but when he instantiate the EditorGrid
>
> gridUsers = *new* EditorGrid( "grid-example2", "560px", "200px", storeUsers,

Merah mohamed amine

unread,
Dec 17, 2007, 3:48:24 PM12/17/07
to gwt...@googlegroups.com
ok thanks its what i do

its the only way to do that???
Reply all
Reply to author
Forward
0 new messages