Loading Javascript menu with GWT 2.0
Hi, I've a small application made with GWT 2.0 + UI Binder with MVP pattern. I'm using a css premade template with a menu that is animated by jquery. In order to avoid to rewrite css I'd like to use the menu that is something this: ul id=navigation class=sf-navbar li a href=index.php Dashboard /a ul li a href=# Administration /a /li li a href=#Forms/a /li li a href=#Tables/a /li li ... ... I've wrote this code in my view with uiBinder. BUT the problem is that this menu is animated by this javascript: $(document).ready(function() { // Navigation menu $('ul#navigation').superfish({ delay: 1000, animation: {opacity:'show',height:'show'}, speed: 'fast', autoArrows: true, dropShadows: false }); $('ul#navigation li').hover(function(){ $(this).addClass('sfHover2'); }, function(){ $(this).removeClass('sfHover2'); }); Also if I load this script in MainEntryPoint.html is doesn't work!! Neither if I load the script in the UIBinder. So I don't know how I can do work this example! THanks very much Best 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-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 uiBinder not completely working with DockPanelLayout (for me that is)
Hi, I had the same problem. Actually, I want to put on the right side of the screen a widget that can have different size. Is there a way to specify a dynamic size ? Thanks On 25 jan, 02:50, Phil mikan...@gmail.com wrote: Hi Joe, I tried the code you pasted. I think your problem is the size of your g:west element. You defined unit as EM in the g:DockLayoutPanel, so the west panel is 210em. I changed the g:west size=20 to 20em, and the Body and South areas showed up. They had been pushed far to the right before (remember, LayoutPanels use absolute positioning). Let me know if this helped. Cheers Phil On Jan 25, 4:26 am, Joe Hudson joe...@gmail.com wrote: Hello, I am new to GWT 2.0 and was trying out the uiBinder. I have a simple test project to get my feet wet and it isn't working as expected. I am only seeing the north and west sections in FireFox (not the center and south sections) and in IE I see nothing at all. Could anyone please help me understand what I am doing wrong? I do see the DOM for the missing sections (center and south) in Firebug but can't understand why they are not showing up. Thank you very much. -- FILES - public class Test implements EntryPoint { @Override public void onModuleLoad() { RootLayoutPanel.get().add(new MainPanel()); }} public class MainPanel extends Composite { interface MyUiBinder extends UiBinderDockLayoutPanel, MainPanel { } private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class); public MainPanel() { initWidget(uiBinder.createAndBindUi(this)); }} -- ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' g:DockLayoutPanel unit='EM' g:north size='5' g:LabelTop/g:Label /g:north g:center g:LabelBody/g:Label /g:center g:west size='210' g:LabelWest/g:Label /g:west g:south size=3 g:LabelSouth/g:Label /g:south /g:DockLayoutPanel /ui:UiBinder -- 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: MVP Question
Hi Ronald, I would recommend to ways: You should configure two GIN modules. One for authorization type A and one for B. This will allow you to configure the dependency in different ways. The authorization type will become a global property of your application. In your EntryPoint, you could have something like this: switch(authorization) { case A: ginjectorA.getPresenter(); // will create a presenter and its dependent view for auth type A case B: ginjectorB.getPresenter(); // will create a presenter and its dependent view for auth type B } You should always recognize that each 'Ginjector' is a couple of configurations. It could look like this: @GinModules({ModuleA.class}) public interface GinjectorA extend Ginjector { Presenter getPresenter() } @GinModules({ModuleB.class}) public interface GinjectorB extend Ginjector { Presenter getPresenter() } So your ModuleA's configure method can look like this: public void configure() { bind(Presenter.class).to(MyPresenter.class); bind(View.class).to(ViewA.class); } ModuleB looks similar. The benefit of this solution is, that you can do the same for other views and dependencies too. You've got just one point where the global information of the authorization type comes in. The second way would be to create a provider that does the job. Your presenter gets a dependency to the provider and the provider's 'get' method does the check. A provider is similar to a factory, but it isn't one. The idea of DI is to keep your code clean and in both cases it is done. Regards Jan Ehrhardt On Mon, Jan 25, 2010 at 6:15 PM, rmuller rmul...@xiam.nl wrote: Hi Jan. Guess what .. I am reading Dependency Injection (Dhanji R. Prasanna) at this moment :) So this was one of the things why I doubt my design. But I really do not understand how DI (GIN) should be applied in my case: - A Presenter uses several Views. The view depends on the authorization (implemented as enum). Now I do something like: switch (authorization) { case A: view = new View(fieldSpecA); break; case B: // etc } Regards, Ronald On 25 jan, 17:18, Jan Ehrhardt jan.ehrha...@googlemail.com wrote: The reason, why another class creats both and than puts the view into the presenter is called Dependency Injection. It is a widely used pattern, that means that you should inject dependencies into classes instead of using factories or doing something like 'new DependentClass()' in the constructor. In the best case, your presenter refers to a view interface and gets its view implementation injected. The easiest way of doing Dependency Injection in GWT is GIN ( http://code.google.com/p/google-gin). It allows you to configure dependencies and let GIN do the creation of objects and put one into another at runtime. Dependency Inection is one of the best practices in GWT (and Java too) development (http://www.youtube.com/watch?v=PDuhR18-EdM) Regards Jan Ehrhardt On Mon, Jan 25, 2010 at 2:54 PM, rmuller rmul...@xiam.nl wrote: Should not the Presenter create the view? Sometimes you need different views (based on authorization data in my case) where you can reuse the Presenter. I let the Presenter decide which view to use. I do this in the ctor. In all examples I see however, the Presenter and View are created by the parent Presenter/AppContext. Also every View has its own Presenter (1 : 1). So I wonder if my design is correct. What is the general opinion about this? Ronald -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT 2.0 ParseException with SerializationPolicyLoader
Hi, I am having trouble with GWT 2.0. I am trying to switch from 1.7 to 2.0, everything compiles fine, but... When I deploy my app I (unfortunately) have my rpc servlets in a different path. Don't ask me why, I simply can't change this. So my RPC servlets are /somewhere/here and my GWT app is being loaded from /somewhere/completely/different/dont/ask/me/why/ Well, since loading the gwt.rpc file was miserable failing, I simply created my own doGetSerializationPolicy method that loads the rpc files from classpath. Since GWT 2.0 this is failing with different errors: someones not being found, someones throwing parseexception. Is there any document explaining what has changed with 2.0? brgds, Papick -- 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: MVP Question
Thank you all for the good advice. I am glad I posted the question! You convinced me going the DI route. I will try with and without GIN. I will let you know or post an follow-up question :) (not this week). Regards, Ronald On Jan 26, 10:03 am, Jan Ehrhardt jan.ehrha...@googlemail.com wrote: Hi Ronald, I would recommend to ways: You should configure two GIN modules. One for authorization type A and one for B. This will allow you to configure the dependency in different ways. The authorization type will become a global property of your application. In your EntryPoint, you could have something like this: switch(authorization) { case A: ginjectorA.getPresenter(); // will create a presenter and its dependent view for auth type A case B: ginjectorB.getPresenter(); // will create a presenter and its dependent view for auth type B } You should always recognize that each 'Ginjector' is a couple of configurations. It could look like this: @GinModules({ModuleA.class}) public interface GinjectorA extend Ginjector { Presenter getPresenter() } @GinModules({ModuleB.class}) public interface GinjectorB extend Ginjector { Presenter getPresenter() } So your ModuleA's configure method can look like this: public void configure() { bind(Presenter.class).to(MyPresenter.class); bind(View.class).to(ViewA.class); } ModuleB looks similar. The benefit of this solution is, that you can do the same for other views and dependencies too. You've got just one point where the global information of the authorization type comes in. The second way would be to create a provider that does the job. Your presenter gets a dependency to the provider and the provider's 'get' method does the check. A provider is similar to a factory, but it isn't one. The idea of DI is to keep your code clean and in both cases it is done. Regards Jan Ehrhardt On Mon, Jan 25, 2010 at 6:15 PM, rmuller rmul...@xiam.nl wrote: Hi Jan. Guess what .. I am reading Dependency Injection (Dhanji R. Prasanna) at this moment :) So this was one of the things why I doubt my design. But I really do not understand how DI (GIN) should be applied in my case: - A Presenter uses several Views. The view depends on the authorization (implemented as enum). Now I do something like: switch (authorization) { case A: view = new View(fieldSpecA); break; case B: // etc } Regards, Ronald On 25 jan, 17:18, Jan Ehrhardt jan.ehrha...@googlemail.com wrote: The reason, why another class creats both and than puts the view into the presenter is called Dependency Injection. It is a widely used pattern, that means that you should inject dependencies into classes instead of using factories or doing something like 'new DependentClass()' in the constructor. In the best case, your presenter refers to a view interface and gets its view implementation injected. The easiest way of doing Dependency Injection in GWT is GIN ( http://code.google.com/p/google-gin). It allows you to configure dependencies and let GIN do the creation of objects and put one into another at runtime. Dependency Inection is one of the best practices in GWT (and Java too) development (http://www.youtube.com/watch?v=PDuhR18-EdM) Regards Jan Ehrhardt On Mon, Jan 25, 2010 at 2:54 PM, rmuller rmul...@xiam.nl wrote: Should not the Presenter create the view? Sometimes you need different views (based on authorization data in my case) where you can reuse the Presenter. I let the Presenter decide which view to use. I do this in the ctor. In all examples I see however, the Presenter and View are created by the parent Presenter/AppContext. Also every View has its own Presenter (1 : 1). So I wonder if my design is correct. What is the general opinion about this? Ronald -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs cr...@googlegroups.comgoogle-web-toolkit%2Bunsubs 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.comgoogle-web-toolkit%2Bunsubs 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
Re: How to write a simple overlay implementation?
Your create method is returning an Element - not an SVGPanel... I'd personally start with a Widget (not a JavascriptObject) and use GWT DOM methods (these will be optimised for each of the supported browsers)... I have the same problem as you - going from a JS world to a GWT/Java world sometimes seems (or is) over complicated... Cheers, Dave On Jan 25, 7:22 pm, markww mar...@gmail.com wrote: Hi, I'd like to make some really simple overlay classes in GWT to wrap some SVG stuff. I'd basically like to get a rectangle drawn, this is how I do it in javascript: var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); svg.setAttribute('width', '100%'); svg.setAttribute('height', '100%'); document.body.appendChild(svg); var rect = document.createElementNS('http://www.w3.org/2000/ svg','rect'); rect.setAttribute(width,300); rect.setAttribute(height,100); svg.appendChild(rect); and now I'm having trouble translating that to GWT. I was hoping I could do a really thin overlay around all those calls, something like this: public class SVGPanel extends JavaScriptObject { protected SVGPanel() {} public static native SVGPanel create(String width, String height) / *-{ var svg = document.createElementNS('http://www.w3.org/2000/ svg', 'svg'); svg.setAttribute('width', width); svg.setAttribute('height', height); return svg; }-*/; } public MyProject implements EntryPoint { public void onModuleLoad() { SVGPanel panel = SVGPanel.create(100%, 100%); Document.get().getBody().appendChild(panel); } } yeah but I do not have a grasp on how we can jump from the javascript representation of the SVG stuff to GWT java classes. For one, the SVGPanel class extends JavaScriptObject, but I can't simply add it to the Document body class because it's expecting an Element type. If someone could just point out the right way to do that bridge I should be able to get going after that. Also, I'm not sure if this the optimal way to incorporate some simple SVG classes, should I be modeling them using the DOM classes instead of trying to use JSNI ? 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: mousemove listener for document?
The way I've done it (I think is): 1. Create a new Class that extends Widget and implements HasMouseMoveHandlers 2. Grab the RootPanel Element and pass that into your new Class constructor (the one that takes an Element as a param) - this should call setElement(Element element) with you passed in element... You can now add MouseMove handlers to you new Widget... On Jan 26, 12:49 am, markww mar...@gmail.com wrote: Hi, Is there a way to listen for mousemoves on the main document? In javascript, I usually do this: window.onload = function() { document.onmousemove = function(e) { alert(the mouse was moved!); }; } can we add some sort of similar listener in GWT? I'm just not sure where to start, 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: MVP Question
Hmmh, without GIN? Are you sure? DI is a great pattern, but without a framework that does the job for you it's really a pain. But for understanding the idea, it might be good. Better look this talk about Guice (which is GIN for non-GWT) http://www.youtube.com/watch?v=hBVJbzAagfs The guys are showing you what's DI without a framework. Regards Jan Ehrhardt On Tue, Jan 26, 2010 at 10:26 AM, rmuller rmul...@xiam.nl wrote: Thank you all for the good advice. I am glad I posted the question! You convinced me going the DI route. I will try with and without GIN. I will let you know or post an follow-up question :) (not this week). Regards, Ronald On Jan 26, 10:03 am, Jan Ehrhardt jan.ehrha...@googlemail.com wrote: Hi Ronald, I would recommend to ways: You should configure two GIN modules. One for authorization type A and one for B. This will allow you to configure the dependency in different ways. The authorization type will become a global property of your application. In your EntryPoint, you could have something like this: switch(authorization) { case A: ginjectorA.getPresenter(); // will create a presenter and its dependent view for auth type A case B: ginjectorB.getPresenter(); // will create a presenter and its dependent view for auth type B } You should always recognize that each 'Ginjector' is a couple of configurations. It could look like this: @GinModules({ModuleA.class}) public interface GinjectorA extend Ginjector { Presenter getPresenter() } @GinModules({ModuleB.class}) public interface GinjectorB extend Ginjector { Presenter getPresenter() } So your ModuleA's configure method can look like this: public void configure() { bind(Presenter.class).to(MyPresenter.class); bind(View.class).to(ViewA.class); } ModuleB looks similar. The benefit of this solution is, that you can do the same for other views and dependencies too. You've got just one point where the global information of the authorization type comes in. The second way would be to create a provider that does the job. Your presenter gets a dependency to the provider and the provider's 'get' method does the check. A provider is similar to a factory, but it isn't one. The idea of DI is to keep your code clean and in both cases it is done. Regards Jan Ehrhardt On Mon, Jan 25, 2010 at 6:15 PM, rmuller rmul...@xiam.nl wrote: Hi Jan. Guess what .. I am reading Dependency Injection (Dhanji R. Prasanna) at this moment :) So this was one of the things why I doubt my design. But I really do not understand how DI (GIN) should be applied in my case: - A Presenter uses several Views. The view depends on the authorization (implemented as enum). Now I do something like: switch (authorization) { case A: view = new View(fieldSpecA); break; case B: // etc } Regards, Ronald On 25 jan, 17:18, Jan Ehrhardt jan.ehrha...@googlemail.com wrote: The reason, why another class creats both and than puts the view into the presenter is called Dependency Injection. It is a widely used pattern, that means that you should inject dependencies into classes instead of using factories or doing something like 'new DependentClass()' in the constructor. In the best case, your presenter refers to a view interface and gets its view implementation injected. The easiest way of doing Dependency Injection in GWT is GIN ( http://code.google.com/p/google-gin). It allows you to configure dependencies and let GIN do the creation of objects and put one into another at runtime. Dependency Inection is one of the best practices in GWT (and Java too) development (http://www.youtube.com/watch?v=PDuhR18-EdM) Regards Jan Ehrhardt On Mon, Jan 25, 2010 at 2:54 PM, rmuller rmul...@xiam.nl wrote: Should not the Presenter create the view? Sometimes you need different views (based on authorization data in my case) where you can reuse the Presenter. I let the Presenter decide which view to use. I do this in the ctor. In all examples I see however, the Presenter and View are created by the parent Presenter/AppContext. Also every View has its own Presenter (1 : 1). So I wonder if my design is correct. What is the general opinion about this? Ronald -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs cr...@googlegroups.comgoogle-web-toolkit%2Bunsubs cr...@googlegroups.com . For more options, visit this
Advice on UIBinder
Hello, I'm lookin for an advice. I developed an application with GWT 1.7 and I have developed without looking the style; now I finished all the function and I want to make it beautiful. I recompile all with GWT 2.0 and works well, in your opinion is worth redo all the pages using the UIBinder? What are the benefits? The alternative is to edit (create) only CSS. Thanks, greetings Alessandro -- 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 Serialization policy strongName changes on refresh
I was having problems with deploying my web app in external server Jboss. I recently figured out that the strongName of the gwt.rpc changes every time I refresh the page. Can someone explains me how to avoid this?, or if this is a bug?. An output here: 10:49:52,593 INFO [STDOUT] Module base URL http://localhost:8080/activa/activ8/ 10:49:52,593 INFO [STDOUT] Strong name 3DCC320CE6689ACF9B59549914237A6F 10:49:52,609 INFO [STDOUT] Serialization policy file path / activ8/3DCC320CE6689 ACF9B59549914237A6F.gwt.rpc ... 10:50:45,000 INFO [STDOUT] Module base URLhttp://localhost:8080/activa/activ8/ 10:50:45,000 INFO [STDOUT] Strong nameA1BA880388289FA4FFF6A08E96127310 10:50:45,000 INFO [STDOUT] Serialization policy file path /activ8/ A1BA880388289 FA4FFF6A08E96127310.gwt.rpc 10:50:45,015 ERROR [[/activa]] serviceImpl: ERROR: The serialization policy file '/activ8/A1BA880388289FA4FFF6A08E96127310.gwt.rpc' was not found; did you forge t to include it in this deployment? 10:50:45,015 ERROR [[/activa]] serviceImpl: WARNING: Failed to get the Serializa tionPolicy 'A1BA880388289FA4FFF6A08E96127310' for module 'http:// localhost:8080/ activa/activ8/'; a legacy, 1.3.3 compatible, serialization policy will be used. You may experience SerializationExceptions as a result. 10:50:45,156 ERROR [[/activa]] Exception while dispatching incoming RPC call com.google.gwt.user.client.rpc.SerializationException: Type 'com.o2hlink.activ8. client.entity.Clinician' was not assignable to 'com.google.gwt.user.client.rpc.I sSerializable' and did not have a custom field serializer.For security purposes, this type will not be serialized.: instance = com.o2hlink.activ8.client.entity. clinic...@2d4185 -- 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: A GWT/GAE best practices project. Want to participate?
Ah..interesting. I'll look into it, but as you say, I will be using GAE with JDO. It would be great if the GWT site had a bunch of links to third party reference material like this. There is so much great material out there, but it's not always easy to find.. I was hoping for a more interactive process in the case of my project, but it's probably hard to get people interested enough to spend time on it :-) / Andreas On Jan 26, 12:20 am, gengstrand gengstr...@gmail.com wrote: You might also want to look athttp://code.google.com/p/tocollege-net/ as another reference implementation of best practices. This time, GWT is combined with Spring, FreeMarker, SiteMesh, Acegi, and Lucene/ Compass. They used Hibernate although I would imagine a JDO approach might make more sense to those looking to deploy on GAE. On Jan 24, 8:44 am, andreas_b andreas.borg...@gmail.com wrote: Hi all. I've just started a new open source GWT/GAE project where I will be following Ray Ryan's best practices and recommended design patterns. Every step of the way will be posted on the web and I will try to initiate discussions with readers on how to solve problems along the way. If you are trying to learn GWT or already know a lot about it and want to help, I would love to hear your ideas and comments. Head over tohttp://borglin.net/gwt-project/anddecide if you are interested in learning/helping out! BR, Andreas -- 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: Custom event system
On Jan 25, 5:34 pm, Ice13ill andrei.fifi...@gmail.com wrote: Hello, i'm trying to develop a custom application event system using my own events and a base event (inherited by the other event types) Here is the code of the base event class: public class EBaseEventH extends EventHandler extends GwtEventH{ public static GwtEvent.TypeH TYPE = new GwtEvent.TypeH(); @Override public GwtEvent.TypeH getAssociatedType() { return TYPE; } } The first pb is a compilation problem: i get the message: Cannot make a static reference to a non-static type H I don't understand, why is H a static type ? and how can i resolve the pb ? (i'm not very good working with parametrized types) The second pb is that i'm not sure if this is a good/correct approach. Any ideas ? The problem is that the Type should be unique for each event (otherwise, you couldn't listen only to a specific subclass of your event; instead all your handlers would be called whichever the specific type of EBaseEvent). In GWT, DomEvent extends GwtEvent but does not create a Type, instead all DomEvent's subclasses have their own Type? (don't go read the DomEvent code, it'll probably distract and confuse you, because DomEvent is so special in also having to attach handlers to the DOM). -- 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: Filedownload with exception handling in gwt
What do you mean exceptionhandling? Our logic goes like this: 1) If IE then show an IE specific download link. Too many users have troubles with popups on IE. 2) For other browsers, use this: public static native boolean open(String url, String name, String features) /*-{ var windowReference = $wnd.open(url, name, features); if( windowReference ) return true; return false; }-*/; We check to see if the link has opened, and show them an error message telling them to enable the popup. Is that what you mean? On Jan 25, 10:08 am, muckdabobenos abo.kla...@gmx.de wrote: Does anyone knows how i can intiate a download with exceptionhandling in gwt. I tried a hidden Frame. It works fine, but i can't fetch the error message which is posted if something goes wrong. Can anybody 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: mousemove listener for document?
Another simpler solution using EventPreview: Event.addNativePreviewHandler(new Event.NativePreviewHandler() { public void onPreviewNativeEvent(NativePreviewEvent foEvent) { switch(foEvent.getTypeInt()) { case Event.ONCLICK: handleClick(foEvent); break; case Event.ONMOUSEOVER: handleMouseOver(foEvent); break; }// end switch } }); Regards. On Tue, Jan 26, 2010 at 3:09 PM, DaveC david.andrew.chap...@googlemail.comwrote: The way I've done it (I think is): 1. Create a new Class that extends Widget and implements HasMouseMoveHandlers 2. Grab the RootPanel Element and pass that into your new Class constructor (the one that takes an Element as a param) - this should call setElement(Element element) with you passed in element... You can now add MouseMove handlers to you new Widget... On Jan 26, 12:49 am, markww mar...@gmail.com wrote: Hi, Is there a way to listen for mousemoves on the main document? In javascript, I usually do this: window.onload = function() { document.onmousemove = function(e) { alert(the mouse was moved!); }; } can we add some sort of similar listener in GWT? I'm just not sure where to start, 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How to wait until the user clicked a button in a PopupPanel???
Hi, I have user editor and when somebody clicks the delete button I show a popup in which the user has to confirm that all the data should be deleted. Only if this will be confirmed with yes, the data will be deleted in the database. Now is my problem that I do not know how I can wait until the button was pressed. I am using the MVP architecture like it was diskussed in a lot of threads here, so my presenter calls a getConfirmed Method in which the popup will be shown. But know I do not know how to wait to this click. Does somebody has a solution for 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.
Re: mousemove listener for document?
I've run into (perfornance) issues using a NativePreviewHandler as it will recieve *ALL* events (mouseover/out/move/up/down etc, etc...) which is why I don't use that method. On Jan 26, 11:08 am, Fazeel Kazi fazzze...@gmail.com wrote: Another simpler solution using EventPreview: Event.addNativePreviewHandler(new Event.NativePreviewHandler() { public void onPreviewNativeEvent(NativePreviewEvent foEvent) { switch(foEvent.getTypeInt()) { case Event.ONCLICK: handleClick(foEvent); break; case Event.ONMOUSEOVER: handleMouseOver(foEvent); break; }// end switch } }); Regards. On Tue, Jan 26, 2010 at 3:09 PM, DaveC david.andrew.chap...@googlemail.comwrote: The way I've done it (I think is): 1. Create a new Class that extends Widget and implements HasMouseMoveHandlers 2. Grab the RootPanel Element and pass that into your new Class constructor (the one that takes an Element as a param) - this should call setElement(Element element) with you passed in element... You can now add MouseMove handlers to you new Widget... On Jan 26, 12:49 am, markww mar...@gmail.com wrote: Hi, Is there a way to listen for mousemoves on the main document? In javascript, I usually do this: window.onload = function() { document.onmousemove = function(e) { alert(the mouse was moved!); }; } can we add some sort of similar listener in GWT? I'm just not sure where to start, 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to write a simple overlay implementation?
It might be worth checking out the gwt svg implementation in gwt-widget library: http://gwt-widget.sourceforge.net/docs/xref/org/gwtwidgets/client/svg/package-summary.html On Tue, Jan 26, 2010 at 6:22 AM, markww mar...@gmail.com wrote: Hi, I'd like to make some really simple overlay classes in GWT to wrap some SVG stuff. I'd basically like to get a rectangle drawn, this is how I do it in javascript: var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); svg.setAttribute('width', '100%'); svg.setAttribute('height', '100%'); document.body.appendChild(svg); var rect = document.createElementNS('http://www.w3.org/2000/ svg','rect'); rect.setAttribute(width,300); rect.setAttribute(height,100); svg.appendChild(rect); and now I'm having trouble translating that to GWT. I was hoping I could do a really thin overlay around all those calls, something like this: public class SVGPanel extends JavaScriptObject { protected SVGPanel() {} public static native SVGPanel create(String width, String height) / *-{ var svg = document.createElementNS('http://www.w3.org/2000/ svg', 'svg'); svg.setAttribute('width', width); svg.setAttribute('height', height); return svg; }-*/; } public MyProject implements EntryPoint { public void onModuleLoad() { SVGPanel panel = SVGPanel.create(100%, 100%); Document.get().getBody().appendChild(panel); } } yeah but I do not have a grasp on how we can jump from the javascript representation of the SVG stuff to GWT java classes. For one, the SVGPanel class extends JavaScriptObject, but I can't simply add it to the Document body class because it's expecting an Element type. If someone could just point out the right way to do that bridge I should be able to get going after that. Also, I'm not sure if this the optimal way to incorporate some simple SVG classes, should I be modeling them using the DOM classes instead of trying to use JSNI ? 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Brett Morgan http://domesticmouse.livejournal.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: GWT 2.0 Upgrade Problem
No, i definetly mean not the XYZ.nochache.js. Here is a line from my firebug: http://localhost:8080/application/64CE9F3B21EDFDB2ADBA49308C361972.cache.js this is what gwt tries to load, but the file is definetly reachable under this path: http://localhost:8080/application/application/64CE9F3B21EDFDB2ADBA49308C361972.cache.js i think the gwt compiler has a problem with it´s pathes and the folders within the war file. i have a new problem, when i compile the application and start it at the application server all pathes to the images folder are wrong, but this time the name of the application instance is missing in the image pathes. i´m absolutely sure both problems had nothing to do with the upgrade but are compiler errors. i had similar problems before when ich made an if statement on an Tree. my original code was something like: if ( tree != null ) that caused compiler error that have not been displayed but the XYZ.cache.js couldn´t been found wehn ich changed the line to: if ( tree.getRoot() != null ) the compiled code worked. So i guess, you google folks have to do a coulpe of fixes to your compiler :-) On 11 Jan., 20:37, Chris Ramsdale cramsd...@google.com wrote: I second Rajeev's comments, there are a couple of oddities that you may experience when upgrading. That said, I'm wondering about the following (@m.militz): 1. I'm assuming you meant XYZ.nocache.js and not XYZ.cache.js. Is this correct? 2. While GWT does produce a .html when you create a new project, it does not create this file every time, and it does not alter it once created. Put another way, I don't believe that GWT is mucking with your Project.html file (not even during upgarde). Is your script tag, within Project.html, incorrect for some reason? What happens if you simply change it to reference module/module.nocache.js? - Chris On Mon, Jan 11, 2010 at 12:33 PM, Rajeev Dayal rda...@google.com wrote: Hi, Have you seen an instance where GWT tries to load the nocache.js file directly from the root of your war folder? What does the HTTP GET request look like? There is definitely a bug in GWT when switching between SDKs. The problem is twofold: 1) The hosted.html file does not get regenerated. The workaround for this is to blow away the generated subdirectories of the war directory after switching SDKs. 2) Because of the caching rules that GWT's embedded Jetty uses, hosted.html is not re-requested by the browser whenever it is requested. The workaround for this is to clear your browser's cache. Rajeev On Mon, Jan 11, 2010 at 11:16 AM, m.mil...@newelements.de m.mil...@newelements.de wrote: Thanks for the hints, but all of this issues i could handle by myself. the problem is gwt produces erroneus code. it tries loading XYZ.cache.js files from the war folder, but into the war fiolder are subdirectories where the js files lies. It looks like this only happens on special occasions but i still can´t fire out what is responsible for that. On 9 Jan., 23:15, Sorinel C scristescu...@hotmail.com wrote: Hi all, There small tricks related with the environment, which aren't documented, in the GWT tutorial. Here you can find what helped me to solve the migration issues: http://ui-programming.blogspot.com/2009/12/update-your-application-to. .. Cheers! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT 2.0 Upgrade Problem
No, i definetly mean not the XYZ.nochache.js. Here is a line from my firebug: http://localhost:8080/application/64CE9F3B21EDFDB2ADBA49308C361972.cache.js this is what gwt tries to load, but the file is definetly reachable under this path: http://localhost:8080/application/application/64CE9F3B21EDFDB2ADBA49308C361972.cache.js i think the gwt compiler has a problem with it´s pathes and the folders within the war file. i have a new problem, when i compile the application and start it at the application server all pathes to the images folder are wrong, but this time the name of the application instance is missing in the image pathes. i´m absolutely sure both problems had nothing to do with the upgrade but are compiler errors. i had similar problems before when ich made an if statement on an Tree. my original code was something like: if ( tree != null ) that caused compiler error that have not been displayed but the XYZ.cache.js couldn´t been found wehn ich changed the line to: if ( tree.getRoot() != null ) the compiled code worked. So i guess, you google folks have to do a coulpe of fixes to your compiler :-) On 11 Jan., 20:37, Chris Ramsdale cramsd...@google.com wrote: I second Rajeev's comments, there are a couple of oddities that you may experience when upgrading. That said, I'm wondering about the following (@m.militz): 1. I'm assuming you meant XYZ.nocache.js and not XYZ.cache.js. Is this correct? 2. While GWT does produce a .html when you create a new project, it does not create this file every time, and it does not alter it once created. Put another way, I don't believe that GWT is mucking with your Project.html file (not even during upgarde). Is your script tag, within Project.html, incorrect for some reason? What happens if you simply change it to reference module/module.nocache.js? - Chris On Mon, Jan 11, 2010 at 12:33 PM, Rajeev Dayal rda...@google.com wrote: Hi, Have you seen an instance where GWT tries to load the nocache.js file directly from the root of your war folder? What does the HTTP GET request look like? There is definitely a bug in GWT when switching between SDKs. The problem is twofold: 1) The hosted.html file does not get regenerated. The workaround for this is to blow away the generated subdirectories of the war directory after switching SDKs. 2) Because of the caching rules that GWT's embedded Jetty uses, hosted.html is not re-requested by the browser whenever it is requested. The workaround for this is to clear your browser's cache. Rajeev On Mon, Jan 11, 2010 at 11:16 AM, m.mil...@newelements.de m.mil...@newelements.de wrote: Thanks for the hints, but all of this issues i could handle by myself. the problem is gwt produces erroneus code. it tries loading XYZ.cache.js files from the war folder, but into the war fiolder are subdirectories where the js files lies. It looks like this only happens on special occasions but i still can´t fire out what is responsible for that. On 9 Jan., 23:15, Sorinel C scristescu...@hotmail.com wrote: Hi all, There small tricks related with the environment, which aren't documented, in the GWT tutorial. Here you can find what helped me to solve the migration issues: http://ui-programming.blogspot.com/2009/12/update-your-application-to. .. Cheers! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to wait until the user clicked a button in a PopupPanel???
When the user clicks the ok button, you generate delete all event. On 01/26/2010 12:10 PM, ojay wrote: Hi, I have user editor and when somebody clicks the delete button I show a popup in which the user has to confirm that all the data should be deleted. Only if this will be confirmed with yes, the data will be deleted in the database. Now is my problem that I do not know how I can wait until the button was pressed. I am using the MVP architecture like it was diskussed in a lot of threads here, so my presenter calls a getConfirmed Method in which the popup will be shown. But know I do not know how to wait to this click. Does somebody has a solution for 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.
Re: How to wait until the user clicked a button in a PopupPanel???
ojay schrieb: I have user editor and when somebody clicks the delete button I show a popup in which the user has to confirm that all the data should be deleted. Only if this will be confirmed with yes, the data will be deleted in the database. Now is my problem that I do not know how I can wait until the button was pressed. One solution would be to use the confirm-method in Window, showing the standard Javascript confirm popup which is modal and returns the moment, the user confirms (or denies) the question: if (Window.confirm(CONSTANTS.AreYouSure())){ letBadThingsHappen(); } I am using the MVP architecture like it was diskussed in a lot of threads here, so my presenter calls a getConfirmed Method in which the popup will be shown. But know I do not know how to wait to this click. If you want to use a GWT Dialog-box you can solve that by calling a callback-function: MyPanel.java: [...] MyConfirmDialog mcd = new MyConfirmDialog(this); mcd.center(); public void onUserConfirmed(boolean clickedYes){ if (clickedYes){ letVeryBadThingsHappen(); } } MyConfirmDialog.java public MyConfirmDialog(MyPanel parent){ super(false, true); this.parent = parent; } ... yesButton.addClickLister(... public void onClick(final Widget sender){ hide(); parent.onUserConfirmed(true); } ); noButton.addClickListener(... public void onClick(final Widget sender){ hide(); parent.onUserConfirmed(false); } } Does somebody has a solution for this? Above should give you an idea. Regards, Lothar -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JsonpRequestBuilder only works across domains?
once again, i have to answer the question myself! at first: would anyone PLEASE write an guide for using the jsonprequestbuilder it´s damn annoing the find out everything by try and error. about my problem: the name of the callback method for the jsonp request changes whith every request. when you do the first request the name is: __gwt_jsonp__.I0.onSuccess for the second request: __gwt_jsonp__.I1.onSuccess for the third: __gwt_jsonp__.I2.onSuccess ... that definetly make sense, BUT is nowhere noted in the documentation! and - belive it or not - you can see this little change from one request to another very hard when you look at a couple of requests. On 21 Jan., 19:32, m.mil...@newelements.de m.mil...@newelements.de wrote: at first i thought i had the same problem. my jsonp requests always timed out. but then i looked at the jsonp examples from the google code pages and found something. nowhere in the f* tutorials is described how the answer of such an jsonp request should look like. what i thought was it has to be an JSON Strin lik: { JSONData } but it looks like, that causes an jasvascript error which is not visible in the browser. the returned string must be javascript code that could be called via the eval function example: __gwt_jsonp__.I0.onSuccess({JSONData}); now the first call works fine. but i have another issue. i use a server side cometservlet, keeping the connection open until i have a message to return. that works fine, i can see the answer for the request in firebug, but json didn´t understand the delayed return. any suggestions? -- 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: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?
On 21 Jan., 15:44, John V Denley johnvden...@googlemail.com wrote: for you dduck, the way forward would be to do as leduque suggests above and set the compile time flag for style to detailed and that should give you a much better idea where the error is, you might find the following link useful:http://code.google.com/webtoolkit/doc/1.6/FAQ_DebuggingAndCompiling.h... I have done so, but the debugging still points to a piece of JavaScript that does not have a clear correspondence to the original Java code :( Regards, Anders -- 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: Problems with build process, please help
The code you are trying to compile is the original from GWT 1.7 project or have you made some changes? What about the 3rd party modules, do you use some of that? Maybe there is some code messing up with the compiler... And the Development Mode, can you try the application using it? Try to compile your code as original as you had successfully compiled in GWT 1.7 and try to make experiments cutting some 3rd party modules off. -- Francisco Bischoff http://www.cirurgiaplastica.pro.br O mate está para o gaúcho como o chá para os ingleses, a coca para os bolivianos, o uísque para os escoceses e o café... para os brasileiros -- Eduardo Bueno On Mon, Jan 25, 2010 at 10:45 AM, Pieter Breed pieter.br...@gmail.comwrote: Hi Frincisca, Yes, actually... My machine is currently trying to build the app with an allocated 15Gigabytes of allocatable ram. Not many desktop machines have so much, so I'm stuttering along on virtual memory which makes it slow. (It's been busy for 2 hours already) But it does feel strange to me that gwtc would need so much ram, which is why I'm asking if we can work with the compiler in this case to keep these requirements down. The other option is that we are doing something wrong (which is slightly more likely). Maybe somebody can help us sort it out? Pieter On Jan 25, 11:59 am, Francisco Bischoff franzbisch...@gmail.com wrote: Hi, I'm not the very experient here, but have you tried to follow the compiler error? [ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...) Maybe you just need to reserve more memory for the java compiler. -- Francisco Bischoffhttp://www.cirurgiaplastica.pro.br O mate está para o gaúcho como o chá para os ingleses, a coca para os bolivianos, o uísque para os escoceses e o café... para os brasileiros -- Eduardo Bueno On Mon, Jan 25, 2010 at 9:47 AM, Pieter Breed pieter.br...@gmail.com wrote: [ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?
On 26 Jan., 13:11, dduck anders.johansen.a...@gmail.com wrote: I have done so, but the debugging still points to a piece of JavaScript that does not have a clear correspondence to the original Java code :( Specifically it points to this line: function Y$(a){var b;if(a.Z()){return KK(new IK,Wob)}else{b=lJ(new fJ,Ohb+a._()+Xob);b.d=true;oJ(b,vV(new _$,a));return b}} The error is: java.lang.IndexOutOfBoundsException: Can't get element 58 Regards, Anders -- 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 Tomcat in Eclipse: Tomcat loads its classes from gwt-dev.jar instead of its own.
Hi, I am actually experimenting with GWT to replace our UI. (We actually use struts) I like GWT a lot so far. I thus pushed the experiment further by trying to integrate it in our solutions. I must work within a few parameters set by my employer. Among those, it must be possible for my team to debug/trace GWT stuff (Take advantage of the devmode) but while the main application still runs in tomcat 5.5.26. (-noserver switch). All of this inside the same Eclipse. I came close to get this to work, really close, but here's my problem: The tomcat ClassLoader loads tomcat classes found in gwt-dev.jar instead of reading its own jar files. If both those tomcats (Mine and GWT's) were of the same version, I would probably not even know there's a problem. This is how i am set up: 1. I have a tomcat installed outside of my project, say, d:/ tomcat-5.5.26 2. I have an eclipse project which was created fully by the GWT wizard. (say, d:/projects/myproject) 3. I activated the AJDT builder in this project. Up until here, everything works great, but inside Google App Engine. (no -noserver switch) 4. I deactivate the Google App Engine (add the -noserver switch) 5. I create a server.xml inside my project, rig everything up 6. I create a Run Configuration this way: 6a. Main class: org.apache.catalina.startup.Bootstrap 6b. Working directory: d:/tomcat-5.5.26/bin 7. I add bootstrap.jar in the classpath of my project. I try to launch it, bang problems arise because of the mixup. I tried tampering with the classpath in my Run Configuration to eliminate GWT, and my tomcat loads allright. (Obviously the GWT classes on the server-side fail to load since they extend RemoteService, which, without GWT jars, is not found of course) I suppose that if the tomcat jars were earlier in the classpath, I would not have this problem? A solution for me to try would be to open gwt-dev.jar and erase tomcat classes. I don't like this solution. Would it even work? Is there a better way? Thanks a lot! Bob -- 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.
display images in smartgwt
hi all, I want to display a image is my project . i want to know where to store the image and what is the path for that image. by the way i successe to display a image that was stored in the web . 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-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: Maven users survey
Hi, From our perspective, we managed to get things working somewhat adequately as follows: 1. use maven for automated builds and awesome dependency management 2. use eclipse and maven eclipse plugin 3. use gwt and gae plugins (where SDK must point to the same versions as those declared in pom.xml) Our biggest challenge was the assumption that the war lives in a directory named war. We got around this on *ix by using a symbolic link to point to the actual build directory in target. The second issue was with the run configurations loading the hosted mode from a non-sdk directory due to the order JAR files are included. We got around this using the -Dappengine.sdk.root parameter. So for us the big wins: 1. better integration of gwt and gae SDKs with maven dependency management 2. flexibility to override all the parameters passed to the HostedMode launcher (in this case we could override -war) cowper On Jan 13, 8:35 am, Keith Platfoot kplatf...@google.com wrote: Hi folks, For the next release of the Google Plugin for Eclipse, we're planning on making a few tweaks to make life easier for Maven users. That's right: we've seen the stars on the issue tracker, and have decided it's time to act. I would say, we feel your pain, but the problem is, we don't. Which is to say, nobody on the plugin team actually uses Maven (everybody around here uses Ant). However, I've been researching Maven to determine exactly what changes we should make to allow it to work more seamlessly with the Google Eclipse Plugin. I've read the relevant issues and groups postings, so I think I have a rough idea of what needs to happen. However, before we go and make any changes, I wanted to ask for the community's advice. So, here are some questions for you. What is the typical workflow of a GWT developer using Maven? I've installed Maven and the gwt-maven-plugin 1.2-SNAPSHOT and managed to create a GWT 2.0 app with the provided archetype. After some tweaking, I'm able to GWT compile, debug with Eclipse (though not via our Web App launch configuration), create a WAR, etc. However, I'm more interested in how you all are doing things. For example: How do you... - Create a new project? - Perform GWT compiles? - Debug with Eclipse? - Run your tests? - Create a WAR for deployment? What specific pain points do Maven users run into when using the Google plugin? I know one major obstacle is that our plugin currently treats the war directory as both an input (e.g. static resources, WEB-INF/lib, WEB-INF/web.xml) and output (WEB-INF/classes, GWT artifacts like nocache.js and hosted.html) . Maven convention, however, says that /src/main/webapp should be input only, which means that hosted mode (or development mode, in GWT 2.0) needs to run from a staging directory (e.g. gwt:run creates a /war folder on demand). This mismatch results in the plugin creating spurious validation errors and breaks our Web App launch configuration. Another incompatibility is that Maven projects depend on the GWT Jars in the Maven repo, whereas our plugin expects to always find a GWT SDK library on the classpath. Are my descriptions of these pain points accurate? If so, one possible solution would be for the plugin to allow the definition of an input war directory (e.g. src/main/webapp) separate from a launch-time staging directory, and for us to relax the requirement that all GWT projects must have a GWT SDK library. So tell me: would these changes adequately reduce the friction between Maven and the Google plugin? Also, are there other problems Maven users are running into when using the plugin? Thanks in advance for all feedback, Keith, on behalf of the Google Plugin for Eclipse 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-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.
TabPanel listener sample code
Hi folks, Are there any samples of the TabPanel with the listener implemented? It would be very helpful to look at some example code. 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.
listbox + ajax
Hi, I'm new here and new to gwt. I'm not a Java programmer, but I'm start to learn to use GWT. I'm trying to use an extension of the ListBox widget to make it able to collect data from a database by AJAX. I found only an example on the web, but I obtain an uncaight exception (class not found) at the first row of this example. Can you help me? :-) thanks! Lorenzo This is the code: Note: the error is when it executes the line: RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, source); ClassNotFoundException arg0 = com/google/gwt/http/client/RequestBuilder --- package com.myProject.client; import com.google.gwt.http.client.Request; import com.google.gwt.http.client.RequestBuilder; import com.google.gwt.http.client.RequestCallback; import com.google.gwt.http.client.Response; import com.google.gwt.json.client.JSONArray; import com.google.gwt.json.client.JSONObject; import com.google.gwt.json.client.JSONParser; import com.google.gwt.json.client.JSONString; import com.google.gwt.json.client.JSONValue; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.ListBox; public class JsonListBox extends ListBox { public JsonListBox(String source) { RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, source); try { builder.setCallback(new RequestCallback() { public void onError(Request request, Throwable exception) { } public void onResponseReceived(Request request, Response response) { if (response.getStatusCode() == 200) { JSONArray items = JSONParser.parse(response.getText()).isArray (); JSONValue jsonValue; for (int i=0; iitems.size(); i++) { JSONObject jsMyObject; JSONString jsTitle, jsId; if ((jsMyObject= items.get(i).isObject()) == null) continue; if ((jsonValue = jsMyObject.get(title)) == null) continue; if ((jsTitle= jsonValue.isString()) == null) continue; if ((jsonValue = jsMyObject.get(id)) == null) continue; if ((jsId = jsonValue.isString()) == null) continue; addItem(jsTitle.stringValue(), jsId.stringValue()); } setVisibleItemCount(items.size()); } else { Window.alert(response.getStatusText()); } } }); builder.send(); } catch (Exception e) { Window.alert(e.getMessage()); } } } -- 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: RFC 1867-compatibe File Upload
I'm not sure, what you mean with non-UI and on the other hand you want to display a progressbar. maybe you want a pure-GWT implementation without any 3rd party stuff like flash or applets? if so, this may be what you are looking 4: http://code.google.com/p/gwtupload/ On 25 Jan., 17:43, Lothar Kimmeringer j...@kimmeringer.de wrote: CI-CUBE schrieb: I'm looking for an RFC 1867-compatible, pure (non-UI) file upload functionality to be used at [Smart]GWT's client side. FormPanel.setEncoding(FormPanel.ENCODING_MULTIPART) should provide that kind of functionality. It would be perfect if the code could provide a callback to render a progress bar. I'm not aware of such a thing but defining a function in a RemoteServiceServlet returning the currently received bytes of the parallel running upload, shouldn't be that hard to be implemented by yourself. Regards, Lothar -- 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 UI BINDER MVP
That is the question I felt like asking as well, Dalla. -- 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: Problems with build process, please help
This is the original v1.7 code with only the GWT 2 change applied, ie no other code changes have been applied yet. We are able to run the app in dev mode without any issues. We use a few 3rd party modules, yes. The primary client-side dependency is the GXT module. On the server we have a few other dependencies: - ehcache - derby - jna We do have a large number of codegen files. We have a 3rd party middle- ware component that we use for comms, which allows us to have clients for the server in many languages. We use this technology to codegen XML serializers and DTOs. This pipeline is on the server, from where normal GWT rpc is used to communicate with the client via the API service calls. For most of these DTO's we create .properties files that help us to create beans to which we can bind the UIs. Does this information help? Pieter On Jan 26, 2:35 pm, Francisco Bischoff franzbisch...@gmail.com wrote: The code you are trying to compile is the original from GWT 1.7 project or have you made some changes? What about the 3rd party modules, do you use some of that? Maybe there is some code messing up with the compiler... And the Development Mode, can you try the application using it? Try to compile your code as original as you had successfully compiled in GWT 1.7 and try to make experiments cutting some 3rd party modules off. -- Francisco Bischoffhttp://www.cirurgiaplastica.pro.br O mate está para o gaúcho como o chá para os ingleses, a coca para os bolivianos, o uísque para os escoceses e o café... para os brasileiros -- Eduardo Bueno On Mon, Jan 25, 2010 at 10:45 AM, Pieter Breed pieter.br...@gmail.comwrote: Hi Frincisca, Yes, actually... My machine is currently trying to build the app with an allocated 15Gigabytes of allocatable ram. Not many desktop machines have so much, so I'm stuttering along on virtual memory which makes it slow. (It's been busy for 2 hours already) But it does feel strange to me that gwtc would need so much ram, which is why I'm asking if we can work with the compiler in this case to keep these requirements down. The other option is that we are doing something wrong (which is slightly more likely). Maybe somebody can help us sort it out? Pieter On Jan 25, 11:59 am, Francisco Bischoff franzbisch...@gmail.com wrote: Hi, I'm not the very experient here, but have you tried to follow the compiler error? [ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...) Maybe you just need to reserve more memory for the java compiler. -- Francisco Bischoffhttp://www.cirurgiaplastica.pro.br O mate está para o gaúcho como o chá para os ingleses, a coca para os bolivianos, o uísque para os escoceses e o café... para os brasileiros -- Eduardo Bueno On Mon, Jan 25, 2010 at 9:47 AM, Pieter Breed pieter.br...@gmail.com wrote: [ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs 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: java.lang.NoClassDefFoundError in tomcat
I figured it out. Accidentally, I used com.google.gwt.dev.util.collect.HashSet instead of java.util.HashSet. It works in eclipse, but not in tomcat, even if I put jar into WEB-INF/ lib directory. On Jan 25, 1:16 pm, ailinykh ailin...@gmail.com wrote: Hello, everybody! When I deploy my GWT application to tomcat I get this error message. Everything is Ok in eclipse. The class com/google/gwt/dev/util/collect/ HashSet is located int gwt-dev.jar. I put this jar into WEB-INF/lib folder, but still no luck. Any ideas what is wrong? Thank you, Andrey SEVERE: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract com.ais.slist.shared.SLItem[] com.ais.slist.client.ListManagerService.addSLItems(int,int,long[]) throws com.ais.slist.shared.NotAuthorizedException' threw an unexpected exception: java.lang.NoClassDefFoundError: com/google/gwt/ dev/util/collect/HashSet at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure (RPC.java:378) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse (RPC.java:581) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall (RemoteServiceServlet.java:188) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost (RemoteServiceServlet.java:224) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost (AbstractRemoteServiceServlet.java:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206) -- 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 Serialization policy strongName changes on refresh
The only time I have this kind of problem is when I am working in Dev mode. It seems that Eclipse caches the nocache.js file (Which tells the browser which gwt.rpc to load). Normally I don't do a rebuild unless I have changed something on the backend so I remember most of the time to stop and restart Dev mode. If you are having this issue outside Dev mode I would look to see if your server is caching the nocache.js file On Jan 26, 2:57 am, mijaelovic miguelangel...@gmail.com wrote: I was having problems with deploying my web app in external server Jboss. I recently figured out that the strongName of the gwt.rpc changes every time I refresh the page. Can someone explains me how to avoid this?, or if this is a bug?. An output here: 10:49:52,593 INFO [STDOUT] Module base URLhttp://localhost:8080/activa/activ8/ 10:49:52,593 INFO [STDOUT] Strong name 3DCC320CE6689ACF9B59549914237A6F 10:49:52,609 INFO [STDOUT] Serialization policy file path / activ8/3DCC320CE6689 ACF9B59549914237A6F.gwt.rpc ... 10:50:45,000 INFO [STDOUT] Module base URLhttp://localhost:8080/activa/activ8/ 10:50:45,000 INFO [STDOUT] Strong nameA1BA880388289FA4FFF6A08E96127310 10:50:45,000 INFO [STDOUT] Serialization policy file path /activ8/ A1BA880388289 FA4FFF6A08E96127310.gwt.rpc 10:50:45,015 ERROR [[/activa]] serviceImpl: ERROR: The serialization policy file '/activ8/A1BA880388289FA4FFF6A08E96127310.gwt.rpc' was not found; did you forge t to include it in this deployment? 10:50:45,015 ERROR [[/activa]] serviceImpl: WARNING: Failed to get the Serializa tionPolicy 'A1BA880388289FA4FFF6A08E96127310' for module 'http:// localhost:8080/ activa/activ8/'; a legacy, 1.3.3 compatible, serialization policy will be used. You may experience SerializationExceptions as a result. 10:50:45,156 ERROR [[/activa]] Exception while dispatching incoming RPC call com.google.gwt.user.client.rpc.SerializationException: Type 'com.o2hlink.activ8. client.entity.Clinician' was not assignable to 'com.google.gwt.user.client.rpc.I sSerializable' and did not have a custom field serializer.For security purposes, this type will not be serialized.: instance = com.o2hlink.activ8.client.entity. clinic...@2d4185 -- 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: Maven users survey
On Tue, Jan 26, 2010 at 12:01 AM, cowper iamco...@gmail.com wrote: Hi, From our perspective, we managed to get things working somewhat adequately as follows: 1. use maven for automated builds and awesome dependency management 2. use eclipse and maven eclipse plugin 3. use gwt and gae plugins (where SDK must point to the same versions as those declared in pom.xml) Our biggest challenge was the assumption that the war lives in a directory named war. We got around this on *ix by using a symbolic link to point to the actual build directory in target. The second issue was with the run configurations loading the hosted mode from a non-sdk directory due to the order JAR files are included. We got around this using the -Dappengine.sdk.root parameter. So for us the big wins: 1. better integration of gwt and gae SDKs with maven dependency management 2. flexibility to override all the parameters passed to the HostedMode launcher (in this case we could override -war) For GPE 1.3, there will be no magic arguments in launch configurations. In other words, the program args and VM args will be explicitly listed in the launch configuration and you can modify them as you see fit. cowper On Jan 13, 8:35 am, Keith Platfoot kplatf...@google.com wrote: Hi folks, For the next release of the Google Plugin for Eclipse, we're planning on making a few tweaks to make life easier for Maven users. That's right: we've seen the stars on the issue tracker, and have decided it's time to act. I would say, we feel your pain, but the problem is, we don't. Which is to say, nobody on the plugin team actually uses Maven (everybody around here uses Ant). However, I've been researching Maven to determine exactly what changes we should make to allow it to work more seamlessly with the Google Eclipse Plugin. I've read the relevant issues and groups postings, so I think I have a rough idea of what needs to happen. However, before we go and make any changes, I wanted to ask for the community's advice. So, here are some questions for you. What is the typical workflow of a GWT developer using Maven? I've installed Maven and the gwt-maven-plugin 1.2-SNAPSHOT and managed to create a GWT 2.0 app with the provided archetype. After some tweaking, I'm able to GWT compile, debug with Eclipse (though not via our Web App launch configuration), create a WAR, etc. However, I'm more interested in how you all are doing things. For example: How do you... - Create a new project? - Perform GWT compiles? - Debug with Eclipse? - Run your tests? - Create a WAR for deployment? What specific pain points do Maven users run into when using the Google plugin? I know one major obstacle is that our plugin currently treats the war directory as both an input (e.g. static resources, WEB-INF/lib, WEB-INF/web.xml) and output (WEB-INF/classes, GWT artifacts like nocache.js and hosted.html) . Maven convention, however, says that /src/main/webapp should be input only, which means that hosted mode (or development mode, in GWT 2.0) needs to run from a staging directory (e.g. gwt:run creates a /war folder on demand). This mismatch results in the plugin creating spurious validation errors and breaks our Web App launch configuration. Another incompatibility is that Maven projects depend on the GWT Jars in the Maven repo, whereas our plugin expects to always find a GWT SDK library on the classpath. Are my descriptions of these pain points accurate? If so, one possible solution would be for the plugin to allow the definition of an input war directory (e.g. src/main/webapp) separate from a launch-time staging directory, and for us to relax the requirement that all GWT projects must have a GWT SDK library. So tell me: would these changes adequately reduce the friction between Maven and the Google plugin? Also, are there other problems Maven users are running into when using the plugin? Thanks in advance for all feedback, Keith, on behalf of the Google Plugin for Eclipse 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Miguel -- 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: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?
...and another, this time the one I am actually after: Class: com.google.gwt.core.client.JavaScriptException Message: (TypeError): Result of expression 'a' [null] is not an object. line: 1520 sourceId: 4968015904 sourceURL: http://worm:8080/myShopInstall/gwt-results-app/5DF30FE3D0E594F4B64889C27BA79632.cache.html expressionBeginOffset: 18742 expressionCaretOffset: 18743 expressionEndOffset: 18745 Line 1520 in the file looks like this: function ZF(a){var b;b=PP(new MP,a.g);while(b.bb.c.d-1){RP(b);TP(b)}} -- 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: Problems with build process, please help
Sorry, I just read what I worte and realised I made a mistake. We don't have that many .properties files, but we do have a large ( 1000) files that describe each field in the DTO with a constant string value. Ex: public class AdminUserListDefProperties implements Serializable, BeanModelTag { public final static String Name = Name; } describes a class AdminUserListDef, which has one property, ie, getName () and setName(). We have about a thousand of these (our data model is pretty huge) but they are only used on the server, not on the client Pieter On Jan 26, 3:43 pm, Pieter Breed pieter.br...@gmail.com wrote: This is the original v1.7 code with only the GWT 2 change applied, ie no other code changes have been applied yet. We are able to run the app in dev mode without any issues. We use a few 3rd party modules, yes. The primary client-side dependency is the GXT module. On the server we have a few other dependencies: - ehcache - derby - jna We do have a large number of codegen files. We have a 3rd party middle- ware component that we use for comms, which allows us to have clients for the server in many languages. We use this technology to codegen XML serializers and DTOs. This pipeline is on the server, from where normal GWT rpc is used to communicate with the client via the API service calls. For most of these DTO's we create .properties files that help us to create beans to which we can bind the UIs. Does this information help? Pieter On Jan 26, 2:35 pm, Francisco Bischoff franzbisch...@gmail.com wrote: The code you are trying to compile is the original from GWT 1.7 project or have you made some changes? What about the 3rd party modules, do you use some of that? Maybe there is some code messing up with the compiler... And the Development Mode, can you try the application using it? Try to compile your code as original as you had successfully compiled in GWT 1.7 and try to make experiments cutting some 3rd party modules off. -- Francisco Bischoffhttp://www.cirurgiaplastica.pro.br O mate está para o gaúcho como o chá para os ingleses, a coca para os bolivianos, o uísque para os escoceses e o café... para os brasileiros -- Eduardo Bueno On Mon, Jan 25, 2010 at 10:45 AM, Pieter Breed pieter.br...@gmail.comwrote: Hi Frincisca, Yes, actually... My machine is currently trying to build the app with an allocated 15Gigabytes of allocatable ram. Not many desktop machines have so much, so I'm stuttering along on virtual memory which makes it slow. (It's been busy for 2 hours already) But it does feel strange to me that gwtc would need so much ram, which is why I'm asking if we can work with the compiler in this case to keep these requirements down. The other option is that we are doing something wrong (which is slightly more likely). Maybe somebody can help us sort it out? Pieter On Jan 25, 11:59 am, Francisco Bischoff franzbisch...@gmail.com wrote: Hi, I'm not the very experient here, but have you tried to follow the compiler error? [ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...) Maybe you just need to reserve more memory for the java compiler. -- Francisco Bischoffhttp://www.cirurgiaplastica.pro.br O mate está para o gaúcho como o chá para os ingleses, a coca para os bolivianos, o uísque para os escoceses e o café... para os brasileiros -- Eduardo Bueno On Mon, Jan 25, 2010 at 9:47 AM, Pieter Breed pieter.br...@gmail.com wrote: [ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs 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: TabPanel listener sample code
Hi, import com.gwtext.client.widgets.TabPanel; ... final TabPanel tabPanel = new TabPanel(); tabPanel.setClosable(false); tabPanel.setResizeTabs(true); tabPanel.setMinTabWidth(115); tabPanel.setTabWidth(135); tabPanel.setEnableTabScroll(true); tabPanel.setWidth(535); tabPanel.setHeight(100%); tabPanel.setActiveTab(0); tabPanel.setLayoutOnTabChange(true); tabPanel.addListener(new TabPanelListenerAdapter(){ @Override public void onTabChange(TabPanel tabPabel, Panel tab) { //TODO } }); I hope it helps, Bruno On Tue, Jan 26, 2010 at 3:26 AM, Dhiren Bhatia dhir...@gmail.com wrote: Hi folks, Are there any samples of the TabPanel with the listener implemented? It would be very helpful to look at some example code. 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How to use the emulated stack traces ?
Hi, In GWT 2.0 there is supposed to be a feature that allows us to emulate java stack traces in the compiled web application. I can not find much information on how to enable this. The docs are very quite about this subject. I found that there are 3 properties: - compiler.emulatedStack - compiler.emulatedStack.recordLineNumbers - compiler.emulatedStack.recordFileNames According to info I found these 3 are supposed to be boolean properties. I tried setting them to true, but I get a very strange error in recordLineNumbers and recordFileNames: [ERROR] The specified property 'compiler.emulatedStack.recordLineNumbers' is not of the correct type; found 'ConfigurationProperty' expecting 'BindingProperty' [java] [ERROR] Failure while parsing XML How do I enable these features ? David -- 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 Upgrade Problem
On Tue, Jan 26, 2010 at 6:21 AM, m.mil...@newelements.de m.mil...@newelements.de wrote: No, i definetly mean not the XYZ.nochache.js. Here is a line from my firebug: http://localhost:8080/application/64CE9F3B21EDFDB2ADBA49308C361972.cache.js this is what gwt tries to load, but the file is definetly reachable under this path: http://localhost:8080/application/application/64CE9F3B21EDFDB2ADBA49308C361972.cache.js Are you trying to run this under an external app server (e.g. Tomcat), or have you simply changed the port that the embedded server uses? If you're deploying your app to an external app server, I can see how you might end up with an application/application path (although I don't know how correct it would be). Let's take a step back, can you describe the directory structure that you see after you run the GWT compiler? i think the gwt compiler has a problem with it´s pathes and the folders within the war file. i have a new problem, when i compile the application and start it at the application server all pathes to the images folder are wrong, but this time the name of the application instance is missing in the image pathes. i´m absolutely sure both problems had nothing to do with the upgrade but are compiler errors. i had similar problems before when ich made an if statement on an Tree. my original code was something like: if ( tree != null ) that caused compiler error that have not been displayed but the XYZ.cache.js couldn´t been found wehn ich changed the line to: if ( tree.getRoot() != null ) the compiled code worked. I was able to successfully run the following code in both Development and Web mode: public class Test implements EntryPoint { public void onModuleLoad() { Tree t = new Tree(); TreeItem ti = null; if (ti != null) { } else { ti = new TreeItem(hello there); } t.addItem(ti); RootPanel.get().add(t); } } Is there something different between your app and the above snippet? So i guess, you google folks have to do a coulpe of fixes to your compiler :-) I think several, mutually exclusive issues are being confused here. Would you mind sending me your project, or a sample project that reproduces the issues you mention above? On 11 Jan., 20:37, Chris Ramsdale cramsd...@google.com wrote: I second Rajeev's comments, there are a couple of oddities that you may experience when upgrading. That said, I'm wondering about the following (@m.militz): 1. I'm assuming you meant XYZ.nocache.js and not XYZ.cache.js. Is this correct? 2. While GWT does produce a .html when you create a new project, it does not create this file every time, and it does not alter it once created. Put another way, I don't believe that GWT is mucking with your Project.html file (not even during upgarde). Is your script tag, within Project.html, incorrect for some reason? What happens if you simply change it to reference module/module.nocache.js? - Chris On Mon, Jan 11, 2010 at 12:33 PM, Rajeev Dayal rda...@google.com wrote: Hi, Have you seen an instance where GWT tries to load the nocache.js file directly from the root of your war folder? What does the HTTP GET request look like? There is definitely a bug in GWT when switching between SDKs. The problem is twofold: 1) The hosted.html file does not get regenerated. The workaround for this is to blow away the generated subdirectories of the war directory after switching SDKs. 2) Because of the caching rules that GWT's embedded Jetty uses, hosted.html is not re-requested by the browser whenever it is requested. The workaround for this is to clear your browser's cache. Rajeev On Mon, Jan 11, 2010 at 11:16 AM, m.mil...@newelements.de m.mil...@newelements.de wrote: Thanks for the hints, but all of this issues i could handle by myself. the problem is gwt produces erroneus code. it tries loading XYZ.cache.js files from the war folder, but into the war fiolder are subdirectories where the js files lies. It looks like this only happens on special occasions but i still can´t fire out what is responsible for that. On 9 Jan., 23:15, Sorinel C scristescu...@hotmail.com wrote: Hi all, There small tricks related with the environment, which aren't documented, in the GWT tutorial. Here you can find what helped me to solve the migration issues: http://ui-programming.blogspot.com/2009/12/update-your-application-to. .. Cheers! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?
BTW, Your code stills looks like compiled with -style obfuscated. On Jan 26, 6:55 am, dduck anders.johansen.a...@gmail.com wrote: ...and another, this time the one I am actually after: Class: com.google.gwt.core.client.JavaScriptException Message: (TypeError): Result of expression 'a' [null] is not an object. line: 1520 sourceId: 4968015904 sourceURL:http://worm:8080/myShopInstall/gwt-results-app/5DF30FE3D0E594F4B64889... expressionBeginOffset: 18742 expressionCaretOffset: 18743 expressionEndOffset: 18745 Line 1520 in the file looks like this: function ZF(a){var b;b=PP(new MP,a.g);while(b.bb.c.d-1){RP(b);TP(b)}} -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Simple DOM programming example using GWT?
Why don't you try void onModuleLoad() { RootPanel.get().add(new HTML(pHellopWorld)); } If you really want to deal directly with the dom look at com.google.gwt.user.client.DOM but this is probably not the way you want to use GWT On Jan 25, 11:07 am, markww mar...@gmail.com wrote: Ah actually it looks like this is needed: doc.getBody().appendChild(p); Thanks On Jan 25, 10:04 am, markww mar...@gmail.com wrote: Hi, I'm trying to use the new DOM classes, I'm not getting even a simple sample to work. I'd like to just try something like this: public class TestProject implements EntryPoint { public void onModuleLoad() { Document doc = Document.get(); ParagraphElement p = doc.createPElement(); p.setInnerText(hello!); } } Is this the right way to go? Do I still need to call doc.appendChild (p)? If I try that, I get an exception: com.google.gwt.core.client.JavaScriptException: (HIERARCHY_REQUEST_ERR): HIERARCHY_REQUEST_ERR: DOM Exception 3 is there a guide to DOM programming using GWT by any chance? 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.
Best practice of GWT
hi GWT gurus, I would like to ask two question about GWT samples 1, Can I assume samples provided under folder gwt-2.0.0/samples are written in best practices? 2, Is there any plan to re-write Showcase sample to UIBinder? Best regards, Max -- 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 understand serialization binary format?
Is there some description of how precisely java objects are passed via POST requests and returned in JSON responses? -- 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 maven and jetty caching
Hey All, I'm using the gwt maven plugin to control my builds and the apache war plugin is built into it. Most of our visuals are controlled strictly by css and since our upgrade to gwt 2.0 we're having a horrible caching problem. In the docs for the war plugin it has a variable called useCache that controls caching. Does anyone know if I can pass this in as a system property to the jetty plugin and if so how to do so? 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: GWT 2.0 UI BINDER MVP
To clarify what I´m looking for, let´s assume that I´m working with Googles MVP Contacts example. Instead of having EditContactView and ContactsView as completly separate views, I want to add them to a DockLayoutPanel, showing both views at the same time. Let´s assume that I want to put the ContactsView in the center panel, and the EditContactView in the south panel. I guess I would do this by creating a third view, called e.g. MainView (and MainPresenter), and then putting my existing views in this third view? But I´m still confused as to how I would set this up, or if creating a third view would even be the correct approach. Please advice :-) -- 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.
UI Binder paths
i'm using uibinder to create some widgets with a CSS file and the corresponding .java and .ui.xml files. Where can i find how the uibinder accesses the required resources ? For example, i have my widgets in the package com.testapp.client.widgets : MyWidget.java and MyWidget.ui.xml The css file is in war/TestApp.css how can i access the css file with the ui:style src=file.css / tag? if i separate the .java files from .ui.xml files how can i tell where to find the ui.xml file when i create the widget ? -- 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 Upgrade Problem
hi, i´m impressed about the quick reply! at first i develop the application on jboss 5.1.0. everything works fine in development mode but since i tried it on the joss i have a couple of problems. so the first application is the name of the application. the second application is the name of the directory where the compiled js files are placed. http://localhost:8080/application/application/64CE9F3B21EDFDB2ADBA493... i absolutely aggree with you that my problem is caused by mixing up something :-) in fact i tried mixing GWT, Isomorphic SmartGWT and CometServlet. I have one main GWT Project and a couple of java projects to create some sort of moduled structure. i use smartgwt for the user interface and gwt for the client server communication with the server side servlet. in fact i´m not absolutely clear if my problems are caused by compiling the gwt or the smartgwt parts. but as soon as i can localize the code that causes the problems i will post it here. On 26 Jan., 15:37, Chris Ramsdale cramsd...@google.com wrote: On Tue, Jan 26, 2010 at 6:21 AM, m.mil...@newelements.de m.mil...@newelements.de wrote: No, i definetly mean not the XYZ.nochache.js. Here is a line from my firebug: http://localhost:8080/application/64CE9F3B21EDFDB2ADBA49308C361972.ca... this is what gwt tries to load, but the file is definetly reachable under this path: http://localhost:8080/application/application/64CE9F3B21EDFDB2ADBA493... Are you trying to run this under an external app server (e.g. Tomcat), or have you simply changed the port that the embedded server uses? If you're deploying your app to an external app server, I can see how you might end up with an application/application path (although I don't know how correct it would be). Let's take a step back, can you describe the directory structure that you see after you run the GWT compiler? i think the gwt compiler has a problem with it´s pathes and the folders within the war file. i have a new problem, when i compile the application and start it at the application server all pathes to the images folder are wrong, but this time the name of the application instance is missing in the image pathes. i´m absolutely sure both problems had nothing to do with the upgrade but are compiler errors. i had similar problems before when ich made an if statement on an Tree. my original code was something like: if ( tree != null ) that caused compiler error that have not been displayed but the XYZ.cache.js couldn´t been found wehn ich changed the line to: if ( tree.getRoot() != null ) the compiled code worked. I was able to successfully run the following code in both Development and Web mode: public class Test implements EntryPoint { public void onModuleLoad() { Tree t = new Tree(); TreeItem ti = null; if (ti != null) { } else { ti = new TreeItem(hello there); } t.addItem(ti); RootPanel.get().add(t); } } Is there something different between your app and the above snippet? So i guess, you google folks have to do a coulpe of fixes to your compiler :-) I think several, mutually exclusive issues are being confused here. Would you mind sending me your project, or a sample project that reproduces the issues you mention above? On 11 Jan., 20:37, Chris Ramsdale cramsd...@google.com wrote: I second Rajeev's comments, there are a couple of oddities that you may experience when upgrading. That said, I'm wondering about the following (@m.militz): 1. I'm assuming you meant XYZ.nocache.js and not XYZ.cache.js. Is this correct? 2. While GWT does produce a .html when you create a new project, it does not create this file every time, and it does not alter it once created. Put another way, I don't believe that GWT is mucking with your Project.html file (not even during upgarde). Is your script tag, within Project.html, incorrect for some reason? What happens if you simply change it to reference module/module.nocache.js? - Chris On Mon, Jan 11, 2010 at 12:33 PM, Rajeev Dayal rda...@google.com wrote: Hi, Have you seen an instance where GWT tries to load the nocache.js file directly from the root of your war folder? What does the HTTP GET request look like? There is definitely a bug in GWT when switching between SDKs. The problem is twofold: 1) The hosted.html file does not get regenerated. The workaround for this is to blow away the generated subdirectories of the war directory after switching SDKs. 2) Because of the caching rules that GWT's embedded Jetty uses, hosted.html is not re-requested by the browser whenever it is requested. The workaround for this is to clear your browser's cache. Rajeev On Mon, Jan 11, 2010 at 11:16 AM, m.mil...@newelements.de m.mil...@newelements.de wrote: Thanks for the hints, but all of this issues i could
Re: How to understand serialization binary format?
Dims schrieb: Is there some description of how precisely java objects are passed via POST requests and returned in JSON responses? The protocol can change between GWT-versions and is to be regarded to be internal. If you really want to know you have to read the sources of the RemoteServiceServlet. Regards, Lothar -- 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: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?
On 26 Jan., 16:15, Djabi george.djaba...@gmail.com wrote: BTW, Your code stills looks like compiled with -style obfuscated. You are right. Thought I had fixed it, but hadn't. Here is the unobfuscated code: function com_google_gwt_user_client_ui_Panel_ $clear__Lcom_google_gwt_user_client_ui_Panel_2V(this$static){ var it; it = com_google_gwt_user_client_ui_WidgetCollection$WidgetIterator_ $WidgetCollection $WidgetIterator__Lcom_google_gwt_user_client_ui_WidgetCollection $WidgetIterator_2Lcom_google_gwt_user_client_ui_WidgetCollection $WidgetIterator_2(new com_google_gwt_user_client_ui_WidgetCollection $WidgetIterator, this $static.com_google_gwt_user_client_ui_ComplexPanel_children); while (it.com_google_gwt_user_client_ui_WidgetCollection $WidgetIterator_index it.com_google_gwt_user_client_ui_WidgetCollection$WidgetIterator_this $0.com_google_gwt_user_client_ui_WidgetCollection_size - 1) { com_google_gwt_user_client_ui_WidgetCollection$WidgetIterator_ $next__Lcom_google_gwt_user_client_ui_WidgetCollection $WidgetIterator_2Lcom_google_gwt_user_client_ui_Widget_2(it); com_google_gwt_user_client_ui_WidgetCollection$WidgetIterator_ $remove__Lcom_google_gwt_user_client_ui_WidgetCollection $WidgetIterator_2V(it); } } Error points to line starting with it = com_google.. Error message is: (TypeError): Result of expression 'this$static' [null] is not an object. -- 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.
Conditional Properties
Hi, I started a thread a while back asking for some way to support sub- types of properties (e.g. for mobile Safari/Android). I got a quick response saying that Conditional Properties were the answer, and that they were in GWT 2.0. Thread: http://groups.google.com/group/google-web-toolkit/browse_thread/thread/41cf2491d3a33148/b027eae0b6dd6f9d?lnk=gstq=Shaun#b027eae0b6dd6f9d Conditional Properties: http://code.google.com/p/google-web-toolkit/wiki/ConditionalProperties Now GWT 2.0 is out, I'm trying to get conditional properties to work but not having much luck. I added the following to my gwt.xml file. It happily compiles but says it's only compiling the usual 6 permutations rather than the expected 8. In fact, even if I remove the set-property declaration, I still only get 6 permutations so maybe I'm doing something wrong here. define-property name=mobile.user.agent values=android,iphone,none / property-provider name=mobile.user.agent![CDATA[ { var ua = window.navigator.userAgent.toLowerCase(); if (ua.indexOf('android') != -1) { return 'android'; } if (ua.indexOf('iphone') != -1) { return 'iphone'; } return 'none'; } ]]/property-provider !-- Constrain the value for non-webkit browsers -- set-property name=mobile.user.agent value=none none when-property-is name=user.agent value=safari / /none /set-property Has anyone managed to get this to work? Does anyone know if conditional properties were indeed implemented or whether they were shelved for some reason? Thanks, -Shaun -- 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: Custom event system
Btw the compile error is because type can't be static and depend on a compile time generic arguement. When the statics are innitilaized H is not defined yet. On Jan 25, 10:34 am, Ice13ill andrei.fifi...@gmail.com wrote: Hello, i'm trying to develop a custom application event system using my own events and a base event (inherited by the other event types) Here is the code of the base event class: public class EBaseEventH extends EventHandler extends GwtEventH{ public static GwtEvent.TypeH TYPE = new GwtEvent.TypeH(); @Override public GwtEvent.TypeH getAssociatedType() { return TYPE; } } The first pb is a compilation problem: i get the message: Cannot make a static reference to a non-static type H I don't understand, why is H a static type ? and how can i resolve the pb ? (i'm not very good working with parametrized types) The second pb is that i'm not sure if this is a good/correct approach. Any ideas ? -- 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 write a simple overlay implementation?
Ok this is what I came up with: public class SVGRect extends Node { protected SVGRect() {} public static final native SVGRect create() /*-{ var rect = document.createElementNS('http://www.w3.org/2000/ svg', 'rect'); return rect; }-*/; } public class SVGPanel extends Node { protected SVGRect() {} public native SVGPanel create(String width, String height) /*-{ var svg = document.createElementNS('http://www.w3.org/2000/ svg', 'svg'); svg.setAttribute('width', width); svg.setAttribute('height', height); return svg; }-*/; } // main module public void onModuleLoad() { SVGPanel panel = SVGPanel.create(100%, 100%); Document doc = Document.get(); doc.getBody().appendChild(panel); SVGRect rect = SVGRect.create(); rect.setWidth(100); create / manipulate shapes etc ... panel.appendChild(rect); } I wanted to use overlays since they're supposed to introduce zero overhead. If I derive from Widget (like gwt-svg does), then don't we have to pay for the extra member variables used in the Widget class? I'm worried that if I want to create a large number of rectangles for example, then each will have extra data associated with it. The Widget implementation looks like this at the start: public abstract class Widget { int style, state; Display display; EventTable eventTable; Object data; so I'm just imaging each rectangle I create in my svg having all that extra data associated with it. @DaveC's comment: Your create method is returning an Element - not an SVGPanel... Yeah I'm not sure if this is right - runs ok (programming by chance) - should I really return a Node, then cast it to my SVGRect type? Since it's just an overlay, I thought it would be ok. I may be completely off on all this, any more thoughts would be great. I've got dragging svg shapes built in now and all that fun stuff, I'd like to make this library available when complete, svg is really cool. I also hooked it up to SVG Web, so that if on Internet Explorer, it'll use that library to emulate SVG using Flash, Thanks On Jan 26, 3:19 am, Brett Morgan brett.mor...@gmail.com wrote: It might be worth checking out the gwt svg implementation in gwt-widget library: http://gwt-widget.sourceforge.net/docs/xref/org/gwtwidgets/client/svg... On Tue, Jan 26, 2010 at 6:22 AM, markww mar...@gmail.com wrote: Hi, I'd like to make some really simple overlay classes in GWT to wrap some SVG stuff. I'd basically like to get a rectangle drawn, this is how I do it in javascript: var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); svg.setAttribute('width', '100%'); svg.setAttribute('height', '100%'); document.body.appendChild(svg); var rect = document.createElementNS('http://www.w3.org/2000/ svg','rect'); rect.setAttribute(width,300); rect.setAttribute(height,100); svg.appendChild(rect); and now I'm having trouble translating that to GWT. I was hoping I could do a really thin overlay around all those calls, something like this: public class SVGPanel extends JavaScriptObject { protected SVGPanel() {} public static native SVGPanel create(String width, String height) / *-{ var svg = document.createElementNS('http://www.w3.org/2000/ svg', 'svg'); svg.setAttribute('width', width); svg.setAttribute('height', height); return svg; }-*/; } public MyProject implements EntryPoint { public void onModuleLoad() { SVGPanel panel = SVGPanel.create(100%, 100%); Document.get().getBody().appendChild(panel); } } yeah but I do not have a grasp on how we can jump from the javascript representation of the SVG stuff to GWT java classes. For one, the SVGPanel class extends JavaScriptObject, but I can't simply add it to the Document body class because it's expecting an Element type. If someone could just point out the right way to do that bridge I should be able to get going after that. Also, I'm not sure if this the optimal way to incorporate some simple SVG classes, should I be modeling them using the DOM classes instead of trying to use JSNI ? 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.comgoogle-web-toolkit%2Bunsubs cr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Brett Morganhttp://domesticmouse.livejournal.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
Re: UI Binder paths
On Jan 26, 4:49 pm, Ice13ill andrei.fifi...@gmail.com wrote: i'm using uibinder to create some widgets with a CSS file and the corresponding .java and .ui.xml files. Where can i find how the uibinder accesses the required resources ? For example, i have my widgets in the package com.testapp.client.widgets : MyWidget.java and MyWidget.ui.xml The css file is in war/TestApp.css how can i access the css file with the ui:style src=file.css / tag? You can't. CssResource is a compile-time thing, and war/ is only an output destination. Your CSS should be in your classpath, then you can use paths relative to the package containing the *.ui.xml. if i separate the .java files from .ui.xml files how can i tell where to find the ui.xml file when i create the widget ? Use a @UiTemplate annotation, with a relative path (not tested but I guess it should 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: GWT Incubator update for GWT 2.0?
It looks like they snuck in an update when nobody was looking. :-) http://code.google.com/p/google-web-toolkit-incubator/wiki/Downloads On Jan 26, 9:36 am, WiseBoggz arseny.bogomo...@gmail.com wrote: Chris, is there an (approximate) timeframe for when you guys are planning to release the updated Incubator? We're having issues with GlassPanel (I guess everyone is), but also with the FastTree -- hoping the new release resolves these. Thanks! On Dec 27 2009, 11:43 pm, Chris Ramsdale cramsd...@google.com wrote: We're currently working on this and will send out an update shortly. In the meantime, any feedback regarding issues that you are are experiencing with the GWT Incubator and GWT 2.0 are greatly appreciated. - Chris On Fri, Dec 11, 2009 at 1:48 PM, Timmy G t...@paloalto.com wrote: Anyone know when we can expect to see the incubator project get refreshed for GWT 2.0? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs cr...@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: JsonpRequestBuilder only works across domains?
On Jan 26, 12:43 pm, m.mil...@newelements.de m.mil...@newelements.de wrote: once again, i have to answer the question myself! at first: would anyone PLEASE write an guide for using the jsonprequestbuilder it´s damn annoing the find out everything by try and error. about my problem: the name of the callback method for the jsonp request changes whith every request. when you do the first request the name is: __gwt_jsonp__.I0.onSuccess for the second request: __gwt_jsonp__.I1.onSuccess for the third: __gwt_jsonp__.I2.onSuccess ... that definetly make sense, BUT is nowhere noted in the documentation! and - belive it or not - you can see this little change from one request to another very hard when you look at a couple of requests. The javadoc for JsonpRequestBuilder starts with: The server will receive a request including a callback url parameter, which should be used to return the response as following: callback(json); where callback is the url parameter (see setCallbackParam (String)), It's clear to me that the URL will contain a query string with a parameter like callback=fnName (where 'callback' is the value you passed to setCallbackParam, and 'fnName' is the callback, i.e. the function name to call). It even comes with an example of calling a GData API (with a link to the GData API documentation that explains what ?alt=json-in-script means) Maybe you should first read some doc about JSON-P, such as http://en.wikipedia.org/wiki/JSON#JSONP -- 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.
Added value of UIBinder in gwt 2.0?
Hello, I've started using gwt for a couple of weeks and still face a question on which I couldn't find any good answer. What is the added value of the UIBinder in gwt 2.0? For example, in my class, I can do: VerticalPanel vertPanel = new VerticalPanel(); vertPanel.setSize(); and so on or have a ui.xml file linked with my class. Why would have to choose the ui.xml rathen than only java code? Thanks, Gerald -- 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: display images in smartgwt
By default the images are loaded from the path {web-root}/images/ In the future please post SmartGWT related questions on the SmartGWT forum : http://forums.smartclient.com/forumdisplay.php?f=14 Sanjiv On Tue, Jan 26, 2010 at 4:43 AM, joe7935 joseph.p...@gmail.com wrote: hi all, I want to display a image is my project . i want to know where to store the image and what is the path for that image. by the way i successe to display a image that was stored in the web . 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
RichTextArea
I am a bit surprised that I didn't see many issues on this: I use RichTextArea and have the following problems: 1 - The getScrollHeight() always returns the height and not the actual scroll height 2 - In IE each line is doubled Can someone help? Yossi -- 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: Advice on UIBinder
Hi Alessandro, IMHO, I wouldn't dare the (wasted) time in redoing the views using UIBinder. If your views are working beautifully right now, then why would you spend more time on them? If you have followed the best-practices, your views are likely to be silly (bunch of set and get methods). Rather, I would spend time in implementing cool stuff as client cache (if it can be done in your app), using the command pattern (if you don't already), improve client experience (I'd suggest Speed Tracer) with GWT.runAsync() calls, and more. GWT 2.0 is a new whole world and you can get some real fun in discovering it :) Last, definitely testing as much as you can your application. That would make an application beautiful ;) Cheers, Mirco On Jan 26, 2010, at 10:55 AM, ale wrote: Hello, I'm lookin for an advice. I developed an application with GWT 1.7 and I have developed without looking the style; now I finished all the function and I want to make it beautiful. I recompile all with GWT 2.0 and works well, in your opinion is worth redo all the pages using the UIBinder? What are the benefits? The alternative is to edit (create) only CSS. Thanks, greetings Alessandro -- 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 Incubator update for GWT 2.0?
I just noticed :) I kept checking the home page, and it says 1.7 still. Thanks! On Jan 26, 12:53 pm, Jim Douglas jdoug...@basis.com wrote: It looks like they snuck in an update when nobody was looking. :-) http://code.google.com/p/google-web-toolkit-incubator/wiki/Downloads On Jan 26, 9:36 am, WiseBoggz arseny.bogomo...@gmail.com wrote: Chris, is there an (approximate) timeframe for when you guys are planning to release the updated Incubator? We're having issues with GlassPanel (I guess everyone is), but also with the FastTree -- hoping the new release resolves these. Thanks! On Dec 27 2009, 11:43 pm, Chris Ramsdale cramsd...@google.com wrote: We're currently working on this and will send out an update shortly. In the meantime, any feedback regarding issues that you are are experiencing with the GWT Incubator and GWT 2.0 are greatly appreciated. - Chris On Fri, Dec 11, 2009 at 1:48 PM, Timmy G t...@paloalto.com wrote: Anyone know when we can expect to see the incubator project get refreshed for GWT 2.0? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs cr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.-Hidequoted text - - Show quoted text -- 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: UI Binder paths
i'll try that. 10x! On Tue, Jan 26, 2010 at 7:46 PM, Thomas Broyer t.bro...@gmail.com wrote: On Jan 26, 4:49 pm, Ice13ill andrei.fifi...@gmail.com wrote: i'm using uibinder to create some widgets with a CSS file and the corresponding .java and .ui.xml files. Where can i find how the uibinder accesses the required resources ? For example, i have my widgets in the package com.testapp.client.widgets : MyWidget.java and MyWidget.ui.xml The css file is in war/TestApp.css how can i access the css file with the ui:style src=file.css / tag? You can't. CssResource is a compile-time thing, and war/ is only an output destination. Your CSS should be in your classpath, then you can use paths relative to the package containing the *.ui.xml. if i separate the .java files from .ui.xml files how can i tell where to find the ui.xml file when i create the widget ? Use a @UiTemplate annotation, with a relative path (not tested but I guess it should 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?
This is beyond anything Ive come across before, sorry I cant help anymore, though it looks like i did manage to push you in the right direction! good luck figuring it out... 2010/1/26 dduck anders.johansen.a...@gmail.com On 26 Jan., 16:15, Djabi george.djaba...@gmail.com wrote: BTW, Your code stills looks like compiled with -style obfuscated. You are right. Thought I had fixed it, but hadn't. Here is the unobfuscated code: function com_google_gwt_user_client_ui_Panel_ $clear__Lcom_google_gwt_user_client_ui_Panel_2V(this$static){ var it; it = com_google_gwt_user_client_ui_WidgetCollection$WidgetIterator_ $WidgetCollection $WidgetIterator__Lcom_google_gwt_user_client_ui_WidgetCollection $WidgetIterator_2Lcom_google_gwt_user_client_ui_WidgetCollection $WidgetIterator_2(new com_google_gwt_user_client_ui_WidgetCollection $WidgetIterator, this $static.com_google_gwt_user_client_ui_ComplexPanel_children); while (it.com_google_gwt_user_client_ui_WidgetCollection $WidgetIterator_index it.com_google_gwt_user_client_ui_WidgetCollection$WidgetIterator_this $0.com_google_gwt_user_client_ui_WidgetCollection_size - 1) { com_google_gwt_user_client_ui_WidgetCollection$WidgetIterator_ $next__Lcom_google_gwt_user_client_ui_WidgetCollection $WidgetIterator_2Lcom_google_gwt_user_client_ui_Widget_2(it); com_google_gwt_user_client_ui_WidgetCollection$WidgetIterator_ $remove__Lcom_google_gwt_user_client_ui_WidgetCollection $WidgetIterator_2V(it); } } Error points to line starting with it = com_google.. Error message is: (TypeError): Result of expression 'this$static' [null] is not an object. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to use the emulated stack traces ?
Never mind... I should have read the reported error more careful. I did not realize that there was a set-configuration-property as well... I had to read the DTD to realize this. David On Tue, Jan 26, 2010 at 3:23 PM, David david.no...@gmail.com wrote: Hi, In GWT 2.0 there is supposed to be a feature that allows us to emulate java stack traces in the compiled web application. I can not find much information on how to enable this. The docs are very quite about this subject. I found that there are 3 properties: - compiler.emulatedStack - compiler.emulatedStack.recordLineNumbers - compiler.emulatedStack.recordFileNames According to info I found these 3 are supposed to be boolean properties. I tried setting them to true, but I get a very strange error in recordLineNumbers and recordFileNames: [ERROR] The specified property 'compiler.emulatedStack.recordLineNumbers' is not of the correct type; found 'ConfigurationProperty' expecting 'BindingProperty' [java] [ERROR] Failure while parsing XML How do I enable these features ? David -- 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 : Re: Added value of UIBinder in gwt 2.0?
Thank you for those points you mentioned. Actually in my case we are developers and so would have a preferences in java code rather than in xml instructions. What I also wonder is if there are some optimisations in using one or the other method. Do you have any idea? Le 26 janv. 2010, 7:57 PM, Mirco mirco.li...@gmail.com a écrit : Hi Gerald, declarative UI have some good advantages. The ones that first pop up in my mind are: - Your Web designers (which are usually not very used to Java fanciness) can be more confident while retouching the layout of your application. Which also decrease the chances that several people (devs and designers) touch the same file, with the risk of nasty conflicts to resolve. - A second advantage goes back to the verbosity of Java, which has not been designed to be a GUI language (rather it is a general-purpose language). Cf this example from the GWT Tutorial. http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html public class MyFoo extends Composite { Button button = new Button(); public MyFoo() { button.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { handleClick(); } }); initWidget(button); } void handleClick() { Window.alert(Hello, AJAX); } } In a UiBinder owner class, you can use the @UiHandler annotation to have all of that anonymous class nonsense written for you. public class MyFoo extends Composite { @UiField Button button; public MyFoo() { initWidget(button); } @UiHandler(button) void handleClick(ClickEvent e) { Window.alert(Hello, AJAX); } } Hope this helps. Cheers, Mirco On Jan 26, 2010, at 7:04 PM, Djay wrote: Hello, I've started using gwt for a couple of weeks and still face a question on which I cou... -- 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.
popuppanel hight/width set to itself, does not work as expected
Check this code: PopupPanel p = new PopupPanel(); p.setSize(p.getOffsetWidth() + px, p.getOffsetHeight() + px); As expected, nothing should happen., size of the popup panel should not change But you can notice that the size changes. Both height and width increases by the amount of padding padding/margin/border specified in the style. I you make those attribute 0px, it works. This problem is not seen with DecoratedPopupPanel, reason being, DecoratedPopupPanel does not use those attributes. Any one know the workaround, or what's wrong here? -- 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: SubmitCompleteEvent.getResults on File upload
A solution to this problem anyone ? On 28 déc 2009, 14:58, Peter Ondruska peter.ondru...@gmail.com wrote: public class Upload extends HttpServlet { private static final long serialVersionUID = -7859156850837921885L; private final Logger logger = Logger.getLogger(getClass().getName()); @SuppressWarnings(unchecked) @Override protected void doPost(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { response.setContentType(text/plain); if (!ServletFileUpload.isMultipartContent(request)) return; final PersistenceManager pm = PMF.get().getPersistenceManager(); final ServletFileUpload upload = new ServletFileUpload(); upload.setSizeMax(1024*1024-256); try { final FileItemIterator iterator = upload.getItemIterator(request); while (iterator.hasNext()) { final FileItemStream fis = iterator.next(); if (!fis.isFormField()) { final String name = fis.getName(); final String mimeType = fis.getContentType(); // TODO overwrite existing if owner matches final InputStream is = fis.openStream(); final Blob blob = new Blob(IOUtils.toByteArray(is)); final Document document = new Document(name, mimeType, blob); final UserService us = UserServiceFactory.getUserService(); final User user = us.getCurrentUser(); document.setOwner(user); pm.makePersistent(document); Cache cache = null; try { CacheFactory cacheFactory = CacheManager.getInstance ().getCacheFactory(); cache = cacheFactory.createCache(Collections.emptyMap()); cache.put(docname~ + name, blob.getBytes()); cache.put(doctype~ + name, mimeType); } catch (CacheException e) { logger.log(Level.SEVERE, failed to configure cache, e); } } } response.getWriter().write(OK); } catch (SizeLimitExceededException e) { response.getWriter().write(Too big); } catch (FileUploadException e) { logger.log(Level.SEVERE, null, e); } finally { pm.close(); } } } On 28 pro, 10:56, Andrés Cerezo acerezoguil...@gmail.com wrote: I need more information, can yoyu sen the source code of the program.java ? Thanks. 2009/12/26 Peter Ondruska peter.ondru...@gmail.com My upload servlet successfully accepts data however the response sent is not what I expect: pre style=word-wrap: brak-word; white-space: pre-wrap;OK/pre instead of just: OK The servlet basically responds with: response.setContentType(text/plain); response.getWriter().write(OK); I have tried with curl to post something and servlet (GAE/J SDK) sends only OK but in GWT application I see *pre style=word-wrap: brak- word; white-space: pre-wrap;OK/pre* when calling event.getResults (). Any clue what am I 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.comgoogle-web-toolkit%2Bunsubs cr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.–Skrýt citovaný text – – Zobrazit citovaný 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.
Default Arabic Number system, Arabic or Latin?
We are in the process of updating number format constants based on latest CLDR update. In previous version, Arabic number system is used for Arabic countries. Now CLDR offers both number system due to the popular request of latin number system. In CLDR file, Arabic number system is marked as the default. I just want to check if we should stick with Arabic number system for Arabic locales or switch to Latin system. I guess Latin number is more popular on the web in Arabic countries. Is it true? Arabic number system uses following digits ٠ ١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩ ( you should see them in reverse order as it is RTL). Latin digits are those 0, 1, 2, 3, 4, 5, 6, ,7, 8, 9 that we are all very familiar with. And of cause, other symbols like decimal point, exponential symbol, etc all different for each of those 2 systems. shanjian -- 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: SubmitCompleteEvent.getResults on File upload
On 27 jan, 00:43, mably fm2...@mably.com wrote: A solution to this problem anyone ? The JavaDoc says send back text/html. Follow this advice, really (just pay attention to and chars that might appear in your output). On 28 déc 2009, 14:58, Peter Ondruska wrote: response.setContentType(text/plain); -- 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 overwriting java.util and java.io classes, Generators, and importing source that is in a src-jar
Hello, list! I'm trying to get back into writing my JSR-303 compliant validation framework for GWT for a couple of reasons. (http://code.google.com/p/ gwt-validation) 1) They (the JSR group) have released an updated/final proposition. They have also released source code! 2) I have some free development time and the version 1 isn't something I'm terribly proud of since I hacked it together for school. I'm taking the src-jar from the JSR-303 group, unpacking it, commenting out the bits that don't work in GWT (java.util.Locale and java.io.InputStream), and just putting it alongside my code in Eclipse. I have a feeling that this is not the right way to do it, nor is it the way I'd like to. I would like to: 1) Create an implementation of java.util.Locale and java.io.InputStream for GWT to use as a reference at compile time. 2) Reference the src-jar directly by using a javax.validation package with the Validation.gwt.xml in it that references the source path of /. If I do this, everything should work properly with the added benefit that I become JSR compliant (to those interfaces) and other people can use my code alongside whatever validation package they're using with (hopefully) minimal side effects. I've also got another problem... I would really like one code path, so that the developer using my implementation can call some code like: Validator validator = ValidationFactory.getValidator(); Instead of having to use two versions, one for pure java and one for hosted: Validator validator = new Validator(); Validator validator = GWT.create(Validatable.class); I'm planning on generating two things: 1) The metadata packages for each class that has validation annotations. 2) The runtime-invokers for each of the classes that has validation annotations. Obviously, the reflection code will not work on the GWT side so something like this will not work because Validator.class has calls to reflection code: public class ValidationFactory { public static Validator getValidator() { if(GWT.isHosted() || GWT.isScript()) { return GWT.create(Validatable.class); } else { return new Validator(); } } } I know that gwt-ent and other libraries have reflection bits that can be used at runtime in GWT but gwt-ent has a differing implementation of JSR-303 and involves adding a lot of other annotation bits to the classes for reflection to work as well. I think I've nailed down the architecture for the broad strokes of getting this to work with no additional harassment to the user but getting these technical details solved will help me greatly. I look forward to any/all responses. Chris -- 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: Maven users survey
Hi Keith, Thanks for offering to help us maven users. I wish you guys did use maven :) On the development workstation, we use STS (for our purposes, Eclipse Ganymede with m2eclipse plugin). We use the Google Plugin for Eclipse for Development mode. We run development mode from the launch menu (by manually configuring an Eclipse Debug/Run configuration with the -- noserver mode set. For our continuous integration environment, we use Hudson and Maven 2.2.1. We compile our code with the Google Eclipse Plugin and copy our code over to src/main/webapp/app-name for debugging with our server. We use Tomcat as our dev server. I might like using Jetty, but there need to be more instructions for configuring the embedded Jetty in the Google Plugin for Eclipse. I think you are on the right track re: the impedance mismatch between Google Plugin for Eclipse (GWT) and Maven. Maven does typically look to src/main/webapp. We use org.codehaus.mojo gwt-maven-plugin as configured here: plugin groupIdorg.codehaus.mojo/groupId artifactIdgwt-maven-plugin/artifactId version1.2/version configuration inplacefalse/inplace runTargetindex.html/runTarget webXmlsrc/main/webapp/WEB-INF/web.xml/webXml logLevelINFO/logLevel warSourceDirectory/war/warSourceDirectory /configuration executions execution goals goalcompile/goal goalgenerateAsync/goal !-- goaltest/goal -- /goals /execution /executions /plugin Our project is a multi-module project with the GWT portion as a specific module dependent upon a backend module (which has services and DAOs). We have another module which handles a web services layer (separate from GWT). We copy our GWT code into src/main/webapp so it can be hosted by the WTP (m2 eclipse integration with Tomcat) We don't fire up Jetty. We launch Tomcat from Eclipse WTP (Debug On Server). To debug GWT, in development, we launch our app with --noserver and specify the startup URL to point to the WTP app. It connects to the GWT plugin debugger. Our front end testing leaves a lot to be desired. We're trying to use mvp and mocking to better test them. We don't have it working smoothly yet. Our build code for our WAR isn't really working well, yet either. I'm happy to do a webex/dimdim to show you what we have working (and not working). One thing I've noticed from the responses so far is that some folks use mvn eclipse:eclipse and others use m2eclipse (from sonatype). The sonatype piece seems to have better WTP integration and is part of the IAM project as I understand it. It seems more integrated if you use eclipse. The sonatype guys are the folks to talk to, specifically Jason Van Zyl and Eugene Kuleshov (http://www.sonatype.com/people/ category/m2eclipse/) I also agree with Nir Feldman's comments. I see these as well: 1. Maven standard is using the src/test/java folder for test cases. Mvn eclipse:eclipse then generates this folder as a source folder. Since the GWTTestCase is not part of the user jar and is part of the dev jar when running the application from eclipse we always get the following error: 12:16:37.315 [ERROR] [] Line 12: No source code is available for type com.google.gwt.junit.client.GWTTestCase; did you forget to inherit a required module? 2. Support for coverage reports. When using cobertura plugin the reports does not contain the GWTTestCase tests. Brian Bonner On Jan 13, 11:35 am, Keith Platfoot kplatf...@google.com wrote: Hi folks, For the next release of the Google Plugin for Eclipse, we're planning on making a few tweaks to make life easier for Maven users. That's right: we've seen the stars on the issue tracker, and have decided it's time to act. I would say, we feel your pain, but the problem is, we don't. Which is to say, nobody on the plugin team actually uses Maven (everybody around here uses Ant). However, I've been researching Maven to determine exactly what changes we should make to allow it to work more seamlessly with the Google Eclipse Plugin. I've read the relevant issues and groups postings, so I think I have a rough idea of what needs to happen. However, before we go and make any changes, I wanted to ask for the community's advice. So, here are some questions for you. What is the typical workflow of a GWT developer using Maven? I've installed Maven and the gwt-maven-plugin 1.2-SNAPSHOT and managed to create a GWT 2.0 app with the provided archetype. After some tweaking, I'm able to GWT compile, debug with Eclipse (though not via our Web App launch configuration), create a WAR, etc. However, I'm more interested in how you all are doing things. For example: How do you... - Create a new project? - Perform GWT compiles? - Debug with Eclipse? - Run
How future proof are GWT permutations?
How future proof are GWT compilations? For example, if I compile my app today with 2.0: 1. How it will react in a couple of years to lets say IE 9, Firefox 4, etc.? 2. How it will react to a yet unknown, however standards compatible, browser? -- 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: Problems with build process, please help
It should sound weird, but... have you tried to compile with less memory at -Xmx parameter? Try the default -Xmx128m, and others like -Xmx512m, -Xmx1024m or -Xmx8192m This came from here It's more that the JVM allocates multiple regions of memory. When you increase -Xmx, this can cause some of the other ones to shrink. I'll keep researching for an answer for this issue. -- Francisco Bischoff http://www.cirurgiaplastica.pro.br O mate está para o gaúcho como o chá para os ingleses, a coca para os bolivianos, o uísque para os escoceses e o café... para os brasileiros -- Eduardo Bueno On Tue, Jan 26, 2010 at 2:08 PM, Pieter Breed pieter.br...@gmail.comwrote: Sorry, I just read what I worte and realised I made a mistake. We don't have that many .properties files, but we do have a large ( 1000) files that describe each field in the DTO with a constant string value. Ex: public class AdminUserListDefProperties implements Serializable, BeanModelTag { public final static String Name = Name; } describes a class AdminUserListDef, which has one property, ie, getName () and setName(). We have about a thousand of these (our data model is pretty huge) but they are only used on the server, not on the client Pieter On Jan 26, 3:43 pm, Pieter Breed pieter.br...@gmail.com wrote: This is the original v1.7 code with only the GWT 2 change applied, ie no other code changes have been applied yet. We are able to run the app in dev mode without any issues. We use a few 3rd party modules, yes. The primary client-side dependency is the GXT module. On the server we have a few other dependencies: - ehcache - derby - jna We do have a large number of codegen files. We have a 3rd party middle- ware component that we use for comms, which allows us to have clients for the server in many languages. We use this technology to codegen XML serializers and DTOs. This pipeline is on the server, from where normal GWT rpc is used to communicate with the client via the API service calls. For most of these DTO's we create .properties files that help us to create beans to which we can bind the UIs. Does this information help? Pieter On Jan 26, 2:35 pm, Francisco Bischoff franzbisch...@gmail.com wrote: The code you are trying to compile is the original from GWT 1.7 project or have you made some changes? What about the 3rd party modules, do you use some of that? Maybe there is some code messing up with the compiler... And the Development Mode, can you try the application using it? Try to compile your code as original as you had successfully compiled in GWT 1.7 and try to make experiments cutting some 3rd party modules off. -- Francisco Bischoffhttp://www.cirurgiaplastica.pro.br O mate está para o gaúcho como o chá para os ingleses, a coca para os bolivianos, o uísque para os escoceses e o café... para os brasileiros -- Eduardo Bueno On Mon, Jan 25, 2010 at 10:45 AM, Pieter Breed pieter.br...@gmail.com wrote: Hi Frincisca, Yes, actually... My machine is currently trying to build the app with an allocated 15Gigabytes of allocatable ram. Not many desktop machines have so much, so I'm stuttering along on virtual memory which makes it slow. (It's been busy for 2 hours already) But it does feel strange to me that gwtc would need so much ram, which is why I'm asking if we can work with the compiler in this case to keep these requirements down. The other option is that we are doing something wrong (which is slightly more likely). Maybe somebody can help us sort it out? Pieter On Jan 25, 11:59 am, Francisco Bischoff franzbisch...@gmail.com wrote: Hi, I'm not the very experient here, but have you tried to follow the compiler error? [ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...) Maybe you just need to reserve more memory for the java compiler. -- Francisco Bischoffhttp://www.cirurgiaplastica.pro.br O mate está para o gaúcho como o chá para os ingleses, a coca para os bolivianos, o uísque para os escoceses e o café... para os brasileiros -- Eduardo Bueno On Mon, Jan 25, 2010 at 9:47 AM, Pieter Breed pieter.br...@gmail.com wrote: [ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs cr...@googlegroups.com . For more options, visit this group at
Re: programatically using CssResource styles in 2.0
thanks for the help Thomas! On Jan 25, 4:36 am, Thomas Broyer t.bro...@gmail.com wrote: On Jan 25, 5:38 am,rossross.m.sm...@googlemail.com wrote: Hi, This is probably a very noob question but I have updated my project to GWT 2.0 and I am trying to rewrite some of my Widgets to use Declarative UI because it looks very promising and cool! However, I am a little stumped on how to apply CssResource styles dynamically in my code. I found the trailing info on the site (http:// code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html) and copied it here for convenience. The part that stumps is me is the following lines: void setEnabled(boolean enabled) { getElement().addStyle(enabled ? : style.enabled() : style.disabled ()); getElement().removeStyle(enabled ? : style.disabled() : style.enabled()); } There do not appear to be addStyle(String) and removeStyle(String) methods in the Element class?? Am I missing something obvious? I hope so! The methods are actually named addClassName and removeClassName. -- 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.
Cancel treeitem selection
Hi. I have a GWT tree of folders. When a folder i do an RPC call to load a list of files on the right side of the screen. If the user were to rapidly change folders it queues up the RPC calls and takes a very long time to load whatever the last folder clicked was. I want to prevent a folder change while the files are still being loaded for the just clicked on folder, so basically I want to cancel the selection event. I've tried a few approaches, but it seems difficult since SelectionEvent cannot be cancelled. I can get it to not select the new treeitem, but it also looses selection of the old treeitem even if i explicitly reselect it. What is the best way to cancel treeitem selection? -- 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 set center property for dialog box using ui binder in xml ????
Hi Basically i want dialog box center 's call to show dialog box in center should be set in xml as default. Can anyone help me ?? Thanks Dev -- 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.
css resource for widget
can anyone give an example how to use CssResource for defining css for a Widget, e.g. SplitLayoutPanel, in standard way. since I cannot expose gwt-SplitLayoutPanel-HDragger in a CssResource because of invalid - character. // @ClassName(gwt-SplitLayoutPanel-HDragger) // String gwtSplitLayoutPanelHDragger(); the Mail example did it in a @NotStrict way // java interface GlobalResources extends ClientBundle { @NotStrict @Source(global.css) CssResource css(); } // global.css .gwt-SplitLayoutPanel-HDragger { cursor: col-resize; } .gwt-SplitLayoutPanel-VDragger { cursor: row-resize; } -- 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.
Call into unknown JavaScript function given only name as string
Hi, I have a requirement where I have to call from GWT client code into an arbitrary JavaScript function given only its name. For example I have the name of the function as a String say doSomething and I have an array of Strings for arguments. I'm expecting that the function is already defined and implemented in the browser by our customers but it could be anything and there can be more than one of them. Meaning there might be one of these functions or there could be 100. I'm just wondering what the correct JSNI syntax for the body would be for the following? protected native void invokeJSFunction(String functionName, String[] args) /*-{ // what would I put here? }-*/; Any help is greatly appreciated! Thanks, -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: mousemove listener for document?
Are u sure abt that? I haven't done any testing in gwt for it. If u hv done, please share the details since have started using this extensively in my project. My experience from pure javascript is that one single handler at document level is much better that having several handlers on various buttons and anchors. Thanks. On Tue, Jan 26, 2010 at 4:47 PM, DaveC david.andrew.chap...@googlemail.comwrote: I've run into (perfornance) issues using a NativePreviewHandler as it will recieve *ALL* events (mouseover/out/move/up/down etc, etc...) which is why I don't use that method. On Jan 26, 11:08 am, Fazeel Kazi fazzze...@gmail.com wrote: Another simpler solution using EventPreview: Event.addNativePreviewHandler(new Event.NativePreviewHandler() { public void onPreviewNativeEvent(NativePreviewEvent foEvent) { switch(foEvent.getTypeInt()) { case Event.ONCLICK: handleClick(foEvent); break; case Event.ONMOUSEOVER: handleMouseOver(foEvent); break; }// end switch } }); Regards. On Tue, Jan 26, 2010 at 3:09 PM, DaveC david.andrew.chap...@googlemail.comwrote: The way I've done it (I think is): 1. Create a new Class that extends Widget and implements HasMouseMoveHandlers 2. Grab the RootPanel Element and pass that into your new Class constructor (the one that takes an Element as a param) - this should call setElement(Element element) with you passed in element... You can now add MouseMove handlers to you new Widget... On Jan 26, 12:49 am, markww mar...@gmail.com wrote: Hi, Is there a way to listen for mousemoves on the main document? In javascript, I usually do this: window.onload = function() { document.onmousemove = function(e) { alert(the mouse was moved!); }; } can we add some sort of similar listener in GWT? I'm just not sure where to start, 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com google-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%252bunsubscr...@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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT support for Grails/Groovy domain objects
GWT is the obvious choice for UI. But if you want to use Grails/Groovy for server side, you have to either code messy DTOs or client side POJOs. It would be nice if GWT would support using the Grails/Groovy domain objects directly on the client. Any chance of that happening? -- 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: Call into unknown JavaScript function given only name as string
Oh! And (hopefully I'm not stating the obvious here), check out the apply Function method: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function/apply and be careful with what this you pass into with it if the author of that function made any assumptions about what this would refer to. The exciting world of javascript! On Jan 26, 9:39 pm, Brendan Kenny bcke...@gmail.com wrote: Check out the answers here:http://stackoverflow.com/questions/359788/javascript-function-name-as... Though the executeFunctionByName example seems a little overblown. The real take away is to not use eval() if you can help it. I would also check to make sure the function is really a function before you call it (e.g. typeof $wnd[globalFunctionName] === 'function'). On Jan 26, 4:05 pm, Patrick patrickmad...@optonline.net wrote: Hi, I have a requirement where I have to call from GWT client code into an arbitrary JavaScript function given only its name. For example I have the name of the function as a String say doSomething and I have an array of Strings for arguments. I'm expecting that the function is already defined and implemented in the browser by our customers but it could be anything and there can be more than one of them. Meaning there might be one of these functions or there could be 100. I'm just wondering what the correct JSNI syntax for the body would be for the following? protected native void invokeJSFunction(String functionName, String[] args) /*-{ // what would I put here? }-*/; Any help is greatly appreciated! Thanks, -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT support for Grails/Groovy domain objects
The problem is the GWT RPC's serialization, which can't work with objects created by hibernate. You can use the DTO Grails plugin ( http://www.grails.org/plugin/dto) or you can use JSON / REST for communication. In the case of a Grails app, which comes with great support for REST / JSON, I would prefer the second way. Regards Jan Ehrhardt On Wed, Jan 27, 2010 at 4:37 AM, Don Ruby, Ramp;D donald.r...@mindspring.com wrote: GWT is the obvious choice for UI. But if you want to use Grails/Groovy for server side, you have to either code messy DTOs or client side POJOs. It would be nice if GWT would support using the Grails/Groovy domain objects directly on the client. Any chance of that happening? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT Tomcat in Eclipse: Tomcat loads its classes from gwt-dev.jar instead of its own.
Hi, I actually got lost at the part where you said that you disable the google appengine server. It doesn't make sense, because if you intend to deploy your application to an application server not equal to GAE you must disable GAE support on your eclipse project. In fact, when you create a GAE project, eclipse copies in your WEB-INF/lib jars that I'm 200% sure that would override some of the tomcat's classes. So, try disabling GAE support for your eclipse project and try again. Also make sure that in WEB-INF/lib you have gwt-servlet.jar Regards, Cristian. On 01/25/2010 11:49 PM, Bob Luo wrote: Hi, I am actually experimenting with GWT to replace our UI. (We actually use struts) I like GWT a lot so far. I thus pushed the experiment further by trying to integrate it in our solutions. I must work within a few parameters set by my employer. Among those, it must be possible for my team to debug/trace GWT stuff (Take advantage of the devmode) but while the main application still runs in tomcat 5.5.26. (-noserver switch). All of this inside the same Eclipse. I came close to get this to work, really close, but here's my problem: The tomcat ClassLoader loads tomcat classes found in gwt-dev.jar instead of reading its own jar files. If both those tomcats (Mine and GWT's) were of the same version, I would probably not even know there's a problem. This is how i am set up: 1. I have a tomcat installed outside of my project, say, d:/ tomcat-5.5.26 2. I have an eclipse project which was created fully by the GWT wizard. (say, d:/projects/myproject) 3. I activated the AJDT builder in this project. Up until here, everything works great, but inside Google App Engine. (no -noserver switch) 4. I deactivate the Google App Engine (add the -noserver switch) 5. I create a server.xml inside my project, rig everything up 6. I create a Run Configuration this way: 6a. Main class: org.apache.catalina.startup.Bootstrap 6b. Working directory: d:/tomcat-5.5.26/bin 7. I add bootstrap.jar in the classpath of my project. I try to launch it, bang problems arise because of the mixup. I tried tampering with the classpath in my Run Configuration to eliminate GWT, and my tomcat loads allright. (Obviously the GWT classes on the server-side fail to load since they extend RemoteService, which, without GWT jars, is not found of course) I suppose that if the tomcat jars were earlier in the classpath, I would not have this problem? A solution for me to try would be to open gwt-dev.jar and erase tomcat classes. I don't like this solution. Would it even work? Is there a better way? Thanks a lot! Bob -- 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-contrib] Re: Comment on DataBackedWidgetsDesign in google-web-toolkit
Comment by andres.a.testi: How this design fits with the passive view pattern? Should not be the view isolated from the model? If the view handles a ListEventT, where T is a model type, is not there a violation to the MVP contract? For more information: http://code.google.com/p/google-web-toolkit/wiki/DataBackedWidgetsDesign -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Changing JsArrayT extends JavaScriptObject to JsArrayT
Collections are very, very amenable to bikeshedding, so I want to have a pretty well thought-out plan so as to avoid endless what if threads, if at all possible. Of course, if the design is bad, people will hopefully say so and we'll do something different. But I just don't want to start with so little that it doesn't have enough intertia to achieve escape velocity. Bruce, for collections in general, maybe we should also consider using / linking / emulating closure collections. With stuff like Bach on the horizon, we may otherwise end up with too many collection frameworks, creating a situation similar to strings in C++. For simple arrays, I think it may make sense to re-visit the original idea of extending the scope of JsArrayT extends JsObject to JsArrayT extends Object. Stefan -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Changing JsArrayT extends JavaScriptObject to JsArrayT
Correct me if I'm wrong, but isn't the closure collections library more like JRE-ish collections than simple JSO wrappers? My impression of most JS code was that if it needed a string map or simple array, people tended to just use raw objects, knowing that there are certain strange behaviors they have to avoid. That said, if there's a way to make them play nice together, I'm all for it. On Tue, Jan 26, 2010 at 7:46 AM, Stefan Haustein haust...@google.comwrote: Collections are very, very amenable to bikeshedding, so I want to have a pretty well thought-out plan so as to avoid endless what if threads, if at all possible. Of course, if the design is bad, people will hopefully say so and we'll do something different. But I just don't want to start with so little that it doesn't have enough intertia to achieve escape velocity. Bruce, for collections in general, maybe we should also consider using / linking / emulating closure collections. With stuff like Bach on the horizon, we may otherwise end up with too many collection frameworks, creating a situation similar to strings in C++. For simple arrays, I think it may make sense to re-visit the original idea of extending the scope of JsArrayT extends JsObject to JsArrayT extends Object. Stefan -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Comment on DataBackedWidgetsDesign in google-web-toolkit
Comment by j...@google.com: @gg: Thanks -- we definitely need to look at glazed lists when thinking about how table models are defined. @andres: We certainly need to experiment with the class relationships, and this is by no means final. The broad idea, however, is that the views are essentially passive -- they express a range of interest (e.g., a row-range in the case of a list or table) that the model then pushes into them asynchronously. This allows for several specific benefits: - It's inherently asynchronous, making it easier to fetch data as necessary. - It allows the model to send new data to a view whenever it's available (not just when requested) - This is important for server-pushed data. - It allows the model to quickly provide whatever data it has available, then send the rest later. For example, if a list needs rows [0, 10], and [0, 5] are cached, the model can provide the first five, request the rest, and provide them when they're available. It's also important to note that this is *not* meant to be a fully-abstract MV[CP] system -- it's just meant to solve the problem of getting data efficiently and asynchronously to large lists, trees, and tables. In that sense it's more like Swing's JTable/TableModel. A system with its own MV[CP] pattern implementation could reasonably treat the pair as a single logical unit. For more information: http://code.google.com/p/google-web-toolkit/wiki/DataBackedWidgetsDesign -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Canvas based widget library
Hi, this is just a very simple demo of a widget library based on HTML5 canvas: (reload the page after loading so that you can see the icons) http://dev.gumboo.com:8880/Showcase/ The widgets can be skinned with CSS (getComputedStyle is used), see: http://dev.gumboo.com:8880/Showcase/Showcase.css The projects home page will be (so far there is nothing there): http://code.google.com/p/gwt-rhodes/ Any comments? Kind Regards, George. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Comment on DataBackedWidgetsDesign in google-web-toolkit
Comment by rj...@google.com: MVP isn't gospel. Perhaps we'll find that the ListModel winds up playing the View roll when one of these table widgets is needed by an MVP developer. For more information: http://code.google.com/p/google-web-toolkit/wiki/DataBackedWidgetsDesign -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Comment on DataBackedWidgetsDesign in google-web-toolkit
Comment by georgopoulos.georgios: Hi, maybe out of scope, but ListBoxT in GWT Mosaic is a ScrollTable with a ListModel, see: http://69.20.122.77/gwt-mosaic/Showcase.html#CwFilterListBox Having a model will be later useful in data binding, like in beans binding example: http://69.20.122.77/gwt-mosaic/Showcase.html#CwListBoxBinding The ListBoxAdapterProvider is using internally a ListModel to bind a java.util.List with ListBox. Like in NetBeans with JTable or JList Benas Binding. For more information: http://code.google.com/p/google-web-toolkit/wiki/DataBackedWidgetsDesign -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Server-side Class object on client-side
Think about an Event based RPC mechanism as outlined in this Article.. http://sonymathew.blogspot.com/2010/01/gwt-jee-blueprint.html Essentially, RPC is then merely firing/listening to events. You merely extend RemtoteRequestEvent and RemtoteRequestEvent and make sure any member content you add is serializable. Sony On Jan 25, 10:33 am, John Tamplin j...@google.com wrote: On Mon, Jan 25, 2010 at 11:26 AM, Nathan Wells nwwe...@gmail.com wrote: So, is it possible to get this sort of functionality? It would enable an RPC mechanism that is a lot easier and more natural. I don't think there would be any performance issues, but that is obviously hard to say for sure at this point. The RPC mechanism has no way to serialize a Java Class instance. Conceivably, you could write a CustomerFieldSerializer for Class and send the name to the client, and then Class.forName (etc) on the server, though I haven't tried it. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: JsStackEmulation leaves alone expressions invoked as functions
LGTM w/ nits. http://gwt-code-reviews.appspot.com/132815/diff/3001/3003 File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right): http://gwt-code-reviews.appspot.com/132815/diff/3001/3003#newcode594 Line 594: private final SetJsNode? invokedNodes = new HashSetJsNode?(); Add javadoc http://gwt-code-reviews.appspot.com/132815/diff/3001/3003#newcode759 Line 759: private final JsName rootLineNumbers = program.getRootScope().findExistingUnobfuscatableName( Why is this moved? http://gwt-code-reviews.appspot.com/132815/diff/3001/3005 File user/test/com/google/gwt/core/client/impl/StackTraceLineNumbersTest.java (right): http://gwt-code-reviews.appspot.com/132815/diff/3001/3005#newcode24 Line 24: public class StackTraceLineNumbersTest extends GWTTestCase { Doesn't this needed to be added to CompilerSuite? http://gwt-code-reviews.appspot.com/132815 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7464 committed - tr...@7399 was merged into this branch...
Revision: 7464 Author: jlaba...@google.com Date: Tue Jan 26 08:21:15 2010 Log: tr...@7399 was merged into this branch Add deferred binding for setting float style. svn merge -c 7399 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk http://code.google.com/p/google-web-toolkit/source/detail?r=7464 Modified: /releases/2.0/branch-info.txt /releases/2.0/user/src/com/google/gwt/dom/client/DOMImpl.java /releases/2.0/user/src/com/google/gwt/dom/client/DOMImplIE6.java /releases/2.0/user/src/com/google/gwt/dom/client/Style.java /releases/2.0/user/src/com/google/gwt/user/client/ui/TabLayoutPanel.java /releases/2.0/user/test/com/google/gwt/user/client/ui/TabLayoutPanelTest.java === --- /releases/2.0/branch-info.txt Mon Jan 25 11:45:40 2010 +++ /releases/2.0/branch-info.txt Tue Jan 26 08:21:15 2010 @@ -1320,3 +1320,7 @@ Remove an RPC request's context path when computing module-relative paths. svn merge -c 7459 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk +tr...@7399 was merged into this branch + Add deferred binding for setting float style. + svn merge -c 7399 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk + === --- /releases/2.0/user/src/com/google/gwt/dom/client/DOMImpl.java Wed Sep 2 07:58:52 2009 +++ /releases/2.0/user/src/com/google/gwt/dom/client/DOMImpl.java Tue Jan 26 08:21:15 2010 @@ -69,6 +69,18 @@ return select; } + public native void cssClearOpacity(Style style) /*-{ +style.opacity = ''; + }-*/; + + public String cssFloatPropertyName() { +return cssFloat; + } + + public native void cssSetOpacity(Style style, double value) /*-{ +style.opacity = value; + }-*/; + public abstract void dispatchEvent(Element target, NativeEvent evt); public native boolean eventGetAltKey(NativeEvent evt) /*-{ === --- /releases/2.0/user/src/com/google/gwt/dom/client/DOMImplIE6.java Wed Jun 10 14:19:15 2009 +++ /releases/2.0/user/src/com/google/gwt/dom/client/DOMImplIE6.java Tue Jan 26 08:21:15 2010 @@ -21,6 +21,21 @@ */ class DOMImplIE6 extends DOMImplTrident { + @Override + public native void cssClearOpacity(Style style) /*-{ +style.filter = ''; + }-*/; + + @Override + public String cssFloatPropertyName() { +return styleFloat; + } + + @Override + public native void cssSetOpacity(Style style, double value) /*-{ +style.filter = 'alpha(opacity=' + (value * 100) + ')'; + }-*/; + @Override public int getAbsoluteLeft(Element elem) { Document doc = elem.getOwnerDocument(); === --- /releases/2.0/user/src/com/google/gwt/dom/client/Style.java Wed Nov 4 06:59:39 2009 +++ /releases/2.0/user/src/com/google/gwt/dom/client/Style.java Tue Jan 26 08:21:15 2010 @@ -94,6 +94,7 @@ public abstract String getType(); } + /** * Enum for the border-style property. */ @@ -246,6 +247,27 @@ } }; } + + /** + * Enum for the float property. + */ + public enum Float implements HasCssName { +LEFT { + public String getCssName() { +return FLOAT_LEFT; + } +}, +RIGHT { + public String getCssName() { +return FLOAT_RIGHT; + } +}, +NONE { + public String getCssName() { +return FLOAT_NONE; + } +}, + } /** * Enum for the font-style property. @@ -515,6 +537,10 @@ private static final String DISPLAY_BLOCK = block; private static final String DISPLAY_NONE = none; + private static final String FLOAT_LEFT = left; + private static final String FLOAT_RIGHT = right; + private static final String FLOAT_NONE = none; + private static final String FONT_STYLE_OBLIQUE = oblique; private static final String FONT_STYLE_ITALIC = italic; private static final String FONT_STYLE_NORMAL = normal; @@ -672,13 +698,20 @@ public final void clearDisplay() { clearProperty(STYLE_DISPLAY); } + + /** + * Clear the font-size css property. + */ + public final void clearFloat() { +clearProperty(DOMImpl.impl.cssFloatPropertyName()); + } /** * Clear the font-size css property. */ public final void clearFontSize() { - clearProperty(STYLE_FONT_SIZE); - } +clearProperty(STYLE_FONT_SIZE); + } /** * Clears the font-style CSS property. @@ -754,8 +787,8 @@ * Clear the opacity css property. */ public final void clearOpacity() { - clearProperty(STYLE_OPACITY); - } +DOMImpl.impl.cssClearOpacity(this); + } /** * Clears the overflow CSS property. @@ -1170,6 +1203,13 @@ public final void setDisplay(Display value) { setProperty(STYLE_DISPLAY, value.getCssName()); } + + /** + * Set the float css property. + */ + public final void setFloat(Float value) { +setProperty(DOMImpl.impl.cssFloatPropertyName(), value.getCssName()); + }
[gwt-contrib] [google-web-toolkit] r7465 committed - tr...@7443:7445 was merged into this branch...
Revision: 7465 Author: jlaba...@google.com Date: Tue Jan 26 08:23:54 2010 Log: tr...@7443:7445 was merged into this branch Fixes a bunch of layout panel issues. svn merge -r 7443:7445 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk http://code.google.com/p/google-web-toolkit/source/detail?r=7465 Added: /releases/2.0/user/test/com/google/gwt/user/client/ui/SplitLayoutPanelTest.java /releases/2.0/user/test/com/google/gwt/user/client/ui/StackLayoutPanelTest.java Modified: /releases/2.0/branch-info.txt /releases/2.0/user/build.xml /releases/2.0/user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java /releases/2.0/user/src/com/google/gwt/user/client/ui/StackLayoutPanel.java /releases/2.0/user/src/com/google/gwt/user/client/ui/TabLayoutPanel.java /releases/2.0/user/test/com/google/gwt/layout/client/LayoutTest.java /releases/2.0/user/test/com/google/gwt/user/UISuite.java /releases/2.0/user/test/com/google/gwt/user/client/ui/TabLayoutPanelTest.java === --- /dev/null +++ /releases/2.0/user/test/com/google/gwt/user/client/ui/SplitLayoutPanelTest.java Tue Jan 26 08:23:54 2010 @@ -0,0 +1,100 @@ +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.user.client.ui; + +/** + * Tests for {...@link SplitLayoutPanel}. + */ +public class SplitLayoutPanelTest extends WidgetTestBase { + + static class Adder implements HasWidgetsTester.WidgetAdder { +public void addChild(HasWidgets container, Widget child) { + ((SplitLayoutPanel) container).addNorth(child, 10); +} + } + + public void testAttachDetachOrder() { +HasWidgetsTester.testAll(new SplitLayoutPanel(), new Adder(), true); + } + + public void testReplaceCenterWidget() { +SplitLayoutPanel p = new SplitLayoutPanel(); +Label l0 = new Label(foo); +Label l1 = new Label(bar); +Label l2 = new Label(baz); + +// center: l1 +p.addWest(l0, 64); +p.add(l1); +assertEquals(l1, p.getCenter()); + +// center: l2 +p.remove(l1); +p.add(l2); +assertEquals(l2, p.getCenter()); + } + + public void testSplitterOrder() { +SplitLayoutPanel p = new SplitLayoutPanel(); +WidgetCollection children = p.getChildren(); + +Label l0 = new Label(foo); +Label l1 = new Label(bar); +Label l2 = new Label(baz); +Label l3 = new Label(tintin); +Label l4 = new Label(toto); + +p.addWest(l0, 64); +assertEquals(l0, children.get(0)); +assertEquals(SplitLayoutPanel.HSplitter.class, children.get(1).getClass()); + +p.addNorth(l1, 64); +assertEquals(l1, children.get(2)); +assertEquals(SplitLayoutPanel.VSplitter.class, children.get(3).getClass()); + +p.addEast(l2, 64); +assertEquals(l2, children.get(4)); +assertEquals(SplitLayoutPanel.HSplitter.class, children.get(5).getClass()); + +p.addSouth(l3, 64); +assertEquals(l3, children.get(6)); +assertEquals(SplitLayoutPanel.VSplitter.class, children.get(7).getClass()); + +p.add(l4); +assertEquals(l4, children.get(8)); + } + + public void testRemoveInsert() { +SplitLayoutPanel p = new SplitLayoutPanel(); +WidgetCollection children = p.getChildren(); + +Label l0 = new Label(foo); +Label l1 = new Label(bar); +Label l2 = new Label(baz); + +p.addWest(l0, 64); +p.add(l1); +assertEquals(l0, children.get(0)); +assertEquals(SplitLayoutPanel.HSplitter.class, children.get(1).getClass()); +assertEquals(l1, children.get(2)); + +p.remove(l0); +p.insertWest(l2, 64, l1); +assertEquals(l2, children.get(0)); +assertEquals(SplitLayoutPanel.HSplitter.class, children.get(1).getClass()); +assertEquals(l1, children.get(2)); + } +} === --- /dev/null +++ /releases/2.0/user/test/com/google/gwt/user/client/ui/StackLayoutPanelTest.java Tue Jan 26 08:23:54 2010 @@ -0,0 +1,73 @@ +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
[gwt-contrib] [google-web-toolkit] r7466 committed - tr...@7456 was merged into this branch...
Revision: 7466 Author: jlaba...@google.com Date: Tue Jan 26 08:25:43 2010 Log: tr...@7456 was merged into this branch Use IE style float deferred binding for IE8. svn merge -c 7456 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk http://code.google.com/p/google-web-toolkit/source/detail?r=7466 Modified: /releases/2.0/branch-info.txt /releases/2.0/user/src/com/google/gwt/dom/client/DOMImplIE6.java /releases/2.0/user/src/com/google/gwt/dom/client/DOMImplTrident.java === --- /releases/2.0/branch-info.txt Tue Jan 26 08:23:54 2010 +++ /releases/2.0/branch-info.txt Tue Jan 26 08:25:43 2010 @@ -1328,3 +1328,7 @@ Fixes a bunch of layout panel issues. svn merge -r 7443:7445 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk +tr...@7456 was merged into this branch + Use IE style float deferred binding for IE8. + svn merge -c 7456 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk + === --- /releases/2.0/user/src/com/google/gwt/dom/client/DOMImplIE6.java Tue Jan 26 08:21:15 2010 +++ /releases/2.0/user/src/com/google/gwt/dom/client/DOMImplIE6.java Tue Jan 26 08:25:43 2010 @@ -25,11 +25,6 @@ public native void cssClearOpacity(Style style) /*-{ style.filter = ''; }-*/; - - @Override - public String cssFloatPropertyName() { -return styleFloat; - } @Override public native void cssSetOpacity(Style style, double value) /*-{ === --- /releases/2.0/user/src/com/google/gwt/dom/client/DOMImplTrident.java Mon Nov 2 12:44:54 2009 +++ /releases/2.0/user/src/com/google/gwt/dom/client/DOMImplTrident.java Tue Jan 26 08:25:43 2010 @@ -127,6 +127,11 @@ var html = multiple ? SELECT MULTIPLE : SELECT; return doc.createElement(html); }-*/; + + @Override + public String cssFloatPropertyName() { +return styleFloat; + } @Override public native void dispatchEvent(Element target, NativeEvent evt) /*-{ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Server-side Class object on client-side
Sony, I disagree with taking an event-based approach to RPC, but this isn't really the forum for that discussion John, My problem is not Class serializability, but rather the fact that the GWT compiler rejects any code path that has SomeServerProcedure.class, since the compiler thinks it will need to translate that class regardless of whether any class or instance members are referenced. I'm suggesting that the compiler is a little bit too eager. When I use annotations, this isn't a problem, since they are simply dropped by the compiler and kept by the server (where I need them). However, that leads to an unnatural wrapping situation, where I basically have a marker class on the client-side that references a server procedure. Does that make sense? I'm not sure if I'm explaining this well, and I can give an example, but it will take a little more time than I have immediately available. I'll probably write it up tonight. On Jan 26, 8:31 am, Sony xsonymat...@gmail.com wrote: Think about an Event based RPC mechanism as outlined in this Article..http://sonymathew.blogspot.com/2010/01/gwt-jee-blueprint.html Essentially, RPC is then merely firing/listening to events. You merely extend RemtoteRequestEvent and RemtoteRequestEvent and make sure any member content you add is serializable. Sony On Jan 25, 10:33 am, John Tamplin j...@google.com wrote: On Mon, Jan 25, 2010 at 11:26 AM, Nathan Wells nwwe...@gmail.com wrote: So, is it possible to get this sort of functionality? It would enable an RPC mechanism that is a lot easier and more natural. I don't think there would be any performance issues, but that is obviously hard to say for sure at this point. The RPC mechanism has no way to serialize a Java Class instance. Conceivably, you could write a CustomerFieldSerializer for Class and send the name to the client, and then Class.forName (etc) on the server, though I haven't tried it. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7467 committed - tr...@7461 was merged into this branch...
Revision: 7467 Author: jlaba...@google.com Date: Tue Jan 26 08:30:07 2010 Log: tr...@7461 was merged into this branch Convert all tests to standards mode and fix standards mode tests in FF. svn merge -c 7461 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk http://code.google.com/p/google-web-toolkit/source/detail?r=7467 Modified: /releases/2.0/branch-info.txt /releases/2.0/user/build.xml /releases/2.0/user/src/com/google/gwt/junit/public/junit-standards.html /releases/2.0/user/src/com/google/gwt/layout/client/LayoutImplIE6.java /releases/2.0/user/test/com/google/gwt/i18n/public_es_AR/junit-standards.html /releases/2.0/user/test/com/google/gwt/i18n/public_es_MX/junit-standards.html /releases/2.0/user/test/com/google/gwt/layout/client/LayoutTest.java /releases/2.0/user/test/com/google/gwt/user/UISuite.java === --- /releases/2.0/branch-info.txt Tue Jan 26 08:25:43 2010 +++ /releases/2.0/branch-info.txt Tue Jan 26 08:30:07 2010 @@ -1332,3 +1332,7 @@ Use IE style float deferred binding for IE8. svn merge -c 7456 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk +tr...@7461 was merged into this branch + Convert all tests to standards mode and fix standards mode tests in FF. + svn merge -c 7461 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk + === --- /releases/2.0/user/build.xmlTue Jan 26 08:23:54 2010 +++ /releases/2.0/user/build.xmlTue Jan 26 08:30:07 2010 @@ -42,12 +42,6 @@ property name=gwt.junit.testcase.noserver.includes value=**/IFrameLinkerTest.class / property name=gwt.junit.testcase.noserver.excludes value= / - !-- -Run LayoutTest in CSS standards mode - -- - property name=gwt.junit.testcase.standards.includes value=**/*Layout*Test.class / - property name=gwt.junit.testcase.standards.excludes value= / - !-- Whether I18NSuite should test e.g. Foo$InnerMsgs_fr.properties (if the value is dollar) or Foo_Inner_fr.properties (for bar) @@ -158,7 +152,7 @@ includes=${gwt.junit.testcase.web.includes} excludes=${gwt.junit.testcase.web.excludes} / gwt.junit test.name=test.web.remote -test.args=${test.web.remote.args} -out www -prod -runStyle RemoteWeb:${gwt.hosts.web.remote} -batch module +test.args=${test.web.remote.args} -out www -prod -standardsMode -runStyle RemoteWeb:${gwt.hosts.web.remote} -batch module test.out=${junit.out}/web-remote test.cases=test.web.remote.tests extraclasspaths @@ -178,7 +172,7 @@ includes=${gwt.junit.testcase.dev.includes} excludes=${gwt.junit.testcase.dev.excludes} / gwt.junit test.name=test.dev.remote -test.args=${test.dev.remote.args} -out www -runStyle RemoteWeb:${gwt.hosts.dev.remote} -batch module +test.args=${test.dev.remote.args} -out www -standardsMode -runStyle RemoteWeb:${gwt.hosts.dev.remote} -batch module test.out=${junit.out}/dev-remote test.cases=test.dev.remote.tests extraclasspaths path refid=test.extraclasspath / @@ -197,7 +191,7 @@ includes=${gwt.junit.testcase.dev.includes} excludes=${gwt.junit.testcase.dev.excludes} / gwt.junit test.name=test.emma.remote - test.args=${test.emma.remote.args} -out www -runStyle RemoteWeb:${gwt.hosts.dev.remote} -batch module + test.args=${test.emma.remote.args} -out www -standardsMode -runStyle RemoteWeb:${gwt.hosts.dev.remote} -batch module test.out=${junit.out}/emma-remote test.cases=test.emma.remote.tests extraclasspaths @@ -218,7 +212,7 @@ includes=${gwt.junit.testcase.dev.includes} excludes=${gwt.junit.testcase.dev.excludes} / gwt.junit test.name=test.emma.selenium -test.args='${test.emma.selenium.args} -out www -runStyle Selenium:${gwt.hosts.dev.selenium} -batch module' +test.args='${test.emma.selenium.args} -out www -standardsMode -runStyle Selenium:${gwt.hosts.dev.selenium} -batch module' test.out=${junit.out}/emma-selenium test.cases=test.emma.selenium.tests extraclasspaths @@ -239,7 +233,7 @@ includes=${gwt.junit.testcase.web.includes} excludes=${gwt.junit.testcase.web.excludes} / gwt.junit test.name=test.draft.remote -test.args=${test.draft.remote.args} -draftCompile -prod -out www -runStyle RemoteWeb:${gwt.hosts.web.remote} -batch module +test.args=${test.draft.remote.args} -draftCompile -prod -standardsMode -out www -runStyle RemoteWeb:${gwt.hosts.web.remote} -batch module test.out=${junit.out}/draft-remote test.cases=test.draft.remote.tests extraclasspaths @@ -258,7 +252,7 @@ includes=${gwt.junit.testcase.web.includes} excludes=${gwt.junit.testcase.web.excludes} / gwt.junit test.name=test.nometa.remote -
[gwt-contrib] HTMLTable.Cell.getElement() calls getCellFormatter().getElement() with row and column swapped
Reviewers: Dan Rice, Description: As the title says. http://code.google.com/p/google-web-toolkit/issues/detail?id=3757 Fix: I swapped the row and column. Testing: I added a unit test to test this. Please review this at http://gwt-code-reviews.appspot.com/134803 Affected files: user/src/com/google/gwt/user/client/ui/HTMLTable.java user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java Index: user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java === --- user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java (revision 7463) +++ user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java (working copy) @@ -15,8 +15,10 @@ */ package com.google.gwt.user.client.ui; +import com.google.gwt.dom.client.TableCellElement; import com.google.gwt.junit.client.GWTTestCase; import com.google.gwt.user.client.Element; +import com.google.gwt.user.client.ui.HTMLTable.Cell; import com.google.gwt.user.client.ui.HTMLTable.CellFormatter; import com.google.gwt.user.client.ui.HTMLTable.ColumnFormatter; import com.google.gwt.user.client.ui.HTMLTable.RowFormatter; @@ -76,6 +78,22 @@ fail(should have throw an index out of bounds); } + /** + * Tests for {...@link HTMLTable.Cell}. + */ + public void testCell() { +HTMLTable table = getTable(1, 4); +table.setText(0, 3, test); +Cell cell = table.new Cell(0, 3); + +assertEquals(0, cell.getRowIndex()); +assertEquals(3, cell.getCellIndex()); + +TableCellElement elem = cell.getElement().cast(); +assertEquals(3, elem.getCellIndex()); +assertEquals(test, elem.getInnerText()); + } + public void testClearWidgetsAndHtml() { HTMLTable table = getTable(4, 4); for (int row = 0; row 4; row++) { Index: user/src/com/google/gwt/user/client/ui/HTMLTable.java === --- user/src/com/google/gwt/user/client/ui/HTMLTable.java (revision 7463) +++ user/src/com/google/gwt/user/client/ui/HTMLTable.java (working copy) @@ -76,7 +76,7 @@ * @return the cell's element. */ public Element getElement() { - return getCellFormatter().getElement(cellIndex, rowIndex); + return getCellFormatter().getElement(rowIndex, cellIndex); } /** -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: JsStackEmulation leaves alone expressions invoked as functions
Thanks, Bob. Sam found a problem with typeof, so I need to upload a slightly modified version to deal with that. I'll also make the changes you suggest. http://gwt-code-reviews.appspot.com/132815/diff/3001/3003 File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right): http://gwt-code-reviews.appspot.com/132815/diff/3001/3003#newcode594 Line 594: private final SetJsNode? invokedNodes = new HashSetJsNode?(); Will do. http://gwt-code-reviews.appspot.com/132815/diff/3001/3003#newcode759 Line 759: private final JsName rootLineNumbers = program.getRootScope().findExistingUnobfuscatableName( Sort order. I can move it back if you'd prefer that kind of thing to go to a separate patch. http://gwt-code-reviews.appspot.com/132815/diff/3001/3005 File user/test/com/google/gwt/core/client/impl/StackTraceLineNumbersTest.java (right): http://gwt-code-reviews.appspot.com/132815/diff/3001/3005#newcode24 Line 24: public class StackTraceLineNumbersTest extends GWTTestCase { Yes. Will do. http://gwt-code-reviews.appspot.com/132815 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors