About a multi page web application

2010-06-02 Thread MaveriK
Hi everyone.

I'm new in GWT, i've just begun to use GWT a couple of week ago.
My goal is to create a web app that shows a login page, and after the
log-in shows an interface where the user can interact with the system

So i was wondering if i need need a multi-page web app, or instead a
single-page switching the visibility of widgets on/off.
I though the first was the best solution as i don't have lots widgets
to manage in one page, but i can't fine a way to make multi-page web
app in GWT...
I read some posts from GWT discussion but i couldn't find out how to
do it.
Could someone help me out?

Tnx in adv

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



JSORestrictionsChecker Bug

2010-06-02 Thread Patrick Twohig
I'm getting this error while trying to compile code with subclasses of
JavaScriptObject.  I'm aware of this issue here:
http://groups.google.com/group/google-web-toolkit-contributors/browse_thread/thread/eaca6b6dbecd2c77/3b76790edc488222?show_docid=3b76790edc488222,
however in my case none of my classes are abstract.  Does anybody know
of a possible workaround until this is patched.  I'm having a really
hard time coming up with a testcase that reproduces the error.

com.google.gwt.dev.jjs.InternalCompilerException: Already seen an
implementing JSO subtype (CompositeImageOverlay) for interface (HasId)
while examining newly-added type (CharacterClassOverlay). This is a
bug in JSORestrictionsChecker.
at
com.google.gwt.core.ext.typeinfo.TypeOracle.computeSingleJsoImplData(TypeOracle.java:
702)
at com.google.gwt.core.ext.typeinfo.TypeOracle.finish(TypeOracle.java:
362)
at
com.google.gwt.dev.javac.TypeOracleMediator.addNewUnits(TypeOracleMediator.java:
359)
at
com.google.gwt.dev.javac.CompilationState.assimilateUnits(CompilationState.java:
135)
at
com.google.gwt.dev.javac.CompilationState.init(CompilationState.java:
79)
at
com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:
286)
at
com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:
182)
at
com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:
280)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:502)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:414)
at com.google.gwt.dev.Compiler.run(Compiler.java:201)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
87)
at
com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:
81)
at com.google.gwt.dev.Compiler.main(Compiler.java:159)

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



GWT 2.0.3 + Tree widget + get tree level of selected TreeItem - Problem

2010-06-02 Thread junior
Hejsan,
I am building dynamic Tree Widget. First Level I done with no problem
so it look like:

+ Atletics
+ Ice Hockey
+ Chess
+ Footbal
+ Golf

Functionality must be like when you click on sport must roll up/show
off list of countries like:

+ Atletics
+ Ice Hockey
+ Canada
+ USA
+ Russia
+ Chess
+ Footbal
+ Golf

and when click to some country then show off League like

+ Atletics
+ Ice Hockey
+ Canada
   + Tournaments
   + Extra league
   + 1.league
   + 2.league
+ USA
+ Russia
+ Chess
+ Footbal
+ Golf


PROBLEM is that I need get level of selected TreeItem to for each
different level will fire up different query so for example for
selected  Ice Hockey need get information that it's 1 level of tree so
use databases select to find out all countries for Ice hockey.
When click to Canada TreeItem, it's level 2 I call select to find
out all leagues level for Canada.

I create handler for Tree like:
// Add a handler that automatically generates some children
statTree.addOpenHandler(new OpenHandlerTreeItem() {

public void onOpen(OpenEventTreeItem event) {
// tree item that was clicked
TreeItem itemSelected = event.getTarget();

if (itemSelected.getChildCount() == 1) {
// Close item immediately
itemSelected.setState(false, false);

// Add a random number of children to 
the item
String itemText = 
itemSelected.getText();

// request to database according 
selected tree item level

// dummy data
for (int i = 0; i  numChildren; i++) {
// tree item to be added
TreeItem childDescendant = 
itemSelected

.addItem(itemText + . + i);

System.out.println(\ncildDescendant index: 
+ 
itemSelected.getChildIndex(childDescendant));
childDescendant.addItem();
}

// Remove the temporary item when we 
finish loading
itemSelected.getChild(0).remove();

// Reopen the item
itemSelected.setState(true, false);
}
}
});

Please help me some one I'll do appreciate it.
Thank you

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



How do you connect to External RPC Service? In other words, can you expose RPC services to outside world by sharing only client/shared pieces?

2010-06-02 Thread Umesh Adtani
I have a RPC servlet that I would like to make available to other GWT
application developers.  The problem that I currently see is that
GWT.create(ServiceInterfaceClass) requires the service to be
deployed on the same host where the GWT application is deployed.
There is no way to do something like
GWT.create(ServiceInterfaceClass,URL-where-service-is-deployed) to
create the handle to the service.

From client's perspective, this means that if your GWT application
talks to multiple RPC services hosted on various different hosts, then
there is no way to talk to those services even if you have shared and
client code-base (containing interfaces, asyncs etc) available to you
in some form of jar files.  Is there a way to get this working in
current GWT versions?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



HOWTO Implement A Drop Down Check Box List

2010-06-02 Thread Guoyu Yan
Hi All,

I got some problem on HOWTO implement a drop down check box list.
Could you give me some ideas to do this. I have done some research on
Creating Custom Widgets but I still don't have any idea about it.

Thanks,

Garin

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Question About Constants(.properties) file of GWT

2010-06-02 Thread veeravelli kiran kumar
Hi All,
I am new to GWT and finding it difficult to understand this. I am
creating a GWT project,putting a constants file and retrieving them
via the constants interface. I am compiling this project and adding
the resources (just the .html ,.css and /project resources) generated
to a war file deployed in JBOSS AS . I am able to view the GWT page
without any problem. Does GWT write the constants into the javascript.
I am using the exact project structure as the GWT project in JBoss
project and placing the constants file in the appropriate location.
Now I am trying to change the constants from this constants file. But
the changes does not get reflected in the view page. What is the
reason behind this? I am finding it really difficult to understand
this can anyone help me in this regard.

Thanks
V Kiran Kumar

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Simple working example of the Data Presentation Widget CellTable

2010-06-02 Thread saklig
Hi,

I want to create a working example of the CellTable widget that was
recently released in GWT 2.1 M1.
I'm having a hard time finding documentation for this widget, as
apparently it has not been written yet :-/

What I've tried so far:


ListMyCellData dataList = new ArrayListMyCellData();
dataList.add(Pizza, 15);
dataList.add(Car, 4);


ListViewAdapterMyCellData adapter = new
ListViewAdapterMyCellData();
CellTableMyCellData view = new CellTableMyCellData(5);
adapter.addView(view);

RootPanel.get(cellTableDiv).add(view);

view.setData(0, stringList.size(), dataList);

adapter.refresh();

private class MyCellData{
private String name;
private int numberOfSomething;

public MyCellData(String name, int numberOfSomething){
  this.name = name;
  this.numberOfSomething = numberOfSomething;
}

public String getName(){
 return name;
}

public int getNumberOfSomething(){
 return numberOfSomething;
}
}



I'm not sure what to insert as parameter in the view.setData .

Could someone pleas give me a pointer or a map :-)

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



GWT 2.0

2010-06-02 Thread Kapil Kulkarni
Hi,
I am new to GWT and in learning mode.
I working with GWT 2.0 / Eclipse 3.5 / JDK 1.5 / IE 8.0

As per getting started guide if I paste the url which i get in
deployment mode to IE 8.0, then I get following
but browser is not displaying text box

Web Application Starter Project

Please enter your name:


And in eclipse I am getting following error:

09:50:37.302 [ERROR] [test_gwt] Failed to create an instance of
'com.kapil.test.client.Test_GWT' via deferred binding
java.lang.RuntimeException: Deferred binding failed for
'com.kapil.test.client.GreetingService' (did you forget to inherit a
required module?)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:43)
at com.google.gwt.core.client.GWT.create(GWT.java:98)
at com.kapil.test.client.Test_GWT.init(Test_GWT.java:36)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
422)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
361)
at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
185)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
380)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
222)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoSuchMethodError:
java.lang.Class.getCanonicalName()Ljava/lang/String;
at
com.google.gwt.user.rebind.rpc.ProxyCreator.getSourceWriter(ProxyCreator.java:
759)
at
com.google.gwt.user.rebind.rpc.ProxyCreator.create(ProxyCreator.java:
225)
at
com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator.generate(ServiceInterfaceProxyGenerator.java:
57)
at
com.google.gwt.dev.javac.StandardGeneratorContext.runGenerator(StandardGeneratorContext.java:
418)
at
com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:
38)
at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.tryRebind(StandardRebindOracle.java:108)
at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.rebind(StandardRebindOracle.java:54)
at
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:
154)
at
com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:
119)
at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:
531)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
414)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39)
at com.google.gwt.core.client.GWT.create(GWT.java:98)
at com.kapil.test.client.Test_GWT.init(Test_GWT.java:36)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
422)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
361)
at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
185)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
380)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
222)
at java.lang.Thread.run(Unknown Source)

09:50:37.369 [DEBUG] [test_gwt] Rebinding
com.google.gwt.core.client.impl.SchedulerImpl
09:50:37.380 [WARN] [test_gwt] For the following type(s), generated
source was never committed (did you forget to call commit()?)
09:50:37.427 [WARN] [test_gwt]
com.kapil.test.client.GreetingService_Proxy
09:50:37.489 [ERROR] [test_gwt] Unable to load module entry point
class com.kapil.test.client.Test_GWT (see associated exception for
details)
09:50:37.531 [ERROR] [test_gwt] Failed to load module 'test_gwt' from
user agent 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64;
Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
3.0.30729; Media Center PC 6.0; MASN)' at 127.0.0.1:49935

Any idea what's causing this issue?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



looking for a proxyservlet for the jetty instance

2010-06-02 Thread alexl
hi, I tried a couple of proxy servlets but each time the engine says
such and such is a restricted class. I recompiled some of the
dependencies but after getting rid of ssl's for example then it
complained about inet address being a restricted class.

the reason I want a proxy is so it is easier to test in development
mode.

thx

java.net.InetAddress is a restricted class. Please see the Google
App Engine developer's guide for more details.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Problem deploying RPC application to jetty

2010-06-02 Thread shirin
Hi
I have a RPC application , very simple with just one servlet class in
server package. it runs good locally but when I deploy it in jetty in
a remote server it said that it can not find my servlet class
this jetty server has been configured before and has a specific
deploying strategy. For example every servlet class should be call so:

/servlet/OneServlet

and I can not change the jetty settings. I should make my project so
that it can work with this server.
I did whatever I could to handle this problem but so far no success.
Could you please help me for the matter?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: HOWTO Implement A Drop Down Check Box List

2010-06-02 Thread Garin Yan
Hi All,

I have found this on
http://www.smartclient.com/smartgwt/showcase/#multi_select_new_category .

Thanks you all the same.

Garin

On Tue, Jun 1, 2010 at 3:20 PM, Guoyu Yan yangu...@gmail.com wrote:

 Hi All,

 I got some problem on HOWTO implement a drop down check box list.
 Could you give me some ideas to do this. I have done some research on
 Creating Custom Widgets but I still don't have any idea about it.

 Thanks,

 Garin




-- 
Garin Yan

Software Engineer, International Service
Founder International Co.,Ltd.
Address: Suzhou International Science Park (Phase V)
 328 Xinghu Rd., Suzhou, Jiangsu, P.R.China, 215123
Tel:+86 512 86665500-7063  Fax:+86 512 87183808  Cell:151 0621 9276
yangu...@gmail.com  ||  www.founderinternational.com

Enjoying 20 years of success satisfying global leaders with every IT need --
Founder’s 30,000 employees are committed to helping you succeed.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Hibernate problems after deploying to google appspot

2010-06-02 Thread Emma Cole
Hi all,

I have an application which uses hibernate that runs fine in hosted
mode, but no longer when deployed.
Here's the details:

In hosted mode it connects to a database that resides on a remote
server.
Connection details set in hibernate.cfg.xml

When run I it get a long stacktrace with errors similar to the
following:

SEVERE: Unable to instrument
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
$ValueWriter$8. Security restrictions may not be entirely emulated.

Which apparently has to do with the fact that it's being run in hosted
mode, and I read that it can be ignored.
The application saves and retrieves data without problems.

After deploying it on appspot and when I try to save a new row in a
table I get this:

javax.servlet.ServletContext log: Exception while dispatching incoming
RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract boolean
com.appspot.positivevoice.client.panels.blog.BlogService.saveBlog(com.appspot.positivevoice.client.models.BlogModel)'
threw an unexpected exception: java.lang.NoClassDefFoundError: Could
not initialize class com.mysql.jdbc.ConnectionImpl
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
378)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
581)


Since the app works fine in hosted mode ( apart from those
exceptions ) I am not even sure which files I should add to the
post...

Any idea much appreciated!

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Problem deploying RPC application to jetty

2010-06-02 Thread shirin
Hi
I posted this error before. I did lots of thing but still without
success
let me give some more details:
say my project name is gwtexample
and my servlet class name is myServlet
in web.xml I defined
servlet-mapping
 
 url-pattern/gwtexample/myServlet/url-pattern
/servlet-mapping

then I deploy every things in jetty server in a remote server
the path of deployed project in jetty is something like this:
/webapps/root/gwtexample
and inside the gwtexample I have every things: my Gwtexample.html
file, resources and also another gwtexample folder which contains js
files (that one which is produced by GWT at compile time).

when I try to run the application, I see this line in jetty's log file
POST /gwtexample/gwtexample/myServlet HTTP/1.1 404 1239

I can not put everything just simply in root folder in order to get
rid of extra gwtexample. So, how can I fix the problem. any solution?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



GWT 2.0.3 + Tree widget + get tree level of selected TreeItem - Problem

2010-06-02 Thread junior
Hejsan
I am building GWT Tree and need to get information about level of
current opened TreeItem. Let me describe more detail.
I build up first level(Sport List) of tree so it looks like:
+ Athletics
+ Ice Hockey
+ Footbal

Second level(Countries List) must looks like:
+ Athletics
+ Ice Hockey
   + Canada
   + USA
   + Russia
+ Footbal

Third level(League List) must looks like:
+ Athletics
+ Ice Hockey
   + Canada
  + Tournament
  + 1.League
  + 2.League
  + AAA League
   + USA
   + Russia
+ Footbal

Why I need info abou opened TreeItem? By level of opened TreeItem fire
up different SELECT of database so if I open up + Ice Hockey - it's
first level, then I fire up SELECT on database to get list of
countries for sport Ice Hockey. Next if I open up country + Canada
then fire up SELECT on databases to get list of all leagues at country
Canada for sport Ice Hockey.

I call open handler for Tree for TreeItem like this:

// Add a handler that automatically generates some children
statTree.addOpenHandler(new OpenHandlerTreeItem() {

public void onOpen(OpenEventTreeItem event) {
// tree item that was clicked
TreeItem itemSelected = event.getTarget();
if (itemSelected.getChildCount() == 1) {
// Close item immediately
itemSelected.setState(false, false);

// Add a random number of children to 
the item
String itemText = 
itemSelected.getText();

// different request to database, 
according level of TreeItem
// ??

// just temporary dummy data
of subtree items
int numChildren = Random.nextInt(5) + 2;
for (int i = 0; i  numChildren; i++) {
// tree item to be added
TreeItem childDescendant = 
itemSelected

.addItem(itemText + . + i);

System.out.println(\ncildDescendant index: 
+ 
itemSelected.getChildIndex(childDescendant));
childDescendant.addItem();
}

// Remove the temporary item when we 
finish loading
itemSelected.getChild(0).remove();

// Reopen the item
itemSelected.setState(true, false);
}
}
});


Please help me with this problem, I'd appreciate it.
junior

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



GWT Custom Events

2010-06-02 Thread Ciarán
Hey I have a problem getting my head around how custom GWT event
Handlers work. I have read quite a bit about the topic and it still is
some what foggy. I have read threads on Stackoverflow like this one
http://stackoverflow.com/questions/998621/gwt-custom-event-handler but
still some what lost .Could someone explain it in an applied mannar
such as the following.

I have 2 classes a block and a man class. When the man collides with
the block the man fires an event ( onCollision() ) and then the block
class listens for that event.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



RichTextToolbar in Uibinder

2010-06-02 Thread krz
Hello,

For my programm i use MVP, and UIbinder for drawing the GUI. i wanted
to create an RichTextArea with the toolbar ( richTextToolbar), i spend
now 2 hours trying things out, im totaly frustrated, and dont know how
to do it... can anyone help me?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Eclipse Modeling Framework (EMF) port to GWT

2010-06-02 Thread Ed Merks
I'm busy refining EMF's support for GWT:

  
http://wiki.eclipse.org/EMF/New_and_Noteworthy/Helios#Support_for_Google_Web_Toolkit_.28GWT.29

One of the problems I have is that I need to support converting date
instances to and from a string representation, in particular, one that
conforms to XMLSchema's dataTime format. I have that working nicely in
regular Java with SimpleDateFormat, but that's not supported by GWT.
So I ported it to use DateTimeFormat.  That's working nicely too. But
now, after more testing, I realize that DateTimeFormat doesn't work on
the server, because it depends on locale stuff, which the server
doesn't support.  That's unfortunate because the format I'm producing
isn't actually locale specific.  In any case, what I really want is a
single library that works for both the client and the server. I get
the sense that I need two different implementations, a default one
that's good on the client, and a different one that works on the
server.

There are many tricks I could play if this were all pure Java.  I've
done similar things to make EMF work both within Eclipse and as stand
alone jars.  But I'm all out of ideas for how to make this work with
GWT and I was hoping someone would have a good suggestion.  As an
example of an approach I might use is:

if (GWT.isClient())
{
  // Use DateTimeFormat
}
else
{
  // Use SimpleDateFormat
}

That doesn't work of course because the GWT compiler will complain
about SimpleDateFormat even though that code path will never be taken
on the client.  I thought the GWT compiler might prune out the
unreachable branch.  If I could move the else part to a different
method and mark that whole method as to-be-ignored by the GWT
compiler, that would make me happy too, but I didn't find any
annotation that would direct the GWT compiler to ignore something.

Another approach I could take is to inject different implementations
depending on where I'm running, client or server.  That's certainly
feasible, but where to put the initialization code?  To make it
easier, I could have a default implementation that works on the client
and then in the case of running on the server, initialization code
would inject one that works for the server.  I could a call to such a
hook in every XyzServiceImpl, full Java is allowed there, but that's
easy to forget and kind of annoying.  How could I ensure that such
server-specific, won't-compile-with-GWT, initialization code is
invoked once for the server?

Any other ideas for how I could maintain a single source/library/
project that adaptively works for both the client and the server based
on different implementation classes?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



firefox gwt issues

2010-06-02 Thread Sam Phippen
When I attempt to load my gwt app in firefox (f13, x64) with the
plugin installed I still get the screen telling me to install the
plugin. I also get a drop down at the top saying additional plugins
are required to display all media on this page

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Design Problem

2010-06-02 Thread Frederic Conrotte
Hello

You should check this book:
http://apress.com/book/view/9781590599853

And the associated website:
http://code.google.com/p/tocollege-net/

It mix both HTML/Freemarker templates with GWT modules.

Fred

On 1 juin, 18:02, ping2ravi ping2r...@gmail.com wrote:
 Hi All,
 I am trying to create a website and stuck with confusion over whether
 to use GWT for presentation or JSP based framework like Spring MVC. I
 want UI to be very user friendly,faster etc and this is possible with
 GWT. But following problem comes with GWT

 1) Book marking of any page. As GWT is suppose to be one url
 application and everything should come under it. But how i will solve
 the problem if i have a site like Facebook, where url can be for User
 profile(/profile/1), My Home(/home), community(/cpmm),video(/video)
 etc. I can solve it by using one html and keeping everything as
 params(i.e. /myapp.htm?type=profileid=1) but then i feel its not how
 GWT should be used or is this the only way i will be able to use it.

 2) Not searchable by Search Engines. Search engine can not see what
 the content is as it always comes through RPC calls.

 3) Implementing History is Overhead, if i fix the issue 1

 4) Its not possibkle to mix jsps and GWT. I tried but GWT css start
 interfaring with my CSS, first starting with changing background
 color.

 But i still like GWT but not sure how i will solve these problems.

 Any suggestions/comments most welcome.

 Thanks,
 Ravi

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Prompt Message Box in View

2010-06-02 Thread Spring
Hello,
When using the MVP pattern, how should I display alerts or message
boxes prompting the user for information? For example, the user clicks
a button to add a new item and I prompt for the name. Where should
this prompt happen? In the View class? In the Presenter? The presenter
is where I have added the listener and the prompt should happen when
the user clicks the add button. I could do this in the presenter, when
the listener is triggered, but I do not wish to have UI elements in
the Presenter. The new name obtained from the prompt needs to be
passed back to the presenter.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Getting a 503 Error.

2010-06-02 Thread Prashant Hegde
Probably your server has exited following a exception during 
initialization Does the console show some exceptions ?


On 03-06-2010 04:12, ike wrote:

Hey...

I am using the plugin for Eclipse. There are no errors in my code
according to Eclipse, but when I run the code, it gives me a screen
like this:

HTTP ERROR: 503

SERVICE_UNAVAILABLE

RequestURI=/In2Solar.html

Powered by jetty://


Is there someplace I could look to find out what is happening???


Thanks.

   


--
You received this message because you are subscribed to the Google Groups Google 
Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT 2.0.3 + Tree widget + get tree level of selected TreeItem - Problem

2010-06-02 Thread Jim Douglas
Follow the chain of getParentItem() until it returns null.

http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/client/ui/TreeItem.html#getParentItem()

On Jun 2, 3:25 am, junior kubinca...@gmail.com wrote:
 Hejsan
 I am building GWT Tree and need to get information about level of
 current opened TreeItem. Let me describe more detail.
 I build up first level(Sport List) of tree so it looks like:
 + Athletics
 + Ice Hockey
 + Footbal

 Second level(Countries List) must looks like:
 + Athletics
 + Ice Hockey
    + Canada
    + USA
    + Russia
 + Footbal

 Third level(League List) must looks like:
 + Athletics
 + Ice Hockey
    + Canada
       + Tournament
       + 1.League
       + 2.League
       + AAA League
    + USA
    + Russia
 + Footbal

 Why I need info abou opened TreeItem? By level of opened TreeItem fire
 up different SELECT of database so if I open up + Ice Hockey - it's
 first level, then I fire up SELECT on database to get list of
 countries for sport Ice Hockey. Next if I open up country + Canada
 then fire up SELECT on databases to get list of all leagues at country
 Canada for sport Ice Hockey.

 I call open handler for Tree for TreeItem like this:

 // Add a handler that automatically generates some children
                 statTree.addOpenHandler(new OpenHandlerTreeItem() {

                         public void onOpen(OpenEventTreeItem event) {
                                 // tree item that was clicked
                                 TreeItem itemSelected = event.getTarget();
                                 if (itemSelected.getChildCount() == 1) {
                                         // Close item immediately
                                         itemSelected.setState(false, false);

                                         // Add a random number of children to 
 the item
                                         String itemText = 
 itemSelected.getText();

                                         // different request to database, 
 according level of TreeItem
                                         // ??

                                         // just temporary dummy data
 of subtree items
                                         int numChildren = Random.nextInt(5) + 
 2;
                                         for (int i = 0; i  numChildren; i++) 
 {
                                                 // tree item to be added
                                                 TreeItem childDescendant = 
 itemSelected
                                                                 
 .addItem(itemText + . + i);
                                                 
 System.out.println(\ncildDescendant index: 
                                                                 + 
 itemSelected.getChildIndex(childDescendant));
                                                 childDescendant.addItem();
                                         }

                                         // Remove the temporary item when we 
 finish loading
                                         itemSelected.getChild(0).remove();

                                         // Reopen the item
                                         itemSelected.setState(true, false);
                                 }
                         }
                 });

 Please help me with this problem, I'd appreciate it.
 junior

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



History.newItem() and History.getToken() and encoding url fragment (Does not happen in FF)

2010-06-02 Thread Sky
History.newItem() and History.getToken() are supposed to
encodeURIComponent and decodeURIComponent respectively. I looked into
the implemented native methods and they sure appear to do that.

However, in FF 3.5 the encoding does not happen. My browser URL shows
normal spaces instead of %20.

In IE8 the encoding does happen.

Is this a big deal or what?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: JSNI Methode call does not work...

2010-06-02 Thread kozura
Your method signature doesn't match your class (String x3).  Also, use
int and I for signature instead of the Integer class.

On May 31, 2:53 pm, Go2one dennis.schum...@go2one.de wrote:
 Hi,

 I've the following Class:

 public class Designer {
  private final native JavaScriptObject addNode() /*-{
    alert(Pre JSNI call);

 th...@de.go2one.sdui.client.processdesigner.processdesigner::sendNode(Ljava/
 lang/String;Ljava/lang/Integer;Ljava/lang/Integer;)(TEST, 100, 100);
    alert(Post JSNI call);

 }

 void sendNode(String id, String x, String y) {
    GWT.log(sendNode() called);

 }
 }

 When addNode  is called, Pre JSNI Call-Alert is shown. After the
 click on OK, an JS-Error is thrown:

 Details zum Fehler auf der Webseite

 Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1;
 Trident/4.0)
 Zeitstempel: Mon, 31 May 2010 20:52:56 UTC

 Meldung: Annahme ausgelöst und nicht aufgefangen.
 Zeile: 36
 Zeichen: 7
 Code: 0
 URI:http://localhost:8080/desk/desk/hosted.html?desk

 Any ideas what I'm doing wrong?
 Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: refresh page in GWT

2010-06-02 Thread kozura
Literally 2 seconds of search turns up:

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/429cbf743328c9a9/938fb8df06bf9cd5

On May 31, 1:30 pm, ahmed saleh ahmed.salehw...@gmail.com wrote:
 hello-
 i have a big GWT application have more than  50 composites ,i have
 big issue when customer, refresh the application , the browser reload
 all application again and back user to home page , i need solve this
 issue

 Ahmed Saleh
 Senior Software engineer
 +2 010 3580 355

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



How do I detect Mouse Up, Mouse Out, Mouse Over, etc on Grid Cells?

2010-06-02 Thread spierce7
I need to be able to do this efficiently in a 50X8 Grid. I need it for
the individual cells within the grid. It seems that all I can get to
work on my grid is a simple click handler.

Grid.addClickHandler(this);
and then whenever a click event occurs (a click down and then a click
up in the same cell), it fires public void onClick(ClickEvent event).
I need much more usability than this for my individual cells.

I was playing around with the idea of possibly adding a blank html
object to each of the cells and having it fill the cells, but this
seems like it would be slow, and I would run into some problems down
the road with table borders. Is there a way that I could access the
Grids native HTML cell objects themselves? If I could somehow access
those I would be able to add click handlers and what not. Still not an
ideal method, but better than adding my own HTML panels and dealing
with border issues.

Do I have any other options?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: SerializerBase.check(String,int) throws useless exception?

2010-06-02 Thread Sripathi Krishnan
Confirm that all classes participating in RPC -

   1. implement Serializable
   2. have a zero-argument constructor

Most of the times I forget zero-argument constructor, and that's when I get
errors similar to what you have pasted.

--Sri


On 31 May 2010 20:23, svincent shawn.vinc...@gmail.com wrote:

 Greetings,

 I'm having a frustrating time debugging a bunch of code I'm trying to
 port to GWT.  There are various subtle serialization issues (not
 surprising, since GWT has its special rules).

 The real problem I'm running in to is that the exception I keep
 getting is this:

 com.google.gwt.user.client.rpc.SerializationException: null
at

 com.google.gwt.user.client.rpc.impl.SerializerBase.check(SerializerBase.java:
 161)
at

 com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:
 145)
at

 com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:
 199)
 ...

 This exception is terrible: it doesn't tell me what class is having
 the trouble.  It tries to print out the 'typeSignature', but the
 typeSignature is null for classes with certain types of serialization
 issues.

 A couple of thoughts:

 1. it would be Really Nice if GWT could be changed to fix this
 exception to be more meaningful (at least include the class name
 that's having the trouble)

 2. Does anybody have tips on what to do when you get this exception?
 I've encountered one case: don't have fields of type java.lang.Object
 in your GWT Serializable classes.  Is there more?

 Thanks!
-Shawn.

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Error during File IO in ServiceImpl class

2010-06-02 Thread Sripathi Krishnan
This isn't a GWT problem, its a GAE problem, and you are more likely to get
an answer on that forum. But from what I know ...

.. you can read files that are present in the war file, but you still cannot
read it as a File. Instead, you should read it from the classpath, like
this
this.getClass().getClassLoader().getResourceAsStream(filename.csv)

where filename.csv is in WEB-INF/classes folder

--Sri


On 2 June 2010 04:14, rahulmalviya malviyarahul2...@gmail.com wrote:

 Hi I tried to read a csv file in ServiceImpl class but i am getting
 access denied error. Please tell me how I can handle File IO in Google
 web application. I read through other posts related to my error but
 they say it is related to Google app engine and if i place file under /
 war/WEB-INF directory I can read a file. But still I get the same
 error.

 Error trace:

 SEVERE: [127543223253] javax.servlet.ServletContext log: Exception
 while dispatching incoming RPC call
 com.google.gwt.user.server.rpc.UnexpectedException: Service method
 'public abstract java.util.List
 testFMIP.client.GreetingService.getFileData()' threw an unexpected
 exception: java.security.AccessControlException: access denied
 (java.io.FilePermission /war/WEB-INF/web.xml read)
at
 com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
 378)
at
 com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
 581)
at

 com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
 188)
at

 com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
 224)
at

 com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
 62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
 511)
at org.mortbay.jetty.servlet.ServletHandler
 $CachedChain.doFilter(ServletHandler.java:1166)
at

 com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
 51)
at org.mortbay.jetty.servlet.ServletHandler
 $CachedChain.doFilter(ServletHandler.java:1157)
at

 com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
 43)
at org.mortbay.jetty.servlet.ServletHandler
 $CachedChain.doFilter(ServletHandler.java:1157)
at

 com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
 122)
at org.mortbay.jetty.servlet.ServletHandler
 $CachedChain.doFilter(ServletHandler.java:1157)
at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
 388)
at
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
 216)
at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
 182)
at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
 765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
 418)
at

 com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
 70)
at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
 152)
at com.google.appengine.tools.development.JettyContainerService
 $ApiProxyHandler.handle(JettyContainerService.java:349)
at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
 152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
 542)
at org.mortbay.jetty.HttpConnection
 $RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
 409)
at org.mortbay.thread.QueuedThreadPool
 $PoolThread.run(QueuedThreadPool.java:582)
 Caused by: java.security.AccessControlException: access denied
 (java.io.FilePermission /war/WEB-INF/web.xml read)
at

 java.security.AccessControlContext.checkPermission(AccessControlContext.java:
 323)
at
 java.security.AccessController.checkPermission(AccessController.java:
 546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:
 532)
at com.google.appengine.tools.development.DevAppServerFactory
 $CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at java.io.FileInputStream.init(FileInputStream.java:100)
at java.io.FileInputStream.init(FileInputStream.java:66)
at
 

Re: Hibernate problems after deploying to google appspot

2010-06-02 Thread Paul Grenyer
Emma

It sounds like you haven't deployed the mysql driver.

Paul

-Original Message-
From: Emma Cole emma.cole.positive.vo...@gmail.com
Date: Mon, 31 May 2010 16:46:59 
To: Google Web Toolkitgoogle-web-toolkit@googlegroups.com
Cc: dan.a...@gmail.com
Subject: Hibernate problems after deploying to google appspot

Hi all,

I have an application which uses hibernate that runs fine in hosted
mode, but no longer when deployed.
Here's the details:

In hosted mode it connects to a database that resides on a remote
server.
Connection details set in hibernate.cfg.xml

When run I it get a long stacktrace with errors similar to the
following:

SEVERE: Unable to instrument
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
$ValueWriter$8. Security restrictions may not be entirely emulated.

Which apparently has to do with the fact that it's being run in hosted
mode, and I read that it can be ignored.
The application saves and retrieves data without problems.

After deploying it on appspot and when I try to save a new row in a
table I get this:

javax.servlet.ServletContext log: Exception while dispatching incoming
RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract boolean
com.appspot.positivevoice.client.panels.blog.BlogService.saveBlog(com.appspot.positivevoice.client.models.BlogModel)'
threw an unexpected exception: java.lang.NoClassDefFoundError: Could
not initialize class com.mysql.jdbc.ConnectionImpl
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
378)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
581)


Since the app works fine in hosted mode ( apart from those
exceptions ) I am not even sure which files I should add to the
post...

Any idea much appreciated!

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



error while invoking java method using jsni

2010-06-02 Thread gerald
When I invoke java method 'func2(JavaScriptObject str)' using jsni, an
error occurs when the type of argument 'str' is javascript string
type, such as var ss = 'aabbcc', However, the method 'func2' does work
while its argument is JavaScriptObject type. In addition, this error
only happen in the dev mode. When I compile the whole module, and run
it in IE6, it works fine. So, I want to know what happen to it. Is it
a potential bug that exists in GWT? The following is the code:

 public class JsniErrorTest implements EntryPoint {
protected static native void func1()/*-{
debugger;
var ss = 'aabbcc'; //error
var obj = new Object();//ok. because it is javascript object 
type
//can't run in dev mode

@com.sxf.errtest.client.JsniErrorTest::func2(Lcom/google/gwt/core/
client/JavaScriptObject;)(ss);
}-*/;

public static void func2(JavaScriptObject str){
System.out.println(str);
}

/**
 * This is the entry point method.
 */
public void onModuleLoad() {
final Button sendButton = new Button(interface impl);

ClickHandler handler = new ClickHandler() {

@Override
public void onClick(ClickEvent event) {

func1();

}
};
sendButton.addClickHandler(handler);
RootPanel.get().add(sendButton);
}
 }

