Are GWT widgets leak memory ?
It seems that GWT widgets are leaking memory. For testing i have created a sample application which create a series of panels containing Labels. If i allocate 1000 panels and clear() all of them there are still around 1K memory remain to get free. Here is the code i have written /** * Entry point classes define codeonModuleLoad()/code. */ public class Test implements EntryPoint { VerticalPanel tableRowContainer; VerticalPanel mainVerticalPanel; TextBox textbox; /** * This is the entry point method. */ public void onModuleLoad() { Button addButton = new Button(Add); Button removeButton = new Button(Remove); Button clearButton = new Button(Clear); Button exitButton = new Button(Exit); tableRowContainer = new VerticalPanel(); mainVerticalPanel = new VerticalPanel(); textbox = new TextBox(); addButton.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { String tbText = textbox.getText(); int num = Integer.parseInt(tbText); for (int i = 0; i num ; i++) { HorizontalPanel row = new HorizontalPanel(); Label l = new Label( * First Label : + i); row.add(l); l= null; Label l1 = new Label( ** Second Label : + i); row.add(l1); l1 = null; Label l2 = new Label( *** Third Label : + i); row.add(l2); l2 = null; Label l3 = new Label ( Fourth Label : + i ); row.add(l3); l3=null; tableRowContainer.add(row); row = null; } } }); //This will explicitly remove each component added to panel removeButton.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { String tbText = textbox.getText(); int num = Integer.parseInt(tbText); int i=0, j=0; // Window.alert(num + num + widgetcount + rowPanel.getWidgetCount()); if (num = tableRowContainer.getWidgetCount()){ for (i = num - 1; i = 0 ; i--) { HorizontalPanel h = (HorizontalPanel)tableRowContainer.getWidget(i); for (j=3; j=0; j--){ h.remove(j); //Window.alert(removing j = + j + : + h.remove(j)); } tableRowContainer.remove(i); // Window.alert(removing i + i + : + rowPanel.remove(i)); // h.removeFromParent(); h = null; } } } }); clearButton.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { tableRowContainer.clear(); } }); exitButton.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { //clear everything; which is uncleared till now. tableRowContainer.clear(); mainVerticalPanel.clear(); tableRowContainer = null; textbox = null; mainVerticalPanel.removeFromParent(); RootPanel.get().remove(mainVerticalPanel); //Only panel added is verticalPanel. mainVerticalPanel = null; } }); mainVerticalPanel.add(textbox); mainVerticalPanel.add(addButton); mainVerticalPanel.add(removeButton);
Re: Are GWT widgets/app leak memory ?
On Mar 16, 2:19 pm, SmartKiller deepica...@gmail.com wrote: It seems that GWT widgets are leaking memory. For testing i have created a sample application which create a series of panels containing Labels. If i allocate 1000 panels and clear() all of them there are still around 1K memory remain to get free. Here is the code i have written /** * Entry point classes define codeonModuleLoad()/code. */ public class Test implements EntryPoint { VerticalPanel tableRowContainer; VerticalPanel mainVerticalPanel; TextBox textbox; /** * This is the entry point method. */ public void onModuleLoad() { Button addButton = new Button(Add); Button removeButton = new Button(Remove); Button clearButton = new Button(Clear); Button exitButton = new Button(Exit); tableRowContainer = new VerticalPanel(); mainVerticalPanel = new VerticalPanel(); textbox = new TextBox(); addButton.addClickHandler(new ClickHandler(){ �...@override public void onClick(ClickEvent event) { String tbText = textbox.getText(); int num = Integer.parseInt(tbText); for (int i = 0; i num ; i++) { HorizontalPanel row = new HorizontalPanel(); Label l = new Label( * First Label : + i); row.add(l); l= null; Label l1 = new Label( ** Second Label : + i); row.add(l1); l1 = null; Label l2 = new Label( *** Third Label : + i); row.add(l2); l2 = null; Label l3 = new Label ( Fourth Label : + i ); row.add(l3); l3=null; tableRowContainer.add(row); row = null; } } }); //This will explicitly remove each component added to panel removeButton.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { String tbText = textbox.getText(); int num = Integer.parseInt(tbText); int i=0, j=0; // Window.alert(num + num + widgetcount + rowPanel.getWidgetCount()); if (num = tableRowContainer.getWidgetCount()){ for (i = num - 1; i = 0 ; i--) { HorizontalPanel h = (HorizontalPanel)tableRowContainer.getWidget(i); for (j=3; j=0; j--){ h.remove(j); //Window.alert(removing j = + j + : + h.remove(j)); } tableRowContainer.remove(i); // Window.alert(removing i + i + : + rowPanel.remove(i)); // h.removeFromParent(); h = null; } } } }); clearButton.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { tableRowContainer.clear(); } }); exitButton.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { //clear everything; which is uncleared till now. tableRowContainer.clear(); mainVerticalPanel.clear(); tableRowContainer = null; textbox = null; mainVerticalPanel.removeFromParent(); RootPanel.get().remove(mainVerticalPanel); //Only panel added is verticalPanel. mainVerticalPanel = null; } });
FlexTable and UiBinder
I'm currently working on an UiBinder based application, where I'd like to use a FlexTable to hold data for a form (the labels plus the text boxes). Unfortunately, it seems that UiBinder does only allow to declare the FlexTable, but not the elements of the FlexTable. As there are quite a lot of elements, I'd like to decleare them in UiBinder too (otherwise it would not make sense to use UiBinder in my application). What's the suggested way to do this? In an older post I read the suggestion to add the widgets at some other place in the UiBinder XML file and then to programmatically move them to the right place in FlexTable. That's what I currently do: I add the widgets to a HorizontalPanel in UiBinder, then in onModuleLoad() I manually use FlexTable.setWidget() to move them to the FlexTable. Afterwards, I delete the HorizontalPanel as it's not required anymore. Is there currently a better or a cleaner way to do this? Or is this type of solution currently the best option? Are there any other tables that offer functionality similar to FlexTable and that I can declare in UiBinder (I need labels and text boxes vertically aligned, each in multiple columns. Additionally, some of the rows have colspan larger than one.)? - Guenther -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: UiBinder with background-image and ImageResource
On Mar 16, 12:27 am, Michael Guyver michael.guy...@gmail.com wrote: Hi Craigo - does the @url work within a ui:style section? As I said: I know it works if your DataResoruce is created with a ui:data, I don't know when it comes from a separate ClientBundle imported with ui:with... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Google Plugin for Eclipse 1.3 Preview is now available
Hey Keith, thank you very much for all the details. For now we actually decided to stick with the goals provided by gwt-maven, so I'm sorry I did not check your points by now. I'll create a new project and check your advices, especially the correct source folders in the GEP launch config, which actually was the only thing I did not look after. I'll drop in a message soon. Andreas On 15 Mrz., 21:05, Keith Platfoot kplatf...@google.com wrote: @Andreas: Forgot to mention that if you're *not* using Eclipse for Java EE, when you make changes to server-side code, you will also need to restart GWT embedded Jetty instance. For GWT 2.0+, click the Restart Server button in the Development Mode view, or for older versions of GWT, the Reload Server button on the Hosted Mode shell toolbar. Keith On Mon, Mar 15, 2010 at 2:27 PM, Keith Platfoot kplatf...@google.comwrote: Hi Andreas, It looks like you're following the correct procedure, and you indicated that you were able to load the application in devmode, but you're not seeing code changes reflected when you Refresh the browser. It might help if I explain briefly how changes are *supposed* to be reflected, and suggest a few ideas for things to check if refresh is not working: - Client-side code changes should *always* be reflected when you click Refresh in your browser during a devmode session, regardless of your source folders' build output paths. This is because GWT devmode is actually using your .java source files, not the compiled .class files. Double-check in your launch configuration's Classpath tab that your source folders appear at the top of the User Entries section. If your gwt:run goal *does*correctly reflect code changes in devmode when you Refresh, it would be useful to compare the devmode process arguments in that case to the devmode process created by the Eclipse launch configuration (you can find the arguments in Eclipse by right-click Properties the java process in the stacktrace view in the Debug perspective). Let me know if there are differences between the two sets of arguments. - Server-side code changes will only be reflected if the compiled .class files are propagated to your runtime WAR directory's WEB-INF/classes directory. As you mentioned, one way to do this is to set your source folders' build output paths to your runtime WAR directory's WEB-INF/classes directory. Of course, Eclipse must also be configured to build automatically (Project Build Automatically). If server-side code refresh is still not working, you might try making a change, and then manually verifying that the runtime WAR directory is getting the new .class file in WEB-INF/classes. - Changes to your HTML/CSS/other static resources will need to be mirrored in your runtime WAR directory (similar to server-side code changes). I'm not aware of any out-of-the-box solution for this if you're using a standard Eclipse distribution (Eclipse Classic or Eclipse for Java developers). You'll need to stop devmode, do another 'mvn clean package', and then launch devmode again. However, if you're using Eclipse for Java EE, there is a way to configure it to automatically push WAR resource changes while devmode is running (this should answer your question in your #3 step). Basically, you start by converting your project into a Dynamic Web Project. I don't know if you can automatically migrate an existing project, but it should be possible to create a new Dynamic Web Project and then simply import your original project's source folders and build path entries. Next, you'll need to configure the Eclipse project to use 'src/main/webapp' as your WAR directory instead of 'WebContent' (Eclipse default). Close Eclipse and edit the file at: project root/.settings/org.eclipse.wst.common.component. Find the wb-resource element with a 'source-path' attribute of '/WebContent'. Change the attribute value to '/src/main/webapp', save the file, and re-open Eclipse. Now, when you start the project's configured server (Tomcat, Jetty, etc... define a server in the Servers view), Eclipse will automatically propagate changes in your source code and static resource files to your runtime WAR directory. However, in Eclipse for Java EE, this runtime WAR directory will *not* be 'target/exploded WAR'. Eclipse will instead create a staging directory in a temporary location (by default, workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/project) and *this* is the WAR directory you'll need to select when launching the Web Application launch configuration. One more note: Eclipse for Java EE will also automatically push your updated .class files into WAR/WEB-INF/classes, so no need to manually change your source folders' build output paths. Does that all make sense? At launch, we'll be adding a couple new FAQ entries to our documentation to
Re: .jsp page will not compile in hosted mode
google-web-toolkit@googlegroups.com ان جميع ابرسائل التي تتوجه لي لانني مشترك في جوجل في غير لغتي ارجو من حضرتكم ان تكون الرسائل في الغة العربية ليتسنى لنا فهم المحتوى وبرغم من ذالك الخطأليس موجود الترجمة انا من البديهي ان اكون متعون مع المعلم جوجل الرسالة من غير لغتي تسبب الخطأ فهمwww.abuawad@gmail.com فهمww.abuawad@gmail.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.
gwt-maven runTarget configuration breaks resource paths
Hey everyone, we are developing GWT applications using maven, gwt-maven-plugin, Eclipse 3.5 EE and m2eclipse. We are currently having some problems setting up a proper run configuration (based on mvn gwt:run goal) that seem to come from wrong paths to resources. Apparently the runTarget tag is used to specify the resource to launch in DevMode. As the documentation says, one can insert the full module path there appended by the resource (/Application.html) IF that resource is located in the modules public folder. The plugin then replaces the module path by the value of the rename-to directive. Now GWT compiler creates a folder named like the rename-to directve value and puts all generated resources in there, namely the generated js-files and the gwt stuff. BUT gwt-maven also puts all other resources in there that is your Application.html which includes the script tag and other files like Application.css for example. Now in order to make the application work in Tomcat (our deployment target) one needs to adjust all resource references starting from the welcome-file in web.xml to all other includes in the Application.html as ther are the script tag and css-includes to match the location inside the folder named after the rename-to directive. But with this configuration the application can not be run in DevMode since DevMode prepends the rename-to directive to all GET request which leads to 404 when requesting the nocache.js (and css and so on, but missing nocache prevents everything else from happening; only white empty html). It requests them from rename-to/rename-to/rename- to.nocache.js, where rename-to is what you entered in your modules rename-to directive. The correct path would be rename-to/rename- to.nocache.js Now where is the problem? How can I configure the runTarget or the paths GWT creates to be the same in DevMode as deployed on Tomcat? Thanks in advance. Andreas P.S.: I remember pure GEP-Projects placing the application html in the root directory of the web application, but gwt-maven does not, maybe that is one reason it conflicts. In our case it even is a pure GEP project we converted to a gwt-maven one. gwt-maven also uses index.html and simply redirects to the application html. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: iFrame in TabPanel Reload Problem
Still haven't found a solution. Anyone out there have a clue what to do? On Mar 4, 3:49 pm, John john.m.daugh...@gmail.com wrote: Any help would be appreciated! Firefox reloads the contents of iframes when they are unhidden. So, if you have a TabPanel, where each tab holds an iframe, moving between tabs reloads the frame. Chrome and IE leave the frame alone, but Firefox closes it when you hide it. For example, if you have a youtube movie up in a frame on one tab, and move to another, the movie keeps playing in the background in Chrome and IE (as it should). In Firefox, the movie stops. And, when you return to the tab, Firefox reloads the page, causing the movie to start over. The fix for this in Firefox is to not hide the frame, but to make it invisible by reducing its size to 0 when you click on another tab. This seems like the type of legitimate JS browser-specific hack that GWT's compiler is good for. Has anyone implemented this fix? How do you even go about making this fix? Any other way to resolve the problem that I don't know about? 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: FlexTable and UiBinder
Why not use a HTML panel and inside define a HTML table with the widgets in the cells? I rarely use things like FlexTable, HorizontalPanel or VerticalPanel. Usually all my forms are a combination of pure HTML and widgets. If you don't need IE6 support then I can show you some neater ways of laying out forms without tables. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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: RPC and MapString, Object serialization problem
Thanks again guys for the response. I was thinking what Paul's solution to take and I like 1st one with: public abstract class PropertyT implements Serializable { T value; } However, I don't see what way GWT serializer may know in this service method: HashMapString, Property? getFoo(); what type of Property can be received - is it not the same problem as in HashMapString, Object getFooWithObject(); ?? Krisw On 12 Mar, 11:04, Paul Robinson ukcue...@gmail.com wrote: You can create a class that wraps everything you might want to transport and use that class in the interface instead. One way is like this: public abstract class PropertyT implements Serializable { T value; } public class LongProperty extends PropertyLong { } public class DoubleProperty extends PropertyDouble { } public interface Service { HashMapString, Property? getFoo(); } another way: public enum PropertyType { INTEGER, LONG, DOUBLE, ... } public class Property implements Serializable { PropertyType type; Long longValue; Date dateValue; Integer intValue; } public interface Service { HashMapString, Property getFoo(); } However you do it, do be aware that you may well increase the required size of data sent over the network using techniques like this - and the time taken to serialize/deserialize it. @gwt.typeArgs was needed before GWT 1.5 when GWT first supported generics. You don't need it now (I'm not sure if you still can use it) and it wouldn't help here anyway because generics let you specify the same information. Paul kriswpl wrote: Thank you Paul for your reply. FYI - I use Map not to use DTO - I put all properties (Long, Date) to this Map. So I have another question --- is it any way to define what kind of objects (Date, Long, Double, etc.) can show in Map. I found information @gwt.typeArgs something. I mean - is it possible to add to the remote interface information about all serializaed types which can be in Map? - to solve this problem Thanks, Krisw On 11 Mar, 17:55, Paul Robinson ukcue...@gmail.com wrote: kriswpl wrote: Interface method is: public MapString, Object test(); and in implementation I put into returned map, object java.util.Long (which is serializable:) ): map.put(long, new Long(1)); Where do I do it wrong? GWT does a great job of putting as little into the javascript as possible. In the above case, there's nothing to tell it that you're going to send a Long, so it doesn't generate theRPCcode into the javascript that knows how to deserialize a Long. Add another method that references Long, and then your first method might work because the Long code is now going to be included. On a related note, using Map in the API is not a good idea because it means GWT must look through all your code for every implementation of Map to see whether it's used. At the very least, it will make compiles take longer. At worst, it will generate longer code. It goes against the grain for java programming, but you need to make GWTRPCAPIs as specific as possible. That means declaring that you're returning a HashMap, not a Map, in the interface. This also means you can't declare Object as a type in anRPCinterface. Paul -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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: RPC and MapString, Object serialization problem
It's not the same problem. With an RPC method of HashMapString, Property? getFoo(), where Property is abstract, GWT will look for all subclasses of Property on the classpath and build the RPC code for them. If you have one Property subclass per data type, then since the Property subclasses explicitly reference the underlying data type (like Long), the RPC code for those data types will be included as well. You might also like to check out this issue related to RPC of cyclic object graphs when using HashMap/HashSet if you use this technique: http://code.google.com/p/google-web-toolkit/issues/detail?id=3577 Paul riswpl wrote: Thanks again guys for the response. I was thinking what Paul's solution to take and I like 1st one with: public abstract class PropertyT implements Serializable { T value; } However, I don't see what way GWT serializer may know in this service method: HashMapString, Property? getFoo(); what type of Property can be received - is it not the same problem as in HashMapString, Object getFooWithObject(); ?? Krisw On 12 Mar, 11:04, Paul Robinson ukcue...@gmail.com wrote: You can create a class that wraps everything you might want to transport and use that class in the interface instead. One way is like this: public abstract class PropertyT implements Serializable { T value; } public class LongProperty extends PropertyLong { } public class DoubleProperty extends PropertyDouble { } public interface Service { HashMapString, Property? getFoo(); } another way: public enum PropertyType { INTEGER, LONG, DOUBLE, ... } public class Property implements Serializable { PropertyType type; Long longValue; Date dateValue; Integer intValue; } public interface Service { HashMapString, Property getFoo(); } However you do it, do be aware that you may well increase the required size of data sent over the network using techniques like this - and the time taken to serialize/deserialize it. @gwt.typeArgs was needed before GWT 1.5 when GWT first supported generics. You don't need it now (I'm not sure if you still can use it) and it wouldn't help here anyway because generics let you specify the same information. Paul kriswpl wrote: Thank you Paul for your reply. FYI - I use Map not to use DTO - I put all properties (Long, Date) to this Map. So I have another question --- is it any way to define what kind of objects (Date, Long, Double, etc.) can show in Map. I found information @gwt.typeArgs something. I mean - is it possible to add to the remote interface information about all serializaed types which can be in Map? - to solve this problem Thanks, Krisw On 11 Mar, 17:55, Paul Robinson ukcue...@gmail.com wrote: kriswpl wrote: Interface method is: public MapString, Object test(); and in implementation I put into returned map, object java.util.Long (which is serializable:) ): map.put(long, new Long(1)); Where do I do it wrong? GWT does a great job of putting as little into the javascript as possible. In the above case, there's nothing to tell it that you're going to send a Long, so it doesn't generate theRPCcode into the javascript that knows how to deserialize a Long. Add another method that references Long, and then your first method might work because the Long code is now going to be included. On a related note, using Map in the API is not a good idea because it means GWT must look through all your code for every implementation of Map to see whether it's used. At the very least, it will make compiles take longer. At worst, it will generate longer code. It goes against the grain for java programming, but you need to make GWTRPCAPIs as specific as possible. That means declaring that you're returning a HashMap, not a Map, in the interface. This also means you can't declare Object as a type in anRPCinterface. Paul -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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 switch the center view of DockLayoutPanel?
Hi, I am new to gwt. I had a page with footer/header/content. The center content changes with different selection in the menu in header. I try to use the DockLayoutPanel. How can I change the view of the center content. It can only add once? Is that the correct widget to use? Thanks. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
problem on the source of 3rd jars which are used in the project
excuse me for my poor english. i have a gwt-ext project which uses some 3rd jars. And gwt require that the 3rd jar must has source in it, however my project is a util, and i dont want to expose my source when it serve as 3rd jar, how can i do? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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.
Comet on android
For the moment I use gwt-comet (net.zschech.gwt.comet), but I can't get it work on Android. On an iPhone it works fine. So i wonder if anyone have a solution to get comet working on Android. What type of comet does google use in Gmail and Wave etc? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT 2.0.3 + Maven2 + Eclipse
Hello everybody, I'm beginning with GWT development and I have a problem. I've already configured Eclipse 3.5 with gwt plugin and m2eclipse plugin. I create a new maven project with gwt-maven-plugin archetype, but I'm not able to communicate client side with server side. I've read the same problem is happened other people but no solution. I'm trying to debug the sample application with gwt:debug goal and then Run remote java application in Debug configuration. I don't know if I am doing anything wrong. Any idea? Thank you and sorry for my English. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How to call a compiler in server side
I'm implement a application to compile code online, i must call a execute file(compiler) with the first parameter is name of source file, but i hear that we can't save file with GAE, so i can't call the compiler, do you have any solution for this problem ? And have a question, can i call Runtime.getRuntime().exec and get return String, i hear that GAE don't support java.io -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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.
Accessability: GWT, ARIA and JAWS screen-reader
We have developed a small GWT 1.5.2 application to implement an intranet inside our portal. It consists of two panes, content and navigation/search; implemented as a HorizonatalSplitPanel containing a ScrollPanel for the content and a DecoratedTabPanel which contains a Tree for the navigation. So far, so good. For mouse-wielding sighted users, it all works as expected. Clicking TreeItems in the navigation causes the content ScrollPanel to get new content. For keyboard-wielding screen-reader users, however, it's not so good. One can tab around to get focus to the navigation. One can arrow-key around the navigation tree to update the content pane (sighted users can see the content pane updating). But the updates to the content pane are inaudible in the screen-reader JAWS. After reading the documentation at http://code.google.com/webtoolkit/doc/latest/DevGuideA11y.html , I added the following lines to the constructor for our content ScrollPanel: com.google.gwt.user.client.Element e = this.getElement(); Accessibility.setRole(e, document); Accessibility.setState(e,aria-live, rude); Accessibility.setState(e,aria-atomic, true); Accessibility.setState(e,relevant, additions); I've also tried with role=region, with other rudeness levels, and without the aria-atomic and relevant attributes. I've verified that the html delivered to the browser does contain the correct attributes on the div (div class=contentBrowserPanel relevant=additions aria- atomic=true aria-live=rude role=document style=overflow: auto; position: relative;). According to http://wiki.codetalks.org/wiki/index.php/How_to_use_ARIA_Live_Regions_for_dynamic_content , this should do exactly what I want. But still no love from the JAWS. We are using Windows XP, Firefox 3, IE 7, and JAWS 11. I thought the problem might be that JAWS is confused with the iframes GWT used to implement the HorizontalSplitPanel. But my visual-impaired user who originally reported the problem reports that none of JAWS iframe-reading commands caused it to properly read the content pane. Has anyone run into similar issues? I saw one post where the author just decided to make a non-AJAX version available from a hidden link. We may have to go that route eventually, but I was hoping there is a simple solution. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWTCanvas - Is this a Bug?
Hate to break it to you but your code is broken on Chrome as well... I mean it appears to redraw some shape on the second row of content and then many more times off horizontally. Why aren't you using an image (which can be cacheable)? On Mar 15, 12:12 pm, Palantar palan...@gmail.com wrote: Hey all, I have a bug in GWTCanvas rendering on I.E. You can view this bug atwww.fastestapps.com/broken/ On that page, I am drawing the scrolling white background using a GWTCanvas element to save space and loading time. The Bad news? It doesn't work at all on i.e. The code that draws the background is: GWTCanvas c = new GWTCanvas(5000,700,5000,700); c.setFillStyle(Color.WHITE); c.setStrokeStyle(Color.RED); c.setGlobalAlpha(1); c.setLineWidth(1); c.beginPath(); c.moveTo(4717.50,162.50); c.lineTo(4255.50,162.50); c.cubicCurveTo(4236.17,162.50,4220.50,178.17,4220.50,197.50); c.lineTo(4220.50,414.50); c.lineTo(4220.50,428.50); c.cubicCurveTo(4220.50,447.83,4204.83,463.50,4185.50,463.50); c.lineTo(3869.50,463.50); c.cubicCurveTo(3850.17,463.50,3834.50,447.83,3834.50,428.50); c.lineTo(3834.50,414.50); c.lineTo(3834.50,165.50); c.cubicCurveTo(3834.50,146.17,3818.83,130.50,3799.50,130.50); c.lineTo(3255.50,130.50); c.cubicCurveTo(3240.26,130.50,3227.31,140.24,3222.50,153.83); c.lineTo(3222.50,354.50); c.cubicCurveTo(3222.50,373.83,3206.83,389.50,3187.50,389.50); c.lineTo(2867.50,389.50); c.cubicCurveTo(2848.17,389.50,2832.50,373.83,2832.50,354.50); c.lineTo(2832.50,346.50); c.lineTo(2832.50,250.50); c.cubicCurveTo(2832.50,231.17,2816.83,215.50,2797.50,215.50); c.lineTo(2271.50,215.50); c.cubicCurveTo(2252.17,215.50,2236.50,231.17,2236.50,250.50); c.lineTo(2236.50,298.50); c.lineTo(2236.50,316.50); c.cubicCurveTo(2236.50,335.83,2220.83,351.50,2201.50,351.50); c.lineTo(1969.50,351.50); c.cubicCurveTo(1950.17,351.50,1934.50,335.83,1934.50,316.50); c.lineTo(1934.50,298.50); c.lineTo(1934.50,165.50); c.cubicCurveTo(1934.50,146.17,1918.83,130.50,1899.50,130.50); c.lineTo(1353.50,130.50); c.cubicCurveTo(1334.17,130.50,1318.50,146.17,1318.50,165.50); c.lineTo(1318.50,272.50); c.lineTo(1318.50,282.17); c.cubicCurveTo(1318.50,301.50,1302.83,317.17,1283.50,317.17); c.lineTo(945.50,317.17); c.cubicCurveTo(926.17,317.17,910.50,301.50,910.50,282.17); c.lineTo(910.50,272.50); c.lineTo(910.50,229.50); c.cubicCurveTo(910.50,210.17,894.83,194.50,875.50,194.50); c.lineTo(334.15,194.50); c.lineTo(325.50,194.50); c.lineTo(54.26,194.50); c.cubicCurveTo(41.26,194.50,30.71,205.04,30.71,218.05); c.cubicCurveTo(30.71,218.05,41.26,241.59,54.26,241.59); c.lineTo(190.21,241.59); c.lineTo(209.21,241.59); c.lineTo(255.50,241.59); c.cubicCurveTo(274.83,241.59,290.50,257.26,290.50,276.59); c.lineTo(290.50,322.59); c.lineTo(290.50,401.58); c.lineTo(290.50,617.50); c.cubicCurveTo(290.50,636.83,306.17,652.50,325.50,652.50); c.lineTo(875.50,652.50); c.cubicCurveTo(894.83,652.50,910.50,636.83,910.50,617.50); c.lineTo(910.50,565.83); c.lineTo(910.50,396.50); c.lineTo(910.50,386.50); c.cubicCurveTo(910.50,367.17,926.17,351.50,945.50,351.50); c.lineTo(1283.50,351.50); c.cubicCurveTo(1302.83,351.50,1318.50,367.17,1318.50,386.50); c.lineTo(1318.50,396.50); c.lineTo(1318.50,541.50); c.cubicCurveTo(1318.50,560.83,1334.17,576.50,1353.50,576.50); c.lineTo(1899.50,576.50); c.cubicCurveTo(1918.83,576.50,1934.50,560.83,1934.50,541.50); c.lineTo(1934.50,434.50); c.lineTo(1934.50,425.50); c.cubicCurveTo(1934.50,406.17,1950.17,390.50,1969.50,390.50); c.lineTo(2201.50,390.50); c.cubicCurveTo(2220.83,390.50,2236.50,406.17,2236.50,425.50); c.lineTo(2236.50,434.50); c.lineTo(2236.50,613.50); c.lineTo(2236.50,746.50);
Obfuscate java source
Hi. I'm developing a GWT library. And I would like to be able to obfuscate the java source code in the .jar file to be able to give the library to others without them reading the code. I know that the way most of us write code it's obfuscated by default, but .. :) Could anyone recomend a tool to do this? //Rasmus Gxt-Schdeuler 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.
Re: Eclipse JavaEE tools + GWT Development mode
Hi Keith, can you tell how to configure Eclipse + Google Plugin for Eclipse (the newest version), so I can debug my GWT project with DB connections? Your previous solution doesn't work anymore (I can't find anythig about WAR in Web Application property). Thanks in advance, Neciu. On 18 Lut, 17:40, Keith Platfoot kplatf...@google.com wrote: Hi Chris, Thanks for posting this. It's a good explanation of how to get WTP and GPE 1.2 working together, which is not a trivial task. However, in the next release of the plugin we're planning on making this integration a whole lot easierhttp://groups.google.com/group/google-web-toolkit/msg/8ff67143cce64e1... . With GPE 1.3, you'll be able to adapt an existing Dynamic Web Project as a GWT project and debug using hosted/dev mode quite easily. Here's a sneak preview of how this will work in GPE 1.3: 1. In your project's Properties dialog, select Google Web Toolkit and check the box: *Use Google Web Toolkit*. 2. Switch to the Web Application property page and change *WAR source directory* to WebContent and uncheck the box: *Also use this directory as the output WAR directory.* * * 3. Start your project's server (be it GlassFish, Tomcat, etc.) using your configured WTP server adapter. 4. Create a new Web Application launch configuration. On the Server tab, uncheck: *Run built-in server* (since we want to use WTP's server adapter) and on the GWT tab, change the -startupUrl argument to point to your server (e.g.http://localhost:8080/WebApp) 5. Run/Debug your new launch configuration. The first time you do this, you'll have to select the location of the WAR directory WTP is publishing to (this is configurable, but I think by default it is workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/project). 6. Presto! GWT hosted/dev mode is now running in your own server, and you can debug either server-side or client-side code, and get automatic redeploy of modified class files or static resources thanks to WTP's auto-publish mechanism. We're going to be uploading a preview built of GPE 1.3 later this month so you can try it out for yourself and let us know what you think, ahead of the official release. Stay tuned! Keith -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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.
Sending HTTP GET request not working!
Hi, I'm trying to send a HTTP GET request to a server on localhost (http:// localhost:8080/wps/WebProcessingService? Request=GetCapabilitiesService=WPS) and for some reason it won't work. I've inherited the GWT HTTP module as shown here: http://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunication.html#DevGuideHttpRequests My code is based on the code in the above link: final String capabilitiesUrl = wpsInput.getText(); RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(capabilitiesUrl)); try { Request request = builder.sendRequest(null, new RequestCallback() { @Override public void onResponseReceived(Request request, Response response) { Window.alert(URL.encode( + response.getStatusCode())); } @Override public void onError(Request request, Throwable exception) { Window.alert(ERROR); } }); } catch (RequestException e) { // TODO Auto-generated catch block e.printStackTrace(); } However, the response keep coming up as status code 0 and seems to be empty. I don't get an errors. The URL is fine - if I copy it into my browser it shows the XML response. Anyway have any idea what I'm doing wrong? Cheers! Jon -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Google Plugin for Eclipse 1.3 Preview is now available
Hi Keith, Thanks for the improvements !! I've got a clean Maven Web project like I used to work with before trying GWT ! :) However, Eclipse seems to keep the folder /war and /war/WEB-INF in my project. Even if I delete it, it keeps appearing. Any clue on this behaviour ? Cheers, Simon On 4 mar, 01:25, Keith Platfoot kplatf...@google.com wrote: Hi everyone, Last month, I announced some of the changes we had planned for the 1.3 version of the Google Plugin for Eclipse. To recap, this release is focused on making life easier for developers using GWT/App Engine alongside third-party tools, including Maven and Eclipse for Java EE. In my post, I promised we'd let you download a preview of 1.3 to get some hands-on testing of the new features and provide us with your feedback before the official release. I'm happy to announce that the time has come. An early preview of 1.3 is now available for download at the following URLs: http://dl.google.com/eclipse/plugin/3.5/zips/com.google.gdt.eclipse.s... http://dl.google.com/eclipse/plugin/3.4/zips/com.google.gdt.eclipse.s... http://dl.google.com/eclipse/plugin/3.3/zips/com.google.gdt.eclipse.s... Note: Ensure that your version of Eclipse has Eclipse's Web Standard Tools (WST) installed before installing the plugin. WST can be installed by navigating to the Software Installation section, and selecting the the appropriate WST feature from the update site for your version of Eclipse. The update sites and feature names are provided below: - 3.5 (Galileo): Galileo Web, XML, and Java EE Development Eclipse Web Developer Tools - 3.4 (Ganymede): Ganymede Update Site Web and Java EE Development Web Developer Tools - 3.3 (Europa): Europa Discovery Site Web and JEE Development Web Standard Tools Project This is a preview build, so the usual caveats and warnings apply: it is not officially supported, and we recommend using a clean installation of Eclipse and a new workspace. Also, we're distributing this preview as a zip file so be sure to follow the instructions on our Installing the Google Plugin for Eclipse from zip files page (http://code.google.com/eclipse/docs/install-from-zip.html). *Known Issues* - If you change launch configuration settings in the Server or GWT tab, you'll need to switch to the Arguments tab before clicking Apply or Run/Debug. This will be fixed in the final release. That being said, we are very interested in your experience with this new release, which we hope will allow the Google plugin to interoperate much better with alternative project structures and third-party tools. The tentative 1.3 release notes are as follows: Enhancements - Configurable WAR directory to allow better integration with Eclipse for Java EE http://www.eclipse.org/downloads/moreinfo/jee.php and projects built with Maven http://maven.apache.org/ - Web Application launch configurations now display and allow editing of generated Program and VM arguments - Errors/Warnings preference page for customizing the severity of any generated problem marker - Projects can reference GWT/App Engine SDKs directly via JARs instead of through SDK library - GWT+App Engine projects automatically configured for optimal caching Fixes - GWT Issue 3583http://code.google.com/p/google-web-toolkit/issues/detail?id=3583: Google Eclipse Plugin configuration is too strict - GWT Issue 3592http://code.google.com/p/google-web-toolkit/issues/detail?id=3592: Eclipse plugin to add 'cache forever' configuration for new 'GWT + App Engine' projects - GWT Issue 3902http://code.google.com/p/google-web-toolkit/issues/detail?id=3902: Allow users to configure the severity of problems reported by the eclipse plugin - App Engine Issue 1515http://code.google.com/p/googleappengine/issues/detail?id=1515: Eclipse plugin requires fixed location for war directory - App Engine Issue 2115http://code.google.com/p/googleappengine/issues/detail?id=2115: Using the @PersistenceAware annotation puts the Eclipse Enhancer in an Infinite Loop - App Engine Issue 1941http://code.google.com/p/googleappengine/issues/detail?id=1941: Plugin fails to enhance dependent classes on source level changes For a complete list of fixed issues, see the GWT issue trackerhttp://code.google.com/p/google-web-toolkit/issues/list?can=1q=label... and App Engine issue trackerhttp://code.google.com/p/googleappengine/issues/list?can=1q=label:GP... . We encourage all interested developers to take the preview build for a spin, and let us know what you think. We'll do everything possible to incorporate your feedback before the final release, slated for later this month. Thanks! 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,
problem on the source of 3rd jars which are used in the project
excuse me for my poor english. i have a gwt-ext project which uses some 3rd jars. And gwt require that the 3rd jar must has source in it, however my project is a util, and i dont want to expose my source when it serve as 3rd jar, how can i do? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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.
UIBinder with custom faces
Hi how do I go create a custom widget that has faces similar to DockLayoutPanel ? Does anyone have a working example? Many thanks Craig -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
problem on the source of 3rd jars which are used in the project
excuse me for my poor english. i have a gwt-ext project which uses some 3rd jars. And gwt require that the 3rd jar must has source in it, however my project is a util, and i dont want to expose my source when it serve as 3rd jar, how can i do? thanks andvance. good luck! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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.
Do you always have an enormous front-prensenter?
Hi, I am new to gwt as well as mvp. We are building a site with gwt- front talking with a legacy server via simple json. I looked through the gwt-mvp sample with gwt-presenter. It seems its mainPresenter acts like a front-controller (dispatch-servlet in Spring mvc)? We are trying to layout the page with a header (menu), a footer (staus bar) and center. The center changes and we have about 15-25 different types for center content (may growing into ~100 later). My understanding is that each of these corresponds to a presenter, which might be called by MainPresenter. Then do you need to inject all of them into the MainPresenter? That seems a really large MainPresenter to build, with a huge constructor to inject. Am I thinking in the right line? Is there any other way to break it down? Thank you very much. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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.
Image Gallery
Hello! Does anyone knows an Image Gallery made in GWT? Like this example: http://www.e2interactive.com/e2-gallery-pro/ or something more simple, with possibility to navigate throught photos and open them (maybe in a popup-panel) without exit the webpage? Thank you :) -- 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 -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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.
Multiple entrypoints? Or something else?
I would like to build a website, using GWT together with Google App Engine.There are three parts, but how should I organize them? * Users can login and customize a service to be included in a DIV on their own homepages (just like e.g. google maps can be included in a homepage). I guess this main-part of the app will be handled in an entrypoint like a normal GWT app. * The users should then include a couple of lines of javascript that replaces a certain DIV on their homepage with their customized service (provided by me). Should I do that as second entrypoint? * In a third view I would like to manage user accounts and various stuff. A third entrypoint? How should I approach the above? (If the method is multiple entrypoints: how do I specify the existence of three index-pages (MyApp1.html, MyApp2.html and MyApp3.html)?) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Obfuscate java source
Hi We've been using ProGuard in our EmNOC product. ... makes some of the code more readable ;) regards Chris Emnico Technologies -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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: Multiple entrypoints? Or something else?
Hello, if you mean each * is a totally different webpage, that you cannot navigate between them with a Hyperlink (History state application), yes, you need more Entrypoints... Each entrypoint is like a new webpage inside your project. With their own MyApp1.gwt.xml and their own /myapp1/ directory at /war/ Your .html page can be any name you want... you just need to redirect the myapp1.nocache.js inside the .html page. -- 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, Mar 16, 2010 at 1:03 PM, jbdhl jbirksd...@gmail.com wrote: I would like to build a website, using GWT together with Google App Engine.There are three parts, but how should I organize them? * Users can login and customize a service to be included in a DIV on their own homepages (just like e.g. google maps can be included in a homepage). I guess this main-part of the app will be handled in an entrypoint like a normal GWT app. * The users should then include a couple of lines of javascript that replaces a certain DIV on their homepage with their customized service (provided by me). Should I do that as second entrypoint? * In a third view I would like to manage user accounts and various stuff. A third entrypoint? How should I approach the above? (If the method is multiple entrypoints: how do I specify the existence of three index-pages (MyApp1.html, MyApp2.html and MyApp3.html)?) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.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 call a compiler in server side
check out beanshell, maybe it provides the functionality you are looking for. On Mar 15, 11:25 am, duclm duclm...@gmail.com wrote: I'm implement a application to compile code online, i must call a execute file(compiler) with the first parameter is name of source file, but i hear that we can't save file with GAE, so i can't call the compiler, do you have any solution for this problem ? And have a question, can i call Runtime.getRuntime().exec and get return String, i hear that GAE don't support java.io -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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+Gears API)Uploaded file become multiple times bigger than original file
http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html#read(byte[]) http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html#read(byte[])in.read() returns the number of bytes read. Could it be that the number of bytes returned from the read is less than the buffer you have allocated? On Tue, Mar 16, 2010 at 1:59 AM, Alex Luya alexander.l...@gmail.com wrote: I want to upload multiple files by using gwt-google-apis,for example an avi file,but Uploaded file become multiple times bigger than original file. in client side, every time,I slice a chunk from Blob by size 2,and send chunk to server ,like this start client code int start=stat.getUploaded(); int size=2; Blob chunk = file.getBlob().slice(start, size); //get request instance HttpRequest req = Factory.getInstance().createHttpRequest(); // set request req.open(POST, ACTION_URL_FOR_GOOGLE_GEARS); req.setRequestHeader(Slice-Size, Integer.toString(size)); req.setRequestHeader(Content-Disposition, attachment); req.setRequestHeader(Content-Type, multipart/octet- stream); //send file req.send(chunk); //end of client code in server side,create a byte buffer with chunck size(Slice- Size),read chunk to buffer,then write buffer to file.but written file become multiple times bigger than original file.and if without using buffer(as commented code),written file is the same as original.So I think client side code is ok,problem comes from server side code.Can somebody help me to point out,thank you! start of server code @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { InputStream in = req.getInputStream(); if (in != null) { String path =/home/user/upload/test; byte[] buffer = new byte[Integer.parseInt(req.getHeader(Slice-Size))]; while (in.read(buffer) != -1) { out.write(buffer); } int l=0; // while ((l=in.read()) != -1) // { // out.write(l); // } out.close(); in.close(); } } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Eric Z. Ayers Google Web Toolkit, Atlanta, GA USA Sign up now for Google I/O 2010: May 19-20, http://code.google.com/io -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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: Sending HTTP GET request not working!
Ignore the URL.encode(...) part of the alert box, that was there because of a dodgy copy and paste! I've removed it now. Also, I've looked at my Tomcat log and my requests are being received fine... but I still can't access the response from GWT. Jon On Mar 15, 4:25 pm, Jon Britton mankillseveryth...@googlemail.com wrote: Hi, I'm trying to send a HTTP GET request to a server on localhost (http:// localhost:8080/wps/WebProcessingService? Request=GetCapabilitiesService=WPS) and for some reason it won't work. I've inherited the GWT HTTP module as shown here:http://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunicat... My code is based on the code in the above link: final String capabilitiesUrl = wpsInput.getText(); RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(capabilitiesUrl)); try { Request request = builder.sendRequest(null, new RequestCallback() { @Override public void onResponseReceived(Request request, Response response) { Window.alert(URL.encode( + response.getStatusCode())); } @Override public void onError(Request request, Throwable exception) { Window.alert(ERROR); } });} catch (RequestException e) { // TODO Auto-generated catch block e.printStackTrace(); } However, the response keep coming up as status code 0 and seems to be empty. I don't get an errors. The URL is fine - if I copy it into my browser it shows the XML response. Anyway have any idea what I'm doing wrong? Cheers! Jon -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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.
JAXB compatibility with GWT 2.0, any news?
Hi, I read a few posts that some people had problems with the integration of gwt with jaxb generated files. I want to use generated files from jaxb to use as shared objects in gwt. Is there anything new with gwt 2.0 ? Can I use it without problems or is there a good workaround how to get it working? Thanks a lot -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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 + Visualization API : Remove handler from a chart
Hi, Is there any way to remove the registered handler from the chart? My idea is to add a new handler on some user action. When I register a new select handler for this chart, it adds up this new event in a list of select events for the same chart hence causing the select event to get triggered first for the earlier registered event and then the new select event. Thanks Ankit -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Google Plugin for Eclipse 1.3 Preview is now available
Resolved ! The problem was that the project Default output folder was still pointing to the /war/WEB-INF/classes directory instead of /target/ classes... Thanks for the great job anyway ! :) On 15 mar, 17:04, Simon simon.bar...@gmail.com wrote: Hi Keith, Thanks for the improvements !! I've got a clean Maven Web project like I used to work with before trying GWT ! :) However, Eclipse seems to keep the folder /war and /war/WEB-INF in my project. Even if I delete it, it keeps appearing. Any clue on this behaviour ? Cheers, Simon On 4 mar, 01:25, Keith Platfoot kplatf...@google.com wrote: Hi everyone, Last month, I announced some of the changes we had planned for the 1.3 version of the Google Plugin for Eclipse. To recap, this release is focused on making life easier for developers using GWT/App Engine alongside third-party tools, including Maven and Eclipse for Java EE. In my post, I promised we'd let you download a preview of 1.3 to get some hands-on testing of the new features and provide us with your feedback before the official release. I'm happy to announce that the time has come. An early preview of 1.3 is now available for download at the following URLs: http://dl.google.com/eclipse/plugin/3.5/zips/com.google.gdt.eclipse.s... http://dl.google.com/eclipse/plugin/3.4/zips/com.google.gdt.eclipse.s... http://dl.google.com/eclipse/plugin/3.3/zips/com.google.gdt.eclipse.s... Note: Ensure that your version of Eclipse has Eclipse's Web Standard Tools (WST) installed before installing the plugin. WST can be installed by navigating to the Software Installation section, and selecting the the appropriate WST feature from the update site for your version of Eclipse. The update sites and feature names are provided below: - 3.5 (Galileo): Galileo Web, XML, and Java EE Development Eclipse Web Developer Tools - 3.4 (Ganymede): Ganymede Update Site Web and Java EE Development Web Developer Tools - 3.3 (Europa): Europa Discovery Site Web and JEE Development Web Standard Tools Project This is a preview build, so the usual caveats and warnings apply: it is not officially supported, and we recommend using a clean installation of Eclipse and a new workspace. Also, we're distributing this preview as a zip file so be sure to follow the instructions on our Installing the Google Plugin for Eclipse from zip files page (http://code.google.com/eclipse/docs/install-from-zip.html). *Known Issues* - If you change launch configuration settings in the Server or GWT tab, you'll need to switch to the Arguments tab before clicking Apply or Run/Debug. This will be fixed in the final release. That being said, we are very interested in your experience with this new release, which we hope will allow the Google plugin to interoperate much better with alternative project structures and third-party tools. The tentative 1.3 release notes are as follows: Enhancements - Configurable WAR directory to allow better integration with Eclipse for Java EE http://www.eclipse.org/downloads/moreinfo/jee.php and projects built with Maven http://maven.apache.org/ - Web Application launch configurations now display and allow editing of generated Program and VM arguments - Errors/Warnings preference page for customizing the severity of any generated problem marker - Projects can reference GWT/App Engine SDKs directly via JARs instead of through SDK library - GWT+App Engine projects automatically configured for optimal caching Fixes - GWT Issue 3583http://code.google.com/p/google-web-toolkit/issues/detail?id=3583: Google Eclipse Plugin configuration is too strict - GWT Issue 3592http://code.google.com/p/google-web-toolkit/issues/detail?id=3592: Eclipse plugin to add 'cache forever' configuration for new 'GWT + App Engine' projects - GWT Issue 3902http://code.google.com/p/google-web-toolkit/issues/detail?id=3902: Allow users to configure the severity of problems reported by the eclipse plugin - App Engine Issue 1515http://code.google.com/p/googleappengine/issues/detail?id=1515: Eclipse plugin requires fixed location for war directory - App Engine Issue 2115http://code.google.com/p/googleappengine/issues/detail?id=2115: Using the @PersistenceAware annotation puts the Eclipse Enhancer in an Infinite Loop - App Engine Issue 1941http://code.google.com/p/googleappengine/issues/detail?id=1941: Plugin fails to enhance dependent classes on source level changes For a complete list of fixed issues, see the GWT issue trackerhttp://code.google.com/p/google-web-toolkit/issues/list?can=1q=label... and App Engine issue trackerhttp://code.google.com/p/googleappengine/issues/list?can=1q=label:GP... . We encourage all interested developers to take the preview build for a spin, and
datePicker not working
Hi! I hoped my code would result in the label getting the selected date, but nothing happens? final Label dateText = new Label(); DatePicker datePicker = new DatePicker(); datePicker.addValueChangeHandler(new ValueChangeHandler() { @SuppressWarnings(unchecked) public void onValueChange(ValueChangeEvent event) { Date date = (Date) event.getValue(); String dateString = DateTimeFormat.getMediumDateFormat().format(date); dateText.setText(dateString); } }); Regards Robert -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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.
Class in jar file used in another GWT application gives *Source not available* error when compiling
Hi, I am trying ot use the DatePicker that the user created here: http://advanced-gwt.sourceforge.net/demo/index.html = *Text and Button Widgets* tab = Select a date. In the *Source Code* section it imports this: import org.gwt.advanced.client.ui.widget.DatePicker; I downloaded the relative jar and imported it in my EntryPoint class. In Eclipse i F3 on it to see the source code, and it opens DatePicker in package org.gwt.advanced.client.ui.widget, which is the one that I want. And it means that the source is there. Try to compile it and I get the error copied below. I believe i need to inherit it, or need to specify the source path in Monkee.gwt.xml, but don't know how to do it. And the source code of the whole project I downloaded is a bit too complicated for me to understand, as I am still a beginner. Does anyone have an idea? Also, not being a GWT standard widget, can it still be declared in a UIBinder xml? Thanks a lot in advance! [ERROR] Errors in 'file:/home/dan/dev/ws/Monkee/src/com/monkee/ client/Monkee.java' [ERROR] Line 44: No source code is available for type org.gwt.advanced.client.ui.widget.DatePicker; did you forget to inherit a required module? Finding entry point classes [ERROR] Unable to find type 'com.monkee.client.Monkee' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Getting error $doc.getBoxObjectFor is not a function in Firefox 3.6
Like JY, our website is unusable with FF 3.6. We are using GWT 2.0.3 together with the Eclipse plugin. Unfortunately, I am not experienced enough, to compile the project with changed GWT source files - the Eclipse plugin uses the gwt-user.jar (?). Will there be a solution for this problem in the next days? Or is there someone who can explain how to use the GWT sources with Eclipse? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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: JAXB compatibility with GWT 2.0, any news?
On Mar 16, 3:11 pm, crojay78 croja...@googlemail.com wrote: Hi, I read a few posts that some people had problems with the integration of gwt with jaxb generated files. I want to use generated files from jaxb to use as shared objects in gwt. Is there anything new with gwt 2.0 ? Can I use it without problems or is there a good workaround how to get it working? Thanks a lot Hi, just for curiosity.. do you need shared objects between gwt javascript and server side java , or shared objects between gwt javascript and native javascripts on the browser's side? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Google Plugin for Eclipse 1.3 Preview is now available
I resolved this issue. It turns out that WTP included Tomcat 5.5 as a runtime dependency (default in the project). When I removed this dependency, everything started working (i.e. UIBinder stuff). Woot! On Mar 15, 4:40 pm, bkbonner brian.bon...@paraware.com wrote: Hey, is anyone else using the GEP Preview seeing the same problem as the one I logged in issue 4745?http://code.google.com/p/google-web-toolkit/issues/detail?id=4745 I have a wtpTest project that can be pulled into Eclipse for Java EE. Just download wtpTest.zip, import the existing project (and choose the archive). Then run the server in tomcat and set the launch config to NOT launch the local server. I keep getting Illegal Constant Pool errors. Brian On Mar 15, 4:05 pm, Keith Platfoot kplatf...@google.com wrote: @Andreas: Forgot to mention that if you're *not* using Eclipse for Java EE, when you make changes to server-side code, you will also need to restart GWT embedded Jetty instance. For GWT 2.0+, click the Restart Server button in the Development Mode view, or for older versions of GWT, the Reload Server button on the Hosted Mode shell toolbar. Keith On Mon, Mar 15, 2010 at 2:27 PM, Keith Platfoot kplatf...@google.comwrote: Hi Andreas, It looks like you're following the correct procedure, and you indicated that you were able to load the application in devmode, but you're not seeing code changes reflected when you Refresh the browser. It might help if I explain briefly how changes are *supposed* to be reflected, and suggest a few ideas for things to check if refresh is not working: - Client-side code changes should *always* be reflected when you click Refresh in your browser during a devmode session, regardless of your source folders' build output paths. This is because GWT devmode is actually using your .java source files, not the compiled .class files. Double-check in your launch configuration's Classpath tab that your source folders appear at the top of the User Entries section. If your gwt:run goal *does*correctly reflect code changes in devmode when you Refresh, it would be useful to compare the devmode process arguments in that case to the devmode process created by the Eclipse launch configuration (you can find the arguments in Eclipse by right-click Properties the java process in the stacktrace view in the Debug perspective). Let me know if there are differences between the two sets of arguments. - Server-side code changes will only be reflected if the compiled .class files are propagated to your runtime WAR directory's WEB-INF/classes directory. As you mentioned, one way to do this is to set your source folders' build output paths to your runtime WAR directory's WEB-INF/classes directory. Of course, Eclipse must also be configured to build automatically (Project Build Automatically). If server-side code refresh is still not working, you might try making a change, and then manually verifying that the runtime WAR directory is getting the new .class file in WEB-INF/classes. - Changes to your HTML/CSS/other static resources will need to be mirrored in your runtime WAR directory (similar to server-side code changes). I'm not aware of any out-of-the-box solution for this if you're using a standard Eclipse distribution (Eclipse Classic or Eclipse for Java developers). You'll need to stop devmode, do another 'mvn clean package', and then launch devmode again. However, if you're using Eclipse for Java EE, there is a way to configure it to automatically push WAR resource changes while devmode is running (this should answer your question in your #3 step). Basically, you start by converting your project into a Dynamic Web Project. I don't know if you can automatically migrate an existing project, but it should be possible to create a new Dynamic Web Project and then simply import your original project's source folders and build path entries. Next, you'll need to configure the Eclipse project to use 'src/main/webapp' as your WAR directory instead of 'WebContent' (Eclipse default). Close Eclipse and edit the file at: project root/.settings/org.eclipse.wst.common.component. Find the wb-resource element with a 'source-path' attribute of '/WebContent'. Change the attribute value to '/src/main/webapp', save the file, and re-open Eclipse. Now, when you start the project's configured server (Tomcat, Jetty, etc... define a server in the Servers view), Eclipse will automatically propagate changes in your source code and static resource files to your runtime WAR directory. However, in Eclipse for Java EE, this runtime WAR directory will *not* be 'target/exploded WAR'. Eclipse will instead create a staging directory in a temporary location (by default,
Re: Getting error $doc.getBoxObjectFor is not a function in Firefox 3.6
2010/3/16 hriess hriess.chemn...@t-online.de الترجمة مثل ج. ي ، موقعنا هو غير قابل للاستخدام مع 3.6 فرنك فرنسي. نحن نستخدم GWT 2.0.3 جنبا إلى جنب مع البرنامج المساعد الكسوف. للأسف ، أنا لست من ذوي الخبرة بما فيه الكفاية ، لترجمة المشروع مع الملفات التي تم تغييرها GWT المصدر -- في كسوف المساعد يستخدم gwt - user.jar (؟). لن يكون هناك حل ل هذه المشكلة في الايام المقبلة؟ أم أن هناك شخص يمكن ان تشرح كيف لاستخدام مصادر GWT مع كسوف الشمس؟ 2010/3/16 hriess hriess.chemn...@t-online.de Like JY, our website is unusable with FF 3.6. We are using GWT 2.0.3 together with the Eclipse plugin. Unfortunately, I am not experienced enough, to compile the project with changed GWT source files - the Eclipse plugin uses the gwt-user.jar (?). Will there be a solution for this problem in the next days? Or is there someone who can explain how to use the GWT sources with Eclipse? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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. -- www.abuawad.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: beta eclipse plugin - running in noserver mode with tomcat - having troubles
Keith, I figured out the problem. It turns out that the problem can be reproduced when the Apache Tomcat 5.5.27 libraries are in the classpath. They were inadvertently in the classpath as a runtime dependency -- injected by WTP. When I pulled them OUT, it works fine. That was a pain to figure out. Brian On Mar 15, 10:31 am, bkbonner brian.bon...@paraware.com wrote: Keith, I created a sample using only Eclipse and WTP and I experience exactly the same problem where I get Illegal constant pool index. i.e. I ruled out MAVEN from the picture. It receives the same error. Were you able to involve someone from the UI Binder area to help figure out what is going on?? Brian On Mar 12, 4:40 pm, bkbonner brian.bon...@paraware.com wrote: Keith, I included the sample here: http://code.google.com/p/google-web-toolkit/issues/detail?id=4745 Brian On Mar 12, 2:48 pm, bkbonner brian.bon...@paraware.com wrote: Keith, I was working to put together a sample of what I was seeing and I think I figured out what was wrong. the ui.xml files don't get copied over by default if they're in the src/main/java directories. they have to be in src/main/resources, or the maven configuration has to be changed to make this work. I haven't tried it yet, but I'm pretty sure that's the reason for the prior failures. Brian On Mar 12, 1:57 pm, bkbonner brian.bon...@paraware.com wrote: I got the other JARs removed. I changed the scope to provided and they're gone, but the results are the same. :( If you have any suggestions, they'd be appreciated. I'll still plug away. If I pull out the UI Binder stuff it works fine. I'll look at pulling another working example in. Brian 13:45:30.618 [ERROR] [Application] Failed to create an instance of 'com.test.gwt.client.ActivityLogView' via deferred binding java.lang.VerifyError: (class: com/google/gwt/core/client/Scheduler, method: init signature: ()V) Illegal constant pool index at com.google.gwt.dom.client.StyleInjector.schedule(StyleInjector.java: 389) at com.google.gwt.dom.client.StyleInjector.inject(StyleInjector.java:382) at com.google.gwt.dom.client.StyleInjector.inject(StyleInjector.java:222) at com.google.gwt.dom.client.StyleInjector.inject(StyleInjector.java:208) at com.test.gwt.client.com_test_gwt_client_ActivityLogView_ActivityLogViewUiBinderImpl_GenBundle_default_InlineClientBundleGenerator $1.ensureInjected(com_test_gwt_client_ActivityLogView_ActivityLogViewUiBinderImpl_GenBundle_default_InlineClientBundleGenerator.java: 14) at com.test.gwt.client.ActivityLogView_ActivityLogViewUiBinderImpl.createAndBindUi(ActivityLogView_ActivityLogViewUiBinderImpl.java: 25) at com.test.gwt.client.ActivityLogView_ActivityLogViewUiBinderImpl.createAndBindUi(ActivityLogView_ActivityLogViewUiBinderImpl.java: 1) at com.test.gwt.client.ActivityLogView.init(ActivityLogView.java: 28) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java: 39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java: 27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java: 422) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39) at com.google.gwt.core.client.GWT.create(GWT.java:98) at com.test.gwt.client.Application.onModuleLoad(Application.java: 24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25) at java.lang.reflect.Method.invoke(Method.java:585) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java: 369) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java: 185) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java: 380) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java: 222) at java.lang.Thread.run(Thread.java:595) 13:45:30.806 [ERROR] [Application] Unable to load module entry point class com.test.gwt.client.Application (see associated exception for details) java.lang.RuntimeException: Deferred binding failed for 'com.test.gwt.client.ActivityLogView' (did you forget to inherit a required module?) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:43) at
Re: Do you always have an enormous front-prensenter?
Hm, when you say inject do you mean via Gin dependancy injection framework? Or are you talking about passing all of those child presenters in as constructor args? I'd highly recomend Gin for this task. It's pretty easy to learn and makes your code nice and tidy. On Mar 15, 2:54 pm, zggame zgg...@gmail.com wrote: Hi, I am new to gwt as well as mvp. We are building a site with gwt- front talking with a legacy server via simple json. I looked through the gwt-mvp sample with gwt-presenter. It seems its mainPresenter acts like a front-controller (dispatch-servlet in Spring mvc)? We are trying to layout the page with a header (menu), a footer (staus bar) and center. The center changes and we have about 15-25 different types for center content (may growing into ~100 later). My understanding is that each of these corresponds to a presenter, which might be called by MainPresenter. Then do you need to inject all of them into the MainPresenter? That seems a really large MainPresenter to build, with a huge constructor to inject. Am I thinking in the right line? Is there any other way to break it down? Thank you very much. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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: beta eclipse plugin - running in noserver mode with tomcat - having troubles
Brian, Glad you figured that out. I've been meaning to respond to your last couple of messages, but have been busy doing last-minute preparations for the official 1.3 launch. Keith On Tue, Mar 16, 2010 at 12:59 PM, bkbonner brian.bon...@paraware.comwrote: Keith, I figured out the problem. It turns out that the problem can be reproduced when the Apache Tomcat 5.5.27 libraries are in the classpath. They were inadvertently in the classpath as a runtime dependency -- injected by WTP. When I pulled them OUT, it works fine. That was a pain to figure out. Brian On Mar 15, 10:31 am, bkbonner brian.bon...@paraware.com wrote: Keith, I created a sample using only Eclipse and WTP and I experience exactly the same problem where I get Illegal constant pool index. i.e. I ruled out MAVEN from the picture. It receives the same error. Were you able to involve someone from the UI Binder area to help figure out what is going on?? Brian On Mar 12, 4:40 pm, bkbonner brian.bon...@paraware.com wrote: Keith, I included the sample here: http://code.google.com/p/google-web-toolkit/issues/detail?id=4745 Brian On Mar 12, 2:48 pm, bkbonner brian.bon...@paraware.com wrote: Keith, I was working to put together a sample of what I was seeing and I think I figured out what was wrong. the ui.xml files don't get copied over by default if they're in the src/main/java directories. they have to be in src/main/resources, or the maven configuration has to be changed to make this work. I haven't tried it yet, but I'm pretty sure that's the reason for the prior failures. Brian On Mar 12, 1:57 pm, bkbonner brian.bon...@paraware.com wrote: I got the other JARs removed. I changed the scope to provided and they're gone, but the results are the same. :( If you have any suggestions, they'd be appreciated. I'll still plug away. If I pull out the UI Binder stuff it works fine. I'll look at pulling another working example in. Brian 13:45:30.618 [ERROR] [Application] Failed to create an instance of 'com.test.gwt.client.ActivityLogView' via deferred binding java.lang.VerifyError: (class: com/google/gwt/core/client/Scheduler, method: init signature: ()V) Illegal constant pool index at com.google.gwt.dom.client.StyleInjector.schedule(StyleInjector.java: 389) at com.google.gwt.dom.client.StyleInjector.inject(StyleInjector.java:382) at com.google.gwt.dom.client.StyleInjector.inject(StyleInjector.java:222) at com.google.gwt.dom.client.StyleInjector.inject(StyleInjector.java:208) at com.test.gwt.client.com_test_gwt_client_ActivityLogView_ActivityLogViewUiBinderImpl_GenBundle_default_InlineClientBundleGenerator $1.ensureInjected(com_test_gwt_client_ActivityLogView_ActivityLogViewUiBinderImpl_GenBundle_default_InlineClientBundleGenerator.java: 14) at com.test.gwt.client.ActivityLogView_ActivityLogViewUiBinderImpl.createAndBindUi(ActivityLogView_ActivityLogViewUiBinderImpl.java: 25) at com.test.gwt.client.ActivityLogView_ActivityLogViewUiBinderImpl.createAndBindUi(ActivityLogView_ActivityLogViewUiBinderImpl.java: 1) at com.test.gwt.client.ActivityLogView.init(ActivityLogView.java: 28) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java: 39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java: 27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java: 422) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39) at com.google.gwt.core.client.GWT.create(GWT.java:98) at com.test.gwt.client.Application.onModuleLoad(Application.java: 24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25) at java.lang.reflect.Method.invoke(Method.java:585) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java: 369) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java: 185) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java: 380) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java: 222) at java.lang.Thread.run(Thread.java:595) 13:45:30.806 [ERROR] [Application]
Re: GWT Grid vs. SmartGWT grid
The Grid class from GWT is a layout handler and not a GUI widget at all. I suspect that you are looking for some kind of data table GUI widget control. The ListGrid control from the SmartGWT project has all the nice bells and whistles but the download can be less than snappy. I don't think that it is too bad though. Check out http://myjsp.dynamicalsoftware.com/kato/ which is a demo containing many SmartGWT widgets including the ListGrid. I wouldn't say that the download was too terrible. SmartGWT works fine on many popular browser/OS combinations. The only place I found of relevance where SmartGWT doesn't work and GWT does is the iPhone. The Grid control from the GXT project might be a nice compromise between eye candy and download time but do check out their license first. @Mariyan has already recommended the PagingScrollTable from the incubator project. Also, you might be interested in this presentation ( see http://www.dynamicalsoftware.com/gwt ) on GWT and some popular yet mature 3rd party libraries. The slide deck covers the very topic that you are asking about. I hope this helps. On Mar 11, 9:12 pm, Ken evotur...@gmail.com wrote: I'm exploring using GWT for future work and for a project I'm looking at now I'm particularly interested in the Grid widget. The GWT Grid just doesn't compare to that provided by SmartGWT, but I'm concerned about using the SmartGWT libraries for several reasons: 1) It requires taking the whole library whole and it doesn't do things in really the same way that GWT does in many cases. 2) I'm concerned about browser compatibility since it relies on JSNI calls to the Smart Client library and not the Java-JavaScript transformation provided by GWT. 3) I'm concerned that by using the SmartGWT library I will be increasing the load time of the application since it will require downloading the entire library again. So what I would really like is a grid control that has a similar feature set as that provided by SmartGWT, but doesn't come with all the extra baggage. Does such a widget exist? Is there at least a JavaScript grid that can be used with GWT that doesn't come with all the baggage of SmartGWT? Am I wrong about the disadvantages to using SmartGWT? Is it a better choice than I have been led to believe by my research? Thank you. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Read Html selected list menu in GWT Entrypoint
Hello, I wanna read selected list menu which appears in html into GWT Entrypoint class. Actually, I am trying to add gwt scripting in existing html. So, I could not create list menu in html using GWT widgets. My GWT code needs read the selected option and send it to server when a button is clicked, I could add ClickHandler to the button. Please help me how its supposed to be read in GWT ?. select id=Growth name=Growth option value=5 selected=selected5%/option option value=1010%/option option value=1515%/option option value=2020%/option option value=3525%/option option value=8080%/option /select -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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: JAXB compatibility with GWT 2.0, any news?
I haven't tried it recently, but JAXB generated classes should work. Earlier, the GWT compiler choked on annotations. It now ignores these annotations when it compiles java into js. You would need to keep the jaxb jars in your compile classpath, but that should be all that you need to do. Could you try compiling jaxb classes and let us know? If they fail, some stack traces/error messages would help in debugging the problem. --Sri On 16 March 2010 22:08, Fabiano ftar...@gmail.com wrote: On Mar 16, 3:11 pm, crojay78 croja...@googlemail.com wrote: Hi, I read a few posts that some people had problems with the integration of gwt with jaxb generated files. I want to use generated files from jaxb to use as shared objects in gwt. Is there anything new with gwt 2.0 ? Can I use it without problems or is there a good workaround how to get it working? Thanks a lot Hi, just for curiosity.. do you need shared objects between gwt javascript and server side java , or shared objects between gwt javascript and native javascripts on the browser's side? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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: FlexTable and UiBinder
On Mar 16, 12:47 pm, Paul Stockley pstockl...@gmail.com wrote: Why not use a HTML panel and inside define a HTML table with the widgets in the cells? I rarely use things like FlexTable, HorizontalPanel or VerticalPanel. Usually all my forms are a combination of pure HTML and widgets. If you don't need IE6 support then I can show you some neater ways of laying out forms without tables. My main reason for using FlexTable was that I need to dynamically add and remove rows and that this is somewhat simpler using FlexTable's insertRow() and removeRow() methods. But I'll have a look at HTML tables, I guess it shouldn't be to hard reimplementing this functionality via direct DOM access. - Guenther -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT's Widget library vs SpeeTracer's TopSpin
Hello all, when doing some research and studying in the source code of SpeedTracer I observed that it uses topspin.jar as a widget library (http://code.google.com/p/speedtracer/source/browse/#svn/trunk/src/ client/ui/lib). Does anyone have more information about this library? I've found some source in svn (http://code.google.com/p/topspin/), but it seems to be kind of older compared to what is present in the jar file. I searched for more information but I haven't found anything relevant yet. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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: Read Html selected list menu in GWT Entrypoint
I believe there's a SelectElement.wrap() method. On Mar 16, 2:53 pm, San sarav...@gmail.com wrote: Hello, I wanna read selected list menu which appears in html into GWT Entrypoint class. Actually, I am trying to add gwt scripting in existing html. So, I could not create list menu in html using GWT widgets. My GWT code needs read the selected option and send it to server when a button is clicked, I could add ClickHandler to the button. Please help me how its supposed to be read in GWT ?. select id=Growth name=Growth option value=5 selected=selected5%/option option value=1010%/option option value=1515%/option option value=2020%/option option value=3525%/option option value=8080%/option /select -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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: Do you always have an enormous front-prensenter?
Yeah, I am using Gin. But it is still pretty ugly for a constrctor with say 30 pretty long parameters. Is there any other way to get around this? Thanks. On Mar 16, 12:42 pm, Trevis trevistho...@gmail.com wrote: Hm, when you say inject do you mean via Gin dependancy injection framework? Or are you talking about passing all of those child presenters in as constructor args? I'd highly recomend Gin for this task. It's pretty easy to learn and makes your code nice and tidy. On Mar 15, 2:54 pm, zggame zgg...@gmail.com wrote: Hi, I am new to gwt as well as mvp. We are building a site with gwt- front talking with a legacy server via simple json. I looked through the gwt-mvp sample with gwt-presenter. It seems its mainPresenter acts like a front-controller (dispatch-servlet in Spring mvc)? We are trying to layout the page with a header (menu), a footer (staus bar) and center. The center changes and we have about 15-25 different types for center content (may growing into ~100 later). My understanding is that each of these corresponds to a presenter, which might be called by MainPresenter. Then do you need to inject all of them into the MainPresenter? That seems a really large MainPresenter to build, with a huge constructor to inject. Am I thinking in the right line? Is there any other way to break it down? Thank you very much. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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: FlexTable and UiBinder
If you need to dynamically modify the table I would stay with FlexTable. Working with the DOM on tables is kind of messy. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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 RPC server compiled as regular servlet
Hi Salvador, Is there is a way to debug GWT stack why onAfterResponseSerialized is not getting called? Thanks, Sanjay On Mon, Mar 15, 2010 at 10:53 AM, Sanjay Ungarala ungar...@gmail.comwrote: Hi Salvador, Thank you for your response. If both client/server are packaged in one WAR, I see the serialized object coming back. I see client call coming to the server. I' am wondering why onAfterResponseSerialized is not getting called on the server. When client/server are deployed in two different WAR files, I explicitly set the target URL in the client target.setServiceEntryPoint(http://localhost:8080/MyServer/query;); Do I have to do anything else when client and server are in different WAR files? Thanks, Sanjay On Mon, Mar 15, 2010 at 5:53 AM, SalvadorDiaz diaz.salva...@gmail.comwrote: Hi Sanjay, GWT RPC async interfaces are generated at compile time, so the GWT compiler has to know where the endpoint of the RPC is at compile time. That's the reason you annotate your RPC interfaces with @RemoteServiceRelativePath, so that the GWT compiler knows where's your RPC servlet. Maybe your server-side code isn't being called at all and that's why you don't get any responses on your client-side code, have you looked at your tomcat logs ? In order to get a better grip on how the RPC calls work, I recommend reading the relevant documentation: http://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunication.html Hope that helps, Salvador On Mar 15, 7:47 am, Sanjay Ungarala ungar...@gmail.com wrote: Hi Sri, Thanks for your response. Hmmafter trying many things, it made me think maybe GWT compiles server code differently :-) Yes, client and server are in different war files. But they are deployed on the same server/port (tomcat). Server returns a object of class that implements serialization interface. I don't see onAfterResponseSerialized method being called. Is it anything to do with the serialization? Thanks, Sanjay On Mon, Mar 15, 2010 at 2:31 AM, Sripathi Krishnan sripathikrish...@gmail.com wrote: Do I need to compile my RPC server using GWT compiler? If so, why? No. The GWT compiler doesn't touch your server side code. When I test my application, I see that the object returned by the server is not reaching the client. You will have to explain how you deploy your code. Are you using separate wars for client and server code? If yes, are they being served from different domains / different ports? --Sri http://blog.530geeks.com On 15 March 2010 00:54, Sanjay ungar...@gmail.com wrote: I compiled my RPC server llike any regular servlet and packaged it in a WAR file. I have another eclipse project (GWT) where I have the client code that has the interface and return object (implements seializable) class code and Iam compiling it in eclipse. When I test my application, I see that the object returned by the server is not reaching the client. Here is my question: Do I need to compile my RPC server using GWT compiler? If so, why? Any help on this issue is appreciated. I have been trying to figure out what is going wrong since 2 days now. Thanks, Sanjay -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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.comgoogle-web-toolkit%2Bunsubs cr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Sanjay Ungarala -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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. -- Sanjay Ungarala -- Sanjay Ungarala -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send
Re: Multiple entrypoints? Or something else?
Correct: the three apps are completely separated from the users point of view, but shares a lot of code. It's not clear to me how to actually implement multiple entry points. I guess each sub-app should use its own nocache.js file, but how do I specify that? Aren't there some step by step guide, or just an example, out there explaining how to implement multiple entry points? On Mar 16, 2:16 pm, Francisco Bischoff franzbisch...@gmail.com wrote: Hello, if you mean each * is a totally different webpage, that you cannot navigate between them with a Hyperlink (History state application), yes, you need more Entrypoints... Each entrypoint is like a new webpage inside your project. With their own MyApp1.gwt.xml and their own /myapp1/ directory at /war/ Your .html page can be any name you want... you just need to redirect the myapp1.nocache.js inside the .html page. -- 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 Tue, Mar 16, 2010 at 1:03 PM, jbdhl jbirksd...@gmail.com wrote: I would like to build a website, using GWT together with Google App Engine.There are three parts, but how should I organize them? * Users can login and customize a service to be included in a DIV on their own homepages (just like e.g. google maps can be included in a homepage). I guess this main-part of the app will be handled in an entrypoint like a normal GWT app. * The users should then include a couple of lines of javascript that replaces a certain DIV on their homepage with their customized service (provided by me). Should I do that as second entrypoint? * In a third view I would like to manage user accounts and various stuff. A third entrypoint? How should I approach the above? (If the method is multiple entrypoints: how do I specify the existence of three index-pages (MyApp1.html, MyApp2.html and MyApp3.html)?) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.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: Google plugin 1.3 preview and jar SDK
Hi Mickaël, Thanks for your feedback about the 1.3 preview of the Google Plugin for Eclipse. The 1.3 version does allow you to use the GWT jars from your Maven repo, but as you discovered, it will not recognize the filenames if you try to add it to the set of registered SDKs via the Google GWT preference page. Instead, just add the jars directly to your project's build path and then enable GWT for the project (project properties Google GWT). As of version 1.3, the plugin will recognize the jars on your classpath as a valid GWT SDK, even though they have been renamed. In versions of the plugin prior to 1.3, you would have seen an error that your project did not contain any GWT SDK. You may file a bug in the issue tracker if you feel that this behavior is incorrect, since the official 1.3 release will work the same way regarding that feature. Keith 2010/3/15 LEDUQUE Mickaël mledu...@gmail.com Hello, I tested the 1.3 preview for the plugin, and one of the nice new feature is the ability to use a gwt-user JAR instead. So I tried to use the gwt-user-2.0.3.jar file that is in my maven2 local repository. But when I set Installation drectory to the good path in the Add Google Web Toolkit SDK dialog, all I get is my repo path/com/google/gwt/gwt-user/2.0.3/gwt-user.jar is missing. That's right because the name is gwt-user-2.0.3.jar, not gwt-user.jar. I think it'd be better to let the user configure jar name as well as path. Can I put an issue fin the issue tracker for a preview version ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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.
Lightweight Metrics System
Hi, I'm trying to integrate the Lightweight Metrics System into my application. Which basically means I added the snippet of code shown in here: http://code.google.com/webtoolkit/doc/latest/DevGuideLightweightMetrics.html into my host page. The problem is that when I load my application in dev mode I get the following exception: 16:22:07.703 [ERROR] [mymodule] Unable to load module entry point class com.myapp.gwt.appbuilder.client.MyModule (see associated exception for details) com.google.gwt.dev.shell.HostedModeException: Something other than a boolean was returned from JSNI method '@com.google.gwt.user.client.rpc.impl.RemoteServiceProxy::stats(Lcom/ google/gwt/core/client/JavaScriptObject;)': JS value of type undefined, expected boolean at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:100) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeBoolean(ModuleSpace.java: 181) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeBoolean(JavaScriptHost.java: 35) at com.google.gwt.user.client.rpc.impl.RemoteServiceProxy.stats(RemoteServiceProxy.java) at com.myapp.gwt.appbuilder.client.services.ApplicationRPCService_Proxy.invoke(ApplicationRPCService_Proxy.java: 25) at com.myapp.gwt.appbuilder.client.command.BaseInvokerRPCAsync.invoke(BaseInvokerRPCAsync.java: 47) at com.myapp.gwt.appbuilder.client.command.SafeInvokerAsync.invoke(SafeInvokerAsync.java: 58) at com.myapp.gwt.appbuilder.client.models.AppMainModel.getAvailableApplications(AppMainModel.java: 10) at com.myapp.gwt.appbuilder.client.controllers.AppMainControl.createNavigationView(AppMainControl.java: 84) at com.myapp.gwt.appbuilder.client.controllers.AppMainControl.init(AppMainControl.java: 41) at com.myapp.gwt.appbuilder.client.MyModule.onModuleLoadDeferred(MyModule.java: 63) at com.myapp.gwt.appbuilder.client.MyModule.onModuleLoad(MyModule.java: 45) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java: 369) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java: 185) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java: 380) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java: 222) at java.lang.Thread.run(Thread.java:619) When I load the application the bootstrap, loadExternalRefs, moduleStartup events are called and complete, but as soon as it gets to the RPC it crashes. This does not happen in regular web mode. Does anybody have any idea what the issue could be? 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.
Debug 2 GWT Linked Sites
My application has 2 different sites which have 2 different html pages. The first site is a User site where you can sign up for different worlds that you can play in. The second site is the World site where the user plays the game. These 2 sites have completely different looks and feels which made sense to treat them as different sites. I create links in both sites to allow the user to switch back and forth. This worked fine in GWT 1.7, but I am having trouble getting it to work in GWT 2.0 debug environment. The link seems to work fine, but it is missing the ?gwt.codesvr=127.0.0.1:9997 in the URL. This seems to only be needed for it to work in Debug mode. Is there an API that would allow me to create the link between the 2 sites, which would put ?gwt.codesvr=127.0.0.1:9997 into the URL if in Debug mode? Is there an API that will allow me to tell if the site is being run in Debug mode so that I can switch the URL creation to include ? gwt.codesvr=127.0.0.1:9997 Thanks, Jeffrey -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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.
Multiple Services at a time
Hi GWT fans, Is it possible to have multiple RPC-based GWT Services at a time and what are the usual pitfalls when doing that? Does anybody here know a good tutorial about setting up multiple services, configuring them? What are the special things one should consider when setting up cascading services (services calling other services)? Examples? I hope my question is not too general to be answered. Thanks a lot, Ralf -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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: Lightweight Metrics System
Ok, I figured it out: __gwtStatsEvent has to return a boolean! The documentation, nor the example mentions it, but the RPC code (at least the RPC code) expects it. On Mar 16, 4:32 pm, Raziel raziel...@gmail.com wrote: Hi, I'm trying to integrate the Lightweight Metrics System into my application. Which basically means I added the snippet of code shown in here:http://code.google.com/webtoolkit/doc/latest/DevGuideLightweightMetri... into my host page. The problem is that when I load my application in dev mode I get the following exception: 16:22:07.703 [ERROR] [mymodule] Unable to load module entry point class com.myapp.gwt.appbuilder.client.MyModule (see associated exception for details) com.google.gwt.dev.shell.HostedModeException: Something other than a boolean was returned from JSNI method '@com.google.gwt.user.client.rpc.impl.remoteserviceproxy::stats(Lcom/ google/gwt/core/client/JavaScriptObject;)': JS value of type undefined, expected boolean at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:100) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeBoolean(ModuleSpace.java: 181) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeBoolean(JavaScriptHost. java: 35) at com.google.gwt.user.client.rpc.impl.RemoteServiceProxy.stats(RemoteServiceP roxy.java) at com.myapp.gwt.appbuilder.client.services.ApplicationRPCService_Proxy.invoke (ApplicationRPCService_Proxy.java: 25) at com.myapp.gwt.appbuilder.client.command.BaseInvokerRPCAsync.invoke(BaseInvo kerRPCAsync.java: 47) at com.myapp.gwt.appbuilder.client.command.SafeInvokerAsync.invoke(SafeInvoker Async.java: 58) at com.myapp.gwt.appbuilder.client.models.AppMainModel.getAvailableApplication s(AppMainModel.java: 10) at com.myapp.gwt.appbuilder.client.controllers.AppMainControl.createNavigation View(AppMainControl.java: 84) at com.myapp.gwt.appbuilder.client.controllers.AppMainControl.init(AppMainCo ntrol.java: 41) at com.myapp.gwt.appbuilder.client.MyModule.onModuleLoadDeferred(MyModule.java : 63) at com.myapp.gwt.appbuilder.client.MyModule.onModuleLoad(MyModule.java: 45) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java: 25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java: 369) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler .java: 185) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan nelServer.java: 380) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java : 222) at java.lang.Thread.run(Thread.java:619) When I load the application the bootstrap, loadExternalRefs, moduleStartup events are called and complete, but as soon as it gets to the RPC it crashes. This does not happen in regular web mode. Does anybody have any idea what the issue could be? Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT 2.0.3 + Maven2 + Eclipse
I think the latest gwt-maven-plugin is gwt 1.6.4. Not 2.0.3 On Mar 15, 3:30 pm, Sergio s3rgio...@gmail.com wrote: Hello everybody, I'm beginning with GWT development and I have a problem. I've already configured Eclipse 3.5 with gwt plugin and m2eclipse plugin. I create a new maven project with gwt-maven-plugin archetype, but I'm not able to communicate client side with server side. I've read the same problem is happened other people but no solution. I'm trying to debug the sample application with gwt:debug goal and then Run remote java application in Debug configuration. I don't know if I am doing anything wrong. Any idea? Thank you and sorry for my English. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Sending HTTP GET request not working!
On 15 mar, 17:25, Jon Britton mankillseveryth...@googlemail.com wrote: Hi, I'm trying to send a HTTP GET request to a server on localhost (http:// localhost:8080/wps/WebProcessingService? Request=GetCapabilitiesService=WPS) and for some reason it won't work. I've inherited the GWT HTTP module as shown here:http://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunicat... My code is based on the code in the above link: final String capabilitiesUrl = wpsInput.getText(); RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(capabilitiesUrl)); try { Request request = builder.sendRequest(null, new RequestCallback() { @Override public void onResponseReceived(Request request, Response response) { Window.alert(URL.encode( + response.getStatusCode())); } @Override public void onError(Request request, Throwable exception) { Window.alert(ERROR); } });} catch (RequestException e) { // TODO Auto-generated catch block e.printStackTrace(); } However, the response keep coming up as status code 0 and seems to be empty. I don't get an errors. The URL is fine - if I copy it into my browser it shows the XML response. Anyway have any idea what I'm doing wrong? Are you trying to violate the Same-Origin Policy? If so, some recent browser versions implement CORS that allow cross-origin requests under certain conditions (server opt-in). I haven't checked but believe in this case you could have a successful response with no status code. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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.
multiselect ListBox getting selected items
I'm attempting to get multiple selected items from a ListBox My setup code is: final ListBox listBox = new ListBox(true); listBox.addItem(Item 1, 1); listBox.addItem(Item 2, 2); listBox.addItem(Item 3, 3); In the onClick event of a button on my panel I want to get the selected items. I have seen suggestions to iterate over all the items, calling the isItemSelected() method for each item to determine whether it’s selected. However I do not see any methods available on ListBox to get the list of items. Obviously I could add a listener to the listBox to capture when someone selects or unselects an item but there must be an easier way to get all of the selected items in a multiselect ListBox Regards, Dave -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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 switch the center view of DockLayoutPanel?
Well, I did it like this. 1. In LayoutView.ui.xml I have a DockLayoutPanel : g:center g:SimplePanel ui:field=content / /g:center 2. In LayoutView: public class LayoutView extends Composite implements LayoutPresenter.Display { @UiField SimplePanel content; @Override public HasWidgets getContent() { return content; } } 3. in Presenter: public class LayoutPresenter { private Display display; public interface Display { HasWidgets getContent(); } public void switchContent(Widget module) { display.getContent().clear(); display.getContent().add(module); } } On Mar 16, 6:59 am, zggame zgg...@gmail.com wrote: Hi, I am new to gwt. I had a page with footer/header/content. The center content changes with different selection in the menu in header. I try to use the DockLayoutPanel. How can I change the view of the center content. It can only add once? Is that the correct widget to use? 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: Obfuscate java source
No. GWT relies upon the java source to convert to javascript. On Mar 16, 2:35 am, rasmus.olaus...@gmail.com rasmus.olaus...@gmail.com wrote: Hi. I'm developing a GWT library. And I would like to be able to obfuscate the java source code in the .jar file to be able to give the library to others without them reading the code. I know that the way most of us write code it's obfuscated by default, but .. :) Could anyone recomend a tool to do this? //Rasmus Gxt-Schdeuler 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.
How to add Widget to a DOM element?
Is it possible to add a widget to a DOM element? I have some DOM structure that I need to directly create in code and I'd like to add a GWT widget as a child element of this DOM structure. Currently I'm using something like the following code to add a SuggestBox: domElement.appendChild(getSuggestBox().getElement()); While this code adds the underlying text input field to the DOM tree, the suggestion feature of the suggest box does not work. However, when I add the Widget directly as child element of another widget everything works fine. Does the call to getElement() somehow partition the Widget from the DOM element so that the DOM element is added without the Widget functionality? How can I add a Widget as child of a DOM element? Stefan -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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: Class in jar file used in another GWT application gives *Source not available* error when compiling
Try to compile it and I get the error copied below. I believe i need to inherit it, or need to specify the source path in Monkee.gwt.xml, but don't know how to do it. And the source code of the whole project I downloaded is a bit too complicated for me to understand, as I am still a beginner. Does anyone have an idea? I would guess you did forget to inherit the right module, because GWT Compiler only includes sourcecode for included GWT modules. You have to add the following line to your project .gwt.xml file: inherits name='org.gwt.advanced.Grid'/ Also, not being a GWT standard widget, can it still be declared in a UIBinder xml? Yes, this is possibly! You have to import the package of the widget using xml namespace declaration: ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:adv='urn:import:org.gwt.advanced.client.ui.widget' g:HTMLPanel !-- usage of datepicker -- adv:DatePicker ... / /g:HTMLPanel /ui:UiBinder If the datepicker has no no-args constructor then you have to supply a @UiFactory Method in your UiBinder class. You should have a look at http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html#Using_a_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.
Remote HTTP fetch from Server not working?
Hi, when i run the code below as standalone pojo, it works fine, but in my GreetingServiceImpl on server it returns 500 error; ** please note i DO want to do this from the server. i saw the tutorial about adding script tags to accomplish this from the client. I need to do the fetch from the server side for other reasons. thanks! import java.io.IOException; import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.params.HttpMethodParams; public class TestRemoteCall { public static void main(String args[]) { HttpClient client = new HttpClient(); GetMethod method = new GetMethod(http://waterdata.usgs.gov/tx/nwis/ current/? type=flowgroup_key=basin_cdsearch_site_no_station_nm=barton); // Provide custom retry handler is necessary method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false)); try { // Execute the method. int statusCode = client.executeMethod(method); if (statusCode != HttpStatus.SC_OK) { System.err.println(Method failed: + method.getStatusLine()); } // Read the response body. byte[] responseBody = method.getResponseBody(); // Deal with the response. // Use caution: ensure correct character encoding and is not binary data // System.out.println(new String(responseBody)); System.out.println(new String(responseBody)); } catch (HttpException he) { System.err.println(Fatal protocol violation: + he.getMessage()); he.printStackTrace(); } catch (IOException e) { System.err.println(Fatal transport error: + e.getMessage()); e.printStackTrace(); } finally { // Release the connection. method.releaseConnection(); } } } HERE is the error message import java.io.IOException; import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.params.HttpMethodParams; public class TestRemoteCall { public static void main(String args[]) { HttpClient client = new HttpClient(); GetMethod method = new GetMethod(http://waterdata.usgs.gov/tx/nwis/ current/? type=flowgroup_key=basin_cdsearch_site_no_station_nm=barton); // Provide custom retry handler is necessary method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false)); try { // Execute the method. int statusCode = client.executeMethod(method); if (statusCode != HttpStatus.SC_OK) { System.err.println(Method failed: + method.getStatusLine()); } // Read the response body. byte[] responseBody = method.getResponseBody(); // Deal with the response. // Use caution: ensure correct character encoding and is not binary data // System.out.println(new String(responseBody)); System.out.println(new String(responseBody)); } catch (HttpException he) { System.err.println(Fatal protocol violation: + he.getMessage()); he.printStackTrace(); } catch (IOException e) { System.err.println(Fatal transport error: + e.getMessage()); e.printStackTrace(); } finally { // Release the connection. method.releaseConnection(); } } } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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.
Memory Increase Using GWT RPC Calls
Hi, I'm having some difficulties when making multiple GWT RPC calls from within a GWT Timer. I've run my example in a few different applications that monitor the memory usage of the page and in all of them there is a constant increase in the amount of memory after each call. In the example all I am doing is scheduling a Timer to run every 5 seconds to call my service that simply returns a large string - around 250,000 characters (JSON formatted). The memory increase seems to occur in IE7, IE8, FireFox Chrome. Chrome's developer tools (Heap Snapshots profile) seems to suggest that the increase is related to the strings I'm returning - I'm assuming that by nulling the string that once the method finishes running the garbage collector should clean it up but something must be holding onto them, I just cant work out what!! Any help would be greatly appreciated! Let me know if anyone requires any extra information! My entry point consists of the following code. package com.imass.performancetesting.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.Timer; import com.google.gwt.user.client.rpc.AsyncCallback; import com.imass.performancetesting.client.services.IVesselServices; import com.imass.performancetesting.client.services.IVesselServicesAsync; public class PerformanceTestingEntryPoint implements EntryPoint { /** * Create a remote service proxy to talk to the server-side Vessel service (Async). */ private IVesselServicesAsync rpcVesselServices = GWT.create(IVesselServices.class); public void onModuleLoad() { new Timer() { public void run() { rpcVesselServices.getCurrentVessels(new AsyncCallbackString() { @Override public void onFailure(Throwable arg0) { // Show the RPC error message to the user GWT.log(arg0.getMessage()); } @Override public void onSuccess(String resultString) { resultString = null; } }); } }.scheduleRepeating(5 * 1000); } } Thanks in advance, Jason. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: UiBinder with background-image and ImageResource
I'm using ui:with ... like this: ui:with field=res type=MyResources/ui:with g:Anchor ui:field=myField styleName={res.css.myAnchor}Some Text/ g:Anchor And it all works. On Mar 16, 9:23 pm, Thomas Broyer t.bro...@gmail.com wrote: On Mar 16, 12:27 am, Michael Guyver michael.guy...@gmail.com wrote: Hi Craigo - does the @url work within a ui:style section? As I said: I know it works if your DataResoruce is created with a ui:data, I don't know when it comes from a separate ClientBundle imported with ui:with... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Google Plugin for Eclipse 1.3 is now available
Hi everyone, I'm happy to announce the release of version 1.3 of the Google Plugin for Eclipse (http://code.google.com/eclipse). This release is designed to make life easier for developers using GWT and/or App Engine alongside third-party tools. For example, we've taken the pain out of using the plugin with projects built with the ever-popular Maven build system: no more ugly hacks or workarounds, or polluted WEB-INF/lib directories! We've even added a new FAQ dedicated to Maven usage: http://code.google.com/eclipse/docs/faq.html#gwt_with_maven. We've also worked hard to make sure the plugin works well with Dynamic Web projects in Eclipse for Java EE. See the following FAQ for details on this scenario: http://code.google.com/eclipse/docs/faq.html#gwt_in_eclipse_for_java_ee. In addition to improving third-party interoperability, we've also made the plugin more customizable and robust overall. Launch configurations now allow direct editing of generated command line arguments, and a new Errors/Warnings preference page lets you tweak the severity of any problem marker we create. We've also fixed a number of bugs related to App Engine ORM enhancement. To install the Google Plugin for Eclipse, you can find our update site URLs, along with detailed instructions, here: http://code.google.com/eclipse/docs/download.html If you're upgrading from a previous version of the plugin, you may want to consult our Upgrading the Plugin guide: http://code.google.com/eclipse/docs/updating_the_plugin.html *Note: If you installed the Google Plugin for Eclipse 1.3 Preview, be sure to remove the relevant subfolders from your eclipse/dropins folder before installing the official 1.3 release via the update site.* *Enhancements* - Configurable WAR directory to allow better integration with Eclipse for Java EE and projects built with Maven - Web Application launch configurations now display and allow editing of generated Program and VM arguments - Errors/Warnings preference page for customizing the severity of any generated problem marker - Projects can reference GWT/App Engine SDKs directly via JARs instead of through SDK library - GWT+App Engine projects automatically configured for optimal caching *Fixes* - GWT Issue 3583: Google Eclipse Plugin configuration is too strict - GWT Issue 3592: Eclipse plugin to add 'cache forever' configuration for new 'GWT + App Engine' projects - GWT Issue 3902: Allow users to configure the severity of problems reported by the eclipse plugin - App Engine Issue 1515: Eclipse plugin requires fixed location for war directory - App Engine Issue 2115: Using the @PersistenceAware annotation puts the Eclipse Enhancer in an Infinite Loop - App Engine Issue 1941: Plugin fails to enhance dependent classes on source level changes For a complete list of fixed issues, see the GWT issue tracker and App Engine issue tracker. We hope you enjoy using this new version of the Google Plugin for Eclipse for all your GWT/App Engine development needs! Let us know if you have questions or run into any issues. Thanks! 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.
Re: Remote HTTP fetch from Server not working?
So I discovered that I need to add any extra libraries into /war/WEB- INF/lib -- added apache httpclient, apache logging, and apache codec jars. Now I get this error --- java.net.Socket is a restricted class. Please see the Google App Engine developer's guide But the gwt docs seem to suggest i can use anything i want on the server side: Tip: Although GWT translates Java into JavaScript for client-side code, GWT does not meddle with your ability to run Java bytecode on your server whatsoever. Server-side code doesn't need to be translatable, so you're free to use any Java library you find useful. Well this one would be useful... any ideas why it is a restricted class? and what that means? Anecdotally i saw that I should be able to use URLConnection? I guess I'll try that. Thanks! On Mar 16, 11:43 am, vegbenz veggieb...@gmail.com wrote: Hi, when i run the code below as standalone pojo, it works fine, but in my GreetingServiceImpl on server it returns 500 error; ** please note i DO want to do this from the server. i saw the tutorial about adding script tags to accomplish this from the client. I need to do the fetch from the server side for other reasons. thanks! import java.io.IOException; import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.params.HttpMethodParams; public class TestRemoteCall { public static void main(String args[]) { HttpClient client = new HttpClient(); GetMethod method = new GetMethod(http://waterdata.usgs.gov/tx/nwis/ current/? type=flowgroup_key=basin_cdsearch_site_no_station_nm=barton); // Provide custom retry handler is necessary method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false)); try { // Execute the method. int statusCode = client.executeMethod(method); if (statusCode != HttpStatus.SC_OK) { System.err.println(Method failed: + method.getStatusLine()); } // Read the response body. byte[] responseBody = method.getResponseBody(); // Deal with the response. // Use caution: ensure correct character encoding and is not binary data // System.out.println(new String(responseBody)); System.out.println(new String(responseBody)); } catch (HttpException he) { System.err.println(Fatal protocol violation: + he.getMessage()); he.printStackTrace(); } catch (IOException e) { System.err.println(Fatal transport error: + e.getMessage()); e.printStackTrace(); } finally { // Release the connection. method.releaseConnection(); } } } HERE is the error message import java.io.IOException; import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.params.HttpMethodParams; public class TestRemoteCall { public static void main(String args[]) { HttpClient client = new HttpClient(); GetMethod method = new GetMethod(http://waterdata.usgs.gov/tx/nwis/ current/? type=flowgroup_key=basin_cdsearch_site_no_station_nm=barton); // Provide custom retry handler is necessary method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false)); try { // Execute the method. int statusCode = client.executeMethod(method); if (statusCode != HttpStatus.SC_OK) { System.err.println(Method failed: + method.getStatusLine()); } // Read the response body. byte[] responseBody = method.getResponseBody(); // Deal with the response. // Use caution: ensure correct character encoding and is not binary data // System.out.println(new String(responseBody)); System.out.println(new
Re: Client Bundle and Image Internationalization
Hello! I just made a project that has the same issue as yours: works in dev mode but not after compiled... I use apache2 server... Localized strings with .properties files work but localized images with imagename_fr.png doesnt... (works only in dev). Have you got to solve this issue? Thanks On 11 fev, 12:24, Christian Goudreau goudreau.christ...@gmail.com wrote: Still no answers ? I really need that issue to be fixed as my app is going live soon. At least, can anyone test ClientBundle ImageResources with locales on a php server and give me some feedback ? Thanks. Christian On Wed, Feb 10, 2010 at 1:20 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: Seems to work in my other project that have tomcat as server... but not on the one that have a php server. Any idea how to fix this ? Christian On Tue, Feb 9, 2010 at 9:00 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: It seem that only the default value is used. I have three files : image.png, image_en_CA.png and image_fr_CA.png. Everything is working fin in dev mode, but when it come to publish, only image.png is taken into account. Maybe it's because I have PHP server side ? Can anyone help me ? Christian On Tue, Feb 9, 2010 at 8:02 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: It doesn't work after build ! My images are a mess and I can't even change de locale, what am I missing ? Christian On Mon, Feb 8, 2010 at 4:24 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: Ok... it's working in dev mode, I don't know why it didnt when going live, I'll do some more test and come back later On Mon, Feb 8, 2010 at 12:02 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: There's an example of what I have : Inside the client bundle : ImageResource example(); and in my directory I have : exemple.png exemple_fr_CA.png exemple_en_CA.png and when I set the local to fr_CA, I have exemple.png instead... On Sun, Feb 7, 2010 at 10:20 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: I know how to implements localizable images with Image bundle, but how does it works with Client Bundle ? I found nothing about that in the documentation and I was wondering what was the best way to acheive this with Gwt 2.0. Thx Christian -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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: Multiple entrypoints? Or something else?
Yes, each subapp will have their own subfolder with their own nocache.js You set the correct nocache.js in your .html file -- 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, Mar 16, 2010 at 8:03 PM, jbdhl jbirksd...@gmail.com wrote: Correct: the three apps are completely separated from the users point of view, but shares a lot of code. It's not clear to me how to actually implement multiple entry points. I guess each sub-app should use its own nocache.js file, but how do I specify that? Aren't there some step by step guide, or just an example, out there explaining how to implement multiple entry points? On Mar 16, 2:16 pm, Francisco Bischoff franzbisch...@gmail.com wrote: Hello, if you mean each * is a totally different webpage, that you cannot navigate between them with a Hyperlink (History state application), yes, you need more Entrypoints... Each entrypoint is like a new webpage inside your project. With their own MyApp1.gwt.xml and their own /myapp1/ directory at /war/ Your .html page can be any name you want... you just need to redirect the myapp1.nocache.js inside the .html page. -- 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 Tue, Mar 16, 2010 at 1:03 PM, jbdhl jbirksd...@gmail.com wrote: I would like to build a website, using GWT together with Google App Engine.There are three parts, but how should I organize them? * Users can login and customize a service to be included in a DIV on their own homepages (just like e.g. google maps can be included in a homepage). I guess this main-part of the app will be handled in an entrypoint like a normal GWT app. * The users should then include a couple of lines of javascript that replaces a certain DIV on their homepage with their customized service (provided by me). Should I do that as second entrypoint? * In a third view I would like to manage user accounts and various stuff. A third entrypoint? How should I approach the above? (If the method is multiple entrypoints: how do I specify the existence of three index-pages (MyApp1.html, MyApp2.html and MyApp3.html)?) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.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.
Re: Remote HTTP fetch from Server not working?
figured it out ! so for the benefit of anybody searching for this problem in the future, here you go: try { java.net.URL url = new URL(input); java.net.URLConnection urlConn = url.openConnection(); urlConn.getContent(); int c; StringBuilder sb = new StringBuilder(); InputStream stream = urlConn.getInputStream(); int i = urlConn.getContentLength(); while (((c=stream.read())!=-1)){// (--i 0){ System.out.print((char)c); sb.append((char)c); } stream.close(); return sb.toString(); } catch (java.io.IOException ioe) { ioe.printStackTrace(); } return null; On Mar 16, 9:09 pm, vegbenz veggieb...@gmail.com wrote: So I discovered that I need to add any extra libraries into /war/WEB- INF/lib -- added apache httpclient, apache logging, and apache codec jars. Now I get this error --- java.net.Socket is a restricted class. Please see the Google App Engine developer's guide But the gwt docs seem to suggest i can use anything i want on the server side: Tip: Although GWT translates Java into JavaScript for client-side code, GWT does not meddle with your ability to run Java bytecode on your server whatsoever. Server-side code doesn't need to be translatable, so you're free to use any Java library you find useful. Well this one would be useful... any ideas why it is a restricted class? and what that means? Anecdotally i saw that I should be able to use URLConnection? I guess I'll try that. Thanks! On Mar 16, 11:43 am, vegbenz veggieb...@gmail.com wrote: Hi, when i run the code below as standalone pojo, it works fine, but in my GreetingServiceImpl on server it returns 500 error; ** please note i DO want to do this from the server. i saw the tutorial about adding script tags to accomplish this from the client. I need to do the fetch from the server side for other reasons. thanks! import java.io.IOException; import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.params.HttpMethodParams; public class TestRemoteCall { public static void main(String args[]) { HttpClient client = new HttpClient(); GetMethod method = new GetMethod(http://waterdata.usgs.gov/tx/nwis/ current/? type=flowgroup_key=basin_cdsearch_site_no_station_nm=barton); // Provide custom retry handler is necessary method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false)); try { // Execute the method. int statusCode = client.executeMethod(method); if (statusCode != HttpStatus.SC_OK) { System.err.println(Method failed: + method.getStatusLine()); } // Read the response body. byte[] responseBody = method.getResponseBody(); // Deal with the response. // Use caution: ensure correct character encoding and is not binary data // System.out.println(new String(responseBody)); System.out.println(new String(responseBody)); } catch (HttpException he) { System.err.println(Fatal protocol violation: + he.getMessage()); he.printStackTrace(); } catch (IOException e) { System.err.println(Fatal transport error: + e.getMessage()); e.printStackTrace(); } finally { // Release the connection. method.releaseConnection(); } } } HERE is the error message import java.io.IOException; import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.params.HttpMethodParams; public class TestRemoteCall { public static void main(String args[]) {
Re: Performance
hi diaz, It seems to be complicated ,as you said.Anyway thanks a ton.I'll work on it,and get back to you with good news.. :) On Mar 15, 2:37 pm, SalvadorDiaz diaz.salva...@gmail.com wrote: Hi raj, I once had a similar problem with a GWT application, as it turned out, there was an IncrementalCommand that was being called again and again and it never returned false so the CPU usage was sky high (50 % of a dual core machine, I think it's the max you can achieve as JS is monothreaded). Anyway, these kind of bugs can be pretty difficult to identify and I did it with the help of firebug's js panel: there's a button called break on next, click on it, and it'll stop on the next method called, from there you can identify which one is taking up all the cpu. Hope that helps, Salvador On Mar 15, 10:01 am, raj raj.cowbo...@gmail.com wrote: Hi all! I'm facing the problem when i run GWT1.7 application firefox3.6 my CPU usage has been grown immensely(upto 50% and it's not coming down).could some one tell me what would be the problem?Is there anything to be done with the coding?Is there any thing to be done with my machine configuration? what should i do, in order to make my GWT application,live? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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.
implementing hotkey/shortcut
Hi , is anyone know how to implement hotkey or shortcut, something liek ctrl+p, or ctrl+left click in GWT, how can i capture that??? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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: Code Review Request: Fix flaxy MessageTransport test
I'm testing that if you try to use MessageTransport.executeRequestAsync(..) and the server side of the network has closed its input stream, then an exception will be thrown (an ExecutionException with an underlying cause of IllegalStateException). I don't think shutdownInput(..) would work, because it says that any input coming in will be silently discarded. I could probably use network.getClientSocket(..).shutdownOutput() to achieve the same effect, though I was really trying to test the case where the server side shut down the input stream. I don't know if there is a better way to do this than polling. On Mon, Mar 15, 2010 at 4:28 PM, k...@google.com wrote: Now we understand the mysterious failure. Thanks for finding it! http://gwt-code-reviews.appspot.com/111808/diff/1/2 File dev/core/test/com/google/gwt/dev/shell/remoteui/MessageTransportTest.java (right): http://gwt-code-reviews.appspot.com/111808/diff/1/2#newcode135 Line 135: sleepCycles++; We should fail with a clear message if the socket cannot be closed, rather than a misleading message down stream. http://gwt-code-reviews.appspot.com/111808 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Add build.xml file with checkstyle target; pass checkstyle
Reviewers: Ray Ryan, Description: Add build.xml file with checkstyle target; pass checkstyle Review by: rj...@google.com Please review this at http://gwt-code-reviews.appspot.com/218801 Affected files: M bikeshed/build.xml M bikeshed/src/com/google/gwt/bikeshed/cells/client/ProfitLossCell.java M bikeshed/src/com/google/gwt/bikeshed/sample/stocks/server/Stocks.java M bikeshed/src/com/google/gwt/sample/expenses/client/Expenses.java M bikeshed/src/com/google/gwt/sample/expenses/client/Shell.java M bikeshed/src/com/google/gwt/sample/expenses/gen/EmployeeRequestImpl.java M bikeshed/src/com/google/gwt/sample/expenses/gen/ExpenseRequestFactoryImpl.java M bikeshed/src/com/google/gwt/sample/expenses/gen/ReportRequestImpl.java M bikeshed/src/com/google/gwt/sample/expenses/server/domain/CreationVisitor.java M bikeshed/src/com/google/gwt/sample/expenses/server/domain/Currency.java M bikeshed/src/com/google/gwt/sample/expenses/server/domain/Employee.java M bikeshed/src/com/google/gwt/sample/expenses/server/domain/Entity.java M bikeshed/src/com/google/gwt/sample/expenses/server/domain/EntityVisitor.java M bikeshed/src/com/google/gwt/sample/expenses/server/domain/NullFieldFiller.java M bikeshed/src/com/google/gwt/sample/expenses/server/domain/RelationshipRefreshingVisitor.java M bikeshed/src/com/google/gwt/sample/expenses/server/domain/RelationshipValidationVisitor.java M bikeshed/src/com/google/gwt/sample/expenses/server/domain/Report.java M bikeshed/src/com/google/gwt/sample/expenses/server/domain/ReportItem.java M bikeshed/src/com/google/gwt/sample/expenses/server/domain/Storage.java M bikeshed/src/com/google/gwt/valuestore/shared/Values.java M bikeshed/test/com/google/gwt/sample/expenses/server/domain/CreationVisitorTest.java A bikeshed/war/symbols.txt -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Don't ever set the base variable to null. It is supposed to be the empty string
I'm working on a test case for this tricky code, but it's going to take several hours to put together. Shall we put in the one-line fixes? The selection scripts as they are cause null pointer dereferences in some situations. http://gwt-code-reviews.appspot.com/219801 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Don't ever set the base variable to null. It is supposed to be the empty string
Reviewers: jgw, Description: Don't ever set the base variable to null. It is supposed to be the empty string if it hasn't been set yet. Please review this at http://gwt-code-reviews.appspot.com/219801 Affected files: M dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js M dev/core/src/com/google/gwt/core/linker/XSTemplate.js Index: dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js === --- dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js (revision 7732) +++ dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js (working copy) @@ -120,7 +120,8 @@ ,markerId = __gwt_marker___MODULE_NAME__ ,markerScript; -if (base = metaProps['baseUrl']) { +if (metaProps['baseUrl']) { + base = metaProps['baseUrl']; return; } Index: dev/core/src/com/google/gwt/core/linker/XSTemplate.js === --- dev/core/src/com/google/gwt/core/linker/XSTemplate.js (revision 7732) +++ dev/core/src/com/google/gwt/core/linker/XSTemplate.js (working copy) @@ -104,7 +104,8 @@ ,markerId = __gwt_marker___MODULE_NAME__ ,markerScript; -if (base = metaProps['baseUrl']) { +if (metaProps['baseUrl']) { + base = metaProps['baseUrl']; return; } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Issue 4720: PopupPanel#removeFromParent doesn't remove glass
Reviewers: jgw, Description: Calling PopupPanel#removeFromParent or RootPanel.get().remove(popupPanel) does not hide the glass. Fix: = onUnload now uses ResizeAnimation to complete the hide process if the PopupPanel isn't already hidden. While the fix seems trivial, this bug actually revealed a few problems that can lead to invalid states. First of all, prior to this patch, calling hide() would actually call setState() twice (once in hide, once in onUnload). Second, calling hide() synchronously after calling show with animations could would leave the PopupPanel in an invalid state. Testing: === I added unit tests. Please review this at http://gwt-code-reviews.appspot.com/220801 Affected files: user/src/com/google/gwt/user/client/ui/PopupPanel.java user/test/com/google/gwt/user/client/ui/PopupTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Don't ever set the base variable to null. It is supposed to be the empty string
On 2010/03/16 15:49:26, Lex wrote: I'm working on a test case for this tricky code, but it's going to take several hours to put together. Shall we put in the one-line fixes? The selection scripts as they are cause null pointer dereferences in some situations. That sounds fine to me for now. Tests would be good, but we can always do them as two separate commits. http://gwt-code-reviews.appspot.com/219801 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Support runAsync with the cross-site linker.
On Mon, Mar 15, 2010 at 8:34 PM, Joel Webber j...@google.com wrote: That's great news, and will really help with efforts to make our linkers more sane. Out of curiosity, what's the strategy for loading fragments into the enclosing namespace (and yes, that's the sound of me being too lazy to dig into the patch)? No, it should be documented separately from the patch. Here you go: http://code.google.com/p/google-web-toolkit/wiki/CrossSiteRunAsync http://code.google.com/p/google-web-toolkit/wiki/CrossSiteRunAsync-Lex -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7735 committed - Created wiki page through web user interface.
Revision: 7735 Author: sp...@google.com Date: Tue Mar 16 09:29:56 2010 Log: Created wiki page through web user interface. http://code.google.com/p/google-web-toolkit/source/detail?r=7735 Added: /wiki/CrossSiteRunAsync.wiki === --- /dev/null +++ /wiki/CrossSiteRunAsync.wikiTue Mar 16 09:29:56 2010 @@ -0,0 +1,58 @@ +#How code is loaded on demand in the cross-site linker + += Introduction = + +The cross-site linker has two challenges for runAsync. First, the code can't be loaded with XHR, because of the Some Origin Policy. Second, the code cannot be loaded at the top level of any iframe, but instead must be inserted into an inner scope of a function. + +This page describes the general strategy used. The precise details, e.g. the label names, are subject to change. + += Inserting code into a function = + +In the initial code download, GWT code is wrapped in a function, and that function exports an installCode function as an expando off of the function itself: +{{{ +function my_gwt_app() { + var jslink = new Object(); + my_gwt_ap.installCode = function(code) { +var install = new Function(jslink, code); +install(jslink); + } + // rest of initial code +} +}}} + +Since the scope of each new Function call is different, all cross-island references must go through the jslink object. New definitions must be installed like this: +{{{ +my_gwt_app.installCode(jslink.foo = function foo() { }) +}}} + +Uses of an identifier from another island look like this: +{{{ +my_gwt_app.installCode(jslink.foo();) +}}} + +The GWT compiler includes an optional pass that is controlled by the configuration parameter `compiler.predeclare.cross.island.references`. It's false by default, but individual linkers can turn it on when needed. Here's how the cross-site linker itself turns on this pass: +{{{ +set-property name=compiler.predeclare.cross.island.references value=true + when-linker-added name=xs / +/set-property +}}} + + += Cross-Site code load = + +Cross-site code is loaded using class CrossLiteLoadingStrategy. + +The general technique is like JSONP. Script tags aren't subject to the Same Origin Policy, so they can be used to download the code. The content downloaded via the script tag has been wrapped as follows: +{{{ +__MODULE_FUNCTION__['runAsyncCallback3']('here is the downloaded code') +}}} + +Before inserting the script tag, CrossSiteLoadingStrategy must insert a callback to handle that code. The callback updates the runAsync book keeping and then uses the installCode function to actually load the code. + += Detecting download errors = + +Detecting download errors with XHR is straightforward, but trickier for script tags. At the time of writing, the implementation uses all of the following attributes on the created script tag: onerror, onload, and onreadystatechange. Additionally, onreadystatechange does not indicate whether the download actually succeeded or not. Thus, the callbacks are all tolerant of bad code. Correspondingly, LoadErrorHandler is now called LoadFinishedHandler. + += Retry = + +Retrying failed downloads is also tricky on some browsers. There appears to be a heuristic in some browsers that if a script tag download for a URL fails three times, then no further downloads of that URL will be attempted. To work around this, CrossSiteLoadingStrategy adds a serial number to each request. Instead of requesting deferredjs/123.cache.js, it uses deferredjs/123.cache.js?serial=0 . -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Update currency data to Unicode CLDR 1.7.2.
Reviewers: shanjian, Description: Update currency data to Unicode CLDR 1.7.2. Patch by: jat Review by: shanjian Please review this at http://gwt-code-reviews.appspot.com/221801 Affected files: M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_af.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_ak.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_am.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_ar.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_as.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_az.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_az_Cyrl.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_be.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_bg.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_bn.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_bo.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_bs.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_byn.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_ca.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_cch.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_cs.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_cy.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_da.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_de.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_de_BE.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_de_LU.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_dv.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_dz.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_ee.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_el.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_el_POLYTON.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_AU.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_BE.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_BW.properties A user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_BZ.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_CA.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_HK.properties A user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_JM.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_MT.properties A user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_NA.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_NZ.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_PH.properties A user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_PK.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_SG.properties A user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_en_TT.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_AR.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_CL.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_CO.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_EC.properties A user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_GT.properties A user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_HN.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_MX.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_PR.properties A user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_US.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_es_UY.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_et.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_eu.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_fa.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_fa_AF.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_fi.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_fil.properties M user/src/com/google/gwt/i18n/client/impl/cldr/CurrencyData_fo.properties M
Re: [gwt-contrib] Support runAsync with the cross-site linker.
Something is screwy with riedvelt, and I can't leave a comment on XSTemplate.js My comment isn't really about your patch in particular, but the patterns we are using in the linker templates. I wish that stanzas of code common to many linkers, like the calling of __gwtStatsEvent() could be extracted and put into the template with variable substitution. For example, adding the sessionId field to the event works fine here, but there are several linkers outside of GWT that will need to be updated to get the same fix. -Eric. On Mon, Mar 15, 2010 at 6:17 PM, sp...@google.com wrote: Reviewers: cromwellian, Description: Support runAsync with the cross-site linker. Please review this at http://gwt-code-reviews.appspot.com/213801 Affected files: M dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java M dev/core/src/com/google/gwt/core/linker/IFrameLinker.java M dev/core/src/com/google/gwt/core/linker/XSLinker.java M dev/core/src/com/google/gwt/core/linker/XSTemplate.js M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java M dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java A dev/core/src/com/google/gwt/dev/jjs/impl/HandleCrossIslandReferences.java M dev/core/src/com/google/gwt/dev/jjs/impl/JsFunctionClusterer.java M dev/core/src/com/google/gwt/dev/js/JsToStringGenerationVisitor.java A dev/core/test/com/google/gwt/dev/js/JavaScriptStringTest.java M user/src/com/google/gwt/core/CompilerParameters.gwt.xml M user/src/com/google/gwt/core/Core.gwt.xml A user/src/com/google/gwt/core/XSLinker.gwt.xml user/src/com/google/gwt/core/client/impl/AsyncFragmentLoader.java A user/src/com/google/gwt/core/client/impl/CrossSiteLoadingStrategy.java M user/src/com/google/gwt/core/client/impl/XhrLoadingStrategy.java M user/test/com/google/gwt/core/client/impl/AsyncFragmentLoaderTest.java M user/test/com/google/gwt/core/client/impl/XhrLoadingStrategyTest.java A user/test/com/google/gwt/dev/jjs/CompilerSuiteCrossSite.gwt.xml A user/test/com/google/gwt/dev/jjs/CrossSiteRunAsyncFailure.gwt.xml A user/test/com/google/gwt/dev/jjs/CrossSiteRunAsyncMetrics.gwt.xml A user/test/com/google/gwt/dev/jjs/CrossSiteRunAsyncSuite.java M user/test/com/google/gwt/dev/jjs/RunAsyncFailure.gwt.xml M user/test/com/google/gwt/dev/jjs/RunAsyncMetricsIntegrationTest.gwt.xml user/test/com/google/gwt/dev/jjs/public/empty-gwt-stats.js A user/test/com/google/gwt/dev/jjs/test/CrossSiteRunAsyncFailureTest.java A user/test/com/google/gwt/dev/jjs/test/CrossSiteRunAsyncMetricsTest.java A user/test/com/google/gwt/dev/jjs/test/CrossSiteRunAsyncTest.java M user/test/com/google/gwt/dev/jjs/test/RunAsyncFailureTest.java A user/test/com/google/gwt/user/client/runasync/CrossSiteLoadingStrategyForRunAsyncFailureTest.java D user/test/com/google/gwt/user/server/runasync/RunAsyncFailureIFrameLinker.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- Eric Z. Ayers Google Web Toolkit, Atlanta, GA USA Sign up now for Google I/O 2010: May 19-20, http://code.google.com/io -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] DOMImpl#eventGetTypeInt returns NULL for unknown event types
Reviewers: Dan Rice, Description: DOMImpl#eventGetTypeInt returns NULL for unknown event types instead of an int, resulting in an exception. Fix: === Added default case that returns -1 and updated JavaDoc. Testing: Added a unit test. Please review this at http://gwt-code-reviews.appspot.com/222801 Affected files: user/src/com/google/gwt/user/client/DOM.java user/src/com/google/gwt/user/client/Event.java user/src/com/google/gwt/user/client/impl/DOMImpl.java user/test/com/google/gwt/user/client/EventTest.java Index: user/test/com/google/gwt/user/client/EventTest.java === --- user/test/com/google/gwt/user/client/EventTest.java (revision 7734) +++ user/test/com/google/gwt/user/client/EventTest.java (working copy) @@ -381,6 +381,24 @@ assertTrue(Event.fireNativePreviewEvent(null)); } + public void testGetTypeInt() { +assertEquals(Event.ONBLUR, Event.getTypeInt(blur)); +assertEquals(Event.ONCHANGE, Event.getTypeInt(change)); +assertEquals(Event.ONCLICK, Event.getTypeInt(click)); +assertEquals(Event.ONERROR, Event.getTypeInt(error)); +assertEquals(Event.ONFOCUS, Event.getTypeInt(focus)); +assertEquals(Event.ONKEYDOWN, Event.getTypeInt(keydown)); +assertEquals(Event.ONKEYPRESS, Event.getTypeInt(keypress)); +assertEquals(Event.ONKEYUP, Event.getTypeInt(keyup)); +assertEquals(Event.ONLOAD, Event.getTypeInt(load)); +assertEquals(Event.ONMOUSEDOWN, Event.getTypeInt(mousedown)); +assertEquals(Event.ONMOUSEMOVE, Event.getTypeInt(mousemove)); +assertEquals(Event.ONMOUSEOUT, Event.getTypeInt(mouseout)); +assertEquals(Event.ONMOUSEOVER, Event.getTypeInt(mouseover)); +assertEquals(Event.ONMOUSEUP, Event.getTypeInt(mouseup)); +assertEquals(-1, Event.getTypeInt(undefined)); + } + /** * Test that legacy EventPreview and NativePreviewHandlers can both cancel the * event. Index: user/src/com/google/gwt/user/client/DOM.java === --- user/src/com/google/gwt/user/client/DOM.java(revision 7734) +++ user/src/com/google/gwt/user/client/DOM.java(working copy) @@ -585,7 +585,7 @@ * Gets the enumerated type of this event (as defined in {...@link Event}). * * @param evt the event to be tested - * @return the event's enumerated type + * @return the event's enumerated type, or -1 if not defined */ public static int eventGetType(Event evt) { return impl.eventGetTypeInt(evt); Index: user/src/com/google/gwt/user/client/impl/DOMImpl.java === --- user/src/com/google/gwt/user/client/impl/DOMImpl.java (revision 7734) +++ user/src/com/google/gwt/user/client/impl/DOMImpl.java (working copy) @@ -84,6 +84,7 @@ case DOMMouseScroll: return 0x2; case contextmenu: return 0x4; case paste: return 0x8; +default: return -1; } }-*/; Index: user/src/com/google/gwt/user/client/Event.java === --- user/src/com/google/gwt/user/client/Event.java (revision 7734) +++ user/src/com/google/gwt/user/client/Event.java (working copy) @@ -485,7 +485,7 @@ * Gets the enumerated type of this event given a valid event type name. * * @param typeName the typeName to be tested - * @return the event's enumerated type + * @return the event's enumerated type, or -1 if not defined */ public static int getTypeInt(String typeName) { return DOM.impl.eventGetTypeInt(typeName); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Update currency data to Unicode CLDR 1.7.2.
On Tue, Mar 16, 2010 at 1:25 PM, Shanjian Li shanj...@google.com wrote: Do you think that we should only include currency that is being used, not those historical currency? Like following: -ZWD = Zimbabwe Dollar|Z$ +ZWD = Zimbabwean Dollar|Z$|0|1 +ZWL = Zimbabwean Dollar (2009) +ZWR = Zimbabwean Dollar (2008)|||1 The last 2 items are not being used any more. And there are many more such kind of currencies. The 1 at the end of the line marks the currency as deprecated. A user has to specifically ask for deprecated currencies to be included in the list of available currencies. The deprecated currencies can still be referenced directly, and I think they need to stay there. Imagine you have an app recording transactions -- do you want to lose the ability to display old transactions if the currency they were made in becomes deprecated? -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: DOMImpl#eventGetTypeInt returns NULL for unknown event types
LGTM http://gwt-code-reviews.appspot.com/222801 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Support runAsync with the cross-site linker.
On Tue, Mar 16, 2010 at 11:54 AM, Eric Ayers zun...@google.com wrote: Something is screwy with riedvelt, and I can't leave a comment on XSTemplate.js My comment isn't really about your patch in particular, but the patterns we are using in the linker templates. I wish that stanzas of code common to many linkers, like the calling of __gwtStatsEvent() could be extracted and put into the template with variable substitution. For example, adding the sessionId field to the event works fine here, but there are several linkers outside of GWT that will need to be updated to get the same fix. Yes. Indeed, this fix originally went into the iframe linker and it was overlooked for the cross-site linker. Using more templating should help us not have to duplicate code so much. I was thinking in the short term to pull out computeScriptBase and processMetas into their own file. Code that wants to pull it in could insert COMPUTE_SCRIPT_BASE or PROCESS_METAS at the place it should go. As well, the code can then be tested more conveniently. Perhaps, though, we may as well define a general INCLUDE(processMetas.js) ? Lex -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Avira and HTML/CryptedGen (again)
We started getting reports of the HTML/Crypted.Gen being detected in our Chrome extension again. I've managed to reproduce it - the signature seems to be the exact set of strings they use: .fromCharCode .charCodeAt nodeValue for 0,0,0,0,0,0 Math.min I kid you not - this is their signature for an encrypted JS virus. I can't seem to remove a single character from any of these tokens without turning it from a dangerous virus to a harmless bit of JS. Order doesn't seem to be important (although I haven't experimented with this that much). I think I'll be able to work around this by replacing any sequence of six zeros separated by commas with the sequence 0,0,0,[space]0,0,0. Matt. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Avira and HTML/CryptedGen (again)
On Tue, Mar 16, 2010 at 2:07 PM, Matt Mastracci matt...@mastracci.comwrote: We started getting reports of the HTML/Crypted.Gen being detected in our Chrome extension again. I've managed to reproduce it - the signature seems to be the exact set of strings they use: .fromCharCode .charCodeAt nodeValue for 0,0,0,0,0,0 Math.min I kid you not - this is their signature for an encrypted JS virus. I can't seem to remove a single character from any of these tokens without turning it from a dangerous virus to a harmless bit of JS. Order doesn't seem to be important (although I haven't experimented with this that much). I think I'll be able to work around this by replacing any sequence of six zeros separated by commas with the sequence 0,0,0,[space]0,0,0. Holy cow -- how do they think that is an acceptable measure? Surely they could at least change the warning to say potentially dangerous JS or something rather than declaring it a virus. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Avira and HTML/CryptedGen (again)
I kid you not - this is their signature for an encrypted JS virus. I can't seem to remove a single character from any of these tokens without turning it from a dangerous virus to a harmless bit of JS. Order doesn't seem to be important (although I haven't experimented with this that much). I think I'll be able to work around this by replacing any sequence of six zeros separated by commas with the sequence 0,0,0,[space]0,0,0. Holy cow -- how do they think that is an acceptable measure? Surely they could at least change the warning to say potentially dangerous JS or something rather than declaring it a virus. This is pretty unbelievable to me as well. I imagine that the process involved someone finding a mutating JS virus, found six strings that it always contained, put them in and figured that it was safe after surfing around for a bit without any false positives. After experimenting a bit further, I discovered that nodeValue is actually matching case insensitively for eval (which makes a little more sense). This means that the signature is something like for eval .fromcharcode .charcodeat math.min 0,0,0,0,0,0 This probably will likely affect a significant number GWT applications that use RPC. Avira seems to check files ending in .js* and .html* for this pattern. I verified that the scanner intercepts these patterns in HTTP traffic and detects them in IE cache files. There might be some negative patterns as well: Avira doesn't block my message in the Google Groups web interface, but it does block it when viewing the raw message source. Matt. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: One-line fix to SelectionScript's fallback logic for
http://gwt-code-reviews.appspot.com/183801 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7736 committed - Don't ever set the base variable to null. It is supposed to be the ...
Revision: 7736 Author: sp...@google.com Date: Tue Mar 16 08:43:23 2010 Log: Don't ever set the base variable to null. It is supposed to be the empty string if it hasn't been set yet. Review at http://gwt-code-reviews.appspot.com/219801 Review by: j...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=7736 Modified: /trunk/dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js /trunk/dev/core/src/com/google/gwt/core/linker/XSTemplate.js === --- /trunk/dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js Mon Mar 8 12:02:36 2010 +++ /trunk/dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js Tue Mar 16 08:43:23 2010 @@ -120,7 +120,8 @@ ,markerId = __gwt_marker___MODULE_NAME__ ,markerScript; -if (base = metaProps['baseUrl']) { +if (metaProps['baseUrl']) { + base = metaProps['baseUrl']; return; } === --- /trunk/dev/core/src/com/google/gwt/core/linker/XSTemplate.js Mon Mar 8 12:02:36 2010 +++ /trunk/dev/core/src/com/google/gwt/core/linker/XSTemplate.js Tue Mar 16 08:43:23 2010 @@ -104,7 +104,8 @@ ,markerId = __gwt_marker___MODULE_NAME__ ,markerScript; -if (base = metaProps['baseUrl']) { +if (metaProps['baseUrl']) { + base = metaProps['baseUrl']; return; } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Avira and HTML/CryptedGen (again)
On Mar 16, 12:42 pm, Matt Mastracci matt...@mastracci.com wrote: Holy cow -- how do they think that is an acceptable measure? Surely they could at least change the warning to say potentially dangerous JS or something rather than declaring it a virus. This probably will likely affect a significant number GWT applications that use RPC. Avira seems to check files ending in .js* and .html* for this pattern. I verified that the scanner intercepts these patterns in HTTP traffic and detects them in IE cache files. There might be some negative patterns as well: Avira doesn't block my message in the Google Groups web interface, but it does block it when viewing the raw message source. Even better: it turns out that if you put the string google anywhere in the file matching CryptedGen, it no longer matches the heuristic. I imagine that it would pick up the string from the class metadata for those not using -XdisableClassMetadata. So this is a virus: for eval .fromcharcode .charcodeat math.min 0,0,0,0,0,0 And this is not: google for eval .fromcharcode .charcodeat math.min 0,0,0,0,0,0 The easiest solution for us seems to be putting the string Google Web Toolkit in a comment in our header. Matt. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Support runAsync with the cross-site linker.
On Tue, Mar 16, 2010 at 1:47 PM, Lex Spoon sp...@google.com wrote: Yes. Indeed, this fix originally went into the iframe linker and it was overlooked for the cross-site linker. Using more templating should help us not have to duplicate code so much. I was thinking in the short term to pull out computeScriptBase and processMetas into their own file. Code that wants to pull it in could insert COMPUTE_SCRIPT_BASE or PROCESS_METAS at the place it should go. As well, the code can then be tested more conveniently. Perhaps, though, we may as well define a general INCLUDE(processMetas.js) ? I think everyone agrees that we need some sort of approach to reduce code duplication here (and I think a similar problem exists in property providers -- right now if I want to slightly extend a property provider I have to cut and paste it). I think there are differences on exactly how far we should go, and since everybody has more than enough to do already nobody has grabbed the horns. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Update bikeshed/eclipse.README based on feedback from Dan
Reviewers: Dan Rice, Description: Update bikeshed/eclipse.README based on feedback from Dan Review by: r...@google.com Please review this at http://gwt-code-reviews.appspot.com/224801 Affected files: M bikeshed/eclipse.README Index: bikeshed/eclipse.README === --- bikeshed/eclipse.README (revision 7736) +++ bikeshed/eclipse.README (working copy) @@ -1,24 +1,24 @@ -To make eclipse go: +To create a Bikeshed project in Eclipse: -* Set svn or git or whatever to exclude the following: +* Set your source code control system (e.g., svn or git) to ignore +the following files and directories. Eclipse needs to edit them, +but they should not be submitted. .settings .classpath .project -bin -build -classes +bin/ +build/ +classes/ com.google.gwt.* -eclipse-trunk -bikeshed/war/expenses -bikeshed/war/stocks -bikeshed/war/tree +bikeshed/war/expenses/ +bikeshed/war/stocks/ +bikeshed/war/tree/ * Install the Google Plugin for Eclipse -* Import bikeshed as a new Java project with existing source -* Bring up the project properties - * find the Google settings and turn on AppEngine and WebKit +* Import trunk/bikeshed/ as a new Java project with existing source +* Bring up the project properties + * find the Google settings and turn on AppEngine and Google Web Toolkit * Java Build Path Libraries Add Variable GWT_TOOLS, Extend redist/json/r2_20080312/json.jar * Copy tools/redist/json/r2_20080312/json.jar to bikeshed/war/WEB_INF/lib * Right click on the bikeshed project and choose Run as Web Application. Choose from the various .html files - -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7737 committed - Adding a default return value to eventGetTypeInt....
Revision: 7737 Author: jlaba...@google.com Date: Tue Mar 16 08:57:25 2010 Log: Adding a default return value to eventGetTypeInt. http://gwt-code-reviews.appspot.com/222801 Review by: r...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=7737 Modified: /trunk/user/src/com/google/gwt/user/client/DOM.java /trunk/user/src/com/google/gwt/user/client/Event.java /trunk/user/src/com/google/gwt/user/client/impl/DOMImpl.java /trunk/user/test/com/google/gwt/user/client/EventTest.java === --- /trunk/user/src/com/google/gwt/user/client/DOM.java Fri Oct 16 14:48:33 2009 +++ /trunk/user/src/com/google/gwt/user/client/DOM.java Tue Mar 16 08:57:25 2010 @@ -585,7 +585,7 @@ * Gets the enumerated type of this event (as defined in {...@link Event}). * * @param evt the event to be tested - * @return the event's enumerated type + * @return the event's enumerated type, or -1 if not defined */ public static int eventGetType(Event evt) { return impl.eventGetTypeInt(evt); === --- /trunk/user/src/com/google/gwt/user/client/Event.java Fri Sep 18 10:54:47 2009 +++ /trunk/user/src/com/google/gwt/user/client/Event.java Tue Mar 16 08:57:25 2010 @@ -485,7 +485,7 @@ * Gets the enumerated type of this event given a valid event type name. * * @param typeName the typeName to be tested - * @return the event's enumerated type + * @return the event's enumerated type, or -1 if not defined */ public static int getTypeInt(String typeName) { return DOM.impl.eventGetTypeInt(typeName); === --- /trunk/user/src/com/google/gwt/user/client/impl/DOMImpl.java Tue Jul 21 07:10:53 2009 +++ /trunk/user/src/com/google/gwt/user/client/impl/DOMImpl.java Tue Mar 16 08:57:25 2010 @@ -84,6 +84,7 @@ case DOMMouseScroll: return 0x2; case contextmenu: return 0x4; case paste: return 0x8; +default: return -1; } }-*/; === --- /trunk/user/test/com/google/gwt/user/client/EventTest.java Thu Feb 25 06:57:14 2010 +++ /trunk/user/test/com/google/gwt/user/client/EventTest.java Tue Mar 16 08:57:25 2010 @@ -380,6 +380,24 @@ public void testFireNativePreviewEventWithoutHandlers() { assertTrue(Event.fireNativePreviewEvent(null)); } + + public void testGetTypeInt() { +assertEquals(Event.ONBLUR, Event.getTypeInt(blur)); +assertEquals(Event.ONCHANGE, Event.getTypeInt(change)); +assertEquals(Event.ONCLICK, Event.getTypeInt(click)); +assertEquals(Event.ONERROR, Event.getTypeInt(error)); +assertEquals(Event.ONFOCUS, Event.getTypeInt(focus)); +assertEquals(Event.ONKEYDOWN, Event.getTypeInt(keydown)); +assertEquals(Event.ONKEYPRESS, Event.getTypeInt(keypress)); +assertEquals(Event.ONKEYUP, Event.getTypeInt(keyup)); +assertEquals(Event.ONLOAD, Event.getTypeInt(load)); +assertEquals(Event.ONMOUSEDOWN, Event.getTypeInt(mousedown)); +assertEquals(Event.ONMOUSEMOVE, Event.getTypeInt(mousemove)); +assertEquals(Event.ONMOUSEOUT, Event.getTypeInt(mouseout)); +assertEquals(Event.ONMOUSEOVER, Event.getTypeInt(mouseover)); +assertEquals(Event.ONMOUSEUP, Event.getTypeInt(mouseup)); +assertEquals(-1, Event.getTypeInt(undefined)); + } /** * Test that legacy EventPreview and NativePreviewHandlers can both cancel the -- http://groups.google.com/group/Google-Web-Toolkit-Contributors