Re: GWT 2.0.4 is now available

2010-06-30 Thread Frederic Conrotte
Hello Chris

Any idea if/when it will be available for Maven users ?

http://repo2.maven.org/maven2/com/google/gwt/gwt-dev/

Thanks

Fred

On Jun 30, 11:25 pm, Chris Ramsdale 
wrote:
> This time without the mangled HTML.
>
> Recently Apple released Safari 5, which included a bug where non-
> integral right-shifts were not being evaluated properly. There were
> several reports, both internally and externally, of GWT-based
> applications unexpectedly crashing when running in Safari 5 (including
> Google Wave). Upon further inspection of the crash, we determined that
> the bug is triggered when calling several of GWT's array sorting
> methods, which in turn perform non-integral right-shifts as part of
> the compiled code.
>
> That's the bad news. The good news is that we have a fix for this
> issue, plus several other house keeping items that we've rolled
> into a 2.0.4 release, which can be downloaded from GWT’s main download
> site.
>
> If you’re experiencing the Safari crash, you’ll need to recompile and
> deploy your GWT app. The changes in 2.0.4 are completely compatible
> with your existing 2.0 app, and should have no negative impact. To
> that extent we’ve already dogfooded 2.0.4, verifying that it fixes the
> Wave crash that was originally reported.
>
> On Jun 30, 5:20 pm, Chris Ramsdale 
> wrote:
>
> > Recently Apple released Safari 5, which included a bug where non-integral
> > right-shifts were not being evaluated properly. There were several
> > reports, both internally and http://code.google.com/p/google-
> > web-toolkit/issues/detail?id=5056">externally, of GWT-based
> > applications unexpectedly crashing when running in Safari 5 (including
> > Google Wave). Upon further inspection of the crash, we determined that
> > the bug is triggered when calling several of GWT's array sorting
> > methods, which in turn perform non-integral right-shifts as part of
> > the compiled code.
>
> > That's the bad news. The good news is that we have a fix for this
> > issue, plus several other http://code.google.com/p/google-web-
> > toolkit/issues/list?can=2&q=milestone%3D2_0_4">house keeping items
> > that we've rolled into a 2.0.4 release, which can be downloaded from
> > GWT’s main http://code.google.com/p/google-web-toolkit/
> > downloads/detail?name=gwt-2.0.4.zip">download site.
>
> > If you’re experiencing the Safari crash, you’ll need to recompile and
> > deploy your GWT app. The changes in 2.0.4 are completely compatible
> > with your existing 2.0 app, and should have no negative impact. To
> > that extent we’ve already dogfooded 2.0.4, verifying that it fixes the
> > Wave crash that was originally reported.

-- 
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.



Right Click on Tree

2010-06-30 Thread ganesh.shirsat
hi,

How to get TreeItem on right click in GWT 2.0.3


please help me

thanks,
Ganesh Shirsat

-- 
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.



Contacts2 example's bug

2010-06-30 Thread JosephLi
If anyone encountered some weird behavior trying to download and run
the Contacts2 example from (http://code.google.com/webtoolkit/articles/
mvp-architecture-2.html) and is having the following symptoms, I  have
the solutions for u:

1.) adding new contact sometimes causes other contacts to disappear.
2.) having multiple ajax calls to
ContactsServiceImpl.updateContact(...) from just one single click to
the save button.

For (1), this is a classic problem using a collection's size as the id
for new items. As the contacts map changes in size due to add/delete
operation, new contacts might incorrectly take on existing contact's
id. (Try delete first contact on the list before u add one). Solution
is to simply put a synchronized id generation method in the
ContactsServiceImpl and use that to get the id for new contact instead
of size. Simple enough.

For (2), this is the fun part and upon digging a bit in the code
through the debugger, the problem comes from the fact that the views
are cached inside AppController. Take a look at onValueChange(...) and
u will see they are cached. Problem is, the presenter's constructor is
calling bind() and that adds a clickHandler everytime. So depends on
how many times u went to the add/edit page and hit, hitting save
causes the list of clickHandler to execute the ajax call sequentially.
This can be observed by putting a breakpoint on
ContactsServiceImpl.updateContact(...) method. U can see threads
piling up there for no good reason. I was scratching my head and
thinking my browser has some funky plugin, but clearing them still
have the problems and only digging the code a bit deeper reveals the
problem.

The simplest solution is to remove the caching of the views and u will
only get one ajax call for every button click.

On top of the two problems, there are something that still puzzle me:
a.) the add & edit is taking different path towards completing the
goal, which resulted in the ContactsServiceImpl.addContact(..) method
never called Take a look at AppController.doAddNewContact() and
doEditContact() and u will see.

b.) I still don't understand why ContactsViewImpl  is
templated while EditContactView is a direct concrete class. Some
expert here might be able to shed some light here.

But at the end, what puzzles me is why Google putting a confusing
example out there for people to learn their already complex MVP-2
model? It just add that much frustration and confusion on top of
everything. And be honest, with all the genius there in Google, I was
expecting something more complete and consistent.

Hope this helps and wish u all encounter less problems then I do while
learning,
Joseph

-- 
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.



Slow OOPHM on Windows 7 64 bit

2010-06-30 Thread Kyle
I've recently upgraded my OS to Win7 x64, and Dev Mode is impossibly
slow. The initial load used to take 10 seconds, and now it takes three
minutes to load OOPHM. My machine is a brand new MacBook Pro, if that
matters. I've tested with Chrome, Firefox, and IE8, and all display
the same long load time. I've tried eclipse 3.5 (Galileo) and 3.6
(Helios), and I've tried both x86 and x64 JDK and JVMs, but the same
behavior occurs. Any help would be greatly appreciated..

-- 
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: JsonpRequestBuilder Timeout - GWT 2.0

2010-06-30 Thread Thomas Broyer

On 30 juin, 16:11, Márcio Menezes  wrote:
> Hello!
> I'm trying to retrieve Json using JsonpRequestBuilder.
> When I use some external url, like this 
> onehttp://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=Y...,
> everything works fine.
> But, when I try to fetch json from some server inside my network, I get
> timeout error (Timeout while callinghttp://192.168.2.12/gwt.js).
>
> When I check the request on firebug, I can see that the response came back
> and its body is exactly what I was suppose to receive. Somehow, it is not
> being handled by the callback function.
>
> If I try the same URL through browser, it works fine.
>
> Does anyone know what it can be?

Are you returning JSON-*P* (i.e. a JavaScript file containing a single
function call with an object or array literal as sole argument)?
Is the function call using the function name given in the URL (in the
query-string, name of the parameter configurable in your
JsonpRequestBuilder)?

-- 
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 to display a JSP page inside a DecoratedTabPanel

2010-06-30 Thread rakesh wagh
the answer is embedded in your question: "framed".
Use com.google.gwt.user.client.ui.Frame


On Jun 30, 10:51 am, Denis  wrote:
> Hello,
>
> I have existing JSP pages that should be framed inside a GWT
> DecoratedTabPanel.
> Is this doable at all?
>
> Thanks for your reply.

-- 
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: Google Plugin for Eclipse 3.6 is now available

2010-06-30 Thread Jason Parekh
Hi Bálint,

Is the checkbox "Launch and deploy from this directory" checked? (It is
below the text box you enter the WAR directory in the project properties >
Google > Web application.)

Also, is this a new project or your existing project?

If you don't mind, could you create a new message thread?

Thanks,
jason

2010/6/29 Kriván Bálint 

> Hi!
>
> I've just downloaded Helios, and installed the GPE, but I'm having an
> issues, when I'm starting the Dev Mode it says, that the working
> directory does not exists. It wasn't a problem in 3.5, but okay, I've
> created it. Then I've noticed it doesn't copy the war files from the
> specified directory (This project has a WAR directory checked and the
> location is given), but 3.5 does. So currently I can't use Eclipse
> Helios and GPE because of this.
> Do you know something about these issues? Has anybody else experienced
> this?
>
> Thanks for your help, I really looking forward to use the new Eclipse
> with the new plugin!
>
> Regards,
> Bálint Kriván
>
> --
> 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.



Re: why do I sometimes get a javascript error of "uncaught exception: java.lang.NullPointerException"?

2010-06-30 Thread andreas
You could try using an UncaughtExceptionHandler. Assign your
implementation in onModuleLoad() by

GWT.setUncaughtExceptionHandler(...);

Then use a DeferredCommand for calling your actual entry point method:

DeferredCommand.addCommand(new Command() {
public void execute() {
yourEntryPointMethod();
}
});

You can use the UncaughtExceptionHandler to print stack trace for
example.

See 
http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/core/client/GWT.UncaughtExceptionHandler.html
and 
http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/core/client/GWT.html

On 30 Jun., 22:03, Shedokan  wrote:
> Why there are some times while doing the same actions in my app I get
> this javascript error:
> uncaught exception: java.lang.NullPointerException
>
> I have no idea where it is coming from since there is no line number
> and have no idea what is causing it.
>
> how can I trace it and fix it?
> and why does it show up in some times and in other times it doesn't?
>
> 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.4 is now available

2010-06-30 Thread Chris Ramsdale
This time without the mangled HTML.

Recently Apple released Safari 5, which included a bug where non-
integral right-shifts were not being evaluated properly. There were
several reports, both internally and externally, of GWT-based
applications unexpectedly crashing when running in Safari 5 (including
Google Wave). Upon further inspection of the crash, we determined that
the bug is triggered when calling several of GWT's array sorting
methods, which in turn perform non-integral right-shifts as part of
the compiled code.

That's the bad news. The good news is that we have a fix for this
issue, plus several other house keeping items that we've rolled
into a 2.0.4 release, which can be downloaded from GWT’s main download
site.

If you’re experiencing the Safari crash, you’ll need to recompile and
deploy your GWT app. The changes in 2.0.4 are completely compatible
with your existing 2.0 app, and should have no negative impact. To
that extent we’ve already dogfooded 2.0.4, verifying that it fixes the
Wave crash that was originally reported.



On Jun 30, 5:20 pm, Chris Ramsdale 
wrote:
> Recently Apple released Safari 5, which included a bug where non-integral
> right-shifts were not being evaluated properly. There were several
> reports, both internally and http://code.google.com/p/google-
> web-toolkit/issues/detail?id=5056">externally, of GWT-based
> applications unexpectedly crashing when running in Safari 5 (including
> Google Wave). Upon further inspection of the crash, we determined that
> the bug is triggered when calling several of GWT's array sorting
> methods, which in turn perform non-integral right-shifts as part of
> the compiled code.
>
> That's the bad news. The good news is that we have a fix for this
> issue, plus several other http://code.google.com/p/google-web-
> toolkit/issues/list?can=2&q=milestone%3D2_0_4">house keeping items
> that we've rolled into a 2.0.4 release, which can be downloaded from
> GWT’s main http://code.google.com/p/google-web-toolkit/
> downloads/detail?name=gwt-2.0.4.zip">download site.
>
> If you’re experiencing the Safari crash, you’ll need to recompile and
> deploy your GWT app. The changes in 2.0.4 are completely compatible
> with your existing 2.0 app, and should have no negative impact. To
> that extent we’ve already dogfooded 2.0.4, verifying that it fixes the
> Wave crash that was originally reported.

-- 
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: Exceptions after unchecking "Use Google AppEngine" -> SOLVED

2010-06-30 Thread sripathikrish...@gmail.com
Yes, remove everything except gwt-servlet and mysql jars. 
 
-Original Message-
From: Hotkey
Sent:  30/06/2010, 20:42 
To: Google Web Toolkit
Subject: Re: Exceptions after unchecking "Use Google AppEngine" -> SOLVED


I'm having exactly the same problem, but i didn't get the clue on how
to solve this one.
Should i remove some files which are in the "war\WEB-INF\lib"
directory? If yes, which ones should stay/be removed?

The application is an "extended" example with additional mysql
connection. I've unchecked the mentioned option because i was unable
to get the MySQL Driver working.
I had this Exception before unchecking:
Caused by: java.lang.ExceptionInInitializerError
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:
282)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at
com.setlog.gwt.servicetest.server.db.DBInterface.(DBInterface.java:
69)

Currently the following files are in the lib directory:

appengine-api-1.0-sdk-1.3.4.jar
appengine-api-labs-1.3.4.jar
appengine-jsr107cache-1.3.4.jar
datanucleus-appengine-1.0.7.final.jar
datanucleus-core-1.1.5.jar
datanucleus-jpa-1.1.5.jar
geronimo-jpa_3.0_spec-1.1.1.jar
geronimo-jta_1.1_spec-1.1.1.jar
gwt-servlet.jar
jdo2-api-2.3-eb.jar
jsr107cache-1.1.jar
mysql-connector-java-5.1.7-bin.jar


