Re: CellTable column and cell style

2011-11-02 Thread divStar
Thank you very much!

I still got a question though: I want to change the style of the
CellTable-header depending on whether the attribute "visible" of
ColumnEx (derived from Column) is set to true or false.
Everytime a column is meant to be hidden or shown, the setter
"setVisible" of the column is called. Is there a way to assign a style
depending on this attribute?

If it was a regular widget, I might have added a custom attribute and
added that to the CSS via selector. However: this does not work here
as I am not able to "getElement()" of that Column.

Thank you once again. I hope you can help me with this problem I have.
Overriding the CSSResource of the CellTable was definitely the right
thing - thank you!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@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 set the path to SDK relatively in Eclipse

2011-11-02 Thread Rikard Hultén
Is it classpath variables you're looking for?

in eclipse 
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftasks-114.htm

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/A396_Ubqi2oJ.
To post to this group, send email to google-web-toolkit@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.4 MVP tutorial

2011-11-02 Thread Brandon Donnelson
Maybe another angle here:
http://code.google.com/p/gwt-examples/wiki/DemoActivitiesAndPlaces

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/r01z0dVmZ5IJ.
To post to this group, send email to google-web-toolkit@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: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-11-02 Thread Brandon Donnelson
I have solved the word data pasting problem. Wahoo! Now to set it up in a 
demo. 

http://code.google.com/p/gwt-examples/source/browse/trunk/GoneVertical-Core/src/org/gonevertical/core/client/input/richtext/WiseRichTextArea.java#179

Brandon Donnelson 
http://gwt-examples.googlecode.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/4MzXweFdeOwJ.
To post to this group, send email to google-web-toolkit@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: Activities and Places - Handling several views

2011-11-02 Thread Brandon Donnelson
My demo and source might help. 
http://code.google.com/p/gwt-examples/wiki/DemoActivitiesAndPlaces

http://code.google.com/p/gwt-examples/source/browse/#svn%2Ftrunk%2FWalletInventory%2Fsrc%2Fcom%2Fgonevertical%2Fclient%2Fapp%2Factivity
 
- activities

Hope that helps,
Brandon Donnelson
http://gwt-examples.googlecode.com


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/vddUxLT7DoAJ.
To post to this group, send email to google-web-toolkit@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: MVP Pattern

2011-11-02 Thread Brandon Donnelson
Here is a demo and source I put together:
http://code.google.com/p/gwt-examples/wiki/DemoActivitiesAndPlaces

There is another project in the sdk samples, called expenses demo. Its 
linked on the mvp pages and is great too.

Hope that helps,
Brandon Donnelson
http://gwt-examples.googlecode.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/OD8PN9eRB_YJ.
To post to this group, send email to google-web-toolkit@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 running "mobilewebapp" sample in 2.4

2011-11-02 Thread Karthik Reddy
I am following the instructions as documented at:

http://google-web-toolkit.googlecode.com/svn/trunk/samples/mobilewebapp/README-MAVEN.txt
 
  (OptionA)


I am able to build the application but as I try to run it in hosted mode 
(using AppEngine)  I get the following error on the browser :

*Http Error 500*

*No realm*

*RequestURI=/MobileWebApp.html*

I suspect this has to do with  access privileges and so forth. Did anyone 
else run into this issue ?

Any pointers/thoughts on what might be going on would be much appreciated. 

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



Google Web Toolkit for Web and Mobile development

2011-11-02 Thread dkgcb
I came across the information that if you want to develop the site
that would serve smart device users, you need to develop site
specifically for mobile users. Does anyone care to share if it is
possible to develop a site that would serve desktop and mobile devices
using the GWT?

-- 
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-toolkit@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 change GWT.xml with maven profile by a GWT project

2011-11-02 Thread Hilco Wijbenga
On 2 November 2011 12:15, Gary S  wrote:
> It's not clear. gwt-maven-plugin user's guide
> http://mojo.codehaus.org/gwt-maven-plugin/user-guide/project.html
> has a screenshot eclipse package explorer of gwt.xml in src/main/
> resources then under Multi-project setup a text diagram with gwt.xml
> in src/main/java

Yes, this is the setup you should follow. If you use Maven you
can/should ignore the weird setup that GWT recommends (mixing source
and compiled output and including JARs in SCM).

> Then 
> http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html
> shows
> 
>  
>  
>  
> 
>
> Why inherit its own name?

Probably a typo, I suspect it should be inheriting from WorkingModule.

> I could build in Eclipse but Hudson couldn't find my module. What
> finally worked was adding a module property like this
>                        
>                         
>                                org.codehaus.mojo
>                                gwt-maven-plugin
>                                ${gwt-maven-plugin.version}
>                                
>                                  xxx.xxx.xxx.xxxClient
>                                        
> xxx.xxx.xxx/xxxclient.html
>                                        
> ${webappDirectory}
>                                
> Which I found after endless googling here
> http://jgonian.wordpress.com/2011/02/24/efficient-gwt-development-swap-your-gwt-xml-with-maven/

This is what I use (GWT Maven Plugin 2.3.0-1 / GWT 2.4.0):


  org.codehaus.mojo
  gwt-maven-plugin
  
/index.html

${project.build.directory}/${project.artifactId}

${project.build.directory}/${project.artifactId}
true
${env.IP_GWT_HOSTED_MODE_PORT}
true
  
  

  com.google.gwt
  gwt-dev
  ${gwt.main.version}

  


It's part of my parent POM and works for all of my GWT projects
*without changes*. Try it out and see how it works for you. I don't
use the  element but it doesn't look very portable (i.e.
reusable by other GWT projects without changes).

-- 
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-toolkit@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: Game Development Resources for GWT

2011-11-02 Thread James Butler
If anyone else knows of online tutorials, books, or other game resources 
for GWT, please reply here and list them for me. 
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/vMYEcNZik1kJ.
To post to this group, send email to google-web-toolkit@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 + EJB

2011-11-02 Thread Alvin Reyes
Hi,

I do think this is possible.

I do have experience in EJB and also tried GWT. What I'm thinking is you
can create a server side wrapper that calls business components - much like
creating a business locator utility that will locate your EJBs on the
server side (you can find a lot of tutorials with this). Then you need to
import your stubs / references to your GWT application.

Theres a lot of tutorials in the internet for EJB and GWT, just pick up the
pieces and you'll surely mold these 2 great technologies. :)


On Thu, Nov 3, 2011 at 3:15 AM, ph09  wrote:

> Hello,
>
> I want to use EJB in my GWT Application, but I coulnd't find a current
> Tutorial. I am new to the topic of EJB's and with GWt I have worked the
> last months. At the moment I have got some RPC Calls in my GWT Application
> and this works. Is it's possible in GWT to use EJB and if yes would it be
> difficult to install?
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/3_KJXXPkkScJ.
> To post to this group, send email to google-web-toolkit@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.
>



-- 
*Alvin P. Reyes*,
Oracle Certified Professional, Java Programmer
Oracle Certified Professional, Java Web Component Developer
Oracle Certified Professional, Java Business Component Developer
Software Engineer

Blog: http://alvinjayreyes.wordpress.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-toolkit@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: Does GWT 1.7 support Class.getSimpleName()?

