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.
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.
Linux issue remain though :-).
Seb.
<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 ?
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.
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'/>
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'/>
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
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