On 21 Jun., 21:45, Rajeev Dayal  wrote:
> Filed the following issue for this:
>
> http://code.google.com/p/google-web-toolkit/issues/detail?id=5041
>
>  Feel
> free to star it/add comments as you see fit.
>
> On Sun, Jun 20, 2010 at 9:41 AM, Sripathi Krishnan <
>
>
>
> sripathi.krish...@gmail.com> wrote:
> > The (probably satisfactory) approach is to remove the GAE jars from the
> > classpath. When you uncheck GAE, it doesn't remove the jars from the
> > classpath. There is some kind of version mismatch in one of the jetty
> > classes (as shown by NoClassDefFoundError), so when you remove GAE jars,
> > things work fine.
>
> > --Sri
>
> > On 20 June 2010 19:03, Magnus  wrote:
>
> >> Hello,
>
> >> for all those who have problems connecting to a mysql database within
> >> a RPC call:
> >> The solution found in this thread is to uncheck "Use Google AppEngine"
> >> in the eclipse project settings:
>
> >>http://www.mail-archive.com/google-web-toolkit@googlegroups.com/msg14...
>
> >> But this leads to problems when running the app in hosted mode.
>
> >> My (unsatisfactory but working) approach:
> >> Create a new Web Application Project, where AppEngine is unchecked at
> >> project creation.
>
> >> I hope this will be usefull for someone...
>
> >> Magnus
>
> >> On Jun 20, 2:35 pm, Magnus  wrote:
> >> > Hello,
>
> >> > after unchecking "Use Google AppEngine" in the project properties in
> >> > Eclipse, I get the following exceptions when launching the
> >> > application.
>
> >> > (I did so, because I found a solution for my database problem:
> >>http://www.mail-archive.com/google-web-toolkit@googlegroups.com/msg14...)
>
> >> > Can you help?
>
> >> > Thank you
> >> > Magnus
>
> >> > [WARN] Server class
>
> >> 'com.google.appengine.repackaged.org.apache.commons.logging.impl.Log4JLogge
> >>  r'
> >> > could not be found in the web app, but was found on the system
> >> > classpath
> >> >    [WARN] Adding classpath entry 'file:/home/wagner/.eclipse/
> >> > org.eclipse.platform_3.3.0_385211434/configuration/eclipse/plugins/
> >> > com.google.appengine.eclipse.sdkbundle.1.3.3_1.3.3.v20100423/
> >> > appengine-java-sdk-1.3.3.1/lib/shared/jsp/repackaged-appengine-commons-
> >> > logging-1.1.1.jar' to the web app classpath for this session
> >> >    For additional info see: file:/home/wagner/.eclipse/
> >> > org.eclipse.platform_3.3.0_385211434/configuration/eclipse/plugins/
> >> > com.google.gwt.eclipse.sdkbundle.2.0.3_2.0.3.v201002191036/gwt-2.0.3/
> >> > doc/helpInfo/webAppClassPath.html
> >> > Starting Jetty on port 
> >> >    [WARN] failed org.mortbay.jetty.nio.SelectChannelConnector
> >> > $...@145c859
> >> > java.lang.NoSuchMethodError: org.mortbay.thread.Timeout.(Ljava/
> >> > lang/Object;)V
> >> >         at org.mortbay.io.nio.SelectorManager
> >> > $SelectSet.(SelectorManager.java:306)
> >> >         at
> >> org.mortbay.io.nio.SelectorManager.doStart(SelectorManager.java:
> >> > 223)
> >> >         at
> >> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> >> > 39)
> >> >         at
>
> >> org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector
> >>  .java:
> >> > 303)
> >> >         at
> >> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> >> > 39)
> >> >         at org.mortbay.jetty.Server.doStart(Server.java:233)
> >> >         at
> >> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> >> > 39)
> >> >         at
> >> > com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:
> >> 

GWT 2.0.4 is now available

2010-06-30 Thread Chris Ramsdale
Recently Apple released Safari 5, which included a bug where non-integral
right-shifts were not being evaluated properly. There were several
reports, both internally and http://code.google.com/p/google-
web-toolkit/issues/detail?id=5056">externally, of GWT-based
applications unexpectedly crashing when running in Safari 5 (including
Google Wave). Upon further inspection of the crash, we determined that
the bug is triggered when calling several of GWT's array sorting
methods, which in turn perform non-integral right-shifts as part of
the compiled code.

That's the bad news. The good news is that we have a fix for this
issue, plus several other http://code.google.com/p/google-web-
toolkit/issues/list?can=2&q=milestone%3D2_0_4">house keeping items
that we've rolled into a 2.0.4 release, which can be downloaded from
GWT’s main http://code.google.com/p/google-web-toolkit/
downloads/detail?name=gwt-2.0.4.zip">download site.

If you’re experiencing the Safari crash, you’ll need to recompile and
deploy your GWT app. The changes in 2.0.4 are completely compatible
with your existing 2.0 app, and should have no negative impact. To
that extent we’ve already dogfooded 2.0.4, verifying that it fixes the
Wave crash that was originally reported.

-- 
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.



JsonpRequestBuilder Timeout - GWT 2.0

2010-06-30 Thread Márcio Menezes
Hello!
I'm trying to retrieve Json using JsonpRequestBuilder.
When I use some external url, like this one
http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&query=Madonna&output=json,
everything works fine.
But, when I try to fetch json from some server inside my network, I get
timeout error (Timeout while calling http://192.168.2.12/gwt.js).

When I check the request on firebug, I can see that the response came back
and its body is exactly what I was suppose to receive. Somehow, it is not
being handled by the callback function.

If I try the same URL through browser, it works fine.

Does anyone know what it can be?

Marcio

-- 
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: Exceptions after unchecking "Use Google AppEngine" -> SOLVED

2010-06-30 Thread Hotkey
I'm having exactly the same problem, but i didn't get the clue on how
to solve this one.
Should i remove some files which are in the "war\WEB-INF\lib"
directory? If yes, which ones should stay/be removed?

The application is an "extended" example with additional mysql
connection. I've unchecked the mentioned option because i was unable
to get the MySQL Driver working.
I had this Exception before unchecking:
Caused by: java.lang.ExceptionInInitializerError
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:
282)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at
com.setlog.gwt.servicetest.server.db.DBInterface.(DBInterface.java:
69)

Currently the following files are in the lib directory:

appengine-api-1.0-sdk-1.3.4.jar
appengine-api-labs-1.3.4.jar
appengine-jsr107cache-1.3.4.jar
datanucleus-appengine-1.0.7.final.jar
datanucleus-core-1.1.5.jar
datanucleus-jpa-1.1.5.jar
geronimo-jpa_3.0_spec-1.1.1.jar
geronimo-jta_1.1_spec-1.1.1.jar
gwt-servlet.jar
jdo2-api-2.3-eb.jar
jsr107cache-1.1.jar
mysql-connector-java-5.1.7-bin.jar


