Re: GWT+Roo a few days later

2010-11-05 Thread zixzigma
is there a way to tell Roo to just generate Places or just
Presenters ? instead of everything ?
the thing is with CRUD part of app, there is a mapping between
Entities(entityproxies) and Places/Activity/Presenters.

but there are times that many entities need to collaborate to present
the information to the user.
the data is not coming from one entity, rather 3-4 entities.
in this case, Roo generates Presenter/Acitivity/Places/Views that are
not going to be used.

because those 4 entities would be presented by one complex widget.

the first thing Roo asks is : give me your domain models.
what about asking for Places ? or Presenters ?

i had developed GWT apps using MVP, prior to Roo release.
and i understand the exampes, concepts, and Roo generated code.
but have difficulty creating a non-crud app with Roo.

and writing MVP without Roo is very difficult, lots of scaffolding
code.
there are other frameworks, such as GWTP, i had found it more easier
to work with.
but since Google's MVP is out, want to give that a try.

so, i'm in the same boat, experimenting.

-- 
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 Loading the application very slowly

2010-11-05 Thread keyboard_samurai
No I cannot use it as I am using GWT 1.7.1 not the 2.x version..

This is what is making this task more challenging now ..



On Nov 6, 10:58 am, zixzigma  wrote:
> Have you tried Code Splitting 
> ?http://code.google.com/webtoolkit/doc/latest/DevGuideCodeSplitting.html
>
> are you Lazy Loading your widgets ?

-- 
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 Loading the application very slowly

2010-11-05 Thread zixzigma
Have you tried Code Splitting ?
http://code.google.com/webtoolkit/doc/latest/DevGuideCodeSplitting.html

are you Lazy Loading your widgets ?

-- 
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 Loading the application very slowly

2010-11-05 Thread keyboard_samurai
HI,

Does anyone have any pointers for this ? Also not sure if speed tracer
can be used in this case..



On Nov 5, 9:59 pm, keyboard_samurai  wrote:
> Hi All,
>
> I am facing a issue which seems to have cropped up in recent times in
> our code. We are using GWT 1.7.1 along with GXT 2.2 widget libraries.
> Till a few days back the application was getting loaded i.e with the
> data within 5-10 seconds ... the cache.html which was getting
> generated back then was around 12.8 MB...This being a intranet based
> application so we didnt have to worry on the application statup. We
> been making continuous upgrades to code base and now the generated
> cache.html size is somewhere around 13.5 MB but this has affected our
> application startup time to increase from 10 seconds to 1 min 10
> seconds. This issue is noticeable only in IE6 and not on other
> browsers like FF and Chrome.
>
> On looking via the HTTP Watch i noticed that the 12.8 MB cache.html
> file gets downloaded in 2-3 seconds and the javascript statements
> executed within the file takes around rest 3-4 seconds,  but the 13.5
> MB cache file was getting downloaded in 28-30 seconds and also the
> javascript within it was taking around 30 seconds to execute. Is this
> normal ? also on comparing the no of lines of code within
> the .cache.html file i noticed it has just increased from 98k to
> 98.5k  ...
>
> not sure whats going wrong here bcoz of which the application has
> slowed down considerably ... Can anyone please provide pointers on how
> to tackle this issue ?
>
> 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: FocusPanel with nested focusable elements

2010-11-05 Thread David Pinn
I'm eager to read an answer to this too.

-- 
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: JUnit testing GWT

2010-11-05 Thread Arthur Kalmenson
Hi Ignat,

I definitely agree with you and follow this model. Not everyone does
and in some cases you're stuck unit testing your views. If you're
able, definitely one should follow what you said.

All the best,
--
Arthur Kalmenson



On Wed, Nov 3, 2010 at 8:51 AM, Ignat Alexeyenko
 wrote:
> Arthur,
>
> These rules are just good OO design - when you are depend on interfaces
> rather than concrete classes.
> One of the pros of following this principles - you can simplify testing by
> using mocks instead of real objects.
> You can read more about why programming to interfaces are so importang.
>
> GWT team offers you MVP (Model View Presenter) pattern - here is a link:
> http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html
> You can find how they hide View's behind interfaces, so you can write tests
> on presenters.
>
> I have a sample project (have not many time for it :( ):
> https://simpleworklog.svn.sourceforge.net/svnroot/simpleworklog/
> It's a maven project, you should have no problems with how to configure it.
>
> Please reffer to following test classes as examples of unit-testing:
> - AdminDashboardPresenterTest.java
> - LoginPresenterTest.java
>
> Hope this helps!
>
> --
> Kind regards,
> Ignat Alexeyenko.
>
> On Fri, Oct 29, 2010 at 4:14 PM, chrisr 
> wrote:
>>
>> Hi Ignat, thank you for the tip.  I do remember reading that there is
>> a way to write gwt junit tests in a way that were much faster than the
>> way I'm doing it now.  I wonder if this is it.
>>
>> Is there some documentation for how to write unit tests of this
>> variety?  I searched but didn't come across anything that looked like
>> what you suggested.
>>
>> --
>> 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.



Gwt 2.1 Activities + Code splitting + Gin

2010-11-05 Thread Nicolas Antoniazzi
Hello,

I am trying to use CodeSplitting with Activites on 2.1.
I read this very interresting thread
http://code.google.com/p/google-web-toolkit/issues/detail?id=5129 and
T.Broyer says that the best approach is to use an AsyncProxy for Activities.

It makes sense but I have problem with it since my "Activities" are binded
with Gin. AsyncProxy uses GWT.create() to instantiate the concrete types and
all my @Inject in my Activities are thus not initialized.

Does anyone tried to mix new Activity concepts with "Code Splitting" ? And
do you know if it could be compatible with "Gin activities" ?

Thanks

Nicolas.

-- 
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.1.0 maven asks for com.google.gwt:gwt-dev:jar:windows:2.1.0??

2010-11-05 Thread Thomas Broyer


On 5 nov, 22:01, Yaakov Chaikin  wrote:
> Never mind... It was the version of the gwt-maven-plugin... However,
> now, I can't get it to install. What version of the gwt-maven-plugin
> am I supposed to use with the latest 2.1.0 release of GWT and which
> repository does it reside in?

You can use either the 1.3.2.google version from the
http://google-web-toolkit.googlecode.com/svn/2.1.0/gwt/maven/
repository, or the 2.1.0 version from Maven Central (released today)

-- 
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 Designer and Data Binding

2010-11-05 Thread Jeff Larsen
Take a look at the editor framework.

http://code.google.com/webtoolkit/doc/latest/DevGuideUiEditors.html

On Nov 5, 12:12 pm, csaffi  wrote:
> Hi everybody,
> I happily discovered that Google has released GWT Designer free for
> use, and I immediately downloaded it for testing. Unfortunately I
> realized that it lacks data binding features to bind data with UI
> components... Maybe it will be introduced in future versions, but for
> now remains a great lack.
>
> Do you know any way to overcome this problem?
>
> Thank you very much 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: Eclipse Hangs on Compile of GWT?

2010-11-05 Thread leslie
And I forgot to answer your question about the specific version I had
been using: it was java version 1.5.0_26 (build 1.5.0_26-
b03-376-9M3263) which I downloaded from the Software Update site from
Apple.

-- 
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: Handling ClickEvents with custom composite widgets

2010-11-05 Thread Jeff Larsen
here is a hacky example of how to do something similar to what you
want with an event bus.

This definitely could've been put together better, but it should give
you the general jist.

https://code.google.com/r/larsenje-fixesforwidgeteventhandling/source/checkout


On Nov 5, 1:14 pm, nathan  wrote:
> I tried event.getSource() but since I created a custom widget, called
> CompositeWidget, and I'm listening for a click in the LeftPanel, I
> believe event.getSource() is returning LeftPanel, not the
> CompositeWidget. So the contents of the CompositeWidget are not
> available from event.getSource(). I could be way off on this.
>
> I think it could have something to do with Event Bubbling. Mentioned
> here:http://code.google.com/webtoolkit/doc/1.6/FAQ_UI.html#How_can_I_effic...,
> but I don't know how to implement that.
>
> I should mention that I'm new to GWT, so if I'm just doing something
> completely wrong or inefficient, please let me know.
>
> I put an example of what I'm trying to do 
> here:https://code.google.com/p/gwtcustomwidgeteventhandling/source/browse/
>
> When the "Remove" button is clicked, I want that CompositeWidget to be
> removed from the LeftPanel, and it's contents removed from the
> RightPanel.
>
> I understand I'm probably not explaining myself well, and what I put
> up may not be the best example, but thanks for any help.

-- 
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: Eclipse Hangs on Compile of GWT?

2010-11-05 Thread leslie
Rajeev thanks so much for helping me to resolve this.

After looking at that bug report I knew I had no choice but to roll
back GWT or upgrade my Java to Java 6.  So I did the latter.

I went into Preferences in Eclipse, selected Java then Installed JRE's
and added the information for the Java 6 version of Java which hadn't
been included in the list in Eclipse.  I disabled Java 5.  I restarted
Eclipse and then attempted a compile and the compile "worked".  ( That
is, I have compile errors because I attempted to use a StringTokenizer
in my GUI but that is a manageable developer error).  And I can see
the output in the Console within Eclipse.

So the "hang" issue of this thread has been resolved.  Thanks Rajeev.

-- 
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 Way to query browser window's document area size in onModuleLoad

2010-11-05 Thread Craig
Have you tried Window.getClientHeight()?

On Nov 5, 3:21 am, magic  wrote:
> Hi,
>
> I am looking for a way to query the size of the browser's document
> window when onModuleLoad is called. I have tried
>
> Element body = RootPanel.getBodyElement();
> int clientWidth = body.getClientWidth();
> int clientHeight = body.getClientHeight();
>
> body.getClientWidth() gives the correct width, but
> body.getClientHeight always returns 0. In fact all queries on body
> having to do with height return 0.
>
> I had similar problems in pure javascript with
>
> dw = document.body.offsetWidth;
> dh = document.body.offsetHeight;
>
> I overcame it there with the following:
>
>   // IE does not appear to support window.innerHeight.
>   if (typeof(window.innerHeight) == 'number')
>         dh = window.innerHeight;
>   else if (document.documentElement &&
> document.documentElement.clientHeight)
>         dh = document.documentElement.clientHeight;
>   else if (document.body & document.body.clientHeight)
>         dh = document.body.clientHeight;
>
> Anyway to do something similar via GWT?
>
>     -Mark

-- 
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: Eclipse Hangs on Compile of GWT?

2010-11-05 Thread leslie
Thanks for your continued help here Rajeev.  I appreciate it.

If I log on as admin and attempt to compile I generate the same dead
lock.  The issue is the same.

I'm going to have look at this bug post.

On Nov 5, 3:02 pm, Rajeev Dayal  wrote:
> I think you're hitting the following bug:
>
> http://bugs.sun.com/view_bug.do?bug_id=6440846
>
> What version of the JDK/JRE
> are you using in your project?
>
>
>
>
>
>
>
> On Fri, Nov 5, 2010 at 4:38 PM, Rajeev Dayal  wrote:
> > If you log on as an admin and try this out, do you see the same problem?
>
> > On Fri, Nov 5, 2010 at 4:37 PM, leslie  wrote:
>
> >> >> 1 - The machine where I'm developing is not online.  It has no
> >> connection to the internet.
>
> >> Actually is does have an internet connection.  I'm just normally
> >> offline when I'm working.
>
> >> --
> >> 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 >>  cr...@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: Eclipse Hangs on Compile of GWT?

2010-11-05 Thread Rajeev Dayal
I think you're hitting the following bug:

http://bugs.sun.com/view_bug.do?bug_id=6440846

What version of the JDK/JRE
are you using in your project?

On Fri, Nov 5, 2010 at 4:38 PM, Rajeev Dayal  wrote:

> If you log on as an admin and try this out, do you see the same problem?
>
>
> On Fri, Nov 5, 2010 at 4:37 PM, leslie  wrote:
>
>> >> 1 - The machine where I'm developing is not online.  It has no
>> connection to the internet.
>>
>> Actually is does have an internet connection.  I'm just normally
>> offline when I'm working.
>>
>> --
>> 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 2.1.0 maven asks for com.google.gwt:gwt-dev:jar:windows:2.1.0??

2010-11-05 Thread Yaakov Chaikin
Never mind... It was the version of the gwt-maven-plugin... However,
now, I can't get it to install. What version of the gwt-maven-plugin
am I supposed to use with the latest 2.1.0 release of GWT and which
repository does it reside in?

Right now, I have this (from the expenses example):

org.codehaus.mojo
gwt-maven-plugin
1.3.2.google


compile
 
 compile
 


test
test

test





On Fri, Nov 5, 2010 at 4:35 PM, Yaakov  wrote:
> Hi,
>
> I switched to using GWT 2.1.0 and updated my maven dependencies, so
> they now look like this:
> 
>        2.1.0
>        3.0.5.RELEASE
> 
> 
>        com.google.gwt
>        gwt-servlet
>        ${gwt.version}
>        runtime
> 
> 
>        com.google.gwt
>        gwt-user
>        ${gwt.version}
>        provided
> 
>
> For some reason, when I try to run mvn clean install, maven looks for
> com.google.gwt:gwt-dev:jar:windows:2.1.0, which has "windows" as the
> classifier.  Of course, it can't find it since there is no windows-
> specific version.
>
> I have no idea why it started using the classifier and how to tell
> maven to stop trying to look for classifier specific one. Anyone know
> what's going on? I've been using GWT 2.0.4 which also did not use the
> classifier anymore and everything worked just fine.
>
> any help would be greatly appreciated!
>
> -Yaakov.

-- 
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: Handling ClickEvents with custom composite widgets

2010-11-05 Thread Chad
nathan,

When building composite widgets, it is up to you, within the composite
widget, to handle and/or expose whatever events you want. So, if you
want to be able to expose click events for multiple buttons in a
composite, you may be best off doing one of two things:

1) Create a public enum that contains an entry for each of the
buttons. Then, provide a method to get which button was clicked so
that when someone handles the click event, they can query for the most
recently clicked button.

2) Create custom events for each action that can be taken by the
composite widget and you other classes would handle those custom
events rather than a click event.

Option 2 is better, but more complicated. Generally, when you create a
composite widget, the internal widgets are all handled by the
composite. If you want access to all the internals, then you aren't
really wanting a composite widget at all.

HTH,
Chad Bourque
www.milamade.com


On Nov 5, 1:14 pm, nathan  wrote:
> I tried event.getSource() but since I created a custom widget, called
> CompositeWidget, and I'm listening for a click in the LeftPanel, I
> believe event.getSource() is returning LeftPanel, not the
> CompositeWidget. So the contents of the CompositeWidget are not
> available from event.getSource(). I could be way off on this.
>
> I think it could have something to do with Event Bubbling. Mentioned
> here:http://code.google.com/webtoolkit/doc/1.6/FAQ_UI.html#How_can_I_effic...,
> but I don't know how to implement that.
>
> I should mention that I'm new to GWT, so if I'm just doing something
> completely wrong or inefficient, please let me know.
>
> I put an example of what I'm trying to do 
> here:https://code.google.com/p/gwtcustomwidgeteventhandling/source/browse/
>
> When the "Remove" button is clicked, I want that CompositeWidget to be
> removed from the LeftPanel, and it's contents removed from the
> RightPanel.
>
> I understand I'm probably not explaining myself well, and what I put
> up may not be the best example, but thanks for any help.

-- 
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: Eclipse Hangs on Compile of GWT?

2010-11-05 Thread Rajeev Dayal
If you log on as an admin and try this out, do you see the same problem?

On Fri, Nov 5, 2010 at 4:37 PM, leslie  wrote:

> >> 1 - The machine where I'm developing is not online.  It has no
> connection to the internet.
>
> Actually is does have an internet connection.  I'm just normally
> offline when I'm working.
>
> --
> 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: Eclipse Hangs on Compile of GWT?

2010-11-05 Thread leslie
>> 1 - The machine where I'm developing is not online.  It has no connection to 
>> the internet.

Actually is does have an internet connection.  I'm just normally
offline when I'm working.

-- 
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.1.0 maven asks for com.google.gwt:gwt-dev:jar:windows:2.1.0??

2010-11-05 Thread Yaakov
Hi,

I switched to using GWT 2.1.0 and updated my maven dependencies, so
they now look like this:

2.1.0
3.0.5.RELEASE


com.google.gwt
gwt-servlet
${gwt.version}
runtime


com.google.gwt
gwt-user
${gwt.version}
provided


For some reason, when I try to run mvn clean install, maven looks for
com.google.gwt:gwt-dev:jar:windows:2.1.0, which has "windows" as the
classifier.  Of course, it can't find it since there is no windows-
specific version.

I have no idea why it started using the classifier and how to tell
maven to stop trying to look for classifier specific one. Anyone know
what's going on? I've been using GWT 2.0.4 which also did not use the
classifier anymore and everything worked just fine.

any help would be greatly appreciated!

-Yaakov.

-- 
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: Eclipse Hangs on Compile of GWT?

2010-11-05 Thread leslie
*** Begin copy of output 

Deadlock Detection:

Found one Java-level deadlock:
=

"main":
  waiting to lock moni...@0x0080dcb8 (obj...@0x0fd193b8, a sun/misc/
URLClassPath),
  which is held by "GWT Update Checker"
"GWT Update Checker":
  waiting to lock moni...@0x0080dc28 (obj...@0x0fd19270, a sun/misc/
Launcher$AppClassLoader),
  which is held by "main"

Found a total of 1 deadlock.

Thread t...@66307: (state = BLOCKED)
 - sun.security.jca.ProviderConfig.getProvider() @bci=26, line=188
(Interpreted frame)
 - sun.security.jca.ProviderList.getProvider(int) @bci=6, line=205
(Interpreted frame)
 - sun.security.jca.ProviderList.getService(java.lang.String,
java.lang.String) @bci=13, line=303 (Interpreted frame)
 - sun.security.jca.GetInstance.getInstance(java.lang.String,
java.lang.Class, java.lang.String) @bci=7, line=140 (Interpreted
frame)
 - java.security.cert.CertificateFactory.getInstance(java.lang.String)
@bci=6, line=141 (Interpreted frame)
 - sun.security.pkcs.PKCS7.parseSignedData(sun.security.util.DerValue)
@bci=131, line=244 (Interpreted frame)
 - sun.security.pkcs.PKCS7.parse(sun.security.util.DerInputStream,
boolean) @bci=47, line=141 (Interpreted frame)
 - sun.security.pkcs.PKCS7.parse(sun.security.util.DerInputStream)
@bci=11, line=110 (Interpreted frame)
 - sun.security.pkcs.PKCS7.(byte[]) @bci=50, line=92
(Interpreted frame)
 - sun.security.util.SignatureFileVerifier.(java.util.ArrayList,
sun.security.util.ManifestDigester, java.lang.String, byte[]) @bci=29,
line=80 (Interpreted frame)
 -
java.util.jar.JarVerifier.processEntry(sun.security.util.ManifestEntryVerifier)
@bci=300, line=266 (Interpreted frame)
 - java.util.jar.JarVerifier.update(int, byte[], int, int,
sun.security.util.ManifestEntryVerifier) @bci=39, line=199
(Interpreted frame)
 - java.util.jar.JarFile.initializeVerifier() @bci=107, line=327
(Interpreted frame)
 - java.util.jar.JarFile.getInputStream(java.util.zip.ZipEntry)
@bci=25, line=392 (Interpreted frame)
 - sun.misc.JarIndex.getJarIndex(java.util.jar.JarFile) @bci=19,
line=92 (Interpreted frame)
 - sun.misc.URLClassPath$JarLoader.(java.net.URL,
java.net.URLStreamHandler, java.util.HashMap) @bci=50, line=547
(Interpreted frame)
 - sun.misc.URLClassPath$3.run() @bci=82, line=324 (Interpreted frame)
 -
java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction)
@bci=0 (Interpreted frame)
 - sun.misc.URLClassPath.getLoader(java.net.URL) @bci=9, line=313
(Interpreted frame)
 - sun.misc.URLClassPath.getLoader(int) @bci=73, line=290 (Compiled
frame)
 - sun.misc.URLClassPath.access$000(sun.misc.URLClassPath, int)
@bci=2, line=59 (Interpreted frame)
 - sun.misc.URLClassPath$1.next() @bci=24, line=187 (Interpreted
frame)
 - sun.misc.URLClassPath$1.hasMoreElements() @bci=1, line=198
(Interpreted frame)
 - java.net.URLClassLoader$3$1.run() @bci=7, line=393 (Interpreted
frame)
 -
java.security.AccessController.doPrivileged(java.security.PrivilegedAction,
java.security.AccessControlContext) @bci=0 (Interpreted frame)
 - java.net.URLClassLoader$3.next() @bci=24, line=390 (Interpreted
frame)
 - java.net.URLClassLoader$3.hasMoreElements() @bci=1, line=415
(Interpreted frame)
 - sun.misc.CompoundEnumeration.next() @bci=33, line=27 (Interpreted
frame)
 - sun.misc.CompoundEnumeration.hasMoreElements() @bci=1, line=36
(Interpreted frame)
 - sun.misc.Service$LazyIterator.hasNext() @bci=125, line=255
(Interpreted frame)
 - java.util.prefs.Preferences.factory1() @bci=11, line=263
(Interpreted frame)
 - java.util.prefs.Preferences.access$000() @bci=0, line=208
(Interpreted frame)
 - java.util.prefs.Preferences$2.run() @bci=0, line=255 (Interpreted
frame)
 - java.util.prefs.Preferences$2.run() @bci=1, line=254 (Interpreted
frame)
 -
java.security.AccessController.doPrivileged(java.security.PrivilegedAction)
@bci=0 (Interpreted frame)
 - java.util.prefs.Preferences.factory() @bci=114, line=252
(Interpreted frame)
 - java.util.prefs.Preferences.() @bci=0, line=210
(Interpreted frame)
 - com.google.gwt.dev.shell.CheckForUpdates.check(long) @bci=41,
line=263 (Interpreted frame)
 - com.google.gwt.dev.shell.CheckForUpdates$1.call() @bci=25, line=124
(Interpreted frame)
 - com.google.gwt.dev.shell.CheckForUpdates$1.call() @bci=1, line=120
(Interpreted frame)
 - java.util.concurrent.FutureTask$Sync.innerRun() @bci=22, line=269
(Interpreted frame)
 - java.util.concurrent.FutureTask.run() @bci=4, line=123 (Interpreted
frame)
 - java.lang.Thread.run() @bci=11, line=655 (Interpreted frame)


Thread t...@69379: (state = BLOCKED)


Thread t...@69635: (state = BLOCKED)
 - java.util.zip.ZipFile$MappedZipFileInputStream.close() @bci=22,
line=713 (Interpreted frame)
 - java.util.zip.ZipFile$MappedZipFileInputStream.finalize() @bci=1,
line=724 (Interpreted frame)
 - java.lang.ref.Finalizer.invokeFinalizeMethod(java.lang.Object)
@bci=0 (Interpreted frame)
 - java.lang.ref.Finalizer.runFinalizer() @bci=45, line=83
(Interpreted frame)
 - java.lang.ref.Finalizer.ac

Re: Eclipse Hangs on Compile of GWT?

2010-11-05 Thread leslie
Thanks for your help!  I have a text file of the generated output
which indicates a deadlock.

I briefly looked at the output and I'll make two remarks,

1 - The machine where I'm developing is not online.  It has no
connection to the internet.
2 - I am logged in as a standard user that is I am not logged in with
full administrator privileges.

There is never any output in the console window within eclipse.  If I
press the red button in the console view
I am able to terminate whatever attempt is being made to compile.
That is, the progress bar stops.

Is there a way I can indicate that I do not GWT Updater to try to
check for updates?

What do you mean "attach it" ? I'm using the form in the website.

On Nov 5, 2:07 pm, Rajeev Dayal  wrote:
> When it's hanging, drop to a command prompt, and type jps. That should give
> you the process id of the compiler process. Then type "jstack ". Copy
> that output into a file and attach it.
>
> If you switch over to the "Console" view while the compile is going on, what
> do you see? What happens if you hit the red button in the Console view? Does
> it terminate the compile?

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



Unhandled exception type Exception -- GWT 2.1.0 (not in GWT 2.0.4)

2010-11-05 Thread Barry
Hi --

I have just installed the GWT 2.1.0 (... I was running GWT 2.0.4). Now
my JUnit tests are failing.

It seems that GWT calls to my servlets are taking the
onFailure(Throwable ex) method on my AsyncCallBacks. The exception is
pretty peculiar:

java.lang.Error: Unresolved compilation problem:
Unhandled exception type Exception

Additionally, I have noticed new GWT debug information on my Eclipse
console (below).