2011-11-02 Thread Patrick Tucker
Rate the issue up:
http://code.google.com/p/google-web-toolkit/issues/detail?id=1944

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/BpfjJmR59FwJ.
To post to this group, send email to google-web-toolkit@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: SVG scaling appears broken in IE9

2011-11-02 Thread Thad
Sorry, the first drawImage method was missing the context.drawImage
call.

  void drawImage(Context2d context) {
context.save();
context.scale(scale, scale);
context.drawImage(imageElement, 0, 0);
context.restore();
  }

On Nov 2, 2:21 pm, Thad  wrote:
> I believe that this is not directly GWT's problem. It's IE's problem.
> However I'll let folks know in case they want to venture down this
> road.
>
> The Context2d scaling methods are broke in IE9. Using GWT 2.3, I'm
> drawing an Image into a Canvas widget. The image is larger than the
> target, so I'm scaling it. With either of the approaches below, the
> image displays in Firefox 7.0.1, Safari 5, and Chrome 13. The image
> does **not** display in IE9.
>
>   void drawImage(Context2d context) {
>     context.save();
>     context.scale(scale, scale);
>     context.restore();
>   }
>
> or
>
>   void drawImage(Context2d context) {
>     context.save();
>     context.drawImage(imageElement, 0, 0,
>                 scale*(double)image.getWidth()-10,
>                 scale*(double)image.getHeight()-10);
>     context.restore();
>   }
>
> scale was computed as
>
>   image = new Image(...
>   image.addLoadHandler(new LoadHandler() {
>     public void onLoad(LoadEvent event) {
>       imageElement = (ImageElement)image.getElement().cast();
>       scale = Math.min((double)width/(double)image.getWidth(),
>                   (double)height/(double)image.getHeight());
>       scale = Math.min(scale, 1.0);
>       drawImage(imageContext);
>     }
>   });
>
> I'll add that context.drawImage(imageElement, 0, 0, width, height)
> does work in IE, but of course depending on my image I may get a
> distorted width:height ratio.
>
> SVG is a new thing with IE9. Hopefully it will be right in IE10.

-- 
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-toolkit@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 + EJB

2011-11-02 Thread András Csányi
On 2 November 2011 20:15, ph09  wrote:
> Hello,
> I want to use EJB in my GWT Application, but I coulnd't find a current
> Tutorial. I am new to the topic of EJB's and with GWt I have worked the last
> months. At the moment I have got some RPC Calls in my GWT Application and
> this works. Is it's possible in GWT to use EJB and if yes would it be
> difficult to install?

On one hand, there is a project called gwtejb looking for it on the internet.

On the other hand, the Stockwatcher [1] example provides you good
basics because when you finish this tutorial you will have have a
servlet. In my application the servlet calls the session beans and the
beans deal with the entities.

http://code.google.com/webtoolkit/doc/1.6/tutorial/RPC.html

But, here is another example. I didn't try it, but it looks like well detailed.
http://www.javacodegeeks.com/2010/09/gwt-ejb3-maven-jboss-51-integration.html

But I would like to warn you I'm not a big java and JEE geek, so you
should wait other, well experienced guys' answers or you should google
it.

-- 
- -
--  Csanyi Andras (Sayusi Ando)  -- http://sayusi.hu --
http://facebook.com/andras.csanyi
--  ""Trust in God and keep your gunpowder dry!" - Cromwell

-- 
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-toolkit@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 change GWT.xml with maven profile by a GWT project

2011-11-02 Thread Gary S
It's not clear. gwt-maven-plugin user's guide
http://mojo.codehaus.org/gwt-maven-plugin/user-guide/project.html
has a screenshot eclipse package explorer of gwt.xml in src/main/
resources then under Multi-project setup a text diagram with gwt.xml
in src/main/java

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

  
  
  


Why inherit its own name?

I could build in Eclipse but Hudson couldn't find my module. What
finally worked was adding a module property like this

 
org.codehaus.mojo
gwt-maven-plugin
${gwt-maven-plugin.version}

  xxx.xxx.xxx.xxxClient

xxx.xxx.xxx/xxxclient.html

${webappDirectory}

Which I found after endless googling here
http://jgonian.wordpress.com/2011/02/24/efficient-gwt-development-swap-your-gwt-xml-with-maven/

-- 
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-toolkit@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 + EJB

2011-11-02 Thread ph09
Hello,

I want to use EJB in my GWT Application, but I coulnd't find a current 
Tutorial. I am new to the topic of EJB's and with GWt I have worked the 
last months. At the moment I have got some RPC Calls in my GWT Application 
and this works. Is it's possible in GWT to use EJB and if yes would it be 
difficult to install?


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/3_KJXXPkkScJ.
To post to this group, send email to google-web-toolkit@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: MVP Pattern

2011-11-02 Thread Thad
I recommend you read about activities and places at
http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html
There are some links to older MVP articles and examples there. Be
warned the new stuff--activities and place--is slightly altered from
the older examples, but both are helpful.

On Nov 2, 2:03 am, Alberto Jesús Rubio Sánchez 
wrote:
> Hi,
>
> I have recently started to develop with GWT in Eclipse and I want to
> use the MVP pattern. I create a new module and select the option for
> use MVP. Eclipse generates a lot of packages: activity, mvp, place,
> ui, server.
>
> Someone could tell me the use of each?
>
> Regards,
>
> Alberto J.

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



SVG scaling appears broken in IE9

2011-11-02 Thread Thad
I believe that this is not directly GWT's problem. It's IE's problem.
However I'll let folks know in case they want to venture down this
road.

The Context2d scaling methods are broke in IE9. Using GWT 2.3, I'm
drawing an Image into a Canvas widget. The image is larger than the
target, so I'm scaling it. With either of the approaches below, the
image displays in Firefox 7.0.1, Safari 5, and Chrome 13. The image
does **not** display in IE9.

  void drawImage(Context2d context) {
context.save();
context.scale(scale, scale);
context.restore();
  }

or

  void drawImage(Context2d context) {
context.save();
context.drawImage(imageElement, 0, 0,
scale*(double)image.getWidth()-10,
scale*(double)image.getHeight()-10);
context.restore();
  }

scale was computed as

  image = new Image(...
  image.addLoadHandler(new LoadHandler() {
public void onLoad(LoadEvent event) {
  imageElement = (ImageElement)image.getElement().cast();
  scale = Math.min((double)width/(double)image.getWidth(),
  (double)height/(double)image.getHeight());
  scale = Math.min(scale, 1.0);
  drawImage(imageContext);
}
  });

I'll add that context.drawImage(imageElement, 0, 0, width, height)
does work in IE, but of course depending on my image I may get a
distorted width:height ratio.

SVG is a new thing with IE9. Hopefully it will be right in IE10.

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



multiarray in typed constants ?

2011-11-02 Thread fred forst
hello all
With Useful for localizing typed constant values , I would know it's
possible to typed multiarray such as

public interface MenuConstants extends Constants
{

@DefaultStringValue("Nom")  //OK
String nom();

@DefaultStringArrayValue //OK
({"titre", "titre 2" })
String [] titreCategorie();

@DefaultStringArrayValue  //no ok error  syntaxe ???
({"titre", "titre 2" } ,
{"titre", "titre 2" }  )
String [] [] titreAutre();

}

thanks you

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@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.



Activities and Places - Handling several views

2011-11-02 Thread Antoine DESSAIGNE
Hi everyone,

I have some trouble managing Activity and Places with several views.

The application is similar to an email client, it has 3 views:

- View A: The list of all the folders

- View B: The list of all the message within a folder

- View C: The message content

If the user loads the application, with no URL token, the views should be
defined like this:

- The View A should contain the list of all folders

- The Views B and C should be empty

If the user loads a message, let say through the URL with the
"message-1234" token, all the views should be updated:

- The View A should highlight the folder that contains this message

- The View B should highlight the message within this folder

- The View C should display the content of the message

Do you have any ideas on how to do that?

Thanks a lot!

Antoine.

-- 
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-toolkit@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 create a shared lib/utility class (client/server) ?

2011-11-02 Thread Jens
Ah well ok that works. I have already done this in a different context 
(globally overwriting a GWT client class), don't know why it doesn't came 
into my mind :)

The only "small issue" that remains is that Eclipse always shows the VM 
implementation when clicking into the source code (jar library only 
contains VM .class + .java files and emulated GWT .java files without class 
files). Would be nice if Eclipse would jump to the emulated client source 
code but I don't think its possible. 
Although its working it just feels a bit odd if you suddenly see java.net.* 
classes if you use the lib only on client side.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/3As7Q6QLjMEJ.
To post to this group, send email to google-web-toolkit@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: Need to store a hashmap in memory to keep the counters for different user

2011-11-02 Thread Jeff Chimene
On 11/01/2011 11:50 PM, Waqas Sadiq wrote:
> Hi,
> 
> I am working on storing different user counters in memory at
> application level (not database) and to have  counters to atmost 3.
> 
> I developed this code using a singleton class with hashmap to store a
> key value pair of user id and and it's counter and time.
> 
> After initial, i was using this singleton class on client side, it
> worked fine for counters but when browser was refreshed, a new
> singleton object was created.
> 
> I searched, and come to know that for security reason, javascript
> don't use shared objects, so i moved it to rpc call and make it server
> side object to overcome it, but when i tested it again, on refresh new
> object is created and data lost.

That's expected behavior. You'll want to retrieve the stored data at
application startup.

> I also tested the static hashmap to hold the data for application
> scope, but it has almost the same behavior, once refreshed the
> browser, its reset and old data is lost in it. It little different
> behavior from normal java web apps where we follow this approach.
> 
> Does any one know how can i keep object at application scope in gwt ?

Can you restrict your app to browsers that support local storage?

In no way will the static storage class solve the problem you're describing.

-- 
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-toolkit@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 change GWT.xml with maven profile by a GWT project

2011-11-02 Thread Hilco Wijbenga
On 2 November 2011 06:20, Kotuboy  wrote:
> Currently, i am working on a gwt-maven project. As every GWT project, it has
> the following gwt.xml
>
>>     
>>     
>>     
>>    .
>>    .
>>    ...
>
> I created another gwt.xml to set configuration for continous integration.
> (as defined here.)
>
>>     
>>         
>>         
>>    .
>>    .
>>    ...
>
> and here is my pom to manage the profiles and change the gwt.xml.
>
>>     
>>   ci
>>         
>>       
>>             
>>           org.codehaus.mojo
>>           gwt-maven-plugin
>>           
>>   com.myCompany.myProject
>>       OBF
>>           
>>       
>>     
>>      
>>
>>     
>
>
>
> If i try to package the project with profile ci (mvn package -Pci), i get
> the following error.
>
>     [ERROR] Failed to execute goal
> org.codehaus.mojo:gwt-maven-plugin:2.3.0-1:compile (default) on project
> MyProject: GWT Module com.myCompany.myProject not found in project sources
> or resources. -> [Help 1]
>
> Where is the problem? How can i solve it?

Isn't "not found" very clear? Maven cannot find your gwt.xml file. Did
you put it in src/main/resources?

-- 
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-toolkit@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: TabIndex Using UIBinder

2011-11-02 Thread BM
Thanks Thomas. You are awesome!

I think we tried tabIndex='0' and so on.. But the focus went from the
first textbox to the browser address bar and then came back to second.
Not sure if I had something wrong setup.


On Nov 2, 10:31 am, Thomas Broyer  wrote:
>  ?
> There's a setTabIndex(int) so there's no reason it wouldn't 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-toolkit@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: future of gwt & who use gwt

2011-11-02 Thread VisualFox
Thank you for sharing Thomas.

Visualfox.me is a small design and strategy firm and we use GWT since
few years now. Our use of GWT is unorthodox as we focus more on the
visual/design aspect. Actually I think that one of the strength of GWT
which is currently totally underused and underestimated. I was one of
the participant at the developer sandbox at google IO 2010 and while I
tried my best to highlight the benefit of GWT I noticed two things:
- Current GWT developer are generally part of big to medium
corporation and are mostly aiming to translate some legacy software to
an intranet/extranet
- Startup and younger developer tend to don't really care about GWT
mostly because none of the app they use daily are built with GWT (they
went to Google IO for chrome and android)

Our most recent work done with GWT is t3ll.me:
http://t3ll.me/I+AM+AWESOME/BECAUSE+I+AM+MADE+OF+GWT
http://t3ll.me/I+am+not+your+average+and+boring+url/you+should+try+it(red)/(yellow)lol+@+url+are+not+awesome(blue)

t3ll.me use VisualFox-FX and Bold which let you resize any HTML
element to fit in a given box (try to resize your browser while
playing with t3ll.me and you will get the idea).

On Oct 31, 4:52 pm, darkflame  wrote:
> For the original posters question of GWT applications out there, I can
> offer two of my own modest pieces of work
>
> http://www.rateoholic.co.uk
> (A website for reviewing stuff, the whole interface is GWT with a
> MySQL/PHP backend)
>
> http://www.cuyperscode.com/cuyperscode/CuypersCode2/CCIIstart.html
> (A online dutch adventure game I was commisioned to make the code for,
> when the login comes up you can go "Log in als gastspeler!" to play as
> guest and test out the interface.)
>
> Both of these still have bugs to iron out, but without GWT it would
> probably have been utterly impossible for a single person to have made
> these, and be cross browser compatible.
>
> -Thomas Wrobel
>
> On Oct 31, 4:16 pm, Brandon Donnelson  wrote:
>
>
>
>
>
>
>
> > I initial had this thought when it came out but then found the future is
> > bright for GWT. I'm seeing extensive development planned and in progress
> > for GWT after reading posts from the engineers. Even if and when it
> > development does trend to dart, its really similar migration and I believe
> > GWT just might translate to DART.
>
> > My two cents :)
> > Brandon Donnelsonhttp://gwt-examples.googlecode.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-toolkit@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: We want you for GQuery