On 21 Jun., 21:45, Rajeev Dayal  wrote:
> Filed the following issue for this:
>
> http://code.google.com/p/google-web-toolkit/issues/detail?id=5041
>
>  Feel
> free to star it/add comments as you see fit.
>
> On Sun, Jun 20, 2010 at 9:41 AM, Sripathi Krishnan <
>
>
>
> sripathi.krish...@gmail.com> wrote:
> > The (probably satisfactory) approach is to remove the GAE jars from the
> > classpath. When you uncheck GAE, it doesn't remove the jars from the
> > classpath. There is some kind of version mismatch in one of the jetty
> > classes (as shown by NoClassDefFoundError), so when you remove GAE jars,
> > things work fine.
>
> > --Sri
>
> > On 20 June 2010 19:03, Magnus  wrote:
>
> >> Hello,
>
> >> for all those who have problems connecting to a mysql database within
> >> a RPC call:
> >> The solution found in this thread is to uncheck "Use Google AppEngine"
> >> in the eclipse project settings:
>
> >>http://www.mail-archive.com/google-web-toolkit@googlegroups.com/msg14...
>
> >> But this leads to problems when running the app in hosted mode.
>
> >> My (unsatisfactory but working) approach:
> >> Create a new Web Application Project, where AppEngine is unchecked at
> >> project creation.
>
> >> I hope this will be usefull for someone...
>
> >> Magnus
>
> >> On Jun 20, 2:35 pm, Magnus  wrote:
> >> > Hello,
>
> >> > after unchecking "Use Google AppEngine" in the project properties in
> >> > Eclipse, I get the following exceptions when launching the
> >> > application.
>
> >> > (I did so, because I found a solution for my database problem:
> >>http://www.mail-archive.com/google-web-toolkit@googlegroups.com/msg14...)
>
> >> > Can you help?
>
> >> > Thank you
> >> > Magnus
>
> >> > [WARN] Server class
>
> >> 'com.google.appengine.repackaged.org.apache.commons.logging.impl.Log4JLogge
> >>  r'
> >> > could not be found in the web app, but was found on the system
> >> > classpath
> >> >    [WARN] Adding classpath entry 'file:/home/wagner/.eclipse/
> >> > org.eclipse.platform_3.3.0_385211434/configuration/eclipse/plugins/
> >> > com.google.appengine.eclipse.sdkbundle.1.3.3_1.3.3.v20100423/
> >> > appengine-java-sdk-1.3.3.1/lib/shared/jsp/repackaged-appengine-commons-
> >> > logging-1.1.1.jar' to the web app classpath for this session
> >> >    For additional info see: file:/home/wagner/.eclipse/
> >> > org.eclipse.platform_3.3.0_385211434/configuration/eclipse/plugins/
> >> > com.google.gwt.eclipse.sdkbundle.2.0.3_2.0.3.v201002191036/gwt-2.0.3/
> >> > doc/helpInfo/webAppClassPath.html
> >> > Starting Jetty on port 
> >> >    [WARN] failed org.mortbay.jetty.nio.SelectChannelConnector
> >> > $...@145c859
> >> > java.lang.NoSuchMethodError: org.mortbay.thread.Timeout.(Ljava/
> >> > lang/Object;)V
> >> >         at org.mortbay.io.nio.SelectorManager
> >> > $SelectSet.(SelectorManager.java:306)
> >> >         at
> >> org.mortbay.io.nio.SelectorManager.doStart(SelectorManager.java:
> >> > 223)
> >> >         at
> >> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> >> > 39)
> >> >         at
>
> >> org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector
> >>  .java:
> >> > 303)
> >> >         at
> >> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> >> > 39)
> >> >         at org.mortbay.jetty.Server.doStart(Server.java:233)
> >> >         at
> >> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> >> > 39)
> >> >         at
> >> > com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:
> >> > 543)
> >> >         at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:421)
> >> >         at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1035)
> >> >         at com.google.gwt.dev.DevModeBase.run(DevMode

Re: overriding CSS styles using the "!important;" keyword

2010-06-30 Thread Katharina Probst
You can just directly override the css defaults for stack panel.  The
style rules are (see
http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/ui/StackPanel.html):

.gwt-StackPanel { the panel itself }
.gwt-StackPanel .gwt-StackPanelItem { unselected items }
.gwt-StackPanel .gwt-StackPanelItem-selected { selected items }
.gwt-StackPanel .gwt-StackPanelContent { the wrapper around the
contents of the item }

if you want to override them in your *ui.xml (or in your CssResource
css file), do this:

@external gwt-StackPanel; (similarly for the others)

and then just have a css rule

.gwt-StackPanel {
   border-bottom: 1px solid #FF; (or whatever you'd like)
}

Hope this helps.

kathrin


On Wed, Jun 30, 2010 at 2:39 AM, Magnus  wrote:
> Hi,
>
> StackPanel has an ugly border at the bottom, and I verified that this
> is explicitly set in standard.css.
>
> So I would like to remove it / change its color by using the "!
> important;" keyword in my own style:
>
> .myStackPanel
> {
>  border-bottom: 1px solid #FF; !important;
> }
>
> This shows no effect.
>
> But it succeeded in other cases.
>
> How can I get rid of the bottom border?
>
> Thanks
> Magnus
>
> --
> 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.



ScrollPanel question

2010-06-30 Thread Kevin
Hi all,

I am working on an application which simulates the idea of googlemap,
where I am able to drag a large image within a viewport.

On top of that, I am now trying to add a scrollbar as well to the
application. I have decided to use scrollpanel, managed to add the
absolute image panel to the scrollpanel and display the image...

So far so good... but then I discover that the scrollpanel's scrollbar
actually overlaps the edge of the absolute image panel underneath it.

Is that a bug in GWT? I would have thought the scrollbar would have
been cleverer than this and add itself outside the viewport, rather
than inside it...

Could someone help me please..

Regards,
Kevin

-- 
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.



Dynamic content loading with UiBinder

2010-06-30 Thread kawanka
Hello,

Can someone point me to a demo/tutorial of using UiBinder (xml layout
stuff) and setting the content of a VerticalPanel dynamically in
code... on a button click or something. the only examples I found were
of using html divs and ids and using RootPanel.get(divId) to get to
the composite in order to swap it out.

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.



JDBC org.gjt.mm.mysql.Driver : Classnotfound

2010-06-30 Thread Hotkey
Dear All,

this is my first post in this group, hopefully i'm not doing anything
wrong. I've searched for this topic but didn't found any solution.

I'm quity new to GWT and are currently writing my first Client/Server
example. Actually i want to read some Data from a database but i
didn't get the connection to work.

At the source
"Class.forName("org.gjt.mm.mysql.Driver").newInstance();" a
ClassNotFoundException is thrown.

I'm using Eclipse and have tried the following:
Project Properties -> Java Build Path -> Libraries -> Add External Jar

Result: still ClassNotFoundException

Manually Copied the file into the WEB-INF\lib directory.

Result:
ExceptionInInitializerError at the line: this.conn =
DriverManager.getConnection(""):

Caused by: java.lang.ExceptionInInitializerError
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:
282)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at
com.setlog.gwt.servicetest.server.db.DBInterface.(DBInterface.java:
69)


