Robin Morris' site
 
GWT Google Web Toolkit
rozzamozza  17/04/2007 - 09:53    To take advantage of new AJAX functionality and the usability improvements this gives, I thought I would try out Google Web Toolkit for a web based reporting tool I was using. The idea looks sound. - Develop your Junit tests and code in java in a professional IDE such as Intellij or Eclipse. - Then GWT compiles the code into Javascript - This then runs on any client. GWT comes with most of the Swing like components you will need so it is quite easy to modify their examples to get smething neet that works. Issues I faced.. 1. As with immature software the "Happy path" for the code you are doing works well. The problem comes if you make some mistake. The error message you get is not intuitive. E.g. For my remote connection to the server I made the mistake of writing service = (ReportServiceAsync) GWT.create(ReportService.class); I wrote: service = (ReportServiceAsync) GWT.create(ReportServiceAsync.class); The error you get is the following... java.lang.RuntimeException: Failed to get JNode at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:52) at com.google.gwt.dev.jjs.impl.BuildTypeMap$BuildDeclMapVisitor.createField(BuildTypeMap.java:325) at com.google.gwt.dev.jjs.impl.BuildTypeMap$BuildDeclMapVisitor.visit(BuildTypeMap.java:186) at org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.traverse(FieldDeclaration.java:272) 2. You start writing tests and great it all works and you get a nifty app. Then you find some layout problem that no matter what setting you change (E.g. setWidth("100%")) you cannot get the layout correct. Not being able to debug of see the actual html layout that is generated by GWT is scarey...so you have to find another way to do things. The feedback time after compiling can make this a long process to fix very simple things. 3. Not all Junit tests will run. Thats because items (such as GWTs Grid class) use native libraries to perform their operations. I am currently working through this to see how I can run all my tests in Intellij 4. I can't get GWT TestCase to work. The error I get is Unable to find 'reporting.gwt.xml' on your classpath. Turns out I need the full path to it which is I guess understandable... Now I am stuck with this... Rebinding com.rozzamozza.inference.reporting.client.reports.GWTTableTest Checking rule [ERROR] Unable to find type 'com.rozzamozza.inference.reporting.client.reports.GWTTableTest' [ERROR] Hint: Check that the type name 'com.rozzamozza.inference.reporting.client.reports.GWTTableTest' is really what you meant [ERROR] Hint: Check that your classpath includes all required source roots [ERROR] Deferred binding failed for 'com.rozzamozza.inference.reporting.client.reports.GWTTableTest'; expect subsequent failures com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries) at com.google.gwt.dev.cfg.ConditionWhenTypeAssignableTo.doEval(ConditionWhenTypeAssignableTo.java:52) at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:36)
Reply
Your name:
Anonymous
Subject:
Comment:


 
Browse archives
« October 2014  
SuMoTuWeThFrSa
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
23
24
25
26
27
28
29
30
31
 


Associates
Tim Bacon


Blogs


User login