It seems like the 2.1.0 compiler has some requirements that aren't
very obvious (... or maybe they're wrong??)

Can anyone add some insight to this?? I'm going back to 2.0.4 for the
time being until I can get a handle on this.



Thanks!

--

GWT compiler debug that looks like it relates to this problem:

Rebinding org.paceproject.palms.browserproxy.client.DeviceService
   Adding '12' new generated units
  Validating newly compiled units
 [ERROR] Errors in 'generated://
8DCA48EC18414A6639A7CF825437502D/org/paceproject/palms/browserproxy/
client/messages/structures/RowListFastRead_FieldSerializer.java'
[ERROR] Line 57: Unhandled exception type Exception
See snapshot: C:\Users\BARRYD~1\AppData\Local\Temp
\org.paceproject.palms.browserproxy.client.messages.structures.RowListFastRead_FieldSerializer8174572182167119369.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.



Re: Eclipse Hangs on Compile of GWT?

2010-11-05 Thread Rajeev Dayal
When it's hanging, drop to a command prompt, and type jps. That should give
you the process id of the compiler process. Then type "jstack ". Copy
that output into a file and attach it.

If you switch over to the "Console" view while the compile is going on, what
do you see? What happens if you hit the red button in the Console view? Does
it terminate the compile?

On Fri, Nov 5, 2010 at 4:03 PM, leslie  wrote:

> Eclipse 3.6 Helios
> GWT 2.1
> Java 5
> Mac OS X 10.5.8
>
> Actually I don't know if it's hanging or not.  But I select the red
> toolbox - the compile icon - and I can see the progress bar at the
> lower right hand of the screen.  But it just progresses continually.
> There is no output and it has been going on like this for several
> minutes.  I don't know how to know what is happening if anything.
>
> This difficulty with performing a compile is new with the upgrade to
> GWT 2.1.  When I was using 2.0.3 I never had a problem doing a project
> compile and I could see the confirmation messages after each
> permutation compile in the console.  But now there is nothing.  Just
> an endless progress bar.
>
> Please help.  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.



Eclipse Hangs on Compile of GWT?

2010-11-05 Thread leslie
Eclipse 3.6 Helios
GWT 2.1
Java 5
Mac OS X 10.5.8

Actually I don't know if it's hanging or not.  But I select the red
toolbox - the compile icon - and I can see the progress bar at the
lower right hand of the screen.  But it just progresses continually.
There is no output and it has been going on like this for several
minutes.  I don't know how to know what is happening if anything.

This difficulty with performing a compile is new with the upgrade to
GWT 2.1.  When I was using 2.0.3 I never had a problem doing a project
compile and I could see the confirmation messages after each
permutation compile in the console.  But now there is nothing.  Just
an endless progress bar.

Please help.  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: Exceptions not showing up in Dev Mode Panel

2010-11-05 Thread Perelman Nathan (Nathan)
That was it, thanks for the quick help. Adding $entry() around my callbacks
fixed it.

 

  _  

From: google-web-toolkit@googlegroups.com
[mailto:google-web-tool...@googlegroups.com] On Behalf Of John Tamplin
Sent: Friday, November 05, 2010 15:17
To: Rajeev Dayal
Cc: google-web-toolkit@googlegroups.com
Subject: Re: Exceptions not showing up in Dev Mode Panel

 

Are you using any JSNI that gets called directly from the browser?  Ie,
anything like obj.callback = function() {...};?  If so, you have to wrap any
entry points from the browser into GWT code with $entry, so that would look
like obj.callback = $entry(function() {...});

 

Note that it could be in library code you are using rather than something
you have written -- I don't have a good suggestion for tracking it down if
it isn't something you have written.

-- 
John A. Tamplin
Software Engineer (GWT), Google

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



smime.p7s
Description: S/MIME cryptographic signature


How to diagnose IE8 javascript error "stack overflow at line: 0"? ends up in Impl.entry0

2010-11-05 Thread BrianP
I have a GWT 2.0.3 app that runs fine in Firefox and Chrome. But when
run in IE8 I get a javascript error that pops up with 'Stack over flow
at line: 0'.  When stepping through it in debug mode, I end up in GWT
class Impl in the method entry0(Object jsFunction, Object thisObj,
Object arguments).  I was hoping to find more information by looking
at those variables in debug mode, but they didn't really tell me
anything other than its a JavaScriptException, which I already knew.

Any recommendation on how I might get more information on this error?
It seems similar to the error in this thread:

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/caf23e8b06ba74fd/072a3f604be05e81?lnk=gst&q=entry0#072a3f604be05e81

One response there mentions adding an UncaughtExceptionHandler there
to the main EntryPoint class.  Would that help?

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: Exceptions not showing up in Dev Mode Panel

2010-11-05 Thread John Tamplin
Are you using any JSNI that gets called directly from the browser?  Ie,
anything like obj.callback = function() {...};?  If so, you have to wrap any
entry points from the browser into GWT code with $entry, so that would look
like obj.callback = $entry(function() {...});

Note that it could be in library code you are using rather than something
you have written -- I don't have a good suggestion for tracking it down if
it isn't something you have written.

-- 
John A. Tamplin
Software Engineer (GWT), Google

-- 
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 not showing up in Dev Mode Panel

2010-11-05 Thread Rajeev Dayal
+[jat]

On Fri, Nov 5, 2010 at 2:42 PM, Perelman Nathan (Nathan) <
nperel...@lgsinnovations.com> wrote:

>  No, I didn’t want to go to the trouble of converting my existing Eclipse
> projects.
>
>
>  --
>
> *From:* google-web-toolkit@googlegroups.com [mailto:
> google-web-tool...@googlegroups.com] *On Behalf Of *Rajeev Dayal
> *Sent:* Friday, November 05, 2010 14:21
> *To:* google-web-toolkit@googlegroups.com
> *Subject:* Re: Exceptions not showing up in Dev Mode Panel
>
>
>
> Are you using the Google Plugin for Eclipse?
>
> On Fri, Nov 5, 2010 at 2:19 PM, Nathan 
> wrote:
>
> I'm using GWT 2.0.4 and in Dev Mode it seems some exceptions are left
> uncaught and show up in the browser instead of in my GWT uncaught
> exception handler or in the Dev Mode panel. For example I get a line
> like "uncaught exception:
> com.google.gwt.dev.shell.HostedModeException: Something other than a
> double was returned from JSNI method..." in my Firebug or browser
> error console. Is there some way I can get this exception to show up
> somewhere where I can see a Java stack trace from it?
>
> --
> 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: UiBinder fails after upgrading to gwt 2.1.0

2010-11-05 Thread pgraham
Right, I suppose I should mention that I am running Kubuntu 10.04 64
bit, eclipse 3.6
with the lastest GPE.


On Nov 4, 2:11 pm, will0  wrote:
> Same issue as pgraham on Ubuntu 10.04, eclipse 3.6.
> This doesn't happen for eclipse 3.5 on the same machine. It also works
> on Windows 7 ultimate 64bit, eclipse 3.6.
>
> On Nov 4, 3:36 am, Richard Berger  wrote:
>
>
>
>
>
>
>
> > OK, this won't help much, but... I was having the same problem just
> > going through some basic tutorial using UiBinder andGWT2.1.  So, I
> > redid everything, writing down each step - and, of course, the problem
> > vanished.
>
> > So, there exists the possibility that2.1and UiBinder do actually
> > work together.
>
> > I can only offer the truly lame suggestion of restarting Eclipse to
> > clean up any old invocations of the dev server.
>
> > Good luck,
> > RB
>
> > On Nov 3, 8:34 am, pgraham  wrote:
>
> > > Update:
>
> > > I have commented out all code in the two files listed above so that
> > > they are as follows:
>
> > > MainMenu.ui.xml:
>
> > >  > >     xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
> > > 
>
> > > MainMenu.java:
>
> > > public class MainMenu extends Composite {
>
> > >     interface Binder extends UiBinder {}
>
> > >     private static Binder uiBinder =GWT.create(Binder.class);
>
> > >     public MainMenu() {
> > >         initWidget(uiBinder.createAndBindUi(this));
> > >     }
>
> > > }
>
> > > When I do this I get the same error so it is not related to the
> > > content.
>
> > > At this point I am thinking that there is a version conflict with
> > >xerces.  Does anyone know if Dev Mode relies onxercesto parse
> > > *.ui.xml files and if so which version?
>
> > > NOTE:  I am using thegwt-maven-plugin to compile the app and it works
> > > fine if I compile it and deploy it in Tomcat
>
> > > Thanks,
> > > Philip
>
> > > On Nov 2, 1:54 pm, pgraham  wrote:
>
> > > > MainMenu.ui.xml:
>
> > > >  > > >     xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
> > > >      > > > type="org.sitebrand.ui.gwt.resources.UiResources.MainMenuCss" />
> > > >      > > > type="org.sitebrand.ui.gwt.resources.MainMenuLbls" />
> > > >      > > > type="org.sitebrand.gwt.constants.DebugConstants" />
>
> > > >     
> > > >          > > > debugId="{debugIds.menuitem_campaigns}" text="{lbls.campaigns}">
> > > >             
> > > >                  > > >                     text="{lbls.createCampaign}" />
> > > >                  > > >                     text="{lbls.viewCampaigns}" />
> > > >                  > > >                     text="{lbls.campaignPriority}" />
> > > >                  > > >                     text="{lbls.reports}" />
> > > >             
> > > >         
>
> > > >          > > > debugId="{debugIds.menuitem_content}" text="{lbls.content}">
> > > >             
> > > >                  > > >                     ui:field="createContent"
> > > >                     text="{lbls.createContent}" />
> > > >                  > > >                     ui:field="viewContent"
> > > >                     text="{lbls.viewContent}" />
> > > >                  > > >                     ui:field="integrate"
> > > >                     text="{lbls.integrate}" />
> > > >             
> > > >         
>
> > > >          > > > debugId="{debugIds.menuitem_segments}" text="{lbls.segments}">
> > > >             
> > > >                  > > >                     ui:field="createSegment"
> > > >                     text="{lbls.createSegment}" />
> > > >                  > > >                     ui:field="viewSegments"
> > > >                     text="{lbls.viewSegments}" />
> > > >             
> > > >         
>
> > > >          > > > debugId="{debugIds.menuitem_layout}" text="{lbls.layout}">
> > > >             
> > > >                  > > >                     ui:field="addTemplate"
> > > >                     text="{lbls.addTemplate}" />
> > > >                  > > >                     ui:field="viewTemplates"
> > > >                     text="{lbls.viewTemplates}" />
> > > >             
> > > >         
>
> > > >          > > > debugId="{debugIds.menuitem_account_mgmt}" text="{lbls.account}">
> > > >             
> > > >                  > > >                     ui:field="myAccount"
> > > >                     text="{lbls.myAccount}" />
> > > >                  > > >                     ui:field="organizations"
> > > >                     text="{lbls.organizations}" />
> > > >                  > > >                     ui:field="sites"
> > > >                     text="{lbls.sites}" />
> > > >                  > > >                     ui:field="users"
> > > >                     text="{lbls.users}" />
> > > >                  > > >                     ui:field="globalSettings"
> > > >                     text="{lbls.globalSettings}" />
> > > >             
> > > >         
>
> > > >          > > > text="{lbls.help}">
> > > >             
> > > >                  > > >                     ui:field="manual"
> > > > 

Error in generating report

2010-11-05 Thread Bruno Santos
I'm trying to generate a report using JaperReports, but when I click
generate the following error appears in eclipse:

[WARN] /seringueira/resumosafra
java.lang.RuntimeException: Unable to report failure
at 
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doUnexpectedFailure(AbstractRemoteServiceServlet.java:107)
at 
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at 
org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.io.IOException: Closed
at 
org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:627)
at 
org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:587)
at 
com.google.gwt.user.server.rpc.RPCServletUtils.writeResponse(RPCServletUtils.java:330)
at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.writeResponse(RemoteServiceServlet.java:352)
at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:251)
at 
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
... 19 more

In class Impl I use the following:

if(bytes != null && bytes.length > 0) {
getThreadLocalResponse().setContentType("application/pdf");
getThreadLocalResponse().setContentLength(bytes.length);
try {
ServletOutputStream ouputStream = 
getThreadLocalResponse().getOutputStream();
ouputStream.write(bytes, 0, bytes.length);
ouputStream.flush();
ouputStream.close();
} catch(Exception ex) {
ex.getMessage();
}
}

Does anyone have any idea what I might be doing wrong?

-- 
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 not showing up in Dev Mode Panel

2010-11-05 Thread Perelman Nathan (Nathan)
No, I didn't want to go to the trouble of converting my existing Eclipse
projects.

 

  _  

From: google-web-toolkit@googlegroups.com
[mailto:google-web-tool...@googlegroups.com] On Behalf Of Rajeev Dayal
Sent: Friday, November 05, 2010 14:21
To: google-web-toolkit@googlegroups.com
Subject: Re: Exceptions not showing up in Dev Mode Panel

 

Are you using the Google Plugin for Eclipse?

On Fri, Nov 5, 2010 at 2:19 PM, Nathan  wrote:

I'm using GWT 2.0.4 and in Dev Mode it seems some exceptions are left
uncaught and show up in the browser instead of in my GWT uncaught
exception handler or in the Dev Mode panel. For example I get a line
like "uncaught exception:
com.google.gwt.dev.shell.HostedModeException: Something other than a
double was returned from JSNI method..." in my Firebug or browser
error console. Is there some way I can get this exception to show up
somewhere where I can see a Java stack trace from it?

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



smime.p7s
Description: S/MIME cryptographic signature


Re: onWindowClosing not reacting to "Cancel" user input in IE6/7/8 when $wnd.redirect used

2010-11-05 Thread Andy_W
Nevermind, worked around it by making a different popup on
logoutit's still a bug though.

On Nov 5, 12:35 pm, Andy_W  wrote:
> Sorry that would be $wnd.location as in the code...
>
> I am at a loss as to how to fix this!
>
> On Nov 4, 10:53 am, Andy_W  wrote:
>
> > Hi,
>
> > I have the following code to prompt the user that if they navigate
> > away "bad stuff" could happen:
>
> >         /**
> >          * Adds a handler to show warning when page is being closed.
> >          */
> >         private void addCloseHandler() {
> >                 Window.addWindowClosingHandler(new Window.ClosingHandler() {
>
> >                         public void onWindowClosing(ClosingEvent event) {
> >                                 event.setMessage("Bad Stuff might happen");
> >                         }
> >                 });
>
> >                 Window.addCloseHandler(new CloseHandler() {
>
> >                         public void onClose(CloseEvent event) {
> > //Cleanup
> >                         }
> >                 });
> >         }
>
> > If I manually type a new URL into IE6/7/8 such aswww.google.com, the
> > prompt appears, and if the user clicks cancel, the redirect does not
> > occur as expected.
>
> > However, I have a logout button that logs the user out, and then does
> > a simple $wnd.location="some url". When this is pressed, the popup
> > appears as before and warns the user, but regardless of whether the
> > user clicks ok or cancel, they are always logged out and redirected.
> > This does not happen in Chrome or Firefox which work exactly as
> > expected (surprise!).
>
> > The code for this is below:
>
> >         public static void doLogout() {
> >                 RequestBuilder rb = new RequestBuilder(RequestBuilder.POST,
> > GwtUtils.getServerUrl()
> >                                 + "/mywebsite?action=doLogout");
> >                 try {
>
> >                         rb.sendRequest("", new RequestCallback() {
> >                                 public void onError(Request request, 
> > Throwable exception) {
>
> >                                         //do something
> >                                 }
>
> >                                 public void onResponseReceived(Request 
> > request, Response response)
> > {
> >                                         GwtUtils.redirect(getLogoutUrl());
> >                                 }
>
> >                         });
> >                 } catch (RequestException e) {
> >                         DebugUtils.addDebugMessage("Exception logging out", 
> > e);
> >                         GwtUtils.redirect(getLogoutUrl());
> >                 }
>
> >         }
>
> >         And in my GetUtils class I have the following Native method:
>
> >         public static native void redirect(String url)/*-{
> >                 $wnd.location = url;
> >         }-*/;

-- 
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: Redirect into a hash-style URL causes a reload in IE

2010-11-05 Thread Gal Dolber
Thanks, I didn't even try to find a solution.
It's incredible how I hate ie more and more every day

On Fri, Nov 5, 2010 at 11:12 AM, Andy  wrote:

> We just ran into this and hopefully if you come across this I can save
> you from having to go through the same painful day of debugging that I
> just experienced.
>
> The issue basically works like this:
>
> Suppose you have a login page at /login and after a successful login,
> you redirect into your gwt application at something like /app#token.
> When you try to navigate from that page using a Hyperlink which sets
> location.hash, it will cause the page to reload instead of navigating.
>
> The reason for this is pretty complicated and I can't say I fully
> understand it. It seems to be a combination of 1) a bug in IE, 2) the
> HistoryImplIE6 timer, and 3) a timing issue.
>
> It only happened occasionally until I put a 1s sleep in my bootstrap
> page. The it happened everytime. Again, you have to come from a 302
> redirect into a hash token for this to happen.
>
> Our specific case was actually redirecting query style URLs like /app?
> token=foo -> /app#foo
>
> Other developers have run into this before. You can read more about it
> here:
>
>
> http://stackoverflow.com/questions/1985056/response-redirect-with-a-fragment-identifier-causes-unexpected-refresh-when-later
>
> and here:
>
>
> http://stackoverflow.com/questions/2602260/javascript-location-hash-refreshing-in-ie/3804661#3804661
>
> That second link contains the fix that I used.
>
> I added:
>
>  window.location.hash = window.location.hash;
>
> in a script tag at the top of my bootstrap page. I only do this for IE
> even though it's probably safe for all browsers.
>
> --
> 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.
>
>


-- 
Guit: Elegant, beautiful, modular and *production ready* gwt applications.

http://code.google.com/p/guit/

-- 
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: Problem with DialogBox

2010-11-05 Thread John LaBanca
>
> You can only call setWidget once on a DialogBox.

To be clear, you can only call "addWidget" once on a DialogBox, correct?

Thanks,
John LaBanca
jlaba...@google.com


On Fri, Nov 5, 2010 at 2:24 PM, skippy  wrote:

> You can only call setWidget once on a DialogBox.
> When I use UI Binder, the compilers tells you that you can not do
> this.
> However, whe not UI Binder, you get that run time error.
>
> I was adding the HTML widget after a vertical panel rather then adding
> it to the vertidal panel.
>
> Thanks.
>
> I hope this helps the next person!
>
> On Nov 5, 11:02 am, John LaBanca  wrote:
> > Can you send a screenshot?
> >
> > Thanks,
> > John LaBanca
> > jlaba...@google.com
> >
> >
> >
> > On Fri, Nov 5, 2010 at 11:51 AM, skippy  wrote:
> > > I have several DialogBox popup views in my application,
> >
> > > After adding a HTML object to one, it now opens in peices.  You can
> > > not even tell it is a DialobBox.  Like it is spilling out of itself.
> >
> > > Any help would be great!
> > > Skippy
> >
> > > --
> > > 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.- Hide quoted
> text -
> >
> > - Show quoted text -
>
> --
> 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: DockLayoutPanel inside UiBinder requires height="100%"

2010-11-05 Thread Jeff Schnitzer
This requirement should *really* be mentioned in the javadocs for
DockLayoutPanel.  Searching this list, a lot of people seem to be
stumbling on this issue.

Jeff

On Thu, Nov 4, 2010 at 8:04 PM, Rud  wrote:
> More specifically it needs to be inside a layout panel of some type,
> or reference as a RootLayoutPanel. Any of the layout panels have this
> requirement.
>
> Rud
> http://www.MysticLakeSoftware.com
>
> On Nov 4, 9:29 pm, Jeff Schnitzer  wrote:
>> This may save someone the ~4 hours it cost me:
>>
>> Can't figure out why your DockLayoutPanel doesn't render when you
>> place it anywhere except *directly* inside a RootLayoutPanel?  It
>> needs height="100%":
>>
>> 
>>         
>>                 ...
>>         
>> 
>>
>> Without this height, DockLayoutPanels inside any other widget
>> (including nested DockLayoutPanels) collapse to 0.
>>
>> Today sucked.
>>
>> Jeff
>
> --
> 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: Problem with DialogBox

2010-11-05 Thread skippy
You can only call setWidget once on a DialogBox.
When I use UI Binder, the compilers tells you that you can not do
this.
However, whe not UI Binder, you get that run time error.

I was adding the HTML widget after a vertical panel rather then adding
it to the vertidal panel.

Thanks.

I hope this helps the next person!

On Nov 5, 11:02 am, John LaBanca  wrote:
> Can you send a screenshot?
>
> Thanks,
> John LaBanca
> jlaba...@google.com
>
>
>
> On Fri, Nov 5, 2010 at 11:51 AM, skippy  wrote:
> > I have several DialogBox popup views in my application,
>
> > After adding a HTML object to one, it now opens in peices.  You can
> > not even tell it is a DialobBox.  Like it is spilling out of itself.
>
> > Any help would be great!
> > Skippy
>
> > --
> > 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.- Hide quoted text -
>
> - Show quoted text -

-- 
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 not showing up in Dev Mode Panel

2010-11-05 Thread Rajeev Dayal
Are you using the Google Plugin for Eclipse?

On Fri, Nov 5, 2010 at 2:19 PM, Nathan  wrote:

> I'm using GWT 2.0.4 and in Dev Mode it seems some exceptions are left
> uncaught and show up in the browser instead of in my GWT uncaught
> exception handler or in the Dev Mode panel. For example I get a line
> like "uncaught exception:
> com.google.gwt.dev.shell.HostedModeException: Something other than a
> double was returned from JSNI method..." in my Firebug or browser
> error console. Is there some way I can get this exception to show up
> somewhere where I can see a Java stack trace from it?
>
> --
> 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.



Exceptions not showing up in Dev Mode Panel

2010-11-05 Thread Nathan
I'm using GWT 2.0.4 and in Dev Mode it seems some exceptions are left
uncaught and show up in the browser instead of in my GWT uncaught
exception handler or in the Dev Mode panel. For example I get a line
like "uncaught exception:
com.google.gwt.dev.shell.HostedModeException: Something other than a
double was returned from JSNI method..." in my Firebug or browser
error console. Is there some way I can get this exception to show up
somewhere where I can see a Java stack trace from it?

-- 
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 run pure java backend setup code in GWTTestCase?

2010-11-05 Thread Hilco Wijbenga
On 5 November 2010 10:54, Potate  wrote:
> I have a GWTTestCase that validates some GETs and POSTs to a servlet.
> The servlet starts up a little differently than the traditional
> servlets. So I can't use the builtin unit test servlet bootstrap in
> module.gwt.xml.
> It's easiest if I can run any pure java methods. When I tried this, I
> got compiler errors saying no client side code of my pure java stuff.
> Is there a way around this?

I'm not entirely clear what you're trying to do but if you have
server-side code (your pure Java stuff) then make sure it is not found
under any of the directories that GWT searches looking for client-side
source code (by default *.client). If you use 
then those directories should *not* contain any server-side code
either.

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

-- 
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: Handling ClickEvents with custom composite widgets

2010-11-05 Thread nathan
I tried event.getSource() but since I created a custom widget, called
CompositeWidget, and I'm listening for a click in the LeftPanel, I
believe event.getSource() is returning LeftPanel, not the
CompositeWidget. So the contents of the CompositeWidget are not
available from event.getSource(). I could be way off on this.

I think it could have something to do with Event Bubbling. Mentioned
here: 
http://code.google.com/webtoolkit/doc/1.6/FAQ_UI.html#How_can_I_efficiently_handle_events_from_many_interior_Widgets?,
but I don't know how to implement that.

I should mention that I'm new to GWT, so if I'm just doing something
completely wrong or inefficient, please let me know.

I put an example of what I'm trying to do here:
https://code.google.com/p/gwtcustomwidgeteventhandling/source/browse/

When the "Remove" button is clicked, I want that CompositeWidget to be
removed from the LeftPanel, and it's contents removed from the
RightPanel.

I understand I'm probably not explaining myself well, and what I put
up may not be the best example, but thanks for any help.

-- 
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: Showing facebook like button using GWT code

2010-11-05 Thread RPB
Hi Aditya,

The problem is that you can't call a 
widget tag inside of an existing  enclosure (i.e. the
GWT generated js code). See this thread for more details:
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/9a81056219c54470/dbf4fd62e9ed41ef?lnk=gst&q=tag+referencing+the+tweetgrid+widget+in+your+host+#dbf4fd62e9ed41ef

Firefox must have implemented a workaround, but the other browsers
still have this problem.

To get xfbml working you can either use injection as described here:
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/f8a77c93d55aabf2

Or use a wrapper such as gwtfb:
http://www.gwtfb.com/#home

Good luck,
Rob



On Nov 3, 7:10 am, Aditya <007aditya.b...@gmail.com> wrote:
> hello,
>         i m trying to embed facbook's like button on page.
> it works completely fine in Firefox but it is not shown in Google
> chrome and IE 6 and above.
> In chrome i tried to dig using inspect element feature so there i
> found exactly same set statement from firefox.
>
> i am embedding it in FlextTable,setting html of one cell using
> fxtMainTbl.setHTML("http://connect.facebook.net/en_US/
> all.js#xfbml=1\">" +
>                                                                               
>   "http://www.demositeurl.com/\"; width=
> \"328\">");
>
> how i should make it work in chrome and IE too.
>
> regards,
> 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.



how to run pure java backend setup code in GWTTestCase?

2010-11-05 Thread Potate
I have a GWTTestCase that validates some GETs and POSTs to a servlet.
The servlet starts up a little differently than the traditional
servlets. So I can't use the builtin unit test servlet bootstrap in
module.gwt.xml.
It's easiest if I can run any pure java methods. When I tried this, I
got compiler errors saying no client side code of my pure java stuff.
Is there a way around this?

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 Designer and Data Binding

2010-11-05 Thread csaffi
Hi everybody,
I happily discovered that Google has released GWT Designer free for
use, and I immediately downloaded it for testing. Unfortunately I
realized that it lacks data binding features to bind data with UI
components... Maybe it will be introduced in future versions, but for
now remains a great lack.

Do you know any way to overcome this problem?

Thank you very much 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: GWT's Event class behaves differently in IE or FF for "keypress" event

2010-11-05 Thread Thomas Broyer


On 5 nov, 12:10, Sorinel C  wrote:
> - Open this page:http://www.quirksmode.org/js/keys.html with both
> browsers (Internet Explorer and Firefox).
> - Choose the "keypress" event for Testing.
> - Click on a numeric key (0,1,2,3 ... 9)
>
> You'll see that the FF and IE have different results.
>
> * IE for key "2"
> keypress
> keyCode is 50
> charCode is undefined
>
> * FF for key "2"
> keypress
> keyCode is 0
> charCode is 50
>
> * Chrome for key "2"
> keypress
> keyCode is 50
> charCode is 50
>
> So, it seems that Chrome is the nicest browser here -- but why do we
> have this discrepancy?  shouldn't the Event class (which is a wrapper
> on NativeEvent) provide the same results like Chrome for any browser?

Given that the keyCode in keydown and keyup events is 98, it SHOULD be
98 in keypress too. As PPK says, IE has the most "reasonable"
implementation here.
You'll find issues in the bug tracker about these discrepancies, but
really they're not easy to solve (particularly re. repeated events,
and differences between platforms (for the same browser, because of
the differences at the OS level))

-- 
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 Loading the application very slowly

2010-11-05 Thread keyboard_samurai
Hi All,

I am facing a issue which seems to have cropped up in recent times in
our code. We are using GWT 1.7.1 along with GXT 2.2 widget libraries.
Till a few days back the application was getting loaded i.e with the
data within 5-10 seconds ... the cache.html which was getting
generated back then was around 12.8 MB...This being a intranet based
application so we didnt have to worry on the application statup. We
been making continuous upgrades to code base and now the generated
cache.html size is somewhere around 13.5 MB but this has affected our
application startup time to increase from 10 seconds to 1 min 10
seconds. This issue is noticeable only in IE6 and not on other
browsers like FF and Chrome.

On looking via the HTTP Watch i noticed that the 12.8 MB cache.html
file gets downloaded in 2-3 seconds and the javascript statements
executed within the file takes around rest 3-4 seconds,  but the 13.5
MB cache file was getting downloaded in 28-30 seconds and also the
javascript within it was taking around 30 seconds to execute. Is this
normal ? also on comparing the no of lines of code within
the .cache.html file i noticed it has just increased from 98k to
98.5k  ...

not sure whats going wrong here bcoz of which the application has
slowed down considerably ... Can anyone please provide pointers on how
to tackle this issue ?

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: CompositeCell and hiding Cells Problem

2010-11-05 Thread John LaBanca
The default implementation of the render method in CompositeCell wraps each
element in a span.  You could do the same and set the display style property
based on the state, and then you don't need to extend SelectionCell.  While
it isn't required for very simple Cells (that only render a single element),
it makes sense to wrap each Cell in its own parent element.

Thanks,
John LaBanca
jlaba...@google.com


On Fri, Nov 5, 2010 at 12:40 PM, Ümit  wrote:

> Ah I see ;-)
>
> However I somehow can't access the styles and the span respectively.
> The render method of the SelectionCell renders the  tag
> directly (I suppose the span is rendered by the CellTable itself).
> I solved my problem by extending the SelectionCell and storing a
> isVible Flag in it and then adding an additional span around it. The
> class looks like this:
>
> public class HideableSelectionCell extends SelectionCell{
>  protected boolean isVisible = true;
>
>  public HideableSelectionCell(List options) {
>super(options);
>  }
>
>  @Override
>  public void render(String value, Object key, SafeHtmlBuilder sb) {
>if (!isVisible)
>  sb.appendHtmlConstant("");
> super.render(value, key, sb);
>
> if (!isVisible)
>  sb.appendHtmlConstant("");
>  }
>
>   public void setIsVisible(boolean isVisible) {
> this.isVisible = isVisible;
>   }
>
>   public boolean getIsVisible(){
>  return this.isVisible;
>   }
> }
>
> And in the render method of the compositeCell I set the isVisible Flag
> of the cell before rendering it.
>
>
> Is that the right approach or is there some other way to access the
> Cell Span's Style directly ?
>
> Sorry for being so persistent ;-)
>
> thanks
>
> Uemit
>
> On Nov 5, 5:03 pm, John LaBanca  wrote:
> > Sorry, I was referring to the CSS property display, and I meant "none",
> not
> > null.
> >
> > Rendering the following will cause the span to be completely hidden and
> take
> > up no space.
> > My cell content
> >
> > Thanks,
> > John LaBanca
> > jlaba...@google.com
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Nov 5, 2010 at 11:24 AM, Ümit  wrote:
> > > Thanks John for the quick response.
> >
> > > One question though. I am not sure what you mean with "setting the
> > > display to null". I checked the specific classes (SelectionCell,
> > > AbstractCell etc) but couldn't find anything which allows me to set
> > > the display to null.
> > > Maybe you can specify what you mean with display.
> >
> > > Thank in advance
> >
> > > Uemit
> >
> > > On Nov 5, 1:46 pm, John LaBanca  wrote:
> > > > As far as the SelectionCell, we should have a version that is
> genericized
> > > > and just use the selected index to map to the generic value.  In
> general,
> > > we
> > > > probably also need an "EditCell", which is basically a two state cell
> > > that
> > > > can enter and exit edit mode.  I'm sure that as people use the Cell
> > > Widgets,
> > > > we'll figure out which Cells are missing from the API.
> >
> > > > As for your immediate problem, I think the answer is that you need to
> > > > override resetFocus() to do whatever you want.  Composite assumes
> that
> > > all
> > > > four elements will be there, so if you override render to change
> that,
> > > then
> > > > you need to override resetFocus() to handle the new structure.
> > > >  Alternatively, you could render all four elements regardless of the
> > > state
> > > > and just set the display to null.
> >
> > > > Thanks,
> > > > John LaBanca
> > > > jlaba...@google.com
> >
> > > > On Fri, Nov 5, 2010 at 7:15 AM, Ümit  wrote:
> > > > > I have an issue with the CompositeCell in a CellTable. My
> > > > > CompositeCell consists of 3 ActionCells and a SelectionCell.
> > > > > However the difference to a normal behaviour of a  CompositeCell is
> > > > > that I don't show all Cells at the same time but based on some
> state
> > > > > in a domain object. Here is what I try to achieve:
> >
> > > > > Initial State
> > > > > Second Stage After pressing on
> Save/Cancel
> > > > > |  NEW  |  -> (press on NEW ActionCell) -> | SELECTION SAVE CANCEL
> |
> > > > > -> | NEW |
> >
> > > > > So after pressing on the NEW ActionCell it should be hidden and the
> > > > > SelectionCell and the SAVE/CANCEL ActionCells should be shown.
> After I
> > > > > press on SAVE or CANCEL again only the NEW ActionCell should be
> shown.
> >
> > > > > For the ActionCells i just  override the render method of the Cell
> to
> > > > > either not render the cell or to render it based on the state in my
> > > > > domain object.
> > > > > This looks like this:
> >
> > > > > public static class NewActioncell extends ActionCell {
> > > > >public NewActioncell(String
> > > > > text,com.google.gwt.cell.client.ActionCell.Delegate
> > > > > delegate) {
> > > > >super(text, delegate);
> > > > >}
> >
> > > > >   @Override
> > > > >   public void render(MyObject value, Object key, SafeHtmlBuilder
> sb)
> > > > > {
> > > > >if (value.getIsNew())  // get t

Re: CompositeCell and hiding Cells Problem

2010-11-05 Thread Ümit
Ah I see ;-)

However I somehow can't access the styles and the span respectively.
The render method of the SelectionCell renders the  tag
directly (I suppose the span is rendered by the CellTable itself).
I solved my problem by extending the SelectionCell and storing a
isVible Flag in it and then adding an additional span around it. The
class looks like this:

public class HideableSelectionCell extends SelectionCell{
  protected boolean isVisible = true;

  public HideableSelectionCell(List options) {
super(options);
  }

  @Override
  public void render(String value, Object key, SafeHtmlBuilder sb) {
if (!isVisible)
  sb.appendHtmlConstant("");
super.render(value, key, sb);

if (!isVisible)
  sb.appendHtmlConstant("");
  }

   public void setIsVisible(boolean isVisible) {
 this.isVisible = isVisible;
   }

   public boolean getIsVisible(){
  return this.isVisible;
   }
}

And in the render method of the compositeCell I set the isVisible Flag
of the cell before rendering it.


Is that the right approach or is there some other way to access the
Cell Span's Style directly ?

Sorry for being so persistent ;-)

thanks

Uemit

On Nov 5, 5:03 pm, John LaBanca  wrote:
> Sorry, I was referring to the CSS property display, and I meant "none", not
> null.
>
> Rendering the following will cause the span to be completely hidden and take
> up no space.
> My cell content
>
> Thanks,
> John LaBanca
> jlaba...@google.com
>
>
>
>
>
>
>
> On Fri, Nov 5, 2010 at 11:24 AM, Ümit  wrote:
> > Thanks John for the quick response.
>
> > One question though. I am not sure what you mean with "setting the
> > display to null". I checked the specific classes (SelectionCell,
> > AbstractCell etc) but couldn't find anything which allows me to set
> > the display to null.
> > Maybe you can specify what you mean with display.
>
> > Thank in advance
>
> > Uemit
>
> > On Nov 5, 1:46 pm, John LaBanca  wrote:
> > > As far as the SelectionCell, we should have a version that is genericized
> > > and just use the selected index to map to the generic value.  In general,
> > we
> > > probably also need an "EditCell", which is basically a two state cell
> > that
> > > can enter and exit edit mode.  I'm sure that as people use the Cell
> > Widgets,
> > > we'll figure out which Cells are missing from the API.
>
> > > As for your immediate problem, I think the answer is that you need to
> > > override resetFocus() to do whatever you want.  Composite assumes that
> > all
> > > four elements will be there, so if you override render to change that,
> > then
> > > you need to override resetFocus() to handle the new structure.
> > >  Alternatively, you could render all four elements regardless of the
> > state
> > > and just set the display to null.
>
> > > Thanks,
> > > John LaBanca
> > > jlaba...@google.com
>
> > > On Fri, Nov 5, 2010 at 7:15 AM, Ümit  wrote:
> > > > I have an issue with the CompositeCell in a CellTable. My
> > > > CompositeCell consists of 3 ActionCells and a SelectionCell.
> > > > However the difference to a normal behaviour of a  CompositeCell is
> > > > that I don't show all Cells at the same time but based on some state
> > > > in a domain object. Here is what I try to achieve:
>
> > > > Initial State
> > > > Second Stage                             After pressing on Save/Cancel
> > > > |  NEW  |  -> (press on NEW ActionCell) -> | SELECTION SAVE CANCEL |
> > > > -> | NEW |
>
> > > > So after pressing on the NEW ActionCell it should be hidden and the
> > > > SelectionCell and the SAVE/CANCEL ActionCells should be shown. After I
> > > > press on SAVE or CANCEL again only the NEW ActionCell should be shown.
>
> > > > For the ActionCells i just  override the render method of the Cell to
> > > > either not render the cell or to render it based on the state in my
> > > > domain object.
> > > > This looks like this:
>
> > > > public static class NewActioncell extends ActionCell {
> > > >    public NewActioncell(String
> > > > text,com.google.gwt.cell.client.ActionCell.Delegate
> > > > delegate) {
> > > >        super(text, delegate);
> > > >    }
>
> > > >   @Override
> > > >   public void render(MyObject value, Object key, SafeHtmlBuilder sb)
> > > > {
> > > >        if (value.getIsNew())  // get the state
> > > >            super.render(value, key, sb);
> > > >        }
> > > > }
>
> > > > The code for the Save and Cencel Action Cells is basically the same
> > > > apart from the fact that in the render method i will render the cells
> > > > if value.getIsNew() == false
> > > > The delegate action just sets the IsNew flag on the MyObject and calls
> > > > refresh on the DataProvider.
>
> > > > So far everything works as expected. As soon as I press on the NEW
> > > > Button, the NEW Button is hidden and only the CANCEL and SAVE buttons
> > > > are shown.
>
> > > > Now I also want to display a Select Box when SAVE and CANCEL are
> > > > shown. The Problem with the SelectionCell is that it is bound to
> > > >

Re: CompositeCell and hiding Cells Problem

2010-11-05 Thread John LaBanca
Sorry, I was referring to the CSS property display, and I meant "none", not
null.

Rendering the following will cause the span to be completely hidden and take
up no space.
My cell content

Thanks,
John LaBanca
jlaba...@google.com


On Fri, Nov 5, 2010 at 11:24 AM, Ümit  wrote:

> Thanks John for the quick response.
>
> One question though. I am not sure what you mean with "setting the
> display to null". I checked the specific classes (SelectionCell,
> AbstractCell etc) but couldn't find anything which allows me to set
> the display to null.
> Maybe you can specify what you mean with display.
>
> Thank in advance
>
> Uemit
>
>
>
>
>
>
> On Nov 5, 1:46 pm, John LaBanca  wrote:
> > As far as the SelectionCell, we should have a version that is genericized
> > and just use the selected index to map to the generic value.  In general,
> we
> > probably also need an "EditCell", which is basically a two state cell
> that
> > can enter and exit edit mode.  I'm sure that as people use the Cell
> Widgets,
> > we'll figure out which Cells are missing from the API.
> >
> > As for your immediate problem, I think the answer is that you need to
> > override resetFocus() to do whatever you want.  Composite assumes that
> all
> > four elements will be there, so if you override render to change that,
> then
> > you need to override resetFocus() to handle the new structure.
> >  Alternatively, you could render all four elements regardless of the
> state
> > and just set the display to null.
> >
> > Thanks,
> > John LaBanca
> > jlaba...@google.com
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Nov 5, 2010 at 7:15 AM, Ümit  wrote:
> > > I have an issue with the CompositeCell in a CellTable. My
> > > CompositeCell consists of 3 ActionCells and a SelectionCell.
> > > However the difference to a normal behaviour of a  CompositeCell is
> > > that I don't show all Cells at the same time but based on some state
> > > in a domain object. Here is what I try to achieve:
> >
> > > Initial State
> > > Second Stage After pressing on Save/Cancel
> > > |  NEW  |  -> (press on NEW ActionCell) -> | SELECTION SAVE CANCEL |
> > > -> | NEW |
> >
> > > So after pressing on the NEW ActionCell it should be hidden and the
> > > SelectionCell and the SAVE/CANCEL ActionCells should be shown. After I
> > > press on SAVE or CANCEL again only the NEW ActionCell should be shown.
> >
> > > For the ActionCells i just  override the render method of the Cell to
> > > either not render the cell or to render it based on the state in my
> > > domain object.
> > > This looks like this:
> >
> > > public static class NewActioncell extends ActionCell {
> > >public NewActioncell(String
> > > text,com.google.gwt.cell.client.ActionCell.Delegate
> > > delegate) {
> > >super(text, delegate);
> > >}
> >
> > >   @Override
> > >   public void render(MyObject value, Object key, SafeHtmlBuilder sb)
> > > {
> > >if (value.getIsNew())  // get the state
> > >super.render(value, key, sb);
> > >}
> > > }
> >
> > > The code for the Save and Cencel Action Cells is basically the same
> > > apart from the fact that in the render method i will render the cells
> > > if value.getIsNew() == false
> > > The delegate action just sets the IsNew flag on the MyObject and calls
> > > refresh on the DataProvider.
> >
> > > So far everything works as expected. As soon as I press on the NEW
> > > Button, the NEW Button is hidden and only the CANCEL and SAVE buttons
> > > are shown.
> >
> > > Now I also want to display a Select Box when SAVE and CANCEL are
> > > shown. The Problem with the SelectionCell is that it is bound to
> > > String as the Generic Type, so I can't access MyObject in its render
> > > method.
> > > My workaround is now to override the   void render method of the
> > > CompositeCell and hide the SelectionCell there. This looks something
> > > like that:
> >
> > > public static class CustomCompositeCell extends
> > > CompositeCell {
> > >public CustomCompositeCell(List> hasCells) {
> > >super(hasCells);
> > >}
> >
> > >@Override
> > >protected  void render(MyObject value, Object
> > > key,SafeHtmlBuilder sb, HasCell hasCell) {
> > >if (!(hasCell.getCell() instanceof SelectionCell) ||
> > > (value.getIsNew()))   // check Cell and State
> > >{
> > >super.render(value, key, sb, hasCell);
> > >}
> > >}
> > > }
> >
> > > So now the SelectionCell is displayed as soon as I press on the NEW
> > > Button. However I get an exception in hosted and in production mode as
> > > soon as I press on cancel or save.
> > > The error is:
> >
> > > Chrome: com.google.gwt.core.client.JavaScriptException: (TypeError):
> > > Cannot read property 'nextSibling' of null
> > > Firefox: elem is null [Break on this error] var sib =
> > > elem.nextSibling;
> >
> > > I managed  to trace the problem back to the resetFocus method of the
> > > CompositeCell class:
> >
> > >  @Override
>

Re: Problem with DialogBox

2010-11-05 Thread John LaBanca
Can you send a screenshot?

Thanks,
John LaBanca
jlaba...@google.com


On Fri, Nov 5, 2010 at 11:51 AM, skippy  wrote:

> I have several DialogBox popup views in my application,
>
> After adding a HTML object to one, it now opens in peices.  You can
> not even tell it is a DialobBox.  Like it is spilling out of itself.
>
> Any help would be great!
> Skippy
>
> --
> 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.



Problem with DialogBox

2010-11-05 Thread skippy
I have several DialogBox popup views in my application,

After adding a HTML object to one, it now opens in peices.  You can
not even tell it is a DialobBox.  Like it is spilling out of itself.

Any help would be great!
Skippy

-- 
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: CompositeCell and hiding Cells Problem

2010-11-05 Thread Ümit
Thanks John for the quick response.

One question though. I am not sure what you mean with "setting the
display to null". I checked the specific classes (SelectionCell,
AbstractCell etc) but couldn't find anything which allows me to set
the display to null.
Maybe you can specify what you mean with display.

Thank in advance

Uemit