Hopefully someone can help me with this

-- 
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 t compile and run gwt app in eclipse and normally

2010-06-30 Thread kondal rao
please help me out in this issue i m very much fresh to this framework
but i know java..

-- 
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.



Successful arabic from GWT client form into MySQL

2010-06-30 Thread henryhbk

I could not find a good recipe for inserting Arabic entered on a GWT
page into a text field to be inserted into MySQL as anything other
than "?". Here is a simplified example



CLIENT:

private RichTextArea arabicNameField = new RichTextArea();
//First thing we discovered is this only reliably works in a
RichTextArea, a TextBox does not seem to work for arabic

myService.insertText(arabicName, new AsyncCallback() {
public void onFailure(Throwable caught) {
System.out.println(caught.getMessage());
}

// we don't do anything here for saving
public void onSuccess(Void result) {
return;
}
});



SERVER:
//The Key is in the UTF encoding and getting the bytes rather 
than
the text
String queryString = "insert into names (arabicname) values 
(?)";

mySqlStatement = con.prepareStatement(queryString);

try {
mySqlStatement.setBytes(1, 
arabicName.getBytes("UTF-8"));
} catch (UnsupportedEncodingException e) {
mySqlStatement.setString(1, "Unable to Encode Name");
}

mySqlStatement.executeUpdate();
mySqlStatement.close();
con.close();

-- 
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 + canvas + gwt-canvas

2010-06-30 Thread Jamie
I have started playing with the  element, GWT, and the cool
gwt-canvas project.
However, it's really slow when you have to recompile every time.

I posted a very short tutorial on experimenting with the canvas
element using a command line:
http://jamies-gwt.blogspot.com/2010/06/experimenting-with-html-canvas.html

The short of it is:  Use firefox + firebug, open a HTML document with
a canvas element in it, and then use the firebug console command line.

-- 
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.



why do I sometimes get a javascript error of "uncaught exception: java.lang.NullPointerException"?

2010-06-30 Thread Shedokan
Why there are some times while doing the same actions in my app I get
this javascript error:
uncaught exception: java.lang.NullPointerException

I have no idea where it is coming from since there is no line number
and have no idea what is causing it.

how can I trace it and fix it?
and why does it show up in some times and in other times it doesn't?

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: Window.Location.getParameter() always null

2010-06-30 Thread Stefan Bachert
Hi,

I use it and it works.
Please supply your URL and your code, probably something went wrong.

Stefan Bachert
http://gwtworld.de

On Jun 29, 9:35 pm, mdwarne  wrote:
> Hi,
>
> I need to pass a parameter to my application.  However if I append a
> parameter to the url query string, I can not retrieve it by name using
> Window.Location. (Always returns null)
>
> When I retrieve the entire Query String,  It contains only the
> gwt.codesvr parameter, but not my additional parameter.
>
> Any Ideas?
> Thanks,
> Mike.

-- 
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: GWTEvent, sinking own events

2010-06-30 Thread Roy
explain?

On Jun 30, 7:41 pm, Johan Rydberg  wrote:
> On 6/30/10 11:57 AM, Roy wrote:If the answer is that View A *will* catch
> its own event, any> recommendations on how to identify the event in such a 
> way that View A
> > knows it was the originator?
>
> Maybe you can use this;
>
> http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/g...()

-- 
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: More than one module

2010-06-30 Thread Chris Boertien
This is just a suggestion off the top of my head and may or may not
work as i think it will.

To address your case I would setup 1 Module for the entry point and
use it to choose which of the other Module's to load for the main
page. I think this should allow you to take the most advantage of code
splitting so as not to load any of the data for one page when the
other is chosen.

Something like...
// PageChooserEntryPoint.onModuleLoad()

if(loadPageOne) {
  GWT.runAsync(new AsyncCallback() {
(new PageOneEntryPoint).onModuleLoad();
  });
} else {
  GWT.runAsync(new AsyncCallback() {
(new PageTwoEntryPoint).onModuleLoad();
  });
}

Im not sure if thats the best way to go about it, but its the first
thing that came to mind.

On Wed, Jun 30, 2010 at 7:25 AM, Katharina Probst  wrote:
> See some documentation here:
> http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules
>
> On Tue, Jun 29, 2010 at 11:59 PM, Michael W  wrote:
>>
>> Yes, you can have more than one module.
>> If you use Maven, you can view gwt maven plugin for detail.
>>
>> On Jun 25, 5:27 pm, GWT_AL  wrote:
>> > I need to developer a web application which has more than one main
>> > page layout.
>> > I was wondering how to develop more than one main page in a GWT
>> > application.
>> > Is it possible to have more than one Module in a GWT app (is that the
>> > way to achieve this)?
>>
>> --
>> 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.
>

-- 
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: Creating new Presenter/View in a Presenter

2010-06-30 Thread Thomas Broyer