the error:

11:18:31.000 [ERROR] [jsnierrortest] Uncaught exception escaped
java.lang.ClassCastException: null
at java.lang.Class.cast(Class.java:2990)
at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:166)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:65)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
157)
at
com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:
1713)
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
165)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
120)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
507)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:
284)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:
107)
at com.sxf.errtest.client.JsniErrorTest.func1(JsniErrorTest.java)
at com.sxf.errtest.client.JsniErrorTest
$1.onClick(JsniErrorTest.java:34)
at
com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:
54)
at
com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:1)
at com.google.gwt.event.shared.HandlerManager
$HandlerRegistry.fireEvent(HandlerManager.java:65)
at com.google.gwt.event.shared.HandlerManager
$HandlerRegistry.access$1(HandlerManager.java:53)
at
com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:
178)
at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:52)
at
com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:
116)
at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:
100)
at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1307)
at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1263)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
157)
at
com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:
1713)
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
165)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
120)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
507)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
264)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)

GWT hostmode in weblogic

2010-06-02 Thread GWT_novice
i am very new to GWT. I want deploy GWT app in weblogic app server
instead of using in-built jetty. Can someone let me know how to do
that? I googled it but not much info regarding set up in weblogic.
Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Simple working example of the Data Presentation Widget CellTable

2010-06-02 Thread Andrew
The following code is what I'm woking on, hope it can help you:

protected void init() {
VerticalPanel container = new VerticalPanel();
initWidget(container);

int pageSize = 10;
CellTableUser cellTable = new CellTableUser(pageSize);
setColumns(cellTable);
setSelectionModel(cellTable);

setDataSize(cellTable);
int pageStart = 0;
loadData(pageStart, pageSize, cellTable);

SimplePagerUser pager = createPager(cellTable);

container.add(cellTable);
container.add(pager);
}

private SimplePagerUser createPager(final CellTableUser
cellTable) {
SimplePagerUser pager = new SimplePagerUser(cellTable,
SimplePager.TextLocation.CENTER) {
public void onRangeOrSizeChanged(PagingListViewUser 
listView) {
loadData(listView.getPageStart(), 
listView.getPageSize(),
listView);
super.onRangeOrSizeChanged(listView);
}
};
return pager;
}

private void setColumns(CellTableUser cellTable) {
cellTable.addColumn(new TextColumnUser() {
@Override
public String getValue(User user) {
return user.getName();
}
}, new TextHeader(Name));

cellTable.addColumn(new TextColumnUser() {
@Override
public String getValue(User user) {
return user.getLocation();
}
}, new TextHeader(Location));
}

private void setSelectionModel(CellTableUser cellTable) {
final SingleSelectionModelUser selectionModel = new
SingleSelectionModelUser();
SelectionChangeHandler selectionHandler = new
SelectionChangeHandler() {
@Override
public void onSelectionChange(SelectionChangeEvent 
event) {
User user = selectionModel.getSelectedObject();
Window.alert(user.getId() + :  + 
user.getName());
}
};
selectionModel.addSelectionChangeHandler(selectionHandler);
cellTable.setSelectionEnabled(true);
cellTable.setSelectionModel(selectionModel);
}

private void setDataSize(final PagingListViewUser cellTable) {
employeeRequest.countUsers(new AsyncCallbackInteger() {
public void onFailure(Throwable caught) {
Window.alert(Request failure:  + 
caught.getMessage());
}

public void onSuccess(Integer result) {
cellTable.setDataSize(result, true);
}
});
}