On Nov 5, 1:46 pm, John LaBanca  wrote:
> As far as the SelectionCell, we should have a version that is genericized
> and just use the selected index to map to the generic value.  In general, we
> probably also need an "EditCell", which is basically a two state cell that
> can enter and exit edit mode.  I'm sure that as people use the Cell Widgets,
> we'll figure out which Cells are missing from the API.
>
> As for your immediate problem, I think the answer is that you need to
> override resetFocus() to do whatever you want.  Composite assumes that all
> four elements will be there, so if you override render to change that, then
> you need to override resetFocus() to handle the new structure.
>  Alternatively, you could render all four elements regardless of the state
> and just set the display to null.
>
> Thanks,
> John LaBanca
> jlaba...@google.com
>
>
>
>
>
>
>
> On Fri, Nov 5, 2010 at 7:15 AM, Ümit  wrote:
> > I have an issue with the CompositeCell in a CellTable. My
> > CompositeCell consists of 3 ActionCells and a SelectionCell.
> > However the difference to a normal behaviour of a  CompositeCell is
> > that I don't show all Cells at the same time but based on some state
> > in a domain object. Here is what I try to achieve:
>
> > Initial State
> > Second Stage                             After pressing on Save/Cancel
> > |  NEW  |  -> (press on NEW ActionCell) -> | SELECTION SAVE CANCEL |
> > -> | NEW |
>
> > So after pressing on the NEW ActionCell it should be hidden and the
> > SelectionCell and the SAVE/CANCEL ActionCells should be shown. After I
> > press on SAVE or CANCEL again only the NEW ActionCell should be shown.
>
> > For the ActionCells i just  override the render method of the Cell to
> > either not render the cell or to render it based on the state in my
> > domain object.
> > This looks like this:
>
> > public static class NewActioncell extends ActionCell {
> >    public NewActioncell(String
> > text,com.google.gwt.cell.client.ActionCell.Delegate
> > delegate) {
> >        super(text, delegate);
> >    }
>
> >   @Override
> >   public void render(MyObject value, Object key, SafeHtmlBuilder sb)
> > {
> >        if (value.getIsNew())  // get the state
> >            super.render(value, key, sb);
> >        }
> > }
>
> > The code for the Save and Cencel Action Cells is basically the same
> > apart from the fact that in the render method i will render the cells
> > if value.getIsNew() == false
> > The delegate action just sets the IsNew flag on the MyObject and calls
> > refresh on the DataProvider.
>
> > So far everything works as expected. As soon as I press on the NEW
> > Button, the NEW Button is hidden and only the CANCEL and SAVE buttons
> > are shown.
>
> > Now I also want to display a Select Box when SAVE and CANCEL are
> > shown. The Problem with the SelectionCell is that it is bound to
> > String as the Generic Type, so I can't access MyObject in its render
> > method.
> > My workaround is now to override the   void render method of the
> > CompositeCell and hide the SelectionCell there. This looks something
> > like that:
>
> > public static class CustomCompositeCell extends
> > CompositeCell {
> >    public CustomCompositeCell(List> hasCells) {
> >        super(hasCells);
> >    }
>
> >   �...@override
> >    protected  void render(MyObject value, Object
> > key,SafeHtmlBuilder sb, HasCell hasCell) {
> >        if (!(hasCell.getCell() instanceof SelectionCell) ||
> > (value.getIsNew()))   // check Cell and State
> >        {
> >            super.render(value, key, sb, hasCell);
> >        }
> >    }
> > }
>
> > So now the SelectionCell is displayed as soon as I press on the NEW
> > Button. However I get an exception in hosted and in production mode as
> > soon as I press on cancel or save.
> > The error is:
>
> > Chrome: com.google.gwt.core.client.JavaScriptException: (TypeError):
> > Cannot read property 'nextSibling' of null
> > Firefox: elem is null [Break on this error] var sib =
> > elem.nextSibling;
>
> > I managed  to trace the problem back to the resetFocus method of the
> > CompositeCell class:
>
> > �...@override
> >  public boolean resetFocus(Element parent, C value, Object key) {
> >    Element curChild =
> > getContainerElement(parent).getFirstChildElement();
> >    for (HasCell hasCell : hasCells) {
> >      // The first child that takes focus wins. Only one child should
> > ever be in
> >      // edit mode, so this is safe.
> >      if (resetFocusImpl(curChild, value, key, hasCell)) {
> >        return true;
> >      }
> >      curChild = curChild.getNextSiblingElement();
> >    }
> >    return false;
> >  }
>
> > It seems that 

Instant Messenger portlet

2010-11-05 Thread Shaji
Hi ,
  I am trying to integrate instant messenger gwtapp
with portlet from the link
http://vinaytechs.blogspot.com/2009/09/tutorial-writing-instant-messenger.html
I have got the source code from ryan dews book which works fine in my
local intellij as well as tomcat webapps.
I am able to use instant messaging without any issues in local env and
tomcat web app but not as portlet.
I am using Vignette application portal and GWT 2.0.4 with tomcat
When I deploy into portlet, RootPanel(EntryPoint class) doesn't get
invoked. Here is the code that should be called
RootPanel.get("messengerView").add( messengerService.getView() );
It seems that this issue is related to javascript nocache.js . This
file is being sourced in html/jsp but it seems there
may be path problem.
It seems that messenger service is never called from the javascript. I
have put some messages in the messenger service but it doesn't
display.

Thanks
Mohammed Ahmed

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



Redirect into a hash-style URL causes a reload in IE

2010-11-05 Thread Andy
We just ran into this and hopefully if you come across this I can save
you from having to go through the same painful day of debugging that I
just experienced.

The issue basically works like this:

Suppose you have a login page at /login and after a successful login,
you redirect into your gwt application at something like /app#token.
When you try to navigate from that page using a Hyperlink which sets
location.hash, it will cause the page to reload instead of navigating.

The reason for this is pretty complicated and I can't say I fully
understand it. It seems to be a combination of 1) a bug in IE, 2) the
HistoryImplIE6 timer, and 3) a timing issue.

It only happened occasionally until I put a 1s sleep in my bootstrap
page. The it happened everytime. Again, you have to come from a 302
redirect into a hash token for this to happen.

Our specific case was actually redirecting query style URLs like /app?
token=foo -> /app#foo

Other developers have run into this before. You can read more about it
here:

http://stackoverflow.com/questions/1985056/response-redirect-with-a-fragment-identifier-causes-unexpected-refresh-when-later

and here:

http://stackoverflow.com/questions/2602260/javascript-location-hash-refreshing-in-ie/3804661#3804661

That second link contains the fix that I used.

I added:

  window.location.hash = window.location.hash;

in a script tag at the top of my bootstrap page. I only do this for IE
even though it's probably safe for all browsers.

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



Joseph Favara/HQ/Corp/OAI is out of the office.

2010-11-05 Thread Joseph . Favara

I will be out of the office starting  11/05/2010 and will not return until
11/15/2010.

I will respond to your message when I return. If this is urgnet please
contact Narayanan Pillai at 105986

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



Native GWT form fields validation framework plans?

2010-11-05 Thread marius.andreiana
Hi,

There is a common, recurring topic about doing form fields validation
in GWT.

Here's a good analysis of the current validation frameworks done by
Brendan
https://wave.google.com/wave/waveref/googlewave.com/w+sVgB2_shE
and more discussions at
http://groups.google.com/group/gwt-platform/browse_thread/thread/6d650f12321dfe93
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/4aeef9d2195f1051/
http://code.google.com/p/google-web-toolkit/issues/detail?id=343

I know native support for validation was started. What are the planned
use cases to support? What's the current status and plans for it? (is
there a wave design doc?) Will it also work with non-RPC backends,
such as REST?

Here are a two use cases besides the basic ones, don't know if these
have been considered:
* some fields might need to interact with server in order to validate.
e.g. on sign up, check if the username entered by user is available
* multiple fields validation e.g. two password inputs, which should
match

Thanks,
Marius

-- 
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: Using REST with GWT

2010-11-05 Thread Harald Pehl
I'm successfully using Restlet in several projects: http://www.restlet.org.
Restlet comes in different editions: GAE, JEE, JSE, GWT and Andoid. So
you can use it on the client and server side.

- Harald

On Nov 5, 2:05 pm, "marius.andreiana" 
wrote:
> On Nov 5, 12:29 pm, Andreas  wrote:> We're start a 
> project using gwt 2.1. What is the best way to
> > communicate with a rest interface. Especially how to batch multiple
> > requests and how to cache response on the client using webstorage or
> > other client side technics.
>
> Until you get more answers, feel free to look 
> onhttp://groups.google.com/group/gwt-platform/browse_thread/thread/1cf3...
> and last sample athttp://code.google.com/p/gwt-platform/issues/detail?id=179

-- 
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: Using REST with GWT

2010-11-05 Thread bconoly
We actually use a JAXB marshaller on our server to unmarshall
responses from our rest services and then send those objects directly
down to the client via GWT RPC.  The way to accomplish this is to
create a simple GWT project and copy and paste the jaxb source into
it.  Once done create your gwt.xml with the source path pointing to
your jaxb packages and then inherit that in your GWT module.  This
will allow you to unmarshall your responses and send them directly
down to the client for caching.

On Nov 5, 6:29 am, Andreas  wrote:
> We're start a project using gwt 2.1. What is the best way to
> communicate with a rest interface. Especially how to batch multiple
> requests and how to cache response on the client using webstorage or
> other client side technics.

-- 
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: tips on speeding up development with Eclipse?

2010-11-05 Thread marius.andreiana
On Nov 5, 12:36 am, David Chandler  wrote:
> Hi Marius,
>
> Indeeds, changes such as these are only useful for speeding up GWT
> compilation. If you're running in dev mode, they aren't necessary.
good to know! I wasn't sure.

> There is a project underway to speed up dev mode. Are you seeing long
> times to refresh in the browser?
Yes, but I'm in a VM. Please let me know if there is some data I can
provide and how, like profiling what happens since the browser refresh
button is hit until the page is available (>30 seconds for me).


>
> /dmc
>
> On Thu, Nov 4, 2010 at 6:28 PM, marius.andreiana
>
>
>
>
>
>
>
>
>
>  wrote:
> > Hi,
>
> > Do you have any tips on speeding up development with Eclipse?
>
> > For example, one can can reduce the compilation time by reducing the
> > list of supported
> > browsers via
> >  in *.gwt.xml
> > or reduce the number of compiled locales
> > 
>
> > PS: I'm curious why these manual changes are even necessary and how
> > come GWT cannot figure by itself that it's being accessed via the
> > development plugin, and therefore generate js&resources only for that
> > specific browser.
>
> > 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 
> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> David Chandler
> Developer Programs Engineer, Google Web 
> Toolkithttp://googlewebtoolkit.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.



Re: Using REST with GWT

2010-11-05 Thread marius.andreiana
On Nov 5, 12:29 pm, Andreas  wrote:
> We're start a project using gwt 2.1. What is the best way to
> communicate with a rest interface. Especially how to batch multiple
> requests and how to cache response on the client using webstorage or
> other client side technics.
Until you get more answers, feel free to look on
http://groups.google.com/group/gwt-platform/browse_thread/thread/1cf3efb5780e5b80
and last sample at
http://code.google.com/p/gwt-platform/issues/detail?id=179

-- 
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: SelectionModel and ListDataProvider are out of synch

2010-11-05 Thread John LaBanca
The SelectionModel shouldn't depend on the data in the ListDataProvider
because it is independent of the data source.  Consider a SelectionModel
that has an option to select all unread messages.  You probably don't have
all of the user messages loaded on the client, but the unread messages
should be selected as you page through the table, without having to update
the SelectionModel each time you load a new page.  Also, SelectionModels can
be shared across multiple CellTables, each with its own ListDataProvider.

Can you deselect the value in the SelectionModel when you remove the row in
your onClick handler?

Thanks,
John LaBanca
jlaba...@google.com


On Fri, Nov 5, 2010 at 6:48 AM, Mirco Dotta  wrote:

> Hi guys,
>
> I'm experiencing an annoying problem with my SelectionModel beeing out
> of synch in respect of the data stored in my ListDataProvider. Maybe
> I'm doing something wrong, but I guess there is a suddle bug that
> prevents to correctly update the selection model when the data in the
> ListDataProvider change.
>
> Below, I pasted a contrived working example that you can test to
> expose the blamed behavior. Basically, you start with a table that
> contains two rows. Then you add a new row (click the add button) and
> you should see the "baz" row. Now select it and click remove.
> Everything is fine, good. Do it once more: add a row and delete it
> and... you get an expection, that is because of the assertion I've
> introduce in the remove button click handler. Check the code and the
> assertion is there only to expose the fact that the SelectionModel has
> more than one eIement in the set... it actually holds two elements,
> the currently selected row (which is good) and the one that was
> deleted beforergh?! So it looks like the the set of selected
> elements hold in the SelectionModel is not in synch with the data hold
> by the ListDataProvider, this despite all Foo's objects are different
> (look at the FooKeys).
>
> Opinions?
>
> public class TestTable implements EntryPoint {
>
>  private static int counter = 0;
>
>  class Foo {
>
>int id;
>String text;
>
>Foo(String text) {
>  this.id = ++TestTable.counter;
>  this.text = text;
>}
>  }
>
>  class FooKeys implements ProvidesKey {
>@Override
>public Object getKey(Foo item) {
>  return item.id;
>}
>  }
>
>  private final List backend = new ArrayList();
>
>  public void onModuleLoad() {
>backend.add(new Foo("foo"));
>backend.add(new Foo("bar"));
>
>ProvidesKey keys = new FooKeys();
>final ListDataProvider dataProvider = new
> ListDataProvider(keys);
>final CellTable table = new CellTable(15, keys);
>final MultiSelectionModel selectionModel = new
> MultiSelectionModel(keys);
>table.setSelectionModel(selectionModel);
>dataProvider.addDataDisplay(table);
>
>table.addColumn(new TextColumn() {
>
>  @Override
>  public String getValue(Foo object) {
>return object.text;
>  }
>});
>FlowPanel panel = new FlowPanel();
>panel.add(table);
>
>Button add = new Button("Add");
>add.addClickHandler(new ClickHandler() {
>  @Override
>  public void onClick(ClickEvent event) {
>Foo e = new Foo("baz");
>List res = new ArrayList(backend);
>res.add(e);
>dataProvider.setList(res);
>  }
>});
>
>panel.add(add);
>
>Button remove = new Button("Remove");
>remove.addClickHandler(new ClickHandler() {
>  @Override
>  public void onClick(ClickEvent event) {
>Set els = selectionModel.getSelectedSet();
>Foo foo = (Foo) els.toArray()[0];
>assert (els.size() == 1); // this fails!
>dataProvider.setList(backend);
>  }
>});
>
>panel.add(remove);
>
>RootPanel.get().add(panel);
>
>dataProvider.setList(new ArrayList(backend));
>  }
> }
>
> -- Mirco
>
> --
> 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: CellTree "show more" not working for top level elements.

