I’m currently failing to get the examples working locally, would be really cool if i could have them working locally to help mock a few UI screens, as I'm just getting to grips with Gxt (3beta4). I started to take notes as I was trying to solve the problem, that way if anyone else wants to follow my footsteps and post what they learned here that would be great
I created a new project in eclipse, using a directory with the examples-src fold contents (from the download) placed inside a directory src.
The project had errors but after including jars for, GWT (latest), GXT3beta4, Javaee-api-6, jabsorb (for the json array/object imports), guice 1.5, app engine sdk, JRE6 I only have one eclipse error now in com.sencha.gxt.examples.resources.server.data.Folder.java;
createQuery here doesn’t match the arguments... and neither of the 2 fixes suggested by eclipse work
TypedQuery<Folder> q = em.createQuery("select f from Folder f where f.parentFolder is null", Folder.class);
I wasn’t sure how to run the examples so I tried to run it from each of the xml files, test, resources, explorer, but these complained about not having html files, so I created a html file for each of the xml files.
I then got this from running it;
00:00:00.016 [WARN] Module declares a servlet class 'com.sencha.gxt.examples.resources.server.ExampleServiceImpl' with a mapping to '/explorer/service', but the web.xml has no corresponding mapping; please add the following lines to your web.xml:
00:00:00.016 [WARN] Module declares a servlet class 'com.sencha.gxt.examples.resources.server.FileServiceImpl' with a mapping to '/explorer/fileservice', but the web.xml has no corresponding mapping; please add the following lines to your web.xml:
And I get a blank page when I go to;
jetty gives me a warning;
I followed the link and it says;
00:00:00.000 [WARN] Adding classpath entry 'file:/C:/Code/Gxt/GxtExamples/src/' to the web app classpath for this session
More info: file:/C:/eclispe/eclipse_Indigo_2011/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201202290255-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
The most common reason to encounter this problem with a new project is using RPC, which tries to loadcom.google.gwt.user.client.rpc.RemoteService. The solution to is copy gwt-servlet.jar from the GWT install directory into your web app'swar/WEB-INF/lib/ directory.
so the gwt-servlet.jar is already in my web directory.
This is as far as I’ve got for now, would be good to get some insight on how to set up the examples, if anyone else managed to get them up and running ok.... any hints or tips?
I've taken a different more clunky approach to working with the example code,
I created a GWT project in eclipse, using the option to create the template boiler plating (you the one where you enter a user name and the server replies back) and then configured this to use GXT. 3 beta 4, and used all the aforementioned jars dependencies I mentioned earlier.
I figured if I then used the file import feature and import the examples-src , then I would be able to use import statement with them when coding in the boiler plate client package.
However straight importing while it got the files in ok, but using the import statement from outside the client package was failing for me.
I've (tried) to recreated the type of error I would get;
09:31:16.963 [ERROR] [gxte] Line 65: No source code is available for type com.sencha.gxt.examples.resources.client.images.ExampleImages; did you forget to inherit a required module?
(in reality it seems that it can't find some images in this example, but the error message format has been same for classes that aren't trying to access the image files in the ExampleImages which are missing - is this a bug that the images are missing?)
My guess is that this error is something to do with me needed to understand the GWT framework better. So a rather clunky laborious solution I found was just to cut n paste the code into new classes inside my client package (com.example.gxte.client). This is good enough for now, and I have learnt a lot about setting up GWT projects in the process, and so far I'm putting together a page of various examples in border layout for the purpose of looking at theme / style adaptation for different colour themes.
If anyone is having a similar experience or insights would love to hear about it here.
Was browsing through this forum for general reading and found some really useful information I didn't find in my initial search, thanks to Colin Alworth!
I will have to try this out at some point!