private void loadData(int start, int size,
final PagingListViewUser cellTable) {
employeeRequest.getUsers(start, size,
new AsyncCallbackPagingDataUser() {
public void onFailure(Throwable caught) 
{
Window.alert(Request failure: 
 + caught.getMessage());
}

public void onSuccess(PagingDataUser 
result) {

cellTable.setData(result.getStart(),

result.getLength(), result.getValues());
}
});
}

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



HttpSession Expiration Notice?

2010-06-02 Thread rileyscott
Hi All,

I need a session expired notice added to my application. This is
similar to Internet banking websites where they expire your session if
it remains idle for too long.

When a user's session has expired on the server, then the server will
send a message to the browser. When the browser receives this message
it will display a pop-up message to the user that their session has
expired.

So effectively, I need a server-push mechanism when the session
expires. I've been researching gwt-comet. It looks promising but not
sure if I'm overthinking the problem.

Any ideas on how to put together a solution?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How do you connect to External RPC Service? In other words, can you expose RPC services to outside world by sharing only client/shared pieces?

2010-06-02 Thread Sripathi Krishnan
Its not a GWT limitation, its a browser restriction - Same Origin Policy.

There are ways to workaround the limitation. In your case, you can setup a
proxy server to forward the requests from one domain to another. Apache
mod_proxy can help you with this.

For example, suppose you have http://rpc.example.com/MyRpcService and
http://UI.AnotherExample.com/. You can setup Apache to forward requests from
http://UI.AnotherExample.com/services/* to rpc.example.com. Then, you'd
configure your RPC client to send requests to ../services/MyRpcService.
Since the browser is sending the request to the same domain, everything
works fine.

It works well (we have our production systems working that way), but I don't
recommend using it unless you have run out of options.

--Sri


On 1 June 2010 11:35, Umesh Adtani adt...@gmail.com wrote:

 I have a RPC servlet that I would like to make available to other GWT
 application developers.  The problem that I currently see is that
 GWT.create(ServiceInterfaceClass) requires the service to be
 deployed on the same host where the GWT application is deployed.
 There is no way to do something like
 GWT.create(ServiceInterfaceClass,URL-where-service-is-deployed) to
 create the handle to the service.

 From client's perspective, this means that if your GWT application
 talks to multiple RPC services hosted on various different hosts, then
 there is no way to talk to those services even if you have shared and
 client code-base (containing interfaces, asyncs etc) available to you
 in some form of jar files.  Is there a way to get this working in
 current GWT versions?

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT 2.0

2010-06-02 Thread Sripathi Krishnan

 java.lang.Class.getCanonicalName()Ljava/lang/String;


Can you double check your JDK Version? Do you have multiple versions of JRE
libraries in your classpath?

--Sri


On 1 June 2010 15:24, Kapil Kulkarni kapilkulkarnip...@gmail.com wrote:

 Hi,
 I am new to GWT and in learning mode.
 I working with GWT 2.0 / Eclipse 3.5 / JDK 1.5 / IE 8.0

 As per getting started guide if I paste the url which i get in
 deployment mode to IE 8.0, then I get following
 but browser is not displaying text box

 Web Application Starter Project

 Please enter your name:


 And in eclipse I am getting following error:

 09:50:37.302 [ERROR] [test_gwt] Failed to create an instance of
 'com.kapil.test.client.Test_GWT' via deferred binding
 java.lang.RuntimeException: Deferred binding failed for
 'com.kapil.test.client.GreetingService' (did you forget to inherit a
 required module?)
at
 com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:43)
at com.google.gwt.core.client.GWT.create(GWT.java:98)
at com.kapil.test.client.Test_GWT.init(Test_GWT.java:36)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
 Source)
at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
 Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
 com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
 422)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
 361)
at

 com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
 185)
at

 com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
 380)
at

 com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
 222)
at java.lang.Thread.run(Unknown Source)
 Caused by: java.lang.NoSuchMethodError:
 java.lang.Class.getCanonicalName()Ljava/lang/String;
at

 com.google.gwt.user.rebind.rpc.ProxyCreator.getSourceWriter(ProxyCreator.java:
 759)
at
 com.google.gwt.user.rebind.rpc.ProxyCreator.create(ProxyCreator.java:
 225)
at

 com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator.generate(ServiceInterfaceProxyGenerator.java:
 57)
at

 com.google.gwt.dev.javac.StandardGeneratorContext.runGenerator(StandardGeneratorContext.java:
 418)
at
 com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:
 38)
at com.google.gwt.dev.shell.StandardRebindOracle
 $Rebinder.tryRebind(StandardRebindOracle.java:108)
at com.google.gwt.dev.shell.StandardRebindOracle
 $Rebinder.rebind(StandardRebindOracle.java:54)
at

 com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:
 154)
at

 com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:
 119)
at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:
 531)
at
 com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
 414)
at
 com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39)
at com.google.gwt.core.client.GWT.create(GWT.java:98)
at com.kapil.test.client.Test_GWT.init(Test_GWT.java:36)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
 Source)
at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
 Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
 com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
 422)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
 361)
at

 com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
 185)
at

 com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
 380)
at

 com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
 222)
at java.lang.Thread.run(Unknown Source)

 09:50:37.369 [DEBUG] [test_gwt] Rebinding
 com.google.gwt.core.client.impl.SchedulerImpl
 09:50:37.380 [WARN] [test_gwt] For the following type(s), generated
 source was never committed (did you forget to call commit()?)
 09:50:37.427 [WARN] [test_gwt]
 com.kapil.test.client.GreetingService_Proxy
 09:50:37.489 [ERROR] [test_gwt] Unable to load module entry point
 class com.kapil.test.client.Test_GWT (see associated exception for
 details)
 09:50:37.531 [ERROR] [test_gwt] Failed to load module 'test_gwt' from
 user agent 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64;
 Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
 3.0.30729; Media Center PC 6.0; MASN)' at 127.0.0.1:49935

 Any idea what's causing this issue?

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to

Re: [gwt-contrib] Re: CompilePerms and classpath loading problem.

2010-06-02 Thread Marko Vuksanovic
I've created a patch (and submitted it for code review -
http://gwt-code-reviews.appspot.com/579801/show). It seems to be working
correctly for me

On Tue, Jun 1, 2010 at 10:54 PM, Marko Vuksanovic markovuksano...@gmail.com
 wrote:

 I have modified the code to check the resource oracle (patch is attached).

 If the way i did it is correct - one more problem arose - The path is not
 reconstructed correctly. I get the error is

 Scanning for additional dependencies:
 file:/D:/Devel/open-source/gwt-distributed-compiler/agent/0002/src/hr/tkd/orka/client/panels/MainPanel.java
   Computing all possible rebind results for
 'hr.tkd.orka.client.panels.MainPanel.MainPanelUiBinder'
   Rebinding hr.tkd.orka.client.panels.MainPanel.MainPanelUiBinder
 Invoking generator
 com.google.gwt.uibinder.rebind.UiBinderGenerator