2010-11-05 Thread John LaBanca
Thanks for reporting this bug.  I created an issue to track it:
http://code.google.com/p/google-web-toolkit/issues/detail?id=5547

Thanks,
John LaBanca
jlaba...@google.com


On Thu, Nov 4, 2010 at 4:53 PM, ben.ol...@gtri.gatech.edu <
ben.ol...@gtri.gatech.edu> wrote:

> The "show more" link is visible for the top level of my CellTree but
> clicking it does not seem to ever hit the "onRangeChanged" method of
> my provider. It works fine when the same provider is used further down
> the tree.
>
> --
> 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: CompositeCell and hiding Cells Problem

2010-11-05 Thread John LaBanca
As far as the SelectionCell, we should have a version that is genericized
and just use the selected index to map to the generic value.  In general, we
probably also need an "EditCell", which is basically a two state cell that
can enter and exit edit mode.  I'm sure that as people use the Cell Widgets,
we'll figure out which Cells are missing from the API.

As for your immediate problem, I think the answer is that you need to
override resetFocus() to do whatever you want.  Composite assumes that all
four elements will be there, so if you override render to change that, then
you need to override resetFocus() to handle the new structure.
 Alternatively, you could render all four elements regardless of the state
and just set the display to null.

Thanks,
John LaBanca
jlaba...@google.com


On Fri, Nov 5, 2010 at 7:15 AM, Ümit  wrote:

> I have an issue with the CompositeCell in a CellTable. My
> CompositeCell consists of 3 ActionCells and a SelectionCell.
> However the difference to a normal behaviour of a  CompositeCell is
> that I don't show all Cells at the same time but based on some state
> in a domain object. Here is what I try to achieve:
>
> Initial State
> Second Stage After pressing on Save/Cancel
> |  NEW  |  -> (press on NEW ActionCell) -> | SELECTION SAVE CANCEL |
> -> | NEW |
>
> So after pressing on the NEW ActionCell it should be hidden and the
> SelectionCell and the SAVE/CANCEL ActionCells should be shown. After I
> press on SAVE or CANCEL again only the NEW ActionCell should be shown.
>
> For the ActionCells i just  override the render method of the Cell to
> either not render the cell or to render it based on the state in my
> domain object.
> This looks like this:
>
> public static class NewActioncell extends ActionCell {
>public NewActioncell(String
> text,com.google.gwt.cell.client.ActionCell.Delegate
> delegate) {
>super(text, delegate);
>}
>
>   @Override
>   public void render(MyObject value, Object key, SafeHtmlBuilder sb)
> {
>if (value.getIsNew())  // get the state
>super.render(value, key, sb);
>}
> }
>
> The code for the Save and Cencel Action Cells is basically the same
> apart from the fact that in the render method i will render the cells
> if value.getIsNew() == false
> The delegate action just sets the IsNew flag on the MyObject and calls
> refresh on the DataProvider.
>
> So far everything works as expected. As soon as I press on the NEW
> Button, the NEW Button is hidden and only the CANCEL and SAVE buttons
> are shown.
>
> Now I also want to display a Select Box when SAVE and CANCEL are
> shown. The Problem with the SelectionCell is that it is bound to
> String as the Generic Type, so I can't access MyObject in its render
> method.
> My workaround is now to override the   void render method of the
> CompositeCell and hide the SelectionCell there. This looks something
> like that:
>
> public static class CustomCompositeCell extends
> CompositeCell {
>public CustomCompositeCell(List> hasCells) {
>super(hasCells);
>}
>
>@Override
>protected  void render(MyObject value, Object
> key,SafeHtmlBuilder sb, HasCell hasCell) {
>if (!(hasCell.getCell() instanceof SelectionCell) ||
> (value.getIsNew()))   // check Cell and State
>{
>super.render(value, key, sb, hasCell);
>}
>}
> }
>
> So now the SelectionCell is displayed as soon as I press on the NEW
> Button. However I get an exception in hosted and in production mode as
> soon as I press on cancel or save.
> The error is:
>
> Chrome: com.google.gwt.core.client.JavaScriptException: (TypeError):
> Cannot read property 'nextSibling' of null
> Firefox: elem is null [Break on this error] var sib =
> elem.nextSibling;
>
> I managed  to trace the problem back to the resetFocus method of the
> CompositeCell class:
>
>  @Override
>  public boolean resetFocus(Element parent, C value, Object key) {
>Element curChild =
> getContainerElement(parent).getFirstChildElement();
>for (HasCell hasCell : hasCells) {
>  // The first child that takes focus wins. Only one child should
> ever be in
>  // edit mode, so this is safe.
>  if (resetFocusImpl(curChild, value, key, hasCell)) {
>return true;
>  }
>  curChild = curChild.getNextSiblingElement();
>}
>return false;
>  }
>
>
> It seems that the loop goes through all 4 Cells but one call of
> getNextSiblingElement() returns null. The interesting part is that the
> exception only happens when I add the selectionCell to CompositeCell.
> It seems that not rendering an ActionCell by overriding its render
> method doesn't cause a problem. However overriding the render method
> of the CompositeCell to not render the SelectionCell causes this
> Exception in the resetFocus method.
>
> Is this a potential bug or is my approach of hiding Cells in a
> CompositeCell flawed. Maybe there is a better approach.
>
> Thanks in advance
>
> Uemit

Re: DecoratedPopupPanel VS DialogBox

2010-11-05 Thread John LaBanca
>
> 1) What's the difference?

DialogBox has a caption bar and support dragging, making it more like a
window.  DialogBox is a subclass of DecoratedPopupPanel.

 2) Which are the PROs and CONs of each one?

Both have the same set of methods.  DialogBox supports a caption bar, so if
you need one, use that.

3) Is it possible to extend them in order to add the three
> icons 'minimize'/'maximize'/'close' like a normal desktop window?

Sort of with DialogBox.  You could try something like the following:
SafeHtml caption = SafeHtmlUtils.fromTrustedString("My
Caption"); //
Obviously, you need real images for min/max/close
dialogBox.setHtml(caption); // Set the caption bar contents
dialogBox.getCaption.addMouseDownHandler(new MouseDownHandler() {
  public void onMouseDown(MouseDownEvent event) {
// Figure out which button was clicked and do the appropriate thing.
  }
});

Another option is to use LayoutPanels to position a popup exactly where you
want on the screen.  The disadvantage is that you must give the LayoutPanel
an explicit size, it will not expand to fit the contents.  The advantage is
that its very easy to reposition the LayoutPanel and animate the
transitions.

Thanks,
John LaBanca
jlaba...@google.com


On Fri, Nov 5, 2010 at 4:01 AM, alexoffspring wrote:

> - DialogBox can be Dragged and Dropped by default while the DPP
> cannot.
> - DB has center() and SetText() Method; DPP uses show().
> - I cannot see the possibility to extend them in order to have the
> 'minimize'/'maximize'/'close'   button like a desktop window (as in
> SmartGWT).
>
> Anymore?
>
>
>
> On 3 Nov, 09:55, alexoffspring  wrote:
> > 1) What's the difference?
> >
> > 2) Which are the PROs and CONs of each one?
> >
> > 3) Is it possible to extend them in order to add the three icons
> > 'minimize'/'maximize'/'close' like a normal desktop window?
>
> --
> 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: onWindowClosing not reacting to "Cancel" user input in IE6/7/8 when $wnd.redirect used

2010-11-05 Thread Andy_W
Sorry that would be $wnd.location as in the code...

I am at a loss as to how to fix this!

On Nov 4, 10:53 am, Andy_W  wrote:
> Hi,
>
> I have the following code to prompt the user that if they navigate
> away "bad stuff" could happen:
>
>         /**
>          * Adds a handler to show warning when page is being closed.
>          */
>         private void addCloseHandler() {
>                 Window.addWindowClosingHandler(new Window.ClosingHandler() {
>
>                         public void onWindowClosing(ClosingEvent event) {
>                                 event.setMessage("Bad Stuff might happen");
>                         }
>                 });
>
>                 Window.addCloseHandler(new CloseHandler() {
>
>                         public void onClose(CloseEvent event) {
> //Cleanup
>                         }
>                 });
>         }
>
> If I manually type a new URL into IE6/7/8 such aswww.google.com, the
> prompt appears, and if the user clicks cancel, the redirect does not
> occur as expected.
>
> However, I have a logout button that logs the user out, and then does
> a simple $wnd.location="some url". When this is pressed, the popup
> appears as before and warns the user, but regardless of whether the
> user clicks ok or cancel, they are always logged out and redirected.
> This does not happen in Chrome or Firefox which work exactly as
> expected (surprise!).
>
> The code for this is below:
>
>         public static void doLogout() {
>                 RequestBuilder rb = new RequestBuilder(RequestBuilder.POST,
> GwtUtils.getServerUrl()
>                                 + "/mywebsite?action=doLogout");
>                 try {
>
>                         rb.sendRequest("", new RequestCallback() {
>                                 public void onError(Request request, 
> Throwable exception) {
>
>                                         //do something
>                                 }
>
>                                 public void onResponseReceived(Request 
> request, Response response)
> {
>                                         GwtUtils.redirect(getLogoutUrl());
>                                 }
>
>                         });
>                 } catch (RequestException e) {
>                         DebugUtils.addDebugMessage("Exception logging out", 
> e);
>                         GwtUtils.redirect(getLogoutUrl());
>                 }
>
>         }
>
>         And in my GetUtils class I have the following Native method:
>
>         public static native void redirect(String url)/*-{
>                 $wnd.location = url;
>         }-*/;

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



SelectionModel and ListDataProvider are out of synch

2010-11-05 Thread Mirco Dotta
Hi guys,

I'm experiencing an annoying problem with my SelectionModel beeing out
of synch in respect of the data stored in my ListDataProvider. Maybe
I'm doing something wrong, but I guess there is a suddle bug that
prevents to correctly update the selection model when the data in the
ListDataProvider change.

Below, I pasted a contrived working example that you can test to
expose the blamed behavior. Basically, you start with a table that
contains two rows. Then you add a new row (click the add button) and
you should see the "baz" row. Now select it and click remove.
Everything is fine, good. Do it once more: add a row and delete it
and... you get an expection, that is because of the assertion I've
introduce in the remove button click handler. Check the code and the
assertion is there only to expose the fact that the SelectionModel has
more than one eIement in the set... it actually holds two elements,
the currently selected row (which is good) and the one that was
deleted beforergh?! So it looks like the the set of selected
elements hold in the SelectionModel is not in synch with the data hold
by the ListDataProvider, this despite all Foo's objects are different
(look at the FooKeys).

Opinions?

public class TestTable implements EntryPoint {

  private static int counter = 0;

  class Foo {

int id;
String text;

Foo(String text) {
  this.id = ++TestTable.counter;
  this.text = text;
}
  }

  class FooKeys implements ProvidesKey {
@Override
public Object getKey(Foo item) {
  return item.id;
}
  }

  private final List backend = new ArrayList();

  public void onModuleLoad() {
backend.add(new Foo("foo"));
backend.add(new Foo("bar"));

ProvidesKey keys = new FooKeys();
final ListDataProvider dataProvider = new
ListDataProvider(keys);
final CellTable table = new CellTable(15, keys);
final MultiSelectionModel selectionModel = new
MultiSelectionModel(keys);
table.setSelectionModel(selectionModel);
dataProvider.addDataDisplay(table);

table.addColumn(new TextColumn() {

  @Override
  public String getValue(Foo object) {
return object.text;
  }
});
FlowPanel panel = new FlowPanel();
panel.add(table);

Button add = new Button("Add");
add.addClickHandler(new ClickHandler() {
  @Override
  public void onClick(ClickEvent event) {
Foo e = new Foo("baz");
List res = new ArrayList(backend);
res.add(e);
dataProvider.setList(res);
  }
});

panel.add(add);

Button remove = new Button("Remove");
remove.addClickHandler(new ClickHandler() {
  @Override
  public void onClick(ClickEvent event) {
Set els = selectionModel.getSelectedSet();
Foo foo = (Foo) els.toArray()[0];
assert (els.size() == 1); // this fails!
dataProvider.setList(backend);
  }
});

panel.add(remove);

RootPanel.get().add(panel);

dataProvider.setList(new ArrayList(backend));
  }
}

-- Mirco

-- 
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+Roo a few days later

2010-11-05 Thread dr1337
I too have recently been playing around with GWT and Spring Roo over
the past few days to see what all the hype was about during Google IO.
So far, my assessment of it has been similar to yours Amir. It's great
if all you need is a simple UI for a database editor but anything else
that requires more customisation, you're probably better off hand
coding it and doing your own plumbing.

I've never used the Spring Framework so perhaps if you have some
experience using it, then that might make using GWT easier for you.
Currently the lack of documentation coupled with having to manually
read the code to figure out what's going on has proven to be too much
of a time investment for what its worth. Until a better tutorial than
the tech demo at Google IO is made, I'll probably stick to doing
things the old but familiar way.

On Nov 4, 8:26 am, Amir Kashani  wrote:
> I've been playing with Roo & GWT for a couple of days now, which
> certainly doesn't make me an expert, but I'd like to share my
> experience and see how it compares with others.
>
> The application that I'm trying to create has about 8 entities that
> require a CRUD like interface. The rest of the application requires a
> more specific (non-CRUD) UI. My hope was that Roo would help generate
> the CRUD portions, just allowing for some basic customizations, and
> let me handle the rest. So far, I seem to be fighting it more than
> it's helped. Some examples:
>
> - You can't modify the generated ui.xml files -- Roo will simply
> clobber them as soon as it makes the next change for that entity. For
> example, I don't want to list the ID field in the list view, but I
> don't see a way to remove it. There's a JIRA open about this, that was
> deferred to post 1.1.0 (ROO-937).
>
> - New dynamic finders don't seem to be added to the respective Request
> interface. Further, and this may be a Roo thing, they return
> TypedQuery rather than a List or the entity, which I don't imagine the
> RequestFactory framework can handle. There's another JIRA than covers
> this, I believe (ROO-1595)
>
> - Adding custom finders doesn't work, because again, Roo will clobber
> the Request interface. I tried removing the @RooGwtMirroredFrom
> annotation from the Request, but Roo just readied it for me. Probably
> under the previous JIRA.
>
> Lastly, the documentation is atrocious. The Roo reference guide only
> mentions GWT in its appendix of commands, and other guides only go as
> far as a simple "gwt setup". There's no mention of the expectations,
> limitations, guide to customization, or anything else. I've seen
> several, yet unanswered posts on the Roo forum about customization, so
> I imagine I'm not alone here.
>
> I've been a very loyal GWT user since 1.3, and I'm very pleased with
> the ongoing progress, including the gamut of features introduced in
> 2.1, so I hope nobody takes this as GWT bashing. However, unless I'm
> really missing something, the implementation of Roo+GWT falls far
> short of the hype it's received since I/O. In the current form, it
> makes for a very impressive demo: type a few commands and a full
> functioning database editor pops out. But as soon as you try to do
> anything outside of what's generated, it's very hard, if not
> impossible.
>
> So, it's only been a few days since final release, but what do other
> people think? Is anyone having better luck?
>
> Thanks.
>
> - Amir

-- 
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 in GWT tutorial with keyboard listener

2010-11-05 Thread nicolas saubi
Hello there,
Well, seems so at least...

On page : http://code.google.com/webtoolkit/doc/1.6/tutorial/manageevents.html

Fact is we are said to do a keyboard listener and to test the key
pressed using this part of code :
if(event.getCharCode() == KeyCodes.KEY_ENTER)

Which seems odd to me as KEY_ENTER is an int, where getCharCode
returns a Char type. So as expected example wasn't working for me
until I changed code to :
if(event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER)

which is working.


I might be wrong and doing something wrong, but well, it works this
way.

-- 
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 manage static contents/pages along with gwt?

2010-11-05 Thread Y2Kenny
I have been using Django with GAE/Python and recently I have been
considering switching to GAE/J and GWT. My questions are

1) Is there a way to do hierarchical templating similar to the Django
template system?

2) How do you manage static contents with/along with GWT in general?

I have been digging around quite a bit but I haven't been able to find
something satisfactory. Here's a summary of the possible solution (I
don't know if my conclusion of them are accurate though since I am not
that familar with java tech.)

a) Use various java frameworks/template engine (Spring, FreeMarker,
StringTemplate, Velocity, etc) but is it possible to mix use these
with GWT?

b) Use Django with Jyphon... but then I am not really using GWT
+servlet any more right? (And lose things like GWT RPC?)

c) Use JSP straight ... but there doesn't seem to be hierarchical
template. As I type this I did some search and some have referenced
Tile (http://stackoverflow.com/questions/490390/jsp-template-
inheritance) does that work well with GWT?

d) Use GWT UiBinder. Base on the description of the dev guide, this
seems to be exactly what I needed but then the examples I see are
small and it seems to be best suited for layout of widget as oppose to
a page. And using UiBinder means that the page is still js generated
right? (not crawlable, etc?)

Again, some of the conclusion above could be wrong since I am new to
the server side java tech. Please correct me if they are inaccurate.

-- 
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: Application works in devlopment mode but not in war file

2010-11-05 Thread branni
Yes, it is at the stack trace.

Tip:
Tipical difference between hosted mode and a deployed app the async
methods problems. You'd like to use the result of the method before
that return with the value.



Sorry for my bad English...

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



CompositeCell and hiding Cells Problem

2010-11-05 Thread Ümit
I have an issue with the CompositeCell in a CellTable. My
CompositeCell consists of 3 ActionCells and a SelectionCell.
However the difference to a normal behaviour of a  CompositeCell is
that I don't show all Cells at the same time but based on some state
in a domain object. Here is what I try to achieve:

Initial State
Second Stage After pressing on Save/Cancel
|  NEW  |  -> (press on NEW ActionCell) -> | SELECTION SAVE CANCEL |
-> | NEW |

So after pressing on the NEW ActionCell it should be hidden and the
SelectionCell and the SAVE/CANCEL ActionCells should be shown. After I
press on SAVE or CANCEL again only the NEW ActionCell should be shown.

For the ActionCells i just  override the render method of the Cell to
either not render the cell or to render it based on the state in my
domain object.
This looks like this:

public static class NewActioncell extends ActionCell {
public NewActioncell(String
text,com.google.gwt.cell.client.ActionCell.Delegate
delegate) {
super(text, delegate);
}

   @Override
   public void render(MyObject value, Object key, SafeHtmlBuilder sb)
{
if (value.getIsNew())  // get the state
super.render(value, key, sb);
}
}

The code for the Save and Cencel Action Cells is basically the same
apart from the fact that in the render method i will render the cells
if value.getIsNew() == false
The delegate action just sets the IsNew flag on the MyObject and calls
refresh on the DataProvider.

So far everything works as expected. As soon as I press on the NEW
Button, the NEW Button is hidden and only the CANCEL and SAVE buttons
are shown.

Now I also want to display a Select Box when SAVE and CANCEL are
shown. The Problem with the SelectionCell is that it is bound to
String as the Generic Type, so I can't access MyObject in its render
method.
My workaround is now to override the   void render method of the
CompositeCell and hide the SelectionCell there. This looks something
like that:

public static class CustomCompositeCell extends
CompositeCell {
public CustomCompositeCell(List> hasCells) {
super(hasCells);
}

@Override
protected  void render(MyObject value, Object
key,SafeHtmlBuilder sb, HasCell hasCell) {
if (!(hasCell.getCell() instanceof SelectionCell) ||
(value.getIsNew()))   // check Cell and State
{
super.render(value, key, sb, hasCell);
}
}
}

So now the SelectionCell is displayed as soon as I press on the NEW
Button. However I get an exception in hosted and in production mode as
soon as I press on cancel or save.
The error is:

Chrome: com.google.gwt.core.client.JavaScriptException: (TypeError):
Cannot read property 'nextSibling' of null
Firefox: elem is null [Break on this error] var sib =
elem.nextSibling;

I managed  to trace the problem back to the resetFocus method of the
CompositeCell class:

 @Override
  public boolean resetFocus(Element parent, C value, Object key) {
Element curChild =
getContainerElement(parent).getFirstChildElement();
for (HasCell hasCell : hasCells) {
  // The first child that takes focus wins. Only one child should
ever be in
  // edit mode, so this is safe.
  if (resetFocusImpl(curChild, value, key, hasCell)) {
return true;
  }
  curChild = curChild.getNextSiblingElement();
}
return false;
  }


It seems that the loop goes through all 4 Cells but one call of
getNextSiblingElement() returns null. The interesting part is that the
exception only happens when I add the selectionCell to CompositeCell.
It seems that not rendering an ActionCell by overriding its render
method doesn't cause a problem. However overriding the render method
of the CompositeCell to not render the SelectionCell causes this
Exception in the resetFocus method.

Is this a potential bug or is my approach of hiding Cells in a
CompositeCell flawed. Maybe there is a better approach.

Thanks in advance

Uemit

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



Download not working

2010-11-05 Thread Bruno Santos
The following download is not working:
http://code.google.com/p/google-web-toolkit/downloads/detail?name=Tutorial-Contacts2-2.1.zip&can=2&q
=

-- 
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's Event class behaves differently in IE or FF for "keypress" event

2010-11-05 Thread Sorinel C
- Open this page: http://www.quirksmode.org/js/keys.html  with both
browsers (Internet Explorer and Firefox).
- Choose the "keypress" event for Testing.
- Click on a numeric key (0,1,2,3 ... 9)

You'll see that the FF and IE have different results.

* IE for key "2"
keypress
keyCode is 50
charCode is undefined

* FF for key "2"
keypress
keyCode is 0
charCode is 50

* Chrome for key "2"
keypress
keyCode is 50
charCode is 50

So, it seems that Chrome is the nicest browser here -- but why do we
have this discrepancy?  shouldn't the Event class (which is a wrapper
on NativeEvent) provide the same results like Chrome for any browser?

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.



Roo Gwt 2.1 DialogBox Activity

2010-11-05 Thread Patrick Hilsbos
Hi,
I have an roo-generated gwt project that deals with requestfactory editordriver 
and so on.
now i want to move e.g. the create or edit part of an proxy to a dialog box 
(actually its rendered to a area of my layoutpanel).
whats the best practice to do that?

thanks in advance!
patrick


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



Using REST with GWT

2010-11-05 Thread Andreas
We're start a project using gwt 2.1. What is the best way to
communicate with a rest interface. Especially how to batch multiple
requests and how to cache response on the client using webstorage or
other client side technics.

-- 
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.4 Way to query browser window's document area size in onModuleLoad

2010-11-05 Thread magic
Hi,

I am looking for a way to query the size of the browser's document
window when onModuleLoad is called. I have tried

Element body = RootPanel.getBodyElement();
int clientWidth = body.getClientWidth();
int clientHeight = body.getClientHeight();

body.getClientWidth() gives the correct width, but
body.getClientHeight always returns 0. In fact all queries on body
having to do with height return 0.

I had similar problems in pure javascript with

dw = document.body.offsetWidth;
dh = document.body.offsetHeight;

I overcame it there with the following:

  // IE does not appear to support window.innerHeight.
  if (typeof(window.innerHeight) == 'number')
dh = window.innerHeight;
  else if (document.documentElement &&
document.documentElement.clientHeight)
dh = document.documentElement.clientHeight;
  else if (document.body & document.body.clientHeight)
dh = document.body.clientHeight;

Anyway to do something similar via GWT?

-Mark

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



Tree with I18N

2010-11-05 Thread xworker
Hi

I am wondering how to build a TreeItem with I18N and not have
different tokens for a menu item.

If I build a TreeItem like this:

 @UiField
Tree tree;

TreeItem customer = new TreeItem(customerGroup");
   customer.addItem("searchCustomer");
   customer.addItem("create");
   customer.setState(true);

tree.clear();
   tree.addItem(customer);


  @UiHandler("tree")
  public void onSelection(SelectionEvent event) {
eventBus.fireEvent(event);
   }
the ValueChange token I get when a user clicks the "create" node is
"create" and then I get code like

 public void onValueChange(ValueChangeEvent event) {
  String token = event.getValue();
 if(token.equals("create")
{
CreateCustomerView create = new CreateCustomerView(eventBus,
 customerService);
   content.setContent(create);
}
...

But what if I want to have different languages in the TreeItem nodes,
then I want something other then the text as a token, perhaps an id.
Can I solve this with the Places pattern from the MVP pattern, and if
so how does that work?

-- 
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: DecoratedPopupPanel VS DialogBox

2010-11-05 Thread alexoffspring
- DialogBox can be Dragged and Dropped by default while the DPP
cannot.
- DB has center() and SetText() Method; DPP uses show().
- I cannot see the possibility to extend them in order to have the
'minimize'/'maximize'/'close'   button like a desktop window (as in
SmartGWT).

Anymore?



On 3 Nov, 09:55, alexoffspring  wrote:
> 1) What's the difference?
>
> 2) Which are the PROs and CONs of each one?
>
> 3) Is it possible to extend them in order to add the three icons
> 'minimize'/'maximize'/'close' like a normal desktop window?

-- 
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: Handling ClickEvents with custom composite widgets

2010-11-05 Thread Amir Kashani
I'm not sure I completely followed your example, but have you tried
event.getSource()? It'll be == to the widget that originated the
event. So, if you attach the same ClickHandler to all of the widgets,
you could use it to differentiate between the sources.

- Amir

On Nov 4, 11:58 am, nathan  wrote:
> I have a DockLayoutPanel consisting of two classes, LeftPanel and
> RightPanel.
>
> LeftPanel consists of several custom widget composites of a CheckBox
> and three Buttons.
>
> When a CheckBox in the LeftPanel is checked/unchecked, information is
> displayed/removed from the RightPanel.
>
> The problem I am having is how to handle different ClickEvents within
> the composite widget. As it is now, I just listen for one of the
> composite widgets to be clicked in the LeftPanel, then display/remove
> the information in the RightPanel based on the state of the CheckBox
> of that widget.
>
> How do I listen for, and differentiate between, one of the Buttons
> being clicked?

-- 
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: extending PushButton results in "invalid child namespace" error in UIBinder

2010-11-05 Thread Amir Kashani
Instead of  use 

The namespace of the child element must match that of its parent.

- Amir

On Nov 4, 5:47 pm, KaffeineComa  wrote:
> I have a simple class that extends PushButton to add a tooltip-like
> popup. It seems that if I try to use this class in UIBinder with
> PushButton's upFace, I get an "invalid child namespace" error:
>
>   toolTipText="previous lesson">
>       
>             previous lesson
>       
>   
>
> I have the namespace defined properly as
> xmlns:widgets='urn:import:com.example.widgets', and this works fine
> until I add the  child element.
>
> It was also working fine as:
>
>  
>       
>             previous lesson
>       
>   
>
> It seems to only be a problem with a custom PushButton subclass that
> also specifies a child element.
>
> Thanks for any pointers.

-- 
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 1.7 - Development Environment using Eclipse, unable to find on classpath

2010-11-05 Thread Panke
It is called WatchdogMain.gwt.xml (with a lowercase D) and is located
at de/spenarion/Watchdog

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