On 30 juin, 17:31, Jyaif  wrote:
> Hi,
> I am beginning to work on a big app created in GWT and I have a
> question regarding the MVP pattern in GWT.
>
> I have readhttp://code.google.com/webtoolkit/articles/mvp-architecture.html,
> and I understand that the AppController creates Presenters, and
> provides them a rpcService, an eventBus, and a view.
>
> This makes it easy (among other things) to target mobile phones or
> desktop computers by submitting different views to the Presenters
>
> However, if one of the Presenter creates some widget, also programmed
> in a VP fashion, it will be the Presenter's responsibility to
> instantiate the view for the widget :-(
> How can I make it so the Presenter knows what kind of view (mobile
> phone/desktop) it has to create?
>
> Should I submit to all my Presenters a Factory with the methods
> newViewForWidgetA(), newViewForWidgetB(), etc... ?

Yes, more or less. But I'd encourage you to use some dependency
injection framework, such as Google GIN, to make this wy easier to
write and maintain.

-- 
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.



Google API Libraries for Google Web Toolkit - Gadgets Update

2010-06-30 Thread Eric Ayers
This is a recap of the blog post that just went out on the GWT blog
   
http://googlewebtoolkit.blogspot.com/2010/06/google-api-libraries-for-google-web.html

Although its only been a few weeks since the previous release of the
open source gadgets library for Google Web Toolkit (GWT), a major
overhaul to the gwt-gadgets  project has been under way and we are
excited to announce that these changes are ready to be released as
gwt-gadgets-1.2.0.

Gadgets allow a developer to create applications that can be embedded
in another website. Sites that support gadgets include iGoogle, My
Space, Orkut, Linked In or Google Wave. These sites all adhere to the
Open Social Foundation specifications for gadgets and the Open Social
API. This release incorporates the following features into the GWT
bindings:

* Updates the API to make use of the gadgets.* JavaScript API
namespace. Previously only the legacy gadgets API was supported.
* Adds OS Lite API (1.0) core support.
* Updates the Gadget RPC sample and provided a utility class to
simplify use of GWT-RPC.
* Adds support for gadget Locale settings.
* HTML strict or quirks mode can be selected.
* Gadget manifest names can be generated with short or long format.
* Changes the Feature classes to interfaces to allow mocking for
unit testing.
* Adds a new sample application with demonstrates the use of Open
Social, OAuth, App Engine and the Maps API together in a gadget.

We would like to recognize Hilbrand Bouwkamp for helping update the
GWT-RPC support in the library. Hilbrand is the author of cobogwave
which adds Google Wave specific support for GWT based gadgets.  Check
it out at http://code.google.com/p/cobogwave.

This new release is now available for download at Google Code

http://code.google.com/p/gwt-google-apis

The Google API Library for GWT Team
-- 
Eric Z. Ayers
Google Web Toolkit, Atlanta, GA USA

-- 
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 to display a JSP page inside a DecoratedTabPanel

2010-06-30 Thread Denis
Hello,

I have existing JSP pages that should be framed inside a GWT
DecoratedTabPanel.
Is this doable at all?

Thanks for your reply.

-- 
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 to simplify your GwtEvent classes and have fun doing it!

2010-06-30 Thread Stephen Haberman

> public class GenericEvent extends GwtEvent {

This is very tangential, but all the talk about a generic event made
me think of a paper a colleague of mine linked me to about potential
design patterns for UI listeners in Scala:

http://lamp.epfl.ch/%7Eimaier/pub/DeprecatingObserversTR2010.pdf

Again, this is very tangential to GWT itself, but I enjoyed the read.

One concrete thing I did like from the paper is that if an observer
doesn't care about the actual payload of an event, just that it was
triggered, the observer can be hooked up to any and every event,
regardless of the event's type. Multiple times in GWT I've wanted to
run the same logic on blur, on click, on whatever, but cannot have
just a single new HeySomethingGenericHappened() { public void handle()
{ ... } ) that can be hooked up to any event.

- Stephen

-- 
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 to simplify your GwtEvent classes and have fun doing it!

2010-06-30 Thread Stephen Haberman

> It is a bit of a nuisance maintaining two java files for each event.

I agree that GWT events involve a lot of boilerplate.

My approach was to write an annotation processor (native Eclipse/javac
support) where you just write a "spec":

@GenEvent
public class CalendarChangeRequestEventSpec {
  Date from;
  Date till;
}

And that's it. The event/handler/type get generated for you as soon as
you hit save. Change "from" to "foo", hit save, the generated code is
immediately up to date with a "getFoo" method instead of "getFrom",
updated hashCode, updated equals, etc. It's pretty slick.

I just recently pushed the code out to github:

http://github.com/stephenh/gwt-mpv-apt

- Stephen

-- 
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: GXT Button Id

2010-06-30 Thread Nirmal
With selenium; you could use CSS locator
css=button:contains(('Send')

Regards,
Nirmal

On Jun 29, 9:09 pm, Paul Grenyer  wrote:
> Hi
>
> > Just curious, are you testing your GUI with Selenium ? If yes, does it
> > work with GWT ?
>
> We're using something called Twist which is based on Selenium and yes, it 
> works.
>
> --
> Thanks
> Paul
>
> Paul Grenyer
> e: paul.gren...@gmail.com
> b: paulgrenyer.blogspot.com

-- 
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.



a weird IndexOutOfBoundsException after removing a tab from the DecoratedTabPanel

2010-06-30 Thread Denis
Hello,

I got a weird exception after removing a tab. Details of the exception
is at the end of this message. Even though I got the exception, the
application still functions normally and the tab can be removed
successfully. I don't know where the exception comes from and what I
should do to avoid it.

The following code is my extension to DecoratedTabPanel to make it
dynamically closable. Any input will be appreciated.

public class ClosableTabPanel extends DecoratedTabPanel {
private boolean isReadyToRemove = false;

public ClosableTabPanel() {
addBeforeSelectionHandler(new BeforeSelectionHandler() 
{
public void 
onBeforeSelection(BeforeSelectionEvent event)
{
if (isReadyToRemove) {
remove(event.getItem());
isReadyToRemove = false;

}
}
});
}

@Override
public void add(Widget w, String tabText) {
HorizontalPanel tab = new HorizontalPanel();
Button button = new Button("x", new ClickHandler() {

@Override
public void onClick(ClickEvent event) {
Widget widget = (Widget) event.getSource();
...
final ClosableTabPanel tab = (ClosableTabPanel) 
widget;
tab.isReadyToRemove = true;
}
});

   .
}
}




java.lang.IndexOutOfBoundsException: null
at
com.google.gwt.user.client.ui.ComplexPanel.checkIndexBoundsForAccess(ComplexPanel.java:
128)
at
com.google.gwt.user.client.ui.DeckPanel.showWidget(DeckPanel.java:313)
at
com.google.gwt.user.client.ui.TabPanel.onTabSelected(TabPanel.java:
382)
at com.google.gwt.user.client.ui.ListenerWrapper
$WrappedTabListener.onSelection(ListenerWrapper.java:754)
at
com.google.gwt.event.logical.shared.SelectionEvent.dispatch(SelectionEvent.java:
89)
at
com.google.gwt.event.logical.shared.SelectionEvent.dispatch(SelectionEvent.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.logical.shared.SelectionEvent.fire(SelectionEvent.java:
43)
at com.google.gwt.user.client.ui.TabBar.selectTab(TabBar.java:462)
at
com.google.gwt.user.client.ui.TabBar.selectTabByTabWidget(TabBar.java:
601)
at com.google.gwt.user.client.ui.TabBar.access$0(TabBar.java:596)
at com.google.gwt.user.client.ui.TabBar
$ClickDelegatePanel.onBrowserEvent(TabBar.java:151)
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.GeneratedMethodAccessor39.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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.GeneratedMethodAccessor18.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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.reactToMessages(BrowserChannel.java:
1668)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
401)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
222)
at jav

Creating new Presenter/View in a Presenter

2010-06-30 Thread Jyaif
Hi,
I am beginning to work on a big app created in GWT and I have a
question regarding the MVP pattern in GWT.

I have read http://code.google.com/webtoolkit/articles/mvp-architecture.html,
and I understand that the AppController creates Presenters, and
provides them a rpcService, an eventBus, and a view.

This makes it easy (among other things) to target mobile phones or
desktop computers by submitting different views to the Presenters

However, if one of the Presenter creates some widget, also programmed
in a VP fashion, it will be the Presenter's responsibility to
instantiate the view for the widget :-(
How can I make it so the Presenter knows what kind of view (mobile
phone/desktop) it has to create?

Should I submit to all my Presenters a Factory with the methods
newViewForWidgetA(), newViewForWidgetB(), etc... ? Or maybe I
completely misunderstood everything from the start, in which case
please explain me if you have time :-)

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: Javascript in HTML Object works in FF not IE

2010-06-30 Thread skippy
OK, well this is what I did.

You need to take  your javascript out of the jsp's that generate the
HTML.
Put them in one to meny .js files.
include them in the same place you have your GWT compiled nochache.js.

Less the 

Re: UiBinder - VerticalPanel not applicable for the argument SelectElement ...

2010-06-30 Thread alan
Thanks. Were is the best source of documentation on UiBinder tags.

-- 
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: GWTEvent, sinking own events

2010-06-30 Thread Jeff Chimene
On Wed, Jun 30, 2010 at 4:41 AM, Johan Rydberg wrote:

> On 6/30/10 11:57 AM, Roy wrote:If the answer is that View A *will* catch
> its own event, any
>
>  recommendations on how to identify the event in such a way that View A
>> knows it was the originator?
>>
>>
> Maybe you can use this;
>
>
> http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/event/shared/GwtEvent.html#getSource()


If the event source isn't a widget, the result will be null.

Consider adding a parameter to the event that identifies the event source.
For example:

eventBus.fireEvent(new MyEvent(MyIndentifier myIndentifier));

Perhaps MyIdentifier is an enum.

Then, in the event class:

public void MyEvent(MyIdentifier myIdentifier) {
this.myIdentifier = myIdentifier;
}

public MyIdentifier getMyIdentifier() {
return myIdentifier;
}

Then, in the event handler:

switch e.getMyIdentifier {
 case MYIDENTIFIER1: break;
 
}

Also, see the current thread subject "How to simplify your GwtEvent classes
and have fun doing it!" for another implementation technique.

-- 
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: More than one module

2010-06-30 Thread Katharina Probst
See some documentation here:

http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules

On Tue, Jun 29, 2010 at 11:59 PM, Michael W  wrote:

> Yes, you can have more than one module.
> If you use Maven, you can view gwt maven plugin for detail.
>
> On Jun 25, 5:27 pm, GWT_AL  wrote:
> > I need to developer a web application which has more than one main
> > page layout.
> > I was wondering how to develop more than one main page in a GWT
> > application.
> > Is it possible to have more than one Module in a GWT app (is that the
> > way to achieve this)?
>
> --
> 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.



Re: GWT / GIN: Adding user class to all presenters

2010-06-30 Thread Miroslav Genov

Hello,

You can bind User object to a singleton provider that is retrieving user 
information. Here is what we are doing in one of our projects:


public class UserInfo {

  public static UserInfo with(String email, String firstname, String 
surname, String family) {

UserInfo info = new UserInfo();
info.email = email;
info.firstname = firstname;
info.surname = surname;
info.family = family;

return info;
  }

  private UserInfo() {

  }

  private String email;
  private String firstname;
  private String family;
  private String surname;

  public String getEmail() {
return email;
  }

  public String getFirstname() {
return firstname;
  }

  public String getFamily() {
return family;
  }

  public String getSurname() {
return surname;
  }
}


and also we have a provider class:

public class UserInfoProvider implements Provider {

  public UserInfo get() {
Dictionary userInfoDict = Dictionary.getDictionary("userInfo");

String email = userInfoDict.get("email");
String firstname = userInfoDict.get("firstname");
String surname = userInfoDict.get("surname");
String family = userInfoDict.get("family");

UserInfo userInfo = UserInfo.with(email, firstname, surname, family);
return userInfo;
  }
}

As you can see the provider is retrieving user information using 
Dictionary provided by GWT. Currently our main page is rendering user 
information as an in-line json that looks as follow:


var userInfo = {
email: "johnu...@somedomain.com",
firstname: "John",
surname: "",
family: "Smith"
}


And finally we are adding binding to the provider class:
bind(UserInfo.class).toProvider(UserInfoProvider.class).in(Singleton.class); 
// we are binding it as a singleton, cause we don't want to instantiate 
new UserInfo object each time when user info have to be rendered.


And here is a sample usage:

public class UserDetailsEditor {

@Inject
public UserDetailsEditor(UserInfo userInfo) {

   }
}


Regards,
  Miroslav
On 06/29/2010 06:23 PM, jmccartie wrote:

I have a hazy understanding of GIN, but have it working for injecting
presenters, etc.

I'm trying to inject a self-made "User" class into all my presenters
in order to get the currently logged-in user.

I've added @Inject to the constructor on my User class, and added User
to my GIN module ... but apart from that, I'm totally lost. Do I bind
it to my app presenter (tried that, but I get an error since User
doesn't extend my AppPresenter)? As a singleton? Is this even the
right way to get pass this data around?

I hate to post this here (not looking for free homework), but I can't
find a decent tutorial/example on this anywhere else.

Much 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: GWTEvent, sinking own events

2010-06-30 Thread Johan Rydberg
On 6/30/10 11:57 AM, Roy wrote:If the answer is that View A *will* catch 
its own event, any

recommendations on how to identify the event in such a way that View A
knows it was the originator?
   

Maybe you can use this;

http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/event/shared/GwtEvent.html#getSource()

--
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 with Eclipse, Google plugin and WTP

2010-06-30 Thread SimonM
Hello,

I have troubles with WTP and Google plugin for Eclipse.

I have one Dynamic Web Application Project, and I use GWT in this
project. It's smart-ui.

I have a Java Project which contains all business logic, it's smart-
business : smart-ui depends on smart-business. All is correctly
exported in Java EE Module Dependencies.

Now I use WTP to deploy on a local JBoss, and all is working except
one thing : the libraries of project-ui are not deployed in WEB-INF/
lib. The project itself is compiled, packaged and deployed in this
directory.

I have found after investigating several hours I can deploy correctly
if I set in the Java Build Path (in Eclipse)  the Default output
folder to build/classes (and not WebContent/WEB-INF/classes). All libs
are present in WEB-INF/lib. I can even set the folder to build/
classes for example, it works.

Meanwhile I have a new error in my project :
The output directory for the project should be set to /smart-ui/
WebContent/WEB-INF/classes  smart-ui-gxtUnknown Google Web App
Problem

If I set the Default output folder back to WebConten/WEB-INF/classes,
I don't have the error anymore but the libs aren't exported to WEB-INF/
lib.


I think there are some incompatibilities between WTP and Google plugin
there.

Am I missing something ? Is this a know issue and does a workaround
exist ?


Thanks for helping.

Simon

-- 
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.



Qt for Symbian Training Course v1.0 Beta

2010-06-30 Thread James Baker
Came across this very interesting training course which can be used
for both self-learning  and educational purposes. Topics that are
covered in this course are:
•   Qt for Symbian introduction
•   Development environment set up
•   Smart installer
•   Memory management
•   Active objects
•   Platform security
•   Mobility APIs
This ZIP package includes training documentation in 3 lectures and lab
exercises with example code. This is a beta release of this training
course.
Download it here http://bit.ly/bbNYF5

-- 
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.



GWTEvent, sinking own events

2010-06-30 Thread Roy
I have a UI which has several open views of the same base data. Any
view can change the data and I plan on using a GWTEvent Bus to notify
the changes to the concerned views.

My question is that if View A fires an event (eg. ContactChangedEvent)
for which View A is also a registered listener, will View A catch the
event? or does the event handler implicitly suppress the catch?

If the answer is that View A *will* catch its own event, any
recommendations on how to identify the event in such a way that View A
knows it was the originator?

best
Roy

-- 
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 to simplify your GwtEvent classes and have fun doing it!

2010-06-30 Thread Nathan Wells
And that could easily be resolved by keeping all your types in the
same place:

EventTypes.PLACE_CHANGE
EventTypes.VALUE_CHANGE

Could this pattern also be enhanced with a sense of "payload"?
something like the following:

public class GenericEvent extends GwtEvent {
   public interface Handler extends EventHandler {
  void handleEvent(P payload);
   }
   private final P payload
   private final Type type;
   public GenericEvent(Type type, P payload) {
  this.type = type;
  this.payload = payload;
   }
   @Override
   public Type getAssociatedType() {
  return type;
   }
   @Override
   protected void dispatch(Handler handler) {
  handler.handleEvent(payload);
   }
}

I think the only difference would be

eventBus.fireEvent(new GenericEvent(MY_EVENT_TYPE,
object);

The only danger here is that you might get into defining payload
objects the same as you would define event objects outside of this
pattern, but at least they would be isolated from the event handling
semantics. I would also probably enhance eventBus with a method so I
could do the following:

eventBus.fireEvent(MY_EVENT_TYPE, object);

Of course, this is all very theoretical. I don't even know if my code
will compile.


On Jun 29, 9:13 am, Thomas Broyer  wrote:
> On 28 juin, 17:50, Paul Schwarz  wrote:
>
> > Thanks Phil, though what would this look like in this case?
>
> > The design of the GwtEvent and TYPE being static is actually very
> > powerful in its elegant simplicity. A call to the constructor of
> > GwtEvent.Type() actually causes an int to be incremented and this
> > becomes the hashCode "ID" of this event type, and hence assigning that
> > to final static variable (TYPE) give a sort of mapping architecture
> > where GwtEvent implementations are mapped to int IDs and that's how
> > the event bus knows which event has been fired.
>
> > So I'm interested to know what you mean by passing in the TYPE from
> > elsewhere, because you'd have to be careful not to construct two
> > GwtEvent.Type()s to represent a given event type. I'm sure you know
> > this, but for the benefit of others who may try to fiddle with the
> > mechanism and then wonder why their events aren't caught.
>
> I suppose:
> public class GenericEvent extends GwtEvent {
>    public interface Handler extends EventHandler {
>       void handleEvent(GenericEvent event);
>    }
>
>    private final Type type;
>
>    public GenericEvent(Type type) {
>       this.type = type;
>    }
>
>   �...@override
>    public Type getAssociatedType() {
>       return type;
>    }
>
>   �...@override
>    protected void dispatch(Handler handler) {
>       handler.handleEvent(this);
>    }
>
> }
>
> ...
>
> public static final Type MY_EVENT_TYPE = new
> Type();
>
> ...
>
> eventBus.addHandler(MY_EVENT_TYPE, new Handler() {
>    public void handleEvent(GenericEvent event) {
>       ...
>    }
>
> });
>
> ...
>
> eventBus.fireEvent(new GenericEvent(MY_EVENT_TYPE));
>
> Sure, there's the risk of defining 2 MY_EVENT_TYPE for the same
> "logical" event, but not much more than the risk of defining 2
> GwtEvent.

-- 
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 to make javascripts,static images and css cacheable...

2010-06-30 Thread aditya sanas
@Andre & Nirmal : Thank you very much for such valuable solution.

  I dont have htaccess file as my application is getting deployed on
the google
appengine so how to send headers along with html is a big question mark in
front of me...
i have found one solution for this is that manipulating appenging-web.xml
which has one important parameter
from cache point of view that is
  





so by using this tag i can make my javascripts,htmls,images cacheable which
could be one solution but as
htaccess provide us direct way to manage html file's headers of our web
application,
i would like to implement something like that.

if anybody has implemented it using appengine then please let me know.

--
Aditya


2010/6/29 André Moraes 

> All the code generated by GWT (css, javascript, images).
>
> Are cacheable by default, since the name of the resource is generated
> by the hash of the contents (i think it is CRC 32, but not sure).
>
> The best way to cache things is to let your web-server handle this.
>
> Apache, nginx, tomcat have a very good cache mechanism which adds some
> special headers inside the HTTP Response and those headers are
> understood by almost any browser.
>
> You can configure your server to mark all *.cache.* files to be cached
> forever. If you change the code of your app, the GWT will change the
> name of the files and then change what is requested from the server,
> so the old files will not be used and the browser will discard them
> later.
>
> The only caution is to disable the cache for the files *.nocache.*
> because these files will not change and the browser must download them
> every time the user goes to your application. Luckly there are only a
> few files (sometimes can be only one file) that will be non-cacheable.
>
> The solution proposed by Nirmal is the way to go (especially the
> CacheFilter), but check the new docs because the way Css and
> ImageResources are handled changed to a better way in the more new
> version of GWT.
>
> On 29 jun, 09:25, Aditya <007aditya.b...@gmail.com> wrote:
> > hello,
> >
> > I m using GWT on client side which includes lots of code and lots of
> > processing which makes my GWT modules little heavier and
> >
> > Whenever i test it online it loads little slower than it was expected
> > when i searched around the web i found the solution that I can
> >
> > make my static content cacheable i have pure HTML pages i dont know
> > how to make it cacheable.
> >
> > I have included meta tags in my pages but most of the browser doesn't
> > support these meta tags.
> >
> > So what could be done in such situation...?
> >
> > --
> > Aditya
>
> --
> 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.