[ERROR] Generator
 'com.google.gwt.uibinder.rebind.UiBinderGenerator' threw an exception while
 rebinding 'hr.tkd.orka.client.panels.MainPanel.MainPanelUiBinder'
 java.lang.RuntimeException: java.io.FileNotFoundException:
 D:\Devel\open-source\gwt-distributed-compiler\agent\hr\tkd\orka\client\panels\MainPanel.ui.xml
 (The system cannot find the path specified)

 Obviously the resource is being looked for at the wrong place... It should
 be 
 D:\Devel\open-source\gwt-distributed-compiler\agent\0002\src\hr\tkd\orka\client\panels\MainPanel.ui.xml

 the program is run from the
 location D:\Devel\open-source\gwt-distributed-compiler\agent\ and the files
 needed for compile perms are located in folder 0002\src, 0002\lib and
 0002\work. The relevant part of the context class path is set
 to D:\Devel\open-source\gwt-distributed-compiler\agent\0002\src but when
 resource is fetched from the resource oracle the path is not constructed
 correctly. I reckon the resource should be added as
 0002\src\hr\tkd\orka\client\panels\MainPanel.ui.xml...

 On Tue, Jun 1, 2010 at 10:05 PM, Marko Vuksanovic 
 markovuksano...@gmail.com wrote:

  I don't believe it's necessarily true for the system loader to be a
 parent of the context loader. It's common, but not necessary. The only
 loader you can't get away from is the boot class loader.


 Ok, I wasn't totally precise. You're right about the boot and system class
 loader. The point was that all the parent class loaders would be checked
 prior to checking the actual class loader. So checking the context class
 loader would result in checking all the class loaders above it (in the
 hierarchy) - and if the hierarchy wasn't explicitly changed this should be
 perfectly ok.

 On Tue, Jun 1, 2010 at 9:17 PM, Lex Spoon sp...@google.com wrote:

 On Tue, Jun 1, 2010 at 2:35 PM, Marko Vuksanovic 
 markovuksano...@gmail.com wrote:

 Class Loaders are checked in parent to child direction - so if you try
 to fetch a resource from a context class loader, system class loader is the
 first that will be checked and only after resource is not found there, next
 child will be checked... and so on... So if something is found in context
 class loader, all parent class loaders have been checked. Somebody correct
 me if I'm wrong.


 I don't believe it's necessarily true for the system loader to be a
 parent of the context loader. It's common, but not necessary. The only
 loader you can't get away from is the boot class loader.

 That said, if it's not on the context loader, you might want to ignore it
 if you can get away with it. For that matter, the same goes for things not
 in the resource oracle.

 -Lex


  --
 http://groups.google.com/group/Google-Web-Toolkit-Contributors





-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: UiBinderGenerator is unable to fetch resources (issue579801)

2010-06-02 Thread jat


http://gwt-code-reviews.appspot.com/579801/diff/1/2
File user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java
(right):

http://gwt-code-reviews.appspot.com/579801/diff/1/2#newcode147
user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java:147:
Resource[] resources = (resourceOracle.getResources()).toArray(new
Resource[] {});
Why not getResourceMap() here instead of a loop?

http://gwt-code-reviews.appspot.com/579801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: RR : Rework ImageResourceGenerator to address several issues (issue335802)

2010-06-02 Thread bobv

Ping.

http://gwt-code-reviews.appspot.com/335802/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: RR : Rework ImageResourceGenerator to address several issues (issue335802)

2010-06-02 Thread Joel Webber
Crap, sorry. I/O ate my brain. Reviewing now.

Le 2 juin 2010 10:04, b...@google.com a écrit :

 Ping.

 http://gwt-code-reviews.appspot.com/335802/show


-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: RR : Rework ImageResourceGenerator to address several issues (issue335802)

2010-06-02 Thread jgw

LGTM.


http://gwt-code-reviews.appspot.com/335802/diff/1/4
File user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java
(left):

http://gwt-code-reviews.appspot.com/335802/diff/1/4#oldcode221
user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java:221:
interface HasRect {
On 2010/04/16 18:24:03, bobv wrote:

Removed this interface because it is silly.


Always a good reason :)

http://gwt-code-reviews.appspot.com/335802/diff/1/6
File user/test/com/google/gwt/resources/client/ImageResourceTest.java
(right):

http://gwt-code-reviews.appspot.com/335802/diff/1/6#newcode167
user/test/com/google/gwt/resources/client/ImageResourceTest.java:167:
assertEquals(128, r.scaledUp().getHeight());
I assume the point of testing both width and height here (even though
only width is set above) is to assert that the image scaled
proportionally, right?

http://gwt-code-reviews.appspot.com/335802/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: RR : Rework ImageResourceGenerator to address several issues (issue335802)

2010-06-02 Thread BobV
Thanks for the review.

 http://gwt-code-reviews.appspot.com/335802/diff/1/6#newcode167
 user/test/com/google/gwt/resources/client/ImageResourceTest.java:167:
 assertEquals(128, r.scaledUp().getHeight());
 I assume the point of testing both width and height here (even though
 only width is set above) is to assert that the image scaled
 proportionally, right?

Yes, I'll add a comment to that effect.

-- 
Bob Vawter
Google Web Toolkit Team

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Faster version of LongLib (issue572801)

2010-06-02 Thread scottb


http://gwt-code-reviews.appspot.com/572801/diff/9001/10015
File user/super/com/google/gwt/emul/java/lang/Number.java (right):