2011-11-02 Thread Kayode Odeyemi
On Wed, Nov 2, 2011 at 3:18 PM, Julien Dramaix wrote:

> Dear community,
>
> The second release of GQuery is currently out. GQuery is now still
> much better than before and includes nice features like jquery Ajax
> syntax which enable to access most of the jQuery API.
> We are conviced that GQuery can, at certain level, make GWT
> developers' life easier. However, there is still lot of work to do and
> we have several ideas that we would like to implement towards the
> improvements of the quality and the usefulness of GQuery.
> Unfortunately, we believe that our current development team is not
> enough to deliver you these improvements in an acceptable time frame.
> That's why today we request for your help. If you have some free time
> and you would like to contribute to GQuery, just let us know.
> We have a few tasks that we can assign to you. Some task may take one
> hour, other tasks may take several days. They are related to the
> different aspect of a project.
> e.g. :
> - improve documentation and code examples
> - write new plugins or port existing jQuery plugins
> - improve testing of the library by implementing missing junit tests.
> - Enumerate and/or implement the remaining JQuery API methods to
> implement
> - Give some ideas/tips/snippets in order to improve/enhance/refactor
> the library
> - Reporting issues and bugs ;)
>
> If you are interested, please reply to this post or send me a mail
> ( julien.dramaix_at_gmail)  Please indicate which tasks you will be
> interested to work in.
>
> Well, I have been looking forward to this project getting to a matured
stage. Since hands are now required, I will like to help.

I will be willing to help in the areas of " improve testing of the library
by implementing missing junit tests."

Regards

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


-- 
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde

-- 
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-toolkit@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: TabIndex Using UIBinder

2011-11-02 Thread Thomas Broyer
 ?
There's a setTabIndex(int) so there's no reason it wouldn't work.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/669fb-Bhcd4J.
To post to this group, send email to google-web-toolkit@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: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-11-02 Thread Brandon Donnelson
Oh yea, I forgot to say thanks :)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/tZ4T-TeWdWYJ.
To post to this group, send email to google-web-toolkit@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: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-11-02 Thread Brandon Donnelson
I ripped the source out so I could create the work around needed for a 
project. I'll submit a issue later.

http://code.google.com/p/gwt-examples/source/browse/#svn%2Ftrunk%2FGoneVertical-Core%2Fsrc%2Forg%2Fgonevertical%2Fcore%2Fclient%2Finput%2Frichtext%2Fworkaround
 
- I just added to the hookEvents(). I also changed all the imports and 
native code to reflect new location. 

More tomorrow.
Brandon Donnelson
http;//gwt-examples.googlecode.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/8SXhzSy9o7kJ.
To post to this group, send email to google-web-toolkit@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.



TabIndex Using UIBinder

2011-11-02 Thread BM
Hi,
How to assign Tab Index inside a UIBinder XML file to a textbox field
in GWT? I am using GWT 2.3.

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



We want you for GQuery

2011-11-02 Thread Julien Dramaix
Dear community,

The second release of GQuery is currently out. GQuery is now still
much better than before and includes nice features like jquery Ajax
syntax which enable to access most of the jQuery API.
We are conviced that GQuery can, at certain level, make GWT
developers' life easier. However, there is still lot of work to do and
we have several ideas that we would like to implement towards the
improvements of the quality and the usefulness of GQuery.
Unfortunately, we believe that our current development team is not
enough to deliver you these improvements in an acceptable time frame.
That's why today we request for your help. If you have some free time
and you would like to contribute to GQuery, just let us know.
We have a few tasks that we can assign to you. Some task may take one
hour, other tasks may take several days. They are related to the
different aspect of a project.
e.g. :
- improve documentation and code examples
- write new plugins or port existing jQuery plugins
- improve testing of the library by implementing missing junit tests.
- Enumerate and/or implement the remaining JQuery API methods to
implement
- Give some ideas/tips/snippets in order to improve/enhance/refactor
the library
- Reporting issues and bugs ;)

If you are interested, please reply to this post or send me a mail
( julien.dramaix_at_gmail)  Please indicate which tasks you will be
interested to work in.

Cheers,

The GQuery team

-- 
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-toolkit@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: I can't get RichTextAre OnPaste Event hooking|sinking to work?

2011-11-02 Thread darkflame
Fantastic work!
I cant try it out right now, but I've bookmarked for later.
This is going to be VERY usefull.

You might also have been the first guy online to work this out based
on my (long) Googleing on this over the last month or so ;)

On Nov 2, 3:33 am, Brandon Donnelson  wrote:
> I found a nice hack to get the onpaste to work: I modified the source to
> try it.
>
>   // my inherited RichTextArea
>   public WiseRichTextArea(boolean hideBorderUntilHover, boolean grow) {
>     super();
>     setup(hideBorderUntilHover, grow);
>   }
>
>   private void setup(boolean hideBorderUntilHover, boolean grow) {
>     this.hideBorderUntilHover = hideBorderUntilHover;
>     this.grow = grow;
>
>     addStyleName("gv-core-WiseRichTextArea");
>
>     setUpEditHover();  
>
>     setupHandlers();
>
>     sinkEvents(Event.ONPASTE);
>   }
>
>   @Override
>   public void onBrowserEvent(Event event) {
>     super.onBrowserEvent(event);
>     switch (event.getTypeInt()) {
>     case Event.ONPASTE:
>       System.out.println("Paste Detected");
>       Window.alert("Paste Works!!! Yippie!!!");
>       break;
>     }
>   }
>
> My hack:
>
> // RichTextAreaImplSafari.java source hack
>  @Override
>   protected native void hookEvents() /*-{
>     var elem = 
> th...@com.google.gwt.user.client.ui.impl.RichTextAreaImpl::elem;
>     var wnd = elem.contentWindow;
>
>     elem.__gwt_handler = function(evt) {
>       if (elem.__listener) {
>         if 
> (@com.google.gwt.user.client.impl.DOMImpl::isMyListener(Ljava/lang/Object;)­(elem.__listener))
>  {
>           
> @com.google.gwt.user.client.DOM::dispatchEvent(Lcom/google/gwt/user/client/­Event;Lcom/google/gwt/user/client/Element;Lcom/google/gwt/user/client/Event­Listener;)(evt,
>  elem, elem.__listener);
>         }
>       }
>     };    
>
>     wnd.addEventListener('keydown', elem.__gwt_handler, true);
>     wnd.addEventListener('keyup', elem.__gwt_handler, true);
>     wnd.addEventListener('keypress', elem.__gwt_handler, true);
>     wnd.addEventListener('mousedown', elem.__gwt_handler, true);
>     wnd.addEventListener('mouseup', elem.__gwt_handler, true);
>     wnd.addEventListener('mousemove', elem.__gwt_handler, true);
>     wnd.addEventListener('mouseover', elem.__gwt_handler, true);
>     wnd.addEventListener('mouseout', elem.__gwt_handler, true);
>     wnd.addEventListener('click', elem.__gwt_handler, true);
>
>     // Whats needed . this works.
>     wnd.addEventListener('paste', elem.__gwt_handler, true);
>
>     // Focus/blur event handlers. For some reason, [add|remove]eventListener()
>     // doesn't work on the iframe element (at least not for focus/blur). Don't
>     // dispatch through the normal handler method, as some of the querying we 
> do
>     // there interferes with focus.
>     wnd.onfocus = function(evt) {
>       if (elem.__listener) {
>         
> @com.google.gwt.user.client.DOM::dispatchEvent(Lcom/google/gwt/user/client/­Event;Lcom/google/gwt/user/client/Element;Lcom/google/gwt/user/client/Event­Listener;)(evt,
>  elem, elem.__listener);
>       }
>     };
>
>     wnd.onblur = function(evt) {
>       if (elem.__listener) {
>         
> @com.google.gwt.user.client.DOM::dispatchEvent(Lcom/google/gwt/user/client/­Event;Lcom/google/gwt/user/client/Element;Lcom/google/gwt/user/client/Event­Listener;)(evt,
>  elem, elem.__listener);
>       }
>     };
>   }-*/;
>
> I'll submit all the source tomorrow.
>
> Brandon Donnelsonhttp://gwt-examples.googlecode.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-toolkit@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.



Opinions: GWT 2.x layout system - goal achieved?

2011-11-02 Thread Yaakov
Hi all,

I am curious to hear people's opinions regarding the xxxLayoutPanel,
i.e., GWT 2.x layout system.

One of the first stated goals regarding the "new" system was:
"Perfectly predictable layout behavior. Precision layout should be
possible."

What has been your experience with this? Has that goal been achieved?

I find it ironic that it now (post GWT 2.0) takes more tinkering with
CSS to get it to look the same in all browsers. Was this the intended
consequence?

Curious as to what people's opinions are on this.

Thanks,
-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-toolkit@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 create a shared lib/utility class (client/server) ?

2011-11-02 Thread Thomas Broyer
You have to use 'super-source'. See "Overriding one package implementation 
with another" at 
http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/-5Asqsl6Y3QJ.
To post to this group, send email to google-web-toolkit@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 set the path to SDK relatively in Eclipse

2011-11-02 Thread Joel
Is it possible to set this path relative to the install path or the
workspace path ?

Instead of :

C:\eclipse\plugins\com.google.gwt.eclipse.sdkbundke_2.4.0...\gwt-2.4.0

I would like seeing something like :

${install}\plugins\com.google.gwt.eclipse.sdkbundke_2.4.0...\gwt-2.4.0

or

${workspace}\..\plugins
\com.google.gwt.eclipse.sdkbundke_2.4.0...\gwt-2.4.0


Thanks in advance.
Joel.

-- 
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-toolkit@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: future of gwt & who use gwt

2011-11-02 Thread Armishev, Sergey
I think even Google underestimates the power of GWT in such area as
refactoring existing MFC C++/Java-Swing GUI clients into Web based. I
rewrote MFC C++ client into GWT in a month.  And most of the heavy
business logic/calculations been just copy/paste from original C++.
Can't imagine amount of work needed for such app if you use JavaScript

 

-Sergey

 

From: google-web-toolkit@googlegroups.com
[mailto:google-web-toolkit@googlegroups.com] On Behalf Of David Chandler
Sent: Tuesday, November 01, 2011 11:49 AM
To: google-web-toolkit@googlegroups.com
Subject: Re: future of gwt & who use gwt

 

Hi Warren,

 

Glad you found my SenchaCon slides (thanks, Thomas--I should have posted
them here, too). Let me put some context around "fewer releases, less
overhaul." Sencha's Darrell Meyer and Sven Brunken did a huge
refactoring of Ext GWT last year to make it more compatible with
mainline GWT. This was in part necessitated by all the major changes in
GWT since 2.1: Cell widgets, Activities & Places, RequestFactory /
AutoBeans, etc. The GWT team has heard from the community quite a few
times "please slow down and just make it solid," and we're listening.

 

As to the first point ("Google is heavily invested"), many of Google's
largest projects are built with GWT, and it is widely used within the
company. Because GWT is open source, the community will continue to
benefit from all the work that Google does on GWT in support of our own
projects. This remains one of the great benefits of using GWT.

 

I apologize for the relative silence on this issue. In general, Google
is very careful about making public commitments of any kind and rarely
discusses future plans, in part because plans are subject to change.

 

/dmc

 

On Fri, Oct 28, 2011 at 11:32 PM, Warren Tang 
wrote:

The following line is also important:

(GWT) Aiming for fewer releases, less overhaul.

Regards,
Warren Tang 




On Saturday, October 29, 2011 11:04:09 AM, Thomas Broyer wrote:

David Chandler recently put his SenchaCon slides online:
http://www.dartlang.org/slides/2011/10/senchacon/index.html#39

"What about GWT?
Google is heavily invested"

-- 
You received this message because you are subscribed to the Google
Groups "Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/uEDf1hXzb6AJ.
To post to this group, send email to
google-web-toolkit@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-toolkit@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.





 

-- 
David Chandler
Developer Programs Engineer
w: http://code.google.com/

b: http://turbomanage.wordpress.com/
t: @googledevtools

 

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


_
This electronic message and any files transmitted with it contains
information from iDirect, which may be privileged, proprietary
and/or confidential. It is intended solely for the use of the individual
or entity to whom they are addressed. If you are not the original
recipient or the person responsible for delivering the email to the
intended recipient, be advised that you have received this email
in error, and that any use, dissemination, forwarding, printing, or
copying of this email is strictly prohibited. If you received this email
in error, please delete it and immediately notify the sender.
_

-- 
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-toolkit@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 create a shared lib/utility class (client/server) ?

2011-11-02 Thread Jens
Hi,

I am trying to implement a small utility class / library that should be 
useable on client side and on server side but has different implementation 
on client and server.

For example I have a utility method that should make a http REST call. On 
client side I should use RequestBuilder but on server side I have to use 
java.net.* classes. How would I do that?

I tried the factory approach in combination with GWT.isScript() but this 
didn't work because the GWT compiler still sees java.net.* classes and 
wants to translate them:

public class SharedUtils {
  private static final SharedUtilsFactory FACTORY = GWT.isScript() ? 
   new SharedUtilsFactoryJS() : new SharedUtilsFactoryVM();

  public static RequestUtils requestUtils() {
return FACTORY.requestUtils();
  }

}

Shouldn't this somehow be possible?

Thanks for help,

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/0Vun73wjMvcJ.
To post to this group, send email to google-web-toolkit@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-App totally blocks Browser-UI

2011-11-02 Thread Paul Robinson

Sounds like you're creating a tree with too many items. (How many?)

Maybe you need some lazy creating of tree items.

Paul

On 02/11/11 11:27, tanteanni wrote:

thx,

are there any examples how to use scheduleIncremental? I don't want/can't to 
split the work that has to be done manually but i want to give the browser a 
chance to do other stuff - is it possible to interrupt a task for some time?
In my case the main work has two parts: loading of data (one ArrayList 
containing the tree structure) and creating a tree widget with it. but 
splitting the work in this two parts wouldn't be enough - the second part alone 
could block a browser on a slow machine for up to 10seconds - very bad.
(optimizing the code or give back some work to server is part of another 
discussion - not to be led here)
--
You received this message because you are subscribed to the Google Groups "Google 
Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/OsqLAj1awYIJ.
To post to this group, send email to google-web-toolkit@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-toolkit@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: problems with loading stuff/bootstrapping onModuleLoad triggered by an event

2011-11-02 Thread tanteanni
At the moment i read your last post/ understood the problem i knew that you 
tried it several times - i saw all your vehement efforts to get it into my 
brain (but some times brains don't want to see :-) ).

i just refactored my code - in fact i haven't changed much (i already had 
some scheduler stuff in my code). Because all my tasks are done on 
construction time (gin injected stuff, ApplicationManager registers himself 
to onTaskDoneEvents in constructor)  i got rid of the public start() 
method. Now i only have a private start called in the way you suggested it:
...
@Override
public void onTopicTreeLoadedEvent(TopicTreeLoadedEvent event) {
ttReady = true;
start();
}
..
@Override
public void onAdminUnitsLoaded(AdminUnitsLoadedEvent event) {
auReady = true;
start();
}
...
private void start() {
if (ttReady && auReady) {
Scheduler.get().scheduleFinally(new ScheduledCommand() {

@Override
public void execute() {
// set up activity managers

sidePanelAreaManager.setDisplay(contentArea.getWestSideArea());

breadCrumbAreaManager.setDisplay(contentArea.getBreadcrumArea());

contentMenuAreaManager.setDisplay(contentArea.getContentMenuArea());

contentAreaManager.setDisplay(contentArea.getContentArea());
// insert dynamic layout in static layout
staticView.getContentArea().setWidget(contentArea);
contentArea.setDefaultLayout();
historyHandler.register(placeController, eventBus, 
startPlace);
historyHandler.handleCurrentHistory();
currentPlace = placeController.getWhere();
}
});

}
}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/u1L5T1n491sJ.
To post to this group, send email to google-web-toolkit@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 change GWT.xml with maven profile by a GWT project

2011-11-02 Thread Kotuboy
Currently, i am working on a gwt-maven project. As every GWT project, it 
has the following gwt.xml


> 
> 
>.
>. 
>...
>

I created another gwt.xml to set configuration for continous integration. 
(as defined 
here
.)


> 
> 
>.
>. 
>...
>

and here is my pom to manage the profiles and change the gwt.xml.


>   ci
> 
>   
> 
>   org.codehaus.mojo
>   gwt-maven-plugin
>   
>   com.myCompany.myProject
>   OBF
>   
>   
> 
>  
> 
> 
>



If i try to package the project with profile ci (mvn package -Pci), i get 
the following error.

[ERROR] Failed to execute goal 
org.codehaus.mojo:gwt-maven-plugin:2.3.0-1:compile (default) on project 
MyProject: GWT Module com.myCompany.myProject not found in project sources 
or resources. -> [Help 1]



Where is the problem? How can i solve it?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Ce8prFlUT3AJ.
To post to this group, send email to google-web-toolkit@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: problems with loading stuff/bootstrapping onModuleLoad triggered by an event

2011-11-02 Thread Thomas Broyer


On Wednesday, November 2, 2011 1:46:53 PM UTC+1, tanteanni wrote:
>
> Thank YOU Thomas,
>
> i guess now i got it
>

Thank God!
 

> - i don't have to "schedule" the data-loading but all the other stuff that 
> need to be properly "initialized", right?
>

Yes. Where did you read about deferring data-loading?
1st message: "defer continueStart() a bit more so it executes outside the 
event handling logic, within a Scheduler.scheduleFinally() for instance"
2nd message: "You need to defer the handleCurrentHistory() call outside the 
event dispatching; but you can actually defer the whole continueStart if 
you prefer"
3rd message: "Delay it (either just handleCurrentHistory() or the whole 
continueStart()) with Scheduler#scheduleFinally"
4th message: "then launch continueStart, but slightly deferred"

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/bq1CLZ0vuEYJ.
To post to this group, send email to google-web-toolkit@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.



Exception thrown by FlexTable

2011-11-02 Thread David Illescas
Hello. I am fairly new to GWT but really enjoying its use. I have the
following dilemma.

I build a FlexTable using and define the contents of its first row as
follows:

fts.setText(0,0,"Passenger ID");
fts.setText(0, 1, "Source Floor");
fts.setText(0,2, "Destination Floor");

update(index);

The update index is responsible for finishing the initialization.
Inside it has a for loop of the following form:

for(int i = 1; i <= data.passenger_destinations.size(); ++i){
fts.setText(i,0,"Passenger " +
i);
<
fts.setText(i,1,
Integer.toString(data.passenger_origins.get(i-1)+1));
fts.getCellFormatter().setHorizontalAlignment(i,
1,HasHorizontalAlignment.ALIGN_CENTER);
fts.setText(i,2,
Integer.toString(data.passenger_destinations.get(i-1)+1));
fts.getCellFormatter().setHorizontalAlignment(i,
2,HasHorizontalAlignment.ALIGN_CENTER);
}

That is about all the code dealing with the FlexTable. However, when
the code is run, at some point during its execution I get the
following exception:

21:22:34.733 [ERROR] [visualizer] Uncaught exception escaped
com.google.gwt.dev.shell.HostedModeException: Something other than an
int was returned from JSNI method
'@com.google.gwt.user.client.ui.HTMLTable::getDOMRowCount(Lcom/google/
gwt/user/client/Element;)': JS value of type null, expected int

That seems clear enough, but when I look at the stack trace, I see
that it happens on the line with the arrow above, and is thrown by the
FlexTable when it tries to get the row count. I am wondering if anyone
knows what is going on, or how to proceed in investigating the matter.
The full stack trace follows.


 at com.google.gwt.dev.shell.JsValueGlue.getIntRange(JsValueGlue.java:
266)
at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:144)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeInt(ModuleSpace.java:
247)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeInt(JavaScriptHost.java:
75)
at
com.google.gwt.user.client.ui.HTMLTable.getDOMRowCount(HTMLTable.java)
at
com.google.gwt.user.client.ui.HTMLTable.getDOMRowCount(HTMLTable.java:
1250)
at
com.google.gwt.user.client.ui.FlexTable.getRowCount(FlexTable.java:
151)
at
com.google.gwt.user.client.ui.FlexTable.prepareRow(FlexTable.java:246)
at
com.google.gwt.user.client.ui.FlexTable.prepareCell(FlexTable.java:
218)
at com.google.gwt.user.client.ui.HTMLTable.setText(HTMLTable.java:
1117)
at com.eece419.visualizer.client.ElevatorDataPanel
$ElevatorWidgets.update(ElevatorDataPanel.java:286)
<-the call to the for loop
at com.eece419.visualizer.client.ElevatorDataPanel
$ElevatorWidgets.access$0(ElevatorDataPanel.java:248)
<-- The call to update()
at com.eece419.visualizer.client.ElevatorDataPanel
$Floortabs.update(ElevatorDataPanel.java:180)
at
com.eece419.visualizer.client.ElevatorDataPanel.update(ElevatorDataPanel.java:
52)
at com.eece419.visualizer.client.Visualizer
$2.onSuccess(Visualizer.java:94)
at com.eece419.visualizer.client.Visualizer
$2.onSuccess(Visualizer.java:1)
at
com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:
232)
at
com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:
287)
at com.google.gwt.http.client.RequestBuilder
$1.onReadyStateChange(RequestBuilder.java:395)
at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
172)
at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:
337)
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
218)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
136)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
561)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
269)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessio

Need to store a hashmap in memory to keep the counters for different user

2011-11-02 Thread Waqas Sadiq
Hi,

I am working on storing different user counters in memory at
application level (not database) and to have  counters to atmost 3.

I developed this code using a singleton class with hashmap to store a
key value pair of user id and and it's counter and time.

After initial, i was using this singleton class on client side, it
worked fine for counters but when browser was refreshed, a new
singleton object was created.

I searched, and come to know that for security reason, javascript
don't use shared objects, so i moved it to rpc call and make it server
side object to overcome it, but when i tested it again, on refresh new
object is created and data lost.

I also tested the static hashmap to hold the data for application
scope, but it has almost the same behavior, once refreshed the
browser, its reset and old data is lost in it. It little different
behavior from normal java web apps where we follow this approach.