http://gwt-code-reviews.appspot.com/572801/diff/9001/10015#newcode245
user/super/com/google/gwt/emul/java/lang/Number.java:245: private static
final int[] maxLengthForRadix = {-1, -1, // unused
Can you move these three static-init arrays into a static nested class;
otherwise you're forcing all of java.lang.Number to have a clinit, which
is less than ideal.

See Decode for example.

http://gwt-code-reviews.appspot.com/572801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Deleting the stocks sample in favor of the Expenses sample. (issue580801)

2010-06-02 Thread jlabanca

Reviewers: jgw,

Description:
Deleting the stocks sample in favor of the Expenses sample.

Review by: j...@google.com

Please review this at http://gwt-code-reviews.appspot.com/580801/show

Affected files:
  D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/StocksCommon.gwt.xml
  D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/StocksDesktop.gwt.xml
  D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/StocksMobile.gwt.xml
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/BuySellPopup.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/ChangeCell.java

  D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/Columns.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/FavoritesWidget.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/FavoritesWidget.ui.xml
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/HighlightingTextCell.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/PlayerScoresWidget.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/PlayerScoresWidget.ui.xml
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/ProfitLossCell.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StockQueryWidget.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StockQueryWidget.ui.xml
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StockQuoteCell.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StockService.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StockServiceAsync.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StocksDesktop.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StocksDesktop.ui.xml
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StocksMobile.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StocksMobile.ui.xml
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/TransactionTreeViewModel.java

  D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/Updater.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/server/GoogleFinance.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/server/PlayerStatus.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/server/StockServiceImpl.java

  D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/server/Stocks.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/shared/PlayerInfo.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/shared/StockQuote.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/shared/StockQuoteList.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/shared/StockRequest.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/shared/StockResponse.java
  D  
bikeshed/src/com/google/gwt/sample/bikeshed/stocks/shared/Transaction.java

  D bikeshed/war/Stocks.html
  D bikeshed/war/StocksMobile.html
  M bikeshed/war/WEB-INF/web.xml


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Faster version of LongLib (issue572801)

2010-06-02 Thread rice

http://gwt-code-reviews.appspot.com/572801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Adding test cases for com.google.gwt.cell.client. (issue581801)

2010-06-02 Thread jlabanca

Reviewers: Dan Rice,

Description:
Adding test cases for com.google.gwt.cell.client.


Please review this at http://gwt-code-reviews.appspot.com/581801/show

Affected files:
  M  
bikeshed/src/com/google/gwt/sample/bikeshed/cookbook/client/MyTreeViewModel.java

  M user/src/com/google/gwt/cell/client/ActionCell.java
  M user/src/com/google/gwt/cell/client/ClickableTextCell.java
  M user/src/com/google/gwt/cell/client/CompositeCell.java
  M user/src/com/google/gwt/cell/client/EditTextCell.java
  M user/src/com/google/gwt/cell/client/IconCellDecorator.java
  A user/test/com/google/gwt/cell/client/AbstractCellTest.java
  A user/test/com/google/gwt/cell/client/ActionCellTest.java
  A user/test/com/google/gwt/cell/client/ButtonCellTest.java
  A user/test/com/google/gwt/cell/client/CellTestBase.java
  A user/test/com/google/gwt/cell/client/CheckboxCellTest.java
  A user/test/com/google/gwt/cell/client/ClickableTextCellTest.java
  A user/test/com/google/gwt/cell/client/CompositeCellTest.java
  A user/test/com/google/gwt/cell/client/DateCellTest.java
  A user/test/com/google/gwt/cell/client/EditTextCellTest.java
  A user/test/com/google/gwt/cell/client/IconCellDecoratorTest.java
  A user/test/com/google/gwt/cell/client/TextCellTest.java
  A user/test/com/google/gwt/cell/client/TextInputCellTest.java


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Fixes issue #3708 (issue582801)

2010-06-02 Thread scottb

Reviewers: Keith,

Description:
Moves assertion checking inside the check block to avoid a bad assertion
on unreachable local classes.

http://gwt-code-reviews.appspot.com/582801


Please review this at http://gwt-code-reviews.appspot.com/582801/show

Affected files:
  M dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java


Index: dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
diff --git a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java  
b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
index  
e685994da342c12752032557abde768a5493971a..811658673c2cf6d0d202f3ef850639cecb007cbd  
100644

--- a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
+++ b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
@@ -84,8 +84,7 @@ public class JdtCompiler {
 CompilationUnitDeclaration cud, ListCompiledClass  
compiledClasses) {

   CompilationUnit unit = builder.build(compiledClasses,
   compiler.computeDependencies(cud),
-  Collections.JsniMethod emptyList(),
-  new MethodArgNamesLookup(),
+  Collections.JsniMethod emptyList(), new MethodArgNamesLookup(),
   cud.compilationResult().getProblems());
   if (cud.compilationResult().hasErrors()) {
 unit = new ErrorCompilationUnit(unit);
@@ -176,13 +175,13 @@ public class JdtCompiler {

 @Override
 public boolean visit(TypeDeclaration typeDecl, BlockScope scope) {
-  CompiledClass enclosingClass =  
map.get(typeDecl.binding.enclosingType());

-  assert (enclosingClass != null);
   /*
* Weird case: if JDT determines that this local class is totally
* uninstantiable, it won't bother allocating a local name.
*/
   if (typeDecl.binding.constantPoolName() != null) {
+CompiledClass enclosingClass =  
map.get(typeDecl.binding.enclosingType());

+assert (enclosingClass != null);
 CompiledClass newClass = new CompiledClass(typeDecl,  
enclosingClass);

 map.put(typeDecl.binding, newClass);
   }


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixes issue #3708 (issue582801)

2010-06-02 Thread kplatfoot

LGTM

http://gwt-code-reviews.appspot.com/582801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re-added Expenses.html, which was lost in the merge. Also uses a URL parameter for mobile emplo... (issue582802)

2010-06-02 Thread jlabanca

Reviewers: Dan Rice,

Description:
Re-added Expenses.html, which was lost in the merge.  Also uses a URL
parameter for mobile employee id instead of hard coding it.  We can
review this more later, but this makes it easier to debug.


Please review this at http://gwt-code-reviews.appspot.com/582802/show

Affected files:
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobile.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobileShell.java
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/client/MobileReportList.java

  A bikeshed/war/Expenses.html


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Command pattern and GWT.runAsync

2010-06-02 Thread Julio Faerman
Hi,

I am trying to split a GWT app that uses the command (action) pattern.
The problem is that  GWT.create(ActionService.class) causes every
subclass of the return and parameter types to be included in the
initial fragment.

For instance, my action interface is:

public interface ActionService extends RemoteService {
T extends Response, V extends Request T execute(V req) throws
ActionFailedException;
}

the problem is that module1.SomeRequest and module2.OtherRequest
gets included in the initial fragment.
Do you see a way around this?

Thanks,
Julio Faerman

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: UiBinderGenerator is unable to fetch resources (issue579801)

2010-06-02 Thread markovuksanovic


http://gwt-code-reviews.appspot.com/579801/diff/1/2
File user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java
(right):

http://gwt-code-reviews.appspot.com/579801/diff/1/2#newcode147
user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java:147:
Resource[] resources = (resourceOracle.getResources()).toArray(new
Resource[] {});
I just haven't noticed that method... I will change this.

http://gwt-code-reviews.appspot.com/579801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Fix issue 4423 - RPC ProxyCreator doesn't support methods with Type Parameters (issue575801)

2010-06-02 Thread andrew . teirney

Reviewers: ,



Please review this at http://gwt-code-reviews.appspot.com/575801/show

Affected files:
  user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java


Index: user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java
===
--- user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java	(revision  
8216)

+++ user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java   (working copy)
@@ -32,6 +32,7 @@
 import com.google.gwt.core.ext.typeinfo.JParameterizedType;
 import com.google.gwt.core.ext.typeinfo.JPrimitiveType;
 import com.google.gwt.core.ext.typeinfo.JType;
+import com.google.gwt.core.ext.typeinfo.JTypeParameter;
 import com.google.gwt.core.ext.typeinfo.NotFoundException;
 import com.google.gwt.core.ext.typeinfo.TypeOracle;
 import com.google.gwt.dev.generator.NameFactory;
@@ -402,13 +403,35 @@
 w.println();

 // Write the method signature
-JType asyncReturnType = asyncMethod.getReturnType().getErasedType();
 w.print(public );
-w.print(asyncReturnType.getQualifiedSourceName());
+
+// Handle any type parameters that are required
+JTypeParameter[] asyncTypeParams = asyncMethod.getTypeParameters();
+if (asyncTypeParams.length  0) {
+  w.print();
+}
+
+boolean needsComma = false;
+for (int i = 0; i  asyncTypeParams.length; ++i) {
+  JTypeParameter param = asyncTypeParams[i];
+  if (needsComma) {
+w.print(, );
+  } else {
+needsComma = true;
+  }
+  w.print(param.getQualifiedSourceName());
+}
+
+if (asyncTypeParams.length  0) {
+  w.print( );
+}
+
+JType asyncReturnType = asyncMethod.getReturnType();
+w.print(asyncReturnType.getParameterizedQualifiedSourceName());
 w.print( );
 w.print(asyncMethod.getName() + ();

-boolean needsComma = false;
+needsComma = false;
 NameFactory nameFactory = new NameFactory();
 JParameter[] asyncParams = asyncMethod.getParameters();
 for (int i = 0; i  asyncParams.length; ++i) {
@@ -425,9 +448,8 @@
* SerializationStreamWriter.writeObject we need a try catch block
*/
   JType paramType = param.getType();
-  paramType = paramType.getErasedType();

-  w.print(paramType.getQualifiedSourceName());
+  w.print(paramType.getParameterizedQualifiedSourceName());
   w.print( );

   String paramName = param.getName();


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] UiBinderGenerator is unable to fetch resources (issue579801)

2010-06-02 Thread markovuksanovic

Reviewers: Ray Ryan, scottb, Lex, jat,

Description:
If class path context is changed UiBinderGenerator isn't able to fetch
resources found in the new class path context.

Please review this at http://gwt-code-reviews.appspot.com/579801/show

Affected files:
  user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


<    1   2