Does any one know how can i keep object at application scope in gwt ?

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



MVP Pattern

2011-11-02 Thread Alberto Jesús Rubio Sánchez
Hi,

I have recently started to develop with GWT in Eclipse and I want to
use the MVP pattern. I create a new module and select the option for
use MVP. Eclipse generates a lot of packages: activity, mvp, place,
ui, server.

Someone could tell me the use of each?

Regards,

Alberto J.

-- 
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-toolkit@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: problems with loading stuff/bootstrapping onModuleLoad triggered by an event

2011-11-02 Thread tanteanni
Thank YOU Thomas,

i guess now i got it - i don't have to "schedule" the data-loading but all 
the other stuff that need to be properly "initialized", right? Thanks for 
your patience (i is probably not the first time i say thx for your patience 
:-)). 

i just wanted jens to ask what happens if dataReady is not ready - i guess 
nothing? but for interest: my code above (using scheduleEntry) would work, 
wouldn't it?


i'll will refactor my code 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/ZIU6mIG7AVMJ.
To post to this group, send email to google-web-toolkit@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: Style individual cells on a VerticalPanel

2011-11-02 Thread Sudhakar Abraham
Create the id property on the global css file in your application.
Change the background-color of id property using  "hover Selector ".
Adds  style name to this object using addStyleName(). Each image is
added in individual veticalpanel  Try the below example

 .gwt-HorizontalPanel
{
   background-color: yellow;
   color: black;
   font-size: 24pt;
 }
.gwt-HorizontalPanel:hover
 {
 background-color: red;
 text-decoration: none;
}


S. Abraham
www.DataStoreGwt.com
Persist objects directly in Google App Engine

On Nov 1, 1:16 pm, gerry  wrote:
> Hi all,
>
> I have laid some images vertically, using a VerticalPanel. I would
> like to use a rollover effect, changing the background of a cell
> whenever the user hovers it. Is this possible by using a
> VerticalPanel? I didn't find something similar to this in its
> documentation
>
> Thanks a lot

-- 
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-toolkit@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: Mouse click not working on ListGrid

2011-11-02 Thread Sudhakar Abraham
You wrote the code as smartgwt. It is generally not good idea to mix
gwt widgets
with smartgwt widgets. Use corresponding widget in smartgwt.

S. Abraham
www.DataStoreGwt.com
Persist objects directly in Google App Engine


On Nov 1, 5:40 pm, David Fernando  wrote:
> I have a strange problem and i am sure it is just simple mistake of
> some kind but i cant really find it and i dont really know what to
> search.
> I create a new window with VerticalPanel in it. Inside this Vertical
> Panel i put TabSet with SelectItem component. The problem is that
> clicking on drop down is not working. Same situation is when i put
> ListGrid inside, RecordClickHandler and RecordDoubleClickHandler are
> not working at all (but RowContextClickHandler works).
>
> public class Sample implements EntryPoint {
>         public void onModuleLoad() {
>         //Without verticalPanel - works !
>         SelectItem s1 = new SelectItem();
>         s1.setTitle("Test List");
>         s1.setMultiple(true);
>         s1.setMultipleAppearance(MultipleAppearance.PICKLIST);
>         s1.setValueMap("a", "b", "c");
>             DynamicForm c1 = new DynamicForm();
>             c1.setItems(s1);
>             TabSet topTabSet = new TabSet();
>             topTabSet.setTabBarPosition(Side.TOP);
>             topTabSet.setWidth(800);
>             topTabSet.setHeight(150);
>             Tab t1 = new Tab("Tab1");
>             Tab t2 = new Tab("Tab2");
>             t2.setPane(c1);
>             topTabSet.addTab(t1);
>             topTabSet.addTab(t2);
>             Window window2 = new Window();
>         window2.setAutoSize(true);
>         window2.setTitle("Without VerticalPanel");
>         window2.setWidth(640);
>         window2.setHeight(480);
>         window2.setCanDragReposition(true);
>         window2.setCanDragResize(true);
>         window2.addItem(topTabSet);
>         window2.show();
>         //With verticalPanel - not working !
>         SelectItem s2 = new SelectItem();
>         s2.setTitle("XXX");
>         s2.setMultiple(true);
>         s2.setMultipleAppearance(MultipleAppearance.PICKLIST);
>         s2.setValueMap("d", "e", "f");
>             DynamicForm c2 = new DynamicForm();
>             c2.setItems(s2);
>             TabSet topTabSet2 = new TabSet();
>             topTabSet2.setTabBarPosition(Side.TOP);
>             topTabSet2.setWidth(800);
>             topTabSet2.setHeight(150);
>             Tab t11 = new Tab("Tab1");
>             Tab t22 = new Tab("Tab2");
>             t22.setPane(c2);
>             topTabSet2.addTab(t11);
>             topTabSet2.addTab(t22);
>         VerticalPanel vp = new VerticalPanel();
>         vp.add(topTabSet2);
>         Window window = new Window();
>         window.setAutoSize(true);
>             window.setTitle("With VerticalPanel");
>             window.setWidth(640);
>             window.setHeight(480);
>             window.centerInPage();
>             window.setCanDragReposition(true);
>             window.setCanDragResize(true);
>             window.addItem(vp);
>         window.show();
>         }
>     }

-- 
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-toolkit@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: problems with loading stuff/bootstrapping onModuleLoad triggered by an event

2011-11-02 Thread Thomas Broyer
Grrr.

onModuleLoad() {
   // launch task 1
   // launch task 2
   // display wait message, or whatever
}

onTask1Finished() {
task1Finished = true;
maybeContinue();
}

onTask2Finished() {
task2Finished = true;
maybeContinue();
}

maybeContinue() {
if (task1Finished && task2Finished) {
   // we're running from an event dispatch so handlers we add to the 
EventBus are deferred, and firing an event synchronously wouldn't trigger 
them, so we defer the whole thing
   Scheduler.get().scheduleFinally(new ScheduledCommand() {
  @Override
  public void execute() {
 // create your activity handlers, then:
 historyHandler.handleCurrentHistory();
  }
   });
}
}

The first 3 methods you already have, the last one too, just missing that 
damn Scheduler bit; i.e. 5 damn lines.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/JLkTwwU0F7QJ.
To post to this group, send email to google-web-toolkit@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: problems with loading stuff/bootstrapping onModuleLoad triggered by an event

2011-11-02 Thread Jens

>
> the problem i have with the code you suggested is: how to implement 
> "//wait"
>

Put the label into your RootPanel like in the original code. I was a bit 
lazy and didn't want to retype it.
 

> as stated before my first implementation with an (infinite) while loop 
> could block the whole browser. 
>

As javascript is executed on a single thread you never want an infinite 
while loop. This will always block the browser. You just want to react to 
events.
 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/jvSPrZEFDkwJ.
To post to this group, send email to google-web-toolkit@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: Hi All,

2011-11-02 Thread smiletolead
Hi Prasad
  Can you provide a prototype to reproduce the issue?

Thanks,
Ganesh

On Nov 1, 2:37 pm, prasad korrapati 
wrote:
> I am new to the GWT . i am able to run my GWT application in firefox
> and IE also . but when i run my application in Google-chrome the
> category table in my application is not clickable (When i leave the
> browser and went to the other browser for 5 minutes).This is what
> happening in Chrome Browser only.
>
> Please help me .
> 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-toolkit@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-App totally blocks Browser-UI

2011-11-02 Thread tanteanni
thx,

are there any examples how to use scheduleIncremental? I don't want/can't 
to split the work that has to be done manually but i want to give the 
browser a chance to do other stuff - is it possible to interrupt a task for 
some time? 
In my case the main work has two parts: loading of data (one ArrayList 
containing the tree structure) and creating a tree widget with it. but 
splitting the work in this two parts wouldn't be enough - the second part 
alone could block a browser on a slow machine for up to 10seconds - very 
bad.
(optimizing the code or give back some work to server is part of another 
discussion - not to be led here)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/OsqLAj1awYIJ.
To post to this group, send email to google-web-toolkit@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: problems with loading stuff/bootstrapping onModuleLoad triggered by an event

2011-11-02 Thread tanteanni
THX for this explanation Jens!

the problem i have with the code you suggested is: how to implement "//wait"

as stated before my first implementation with an (infinite) while loop 
could block the whole browser. So whats about the other kinds of 
scheduleXXX? Whats about the code i showed above - using  "scheduleEntry"? 
According do Javadoc "scheduleEntry" is exactly what i need, but i am 
unsure how to use it.


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/lyGmS_rDSU0J.
To post to this group, send email to google-web-toolkit@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: problems with loading stuff/bootstrapping onModuleLoad triggered by an event

2011-11-02 Thread Jens
Using SimpleEventBus the following does not behave like you expect:

eventBus.addHandler(FirstEvent.TYPE, new FirstHandler() {
  void onFirstEvent(FirstEvent e) {
//will be enqueued to be added. So handler is not fully registered
eventBus.addHandler(SecondEvent.TYPE, new SecondHandler() {
   void onSecondEvent(SecondEvent e) {
  sysout("second event")
   }
}
//wont trigger handler from above
eventBus.fire(new SecondEvent());
sysout("first event done");
  }
});

The output would be "first event done" and you wont see "second event" on 
the console. As Thomas said handlers that you add to the event bus while an 
event is actually dispatched (in this case FirstEvent) will cause the 
SimpleEventBus to put the new handler into a queue. After all events are 
dispatched the contents of this queue is added to the list of known 
handlers ready to be executed. But as all events are already dispatched 
these new handlers wont get executed.

And thats exactly what happens with your original code. Once your 
DataReceiver has finished loading your data you fire an event 
"OnSometimeEvent". The handler of this event calls continueStart() which in 
turn adds a handler to the event bus via historyHandler.register(...) and 
then fires a second event via historyHandler.handleCurrentHistory(). 
Because you register the history handler while your OnSometimeEvent gets 
dispatched this handler will be stored in a queue in SimpleEventBus. Then 
the second event will be dispatched (fired by 
historyHandler.handleCurrentHistory()) and after this event has been 
executed the handler in the queue will be added to the list of known 
handlers.

To solve this you either have to refactor your code in a way that all 
handlers are registered to the event bus before OnSometimeEvent is fired or 
you have to break your code execution flow by taking the continueStart() 
method and defer it until OnSometimeEvent has been dispatched.

So:

public void start() {
  if(dataReady) {
Scheduler.get().scheduleFinally(
  //
  continueStart();
 );
  } else { //wait }
}

should do the trick. If scheduleFinally does not work try scheduleDeferred 
which executes the code even later. If you want to understand the Scheduler 
class you should read something about the browser event loop.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/9OARWz2xSVoJ.
To post to this group, send email to google-web-toolkit@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: problems with loading stuff/bootstrapping onModuleLoad triggered by an event

2011-11-02 Thread tanteanni
i found a bit of info about scheduler 
here. 
now i got:

"private boolean tryToContinue() {
if (ttReady && auReady) {
continueStart();
return false;
} else
return true;
}

public void start() {
Scheduler.get().scheduleEntry(new RepeatingCommand() {

@Override
public boolean execute() {
return tryToContinue();
}
});
"
i used "scheduleEntry" because of Javadoc: "This type of command is 
appropriate for instrumentation or code that needs to know when "something 
happens." "
But i am unsure about my implementation/ my understanding about scheduler - 
is the code above correct?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/lzoQaeWpE8kJ.
To post to this group, send email to google-web-toolkit@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-App totally blocks Browser-UI

2011-11-02 Thread Paul Robinson

Javascript is single threaded, so you shouldn't do too much in one go.

You can use Scheduler.get().scheduleIncremental(repeatingCmd) to do some work 
in pieces. If the problem is that it's slow while dealing with large RPC 
messages, then you may need smaller messages.

HTH
Paul

On 02/11/11 09:57, tanteanni wrote:

At the start of my App the Browser has to load some stuff and create some data objects 
(Trees). The Problem is, that this blocks the the whole browser (no tab switching no 
reaction on user interactions, even my animated loading.gif is not loaded/animated). In 
swing applications the is a "SwingWorker" to keep the ui running - for example 
to display a progress bar.
But how to achieve this with GWT? My guess is to use Scheduler some how?! I 
want to get the loading more in background and keep the browser more 
responsive. But how to do this?


thx 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-toolkit@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 expand with CompositeCell - Example or HowTo?!

2011-11-02 Thread guevaradelaserna
Yes this was really helpful! Now I understand it in general! Thank you! 

I try to apply it to example 2 of 
http://code.google.com/intl/de-DE/webtoolkit/doc/latest/DevGuideUiCellWidgets.html#celltree
 In 
this example the leafs are added to a list. How I have to modify this 
function? What's the best way to get started or could you give me a short 
explanation? 

Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/5A6zj1sBrfYJ.
To post to this group, send email to google-web-toolkit@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-App totally blocks Browser-UI

2011-11-02 Thread tanteanni
At the start of my App the Browser has to load some stuff and create some 
data objects (Trees). The Problem is, that this blocks the the whole 
browser (no tab switching no reaction on user interactions, even my 
animated loading.gif is not loaded/animated). In swing applications the is 
a "SwingWorker" to keep the ui running - for example to display a progress 
bar.
But how to achieve this with GWT? My guess is to use Scheduler some how?! I 
want to get the loading more in background and keep the browser more 
responsive. But how to do this?


thx in advance


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/WwjzFmFE0kQJ.
To post to this group, send email to google-web-toolkit@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: problems with loading stuff/bootstrapping onModuleLoad triggered by an event

2011-11-02 Thread tanteanni

ok, thx thomas it begins to become clearer,

my code attached don't use scheduler, thats right. meanwhile (thx to you 
thomas) i played with Scheduler and Timer. The current code looks like:
"
public void start() {

Timer timer = new Timer() {

@Override
public void run() {
if (ttReady && auReady) {
continueStart();
this.cancel();
}
  else {
  System.out.println("waiting: " + ttReady + " " + 
auReady);
  }

  }
};

timer.scheduleRepeating(1000);
   
}
"
but the feeling about this code is not better than the feeling with my 
infinite loop. i think the problem is, that i don't really understand the 
backgrounds - especially the scheduler. could you please show me some 
sample code for my special problem (how should start() look like?) or give 
some reference to docs explaining the scheduler/the model behind it?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/fwqvnb84yH4J.
To post to this group, send email to google-web-toolkit@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.