Re: Is there any integration between GWT and Google Web Designer ?
I would rather think about getting from the Designer a GWT-compatible code in java ! Yves -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Is there any integration between GWT and Google Web Designer ?
Hi It is not about the old GWT Designer but well about this tool https://www.google.com/webdesigner/ ! I don't use Google Web Designer, but I wonder if there might be any mean to produce GWT compatbile code with this tool ? Thanks Yves -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: CellTable keyboard events troubles in Chrome
Hi Jens, Thanks a lot for the suggestion, it works. I used the dev version because in the past it was needed for the dev mode. I installed the last stable version, and it is ok also with the dev mode. Thanks Yves Le mardi 5 novembre 2013 21:40:43 UTC+1, Jens a écrit : Have you also tried the stable chrome channel instead of the dev channel? -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: GWT components aren't displaying
Hi, I don't know if you did it or not (not seen in your example) : the Usuario dto class must also implements Serializable. HTH Yves Le dimanche 10 novembre 2013 19:34:37 UTC+1, Jairo de Almeida a écrit : hi Group, Someone get problems with serialized pojo in comunication about client and server layers in GWT applications? I'm seeing the objects(POJOs) reach in debug mode correctly, but the client components aren't displayed correctly, ListBox display empty. I will send a resume of application source http://pastebin.com/gyi5jpY5 I'm not undertand why i get the object correctly for example in System.out.println(dto) , but in component ListBox not display without exceptions Thanks for Help Guys, See Jairo. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: CellTable keyboard events troubles in Chrome
I know this is not a funny question, but if someone already had this kind of issue or have any suggestion, help would be very appreciated as I could not make it work correctly in Chrome. GWT-team ? Thanks Yves Le dimanche 3 novembre 2013 19:37:03 UTC+1, yves a écrit : Hi All, After a search on the internet and in this group I didn't found help for the issue I have. So I ask here if someone has any advice or workaround. I just tried basic example of CellTable found here http://www.gwtproject.org/doc/latest/DevGuideUiCellWidgets.html, and put the cellTable in an empty VerticalPanel somewhere in my app. In Chrome only, the example doesn't work correctly : almost all keyboard events have no effect. Only Delete, Backspace, CTRL-Z + other CTRLs and ENTER keys work. It is impossible to type in some text : alphanumeric key events have no effect on the content of the cells. With other browsers than Chrome the CellTable example works without any problem ! For the test I use : GWT 2.5.1 Test NOT OK : Chrome 32.0.1687.2 dev-m Aura Test OK : Firefox : 24.0 Test OK : Opera : 12.11 Test OK : Safari : 5.1.7 (no test on IE as I have only IE6, for other tests purpose...) Thank you for your help. Yves /** * A simple data type that represents a contact with a unique ID. */ private static class Contact { private static int nextId = 0; private final int id; private String name; public Contact(String name) { nextId++; this.id = nextId; this.name = name; } } /** * The list of data to display. */ private static final ListContact CONTACTS = Arrays.asList(new Contact(John), new Contact(Joe), new Contact(George)); /** * The key provider that allows us to identify Contacts even if a field * changes. We identify contacts by their unique ID. */ private static final ProvidesKeyContact KEY_PROVIDER = new ProvidesKeyContact() { @Override public Object getKey(Contact item) { return item.id; } }; . initWidget(uiBinder.createAndBindUi(this)); // Create a CellTable with a key provider. final CellTableContact table = new CellTableContact(KEY_PROVIDER); table.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED); // Add a text input column to edit the name. final TextInputCell nameCell = new TextInputCell(); ColumnContact, String nameColumn = new ColumnContact, String(nameCell) { @Override public String getValue(Contact object) { // Return the name as the value of this column. return object.name; } }; table.addColumn(nameColumn, Name); // Add a field updater to be notified when the user enters a new name. nameColumn.setFieldUpdater(new FieldUpdaterContact, String() { @Override public void update(int index, Contact object, String value) { // Inform the user of the change. Window.alert(You changed the name of + object.name + to + value); // Push the changes into the Contact. At this point, you could send an // asynchronous request to the server to update the database. object.name = value; // Redraw the table with the new data. table.redraw(); } }); // Push the data into the widget. table.setRowData(CONTACTS); vp.add(table); -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
CellTable keyboard events troubles in Chrome
Hi All, After a search on the internet and in this group I didn't found help for the issue I have. So I ask here if someone has any advice or workaround. I just tried basic example of CellTable found here http://www.gwtproject.org/doc/latest/DevGuideUiCellWidgets.html, and put the cellTable in an empty VerticalPanel somewhere in my app. In Chrome only, the example doesn't work correctly : almost all keyboard events have no effect. Only Delete, Backspace, CTRL-Z + other CTRLs and ENTER keys work. It is impossible to type in some text : alphanumeric key events have no effect on the content of the cells. With other browsers than Chrome the CellTable example works without any problem ! For the test I use : GWT 2.5.1 Test NOT OK : Chrome 32.0.1687.2 dev-m Aura Test OK : Firefox : 24.0 Test OK : Opera : 12.11 Test OK : Safari : 5.1.7 (no test on IE as I have only IE6, for other tests purpose...) Thank you for your help. Yves /** * A simple data type that represents a contact with a unique ID. */ private static class Contact { private static int nextId = 0; private final int id; private String name; public Contact(String name) { nextId++; this.id = nextId; this.name = name; } } /** * The list of data to display. */ private static final ListContact CONTACTS = Arrays.asList(new Contact(John), new Contact(Joe), new Contact(George)); /** * The key provider that allows us to identify Contacts even if a field * changes. We identify contacts by their unique ID. */ private static final ProvidesKeyContact KEY_PROVIDER = new ProvidesKeyContact() { @Override public Object getKey(Contact item) { return item.id; } }; . initWidget(uiBinder.createAndBindUi(this)); // Create a CellTable with a key provider. final CellTableContact table = new CellTableContact(KEY_PROVIDER); table.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED); // Add a text input column to edit the name. final TextInputCell nameCell = new TextInputCell(); ColumnContact, String nameColumn = new ColumnContact, String(nameCell) { @Override public String getValue(Contact object) { // Return the name as the value of this column. return object.name; } }; table.addColumn(nameColumn, Name); // Add a field updater to be notified when the user enters a new name. nameColumn.setFieldUpdater(new FieldUpdaterContact, String() { @Override public void update(int index, Contact object, String value) { // Inform the user of the change. Window.alert(You changed the name of + object.name + to + value); // Push the changes into the Contact. At this point, you could send an // asynchronous request to the server to update the database. object.name = value; // Redraw the table with the new data. table.redraw(); } }); // Push the data into the widget. table.setRowData(CONTACTS); vp.add(table); -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Offline debugging my gwt app
Hello GWT-team guys ! Nobody has an idea at least if is it a bug or a feature? Thanks a lot for your help Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Offline debugging my gwt app
Yes hosted.html is included in the CACHE section of the manifest. I don't have a devmode.js file. Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Offline debugging my gwt app
Hello All, I need to debug my gwt app. The problem is that I need to debug it OFFLINE. After a tour on the net, I didn't found an answer. Thus here is the scenario. My GWT version is 2.4.0 Debugging the code is ok. Running in production offline is ok, using a cache manifest. But I can't do both : debugging offline. To avoid any config difference, I use exactly the same tomcat server deployment to run in production or in debug mode (thus with the debug option -noserver). The cache manifest is built in runtime by a dedicated service whose response depends on the current permutation. When online, the manifest is always requested in debug and in production mode (confirmed by tracing). (a subsidiary question is : why in production the manifest is called twice and in debug it is called once ?). Then I stopped tomcat. = In production offline the gwt app is running correctly. = In debug offline, nothing is displayed : the browser has loaded the app html file from its cache (confirmed by displaying the page source code), but the browser remains empty, the gwt app is not running. It seems that when offline, the google dev plugin doesn't communicate correctly with the IDE as it even doesn't realize when the development mode is stopped in the IDE (the black overlay with the message Plugin failed to connect to Development Mode server at localhost:9997 is no displayed). May be the plugin is not started when offline ? In order to help me test my app when offline, does anybody knows why the app is not running in debug offline mode and how to make it run ? Thanks a lot ! Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Offline debugging my gwt app
Thanks for your answer, but my question is about the HTML5 offline feature. Sorry if my post was not clear. The problem is that I can't debug the GWT app while running it without a connection to the site server, thus offline. Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: RPC call in Activity onStop()
Hi, Finally I didn't succeed to make an RPC call from the overridden AbstractActivity.onStop(). Actually the GWT doc says about onStop() : Called when the Activity's widget has been removed from view. I guess that all the RPC mechanisms is already destroyed because the server never get called. @Milan : I can't make the call during mayStop because I don't know at that moment whether the user will choose to close or not the activity. The RPC call must be executed only when the activity is effectively stopped. The only ugly workaround I found is a kind of watchdog between the client and the server so that the client periodically tells to the server I am still here. If someone succeeded to make an RPC call during onStop(), I would appreciate the feedback :-) Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Is it possible to create screens at runtime?
Unless I don't understand your question, this is THE main GWT feature, thus smart-gwt too ! Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: RPC call in Activity onStop()
The use case is when one is closing the browser or the tab or when navigating to another url, thus really quitting the GWT application, not just changing Place. I found that apparently in this case the ActivityManager.onPlaceChange(PlaceChangeEvent event) seems to be never called. And then onStop() is NOT called in my use case. Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: RPC call in Activity onStop()
Sorry for my late reaction. Indeed I don't need the callback, I just need to send a terminates message to the server to release some temporary work data. As it didn't worked, I removed this part of the code, so I can't give right now an example. But the fact is that the server didn't received the call (checked with a lot of debug logs and breakpoints). I'll try again, also with the addClosingHandler() which I didn't knew. Thanks for the suggestion. I'll come back soon. Yves Le mardi 19 février 2013 23:45:32 UTC+1, Jens a écrit : I don't see why it should not work. You can do an RPC request in Activity.onStop() but you have to be aware of the fact that the activity will continue to stop while the request is pending. So your request's callback should not do anything that depends on the activity state or its view (which will be detached after the activity is stopped). You can also do a RPC request in Window.addClosingHandler() which will be called before the window/tab gets closed. But again in this case the callback is probably never called as the window/tab gets closed while the request is pending. All you could do here is telling the server that the app terminates now and let the server invalidate the users session for example. Have you checked FireBug/Chrome Devtools and verified that no last request is made? -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: RPC call in Activity onStop()
Actually it is a subclass of AbstractActivity and onStop() is overridden. The fact the widget is being destroyed (? I am not sure of what really happens at this moment) could be the source of the problem because I have a lot of things to do during the onStop() call and something might go wrong in the client. Thanks for input. Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: RPC call in Activity onStop()
Not any suggestion ? Thanks Yves Le dimanche 17 février 2013 23:47:12 UTC+1, yves a écrit : Hi, After a search on the net I didn't find an answer to this problem : I need to make an RPC call from the onStop() function in order to inform the server that the application is closing. Apprently this doesn't work : the server never gets RPC-called from onStop(). (I checked that onStop is called...) Thus my questions are : 1) Is it really impossible to make an RPC call during the onStop process ? 2) In case it is impossible, is there any way to know that the app is closing so I can make a last RPC call ? Thank you for your suggestions. Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
RPC call in Activity onStop()
Hi, After a search on the net I didn't find an answer to this problem : I need to make an RPC call from the onStop() function in order to inform the server that the application is closing. Apprently this doesn't work : the server never gets RPC-called from onStop(). (I checked that onStop is called...) Thus my questions are : 1) Is it really impossible to make an RPC call during the onStop process ? 2) In case it is impossible, is there any way to know that the app is closing so I can make a last RPC call ? Thank you for your suggestions. Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Could not load GWT DMP Plugin
It doesn't work for me. Chrome 24.0.1305.3 dev-m plugin 1.0.11357 win XP SP3 I found that it might be blocked by norton anti-virus : googleupdate.exe was blocked (severity : medium) I found another problem in norton history log : the dev plugin dll is identifid as a threat Suspicious.Cloud.7.EP (severity : high) c:\documents and settings\yves\local settings\application data\google\chrome\user data\default\extensions\jpjpnpmbddbjkfaccnmhnkdgjideieim\1.0.11357_0\winnt_x86-msvc\npgwtdevplugin.dll HTH Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/WMWerasyAnUJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Inserting a DIV in a GWT Panel
I'm not sure, but try to remove the style display:none or change it (something like footer.setProperty(display, xxx)) when you append the element. Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Which value is returned by Element.getStyle() getProperty() ?
Hello All, My question seems trivial : what is the contract of Element.getStyle() getProperty() ? Of course the question relies on the GWT implementation, which is in Style.java : private native String getPropertyImpl(String name) /*-{ return this[name]; }-*/; Thus what is the javascript contract, more precisely : - does it return the default value as defined by W3C, if any ? - does it return the value defined in the css file, if any ? - does it return the value passed to the last call to setProperty(), if any ? I guess that might be some priority between these possibilities ? Also, does anybody know if there is any difference in the contract between versions of CSS or versions of HTML ? And also, are there any differences beween browsers, with a GWT workaround providing a uniform contract ? Even if this question might be trivial, I didn't found an answer on the net :-) Thanks for your comments ! Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Which value is returned by Element.getStyle() getProperty() ?
Thanks for this interesting link! I found, among others, 2 complementary answers: - element.style.getPropertyValue(styleName) gives the value defined in the style attribute of the element, as coded in the html file. - window.getComputedStyle(element, null).getPropertyValue(styleName) gives the actual used value to render the element, taking into account the element's style attribute, css style sheet file and any programatic changes. After some tests it seems that the GWT implementation in Style.java (return this[name];) is equivalent to element.style.getPropertyValue(name). There is one more question left : this doesn't always work for shorthand properties ! For example, let's take the PushButton as defined in the GWT clean theme css file, and look at the values returned by window.getComputedStyle(element, null).getPropertyValue(styleName) : - the background property value as defined in clean is url('images/hborder.png') repeat-x 0px -27px which is returned by window.getComputedStyle in its used value form = ok - the border property value as defined in clean is 1px solid #bbb but an empty string is returned by window.getComputedStyle = not ok !! This is probably because the border-bottom property is also defined that breaks the possibility to get a global value for the border property. May be in this case the only way to get the border value is to read the css file using something like var ss = document.styleSheets[1]; return ss.cssRules[0].style.border; But it is no more a used value as defined here https://developer.mozilla.org/en/CSS/used_value Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
[gwt-contrib] @com.google.gwt.user.client.impl.DOMImpl::eventGetTypeInt(Ljava/lang/String;)': JS value of type null, expected int
Hello, I am running myapp in dev mode in chrome and I got the following error. Versions are : gwt 2.4.0v201203300216-rel-37 / eclipse 3.7 / chrome 19.0.1084.1 dev-m After a search in this group, I didn't found something related to this issue, thus I post it. Yves 20:54:31.000 [ERROR] [myapp] Uncaught exception escaped com.google.gwt.dev.shell.HostedModeException: Something other than an int was returned from JSNI method '@com.google.gwt.user.client.impl.DOMImpl::eventGetTypeInt(Ljava/lang/ String;)': JS value of type null, expected int at com.google.gwt.dev.shell.JsValueGlue.getIntRange(JsValueGlue.java:266) at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:144) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeInt(ModuleSpace.java: 247) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeInt(JavaScriptHost.java: 75) at com.google.gwt.user.client.impl.DOMImpl.eventGetTypeInt(DOMImpl.java) at com.google.gwt.user.client.impl.DOMImpl.eventGetTypeInt(DOMImpl.java: 62) at com.google.gwt.user.client.DOM.eventGetType(DOM.java:602) at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java: 164) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1351) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1307) at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java: 172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java: 337) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java: 218) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java: 136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java: 561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java: 269) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java: 91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213) at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java: 172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java: 292) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java: 546) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java: 363) at java.lang.Thread.run(Thread.java:619) -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Missing compiler error message for serializable object
Hi, With GWT 2.1.1, I made a novice-mistake in the declaration of a serializable object : I forgot the mandatory zero-arg constructor. This object is used in RPC exchange between the GWT client and the server. In runtime I got an ugly com.google.gwt.user.client.rpc.SerializationException Unexpected error... message. After digging and debugging during one full day into a.o. the GWT- generated-javascript and trying other ways to exchange my data (while many other objects are correctly transfered to and from the server...), I finally made a change that suddenlly produced a compiler mesage saying explicitly that the zero-arg constructor is missing. My question is : why in only one case the error message is produced, and not in my all other trials ? This is very frustrating :-) The case where the compiler produces the error message is when I create an explicit RPC method passing explicitly the object in parameter. While all other cases where the compiler does not produce the error message, are when the object is passed as a parameter of a common method usgin a parent class param signature. Example: class MyBadObject extends ParentObject { // missing zero-arg contructor // but has constructor with arg ! ... } class ParentObject implements Serializable { ... } 1) The case producing the compiler message: MyService extends RemoveService { public void myRPCSpecificMethod(MyBadObject param); } 2) The case where the compiler error message does not give any message : MyService extends RemoveService { public void myRPCCommonMethod(ParentObject param); } and the method is called with a new MyBadObject(...) param value. A simple compiler warning message saying : Did you forgot the zero- arg constructor in this serializable sub-class ? would have been very usefull. (I am using the INFO loglevel compiler param, thus I get all ERROR and WARN messages). Altough I am using GWT 2.1.1, I did not see this correction in the release notes until GWT 2.3 Thanks for your comments Yves -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] TabLayoutPanel problem with customheader
Hi, As I'am trying to create a TabLayoutPanel with 2 customheaders, for each header I made this kind of stuff in the ui.xml : g:customHeader g:Label addStyleNames='newuser-tab' ui:field='cpnyLoginTabLbl'/ /g:customHeader (of course : distinct ui:field for each header) Then programatically, after the initWidget(uiBinder.createAndBindUi(this)); for each header I made this kind of stuff : cpnyLoginTabLbl.setText(Login); (of course : distinct ui:field and text for each header) As a result, the browser (FF3.6) displayed the 2nd tab at the 1st position, and the 1st tab was empty (no text in the header, the header is a small few pixels square) and in last position. To avoid this I had to replace the lines in the ui.xml in this way : g:customHeader g:Label addStyleNames='newuser-tab' ui:field='cpnyLoginTabLbl'Login/g:Label /g:customHeader where I put the text directly in the ui.xml instead of programatically. With the text in the ui.xml it is displayed correctly. This is very annoying as I need to set the text programatically with I18N. I could do this in the ui.xml but it will multiply the number of requested properties files. Did I missed something or is it a bug ? Thanks Yves -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: TabLayoutPanel problem with customheader
Sorry, I found my mistake. The customheader works very fine ! Please, discard my post. Yves On 2 jan, 11:02, yves yves.ko...@gmail.com wrote: Hi, As I'am trying to create a TabLayoutPanel with 2 customheaders, for each header I made this kind of stuff in the ui.xml : g:customHeader g:Label addStyleNames='newuser-tab' ui:field='cpnyLoginTabLbl'/ /g:customHeader (of course : distinct ui:field for each header) Then programatically, after the initWidget(uiBinder.createAndBindUi(this)); for each header I made this kind of stuff : cpnyLoginTabLbl.setText(Login); (of course : distinct ui:field and text for each header) As a result, the browser (FF3.6) displayed the 2nd tab at the 1st position, and the 1st tab was empty (no text in the header, the header is a small few pixels square) and in last position. To avoid this I had to replace the lines in the ui.xml in this way : g:customHeader g:Label addStyleNames='newuser-tab' ui:field='cpnyLoginTabLbl'Login/g:Label /g:customHeader where I put the text directly in the ui.xml instead of programatically. With the text in the ui.xml it is displayed correctly. This is very annoying as I need to set the text programatically with I18N. I could do this in the ui.xml but it will multiply the number of requested properties files. Did I missed something or is it a bug ? Thanks Yves -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: To GWT or Not to GWT
Hi, Some times ago I had same kind of questions than bkardell. Actually I would reformulate it another way : I compare the problem to an .exe that is using .dll files If you build a new .exe app you may reuse existing .dlls I understand that this is not possible with GWT as when you compile your GWT-app, you compile the entire code in once. The big advantage is the javascript optimization. But would it be possible in the future to allow building GWT-app by reusing previously built GWT-dlls ? This implies that those GWT-dlls have a know API-contract used by the main GWT-exe In a distributed and disparate environment this has been solved with the SOA concept using SOAP, an ESB,... with all the paylod and complexity allowing the communication between the components. So I don't have in mind an ESB solution, as the environment is not distributed nor disparate. But in the context of GWT, would it be nonsense (for the future of course) to build new app by using pre-compiled building blocks having their own life-cycle independant of each other ? Yves On 15 déc, 21:40, zixzigma zixzi...@gmail.com wrote: if you use JQuery or any other Library, there is a core JSLibrary, and third party plugins. in a typical app/site you end up adding plugin after plugin to your site/app. each of those plugins are developed by separate developer somewhere in the world. they might have used similar utility library, but when you use them together you have no idea. so this problem is not a GWT related problem. your team/company should put in a place a process regarding code- reuse. one alternative could be to rely on only one 3rd party provider, such as Ext, you can be pretty sure that they have a common base library underneath. you might have to pay. well decisions are about tradeoff. the other alternative is assembling random plugins over the internet, developed by developers with varying degree of skills. you end up with bloated tangled JavaScript code, where plugin after plugin, contains duplicate code. this is the case with JQuery plugins. JQuery itself is a neat library, but if you assemble random plugins you found over the internet, the problem you described also applies. and it is not just JavaScript,in any programming language, if you rely on third-party packages/libraries, there is a good chance there might be a fair amount of duplication, resulting in larger size of file. thats why in Java World, build tools such as Maven, help manage dependencies, so you don't use more than what you need. but even then, each of the .jar in your project, might have used custom String/Math/Algorithms utility classes. it is not a GWT problem, becareful when using external libraries. tradeoff: you get a piece of functionality out of the box VS maintainability and duplication -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email 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: ClassT is not serializable ?
Indeed, it seems to be good solutions too. Thanks Yves On 15 déc, 10:15, Paul Robinson ukcue...@gmail.com wrote: You don't have to hard code anything to send class names. In the client, you can use this: class MyTypeT extends MyGen implements Serializable { String className; MyType() {} // mandatory no-arg contructor MyType(T anObject) { // with a non-null param value ! this.className = anObject.getClass().getName(); } } or this: class MyTypeT extends MyGen implements Serializable { String className; MyType() {} // mandatory no-arg contructor MyType(Class? extends T cls) { // with a non-null param value ! this.className = cls.getName(); } } and then on the server, if you need a Class rather than a String, use Class.forName(myType.className) HTH Paul On 14/12/10 18:49, yves wrote: Hi all, thanks for your comments and advices. To solve my problem I'll do something like Didier said : I'll instantiate an object of type T (which is Serializable), instead of ClassT, and pass it to the server via the RPC. class MyTypeT extends MyGen implements Serializable { T anObject; MyType() {} // mandatory no-arg contructor MyType(T anObject) { // with a non-null param value ! this.anObject = anObject; } } Doing so, the server will receive a MyType object, will recognize the type T of anObject and will be able to select the right handler. And even the generics is not anymore required as the type of anObject will be checked dynamically by the server. Actually class.getCanonicalName() is not implemented too in GWT, so my previous post is not realistic. I personnaly prefer this solution than harcode the full className (as it will change if I reorganize the packages...) Regards Yves On 14 d�c, 15:51, epeplisc...@googlemail.com wrote: you dont need to, just put a fullyqualified classname on the wire and forName() it in the VM. you may also think about providing your custom field serializer for the class, but actually would be nonsense since you anyway cannot use it reasonably on the client On 14 Dez., 12:20, yvesyves.ko...@gmail.com wrote: @Didier Of course MyType implements Serializable . It is just a typo in the example. Sorry. @Paul I didn't realized that Class is not GWT-serializable. Thanks for your remark. I lost pretty much time to find out why I get an exception during an RPC call It would have been nice if ClassT was serializable. I would have used it to select an appropriate handler at server-side. Anyway I use instead the canonical class name to map the handler, but the code is little bit more uggly :-) I noticed also the a call to class.hashCode() does not give the same value in the (gwt-compiled)-client and in the (JVM running)-server. In my attempts to workaround the unserializability of Class, I tried to use the hashCode() value, unsuccessfully... Regards Yves On 14 d�c, 10:42, Paul Robinsonukcue...@gmail.com wrote: Class is not gwt-serializable. MyType has a non-final, non-transient field of type Class Therefore MyType is not serializable On 14/12/10 09:33, Didier Durand wrote: Hi, Serializable is an interface not a class. That's why it's not the list you mention. An interface has nothing to be serialized per se. You should let us know about your class MyType in order to better help. regards didier On Dec 14, 9:21 am, Paul Robinsonukcue...@gmail.com wrote: If you look at the Class.java that GWT uses to emulate the JVM's Class, you'll see that it does not implement Serializable. On 13/12/10 22:19, yves wrote: Hi, I have a class defined in a way similar to this: class MyTypeT extends MyGen extends Serializable { private ClassT aClass; public MyType() {} public void setClass(ClassT aClass) { this.aClass = aClass; } } where MyGen is also Serializable When I compile de project (I'am currently still using GWT 2.1.0 RC1), then I find the following : 1) the compiler (using the compiler options -extra, -work and -gen) does not generate the code MyType_FieldSerializer.java as it does for all other serializable classes. 2) In the extra / rpclog dir, the class MyType is flagged like this: Serialization status Not serializable 3) And when I run my app, I get an InvocationException : the client is unable to make an RPC call with a parameter of type MyType. Is it a bug in the compiler, or did I missed something about ClassT serializability ? Thanks for your help Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com
Re: ClassT is not serializable ?
@Didier Of course MyType implements Serializable . It is just a typo in the example. Sorry. @Paul I didn't realized that Class is not GWT-serializable. Thanks for your remark. I lost pretty much time to find out why I get an exception during an RPC call It would have been nice if ClassT was serializable. I would have used it to select an appropriate handler at server-side. Anyway I use instead the canonical class name to map the handler, but the code is little bit more uggly :-) I noticed also the a call to class.hashCode() does not give the same value in the (gwt-compiled)-client and in the (JVM running)-server. In my attempts to workaround the unserializability of Class, I tried to use the hashCode() value, unsuccessfully... Regards Yves On 14 déc, 10:42, Paul Robinson ukcue...@gmail.com wrote: Class is not gwt-serializable. MyType has a non-final, non-transient field of type Class Therefore MyType is not serializable On 14/12/10 09:33, Didier Durand wrote: Hi, Serializable is an interface not a class. That's why it's not the list you mention. An interface has nothing to be serialized per se. You should let us know about your class MyType in order to better help. regards didier On Dec 14, 9:21 am, Paul Robinsonukcue...@gmail.com wrote: If you look at the Class.java that GWT uses to emulate the JVM's Class, you'll see that it does not implement Serializable. On 13/12/10 22:19, yves wrote: Hi, I have a class defined in a way similar to this: class MyTypeT extends MyGen extends Serializable { private ClassT aClass; public MyType() {} public void setClass(ClassT aClass) { this.aClass = aClass; } } where MyGen is also Serializable When I compile de project (I'am currently still using GWT 2.1.0 RC1), then I find the following : 1) the compiler (using the compiler options -extra, -work and -gen) does not generate the code MyType_FieldSerializer.java as it does for all other serializable classes. 2) In the extra / rpclog dir, the class MyType is flagged like this: Serialization status Not serializable 3) And when I run my app, I get an InvocationException : the client is unable to make an RPC call with a parameter of type MyType. Is it a bug in the compiler, or did I missed something about ClassT serializability ? Thanks for your help Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email 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: ClassT is not serializable ?
Hi all, thanks for your comments and advices. To solve my problem I'll do something like Didier said : I'll instantiate an object of type T (which is Serializable), instead of ClassT, and pass it to the server via the RPC. class MyTypeT extends MyGen implements Serializable { T anObject; MyType() {} // mandatory no-arg contructor MyType(T anObject) { // with a non-null param value ! this.anObject = anObject; } } Doing so, the server will receive a MyType object, will recognize the type T of anObject and will be able to select the right handler. And even the generics is not anymore required as the type of anObject will be checked dynamically by the server. Actually class.getCanonicalName() is not implemented too in GWT, so my previous post is not realistic. I personnaly prefer this solution than harcode the full className (as it will change if I reorganize the packages...) Regards Yves On 14 déc, 15:51, ep eplisc...@googlemail.com wrote: you dont need to, just put a fullyqualified classname on the wire and forName() it in the VM. you may also think about providing your custom field serializer for the class, but actually would be nonsense since you anyway cannot use it reasonably on the client On 14 Dez., 12:20, yves yves.ko...@gmail.com wrote: @Didier Of course MyType implements Serializable . It is just a typo in the example. Sorry. @Paul I didn't realized that Class is not GWT-serializable. Thanks for your remark. I lost pretty much time to find out why I get an exception during an RPC call It would have been nice if ClassT was serializable. I would have used it to select an appropriate handler at server-side. Anyway I use instead the canonical class name to map the handler, but the code is little bit more uggly :-) I noticed also the a call to class.hashCode() does not give the same value in the (gwt-compiled)-client and in the (JVM running)-server. In my attempts to workaround the unserializability of Class, I tried to use the hashCode() value, unsuccessfully... Regards Yves On 14 déc, 10:42, Paul Robinson ukcue...@gmail.com wrote: Class is not gwt-serializable. MyType has a non-final, non-transient field of type Class Therefore MyType is not serializable On 14/12/10 09:33, Didier Durand wrote: Hi, Serializable is an interface not a class. That's why it's not the list you mention. An interface has nothing to be serialized per se. You should let us know about your class MyType in order to better help. regards didier On Dec 14, 9:21 am, Paul Robinsonukcue...@gmail.com wrote: If you look at the Class.java that GWT uses to emulate the JVM's Class, you'll see that it does not implement Serializable. On 13/12/10 22:19, yves wrote: Hi, I have a class defined in a way similar to this: class MyTypeT extends MyGen extends Serializable { private ClassT aClass; public MyType() {} public void setClass(ClassT aClass) { this.aClass = aClass; } } where MyGen is also Serializable When I compile de project (I'am currently still using GWT 2.1.0 RC1), then I find the following : 1) the compiler (using the compiler options -extra, -work and -gen) does not generate the code MyType_FieldSerializer.java as it does for all other serializable classes. 2) In the extra / rpclog dir, the class MyType is flagged like this: Serialization status Not serializable 3) And when I run my app, I get an InvocationException : the client is unable to make an RPC call with a parameter of type MyType. Is it a bug in the compiler, or did I missed something about ClassT serializability ? Thanks for your help Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email 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: Would GWT and/or incubator be interested in Run Time UiBinding
May be this could be very interesting for some kind of applications. Personaly I would be happy to have this kind of dynamic UI intergated into GWT. I have a question : what/how do you suggest to do in order to create the link between the user interaction (e.g. click on a submit button) to your code (e.g. to actually produce something) ? GWT acquired GWTDesigner from Instantiations.com. But GWTDesigner (as far as I remember when I used it almost 2 years ago) is not dynamic. It allows only static prototyping. So GWTDesigner is not comparable to what you created. Here the added value, is the change one could provide to the UI on the fly. Not usual in programming techniques ! Nice work. Yves On 14 nov, 03:00, TedM ted.malask...@gmail.com wrote: If it is helpful here is a video of me exampling how to use the demo. http://www.youtube.com/watch?v=wDzuS7pnYJE -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Internal compiler error with GWT 2.1.0 RC1 when using generics
@Jeff As you suggested me, I tried the followig without success (same OOME problem): public class ResultNodeT extends IResultNode implements IResultNode and public interface IResultNode extends Result Again this is syntaxically correct and compiles sucessfully with javac, BUT gives again the OOME problem with the GWT compiler. So apprently the problem is NOT due to the self-referenced generics ResulNodeT extends ResultNode? @Miguel As youl suggests in your link, is the problem the serialization of an array of type T : T[] next; ? As a workarround, I'll try to replace this array T[] by an ArrayListT which serializes without know issue. Yves On 11 nov, 19:30, Miguel Méndez mmen...@google.com wrote: Thanks. I was able to reproduce the problem and filed issue 5582http://code.google.com/p/google-web-toolkit/issues/detail?id=5582 . @zhuyi: can you take a look at this bug? On Thu, Nov 11, 2010 at 11:58 AM, yves yves.ko...@gmail.com wrote: Miguel, Here is the ResultNode class public class ResultNodeT extends ResultNode? implements Result { private static final long serialVersionUID = -3560238969723137110L; public int dataType; public int id1; public int id2; public int id3; public int id4; public int numChildren; public String data; public T[] next; public ResultNode() {} } and its parent, which is an empty placeholder for Serializable: public interface Result extends Serializable { } This class implements a node in a tree. The goal of the generics is to define the children nodes type (the next[] member). Actually ResultNode is not used by itself, only subtypes are instanciated. Subtypes of ResultNode define only additional int, boolean or float members. Nothing else. Even if the goal here is not to justify why I am doing this, this usage of the genrics allows me to remove from the code many unsafe type cast. Now with the generics I am sure of the member type (next[]). Isn't this the goal of generics ? :-) Yves On 11 nov, 17:34, Miguel Méndez mmen...@google.com wrote: @yves: What does the ResultNode class look like? It is class ResultNodeT extends ResultNode? but what about its supertype and fields? On Thu, Nov 11, 2010 at 10:50 AM, yves yves.ko...@gmail.com wrote: Chris, JConsole does not succeed to connect to the java compilation : I get an out of memory error in sun.rmi.transport.tcp.TCPTransport $AcceptLoop.executeAcceptLoop while trying to start a new thread. = Result: no data in jconsole The compiler is the one shipped with GWT 2.1.0RC1 I'll send you the output of -verbose:gc Yves On 10 nov, 23:26, Chris Conroy con...@google.com wrote: Yves, You say this error did not occur before your most recent change. It would be useful to get an idea for the memory usage before this change: it could be that your app is just very large and you were already on the edge of an OOME, your change really necessitates more memory, or this is a pathological case. Here are a few things to try for gathering more useful information: -Try attaching jconsole to the compile in the before and after scenario and see how the memory usage compares between both. -add -XX:-HeapDumpOnOutOfMemoryError to the JVM args for your failing compile. There may be some interesting data in the resulting dump. If you can share the heap dump with us (you can send me a link off list if you like), then I can take a look. -Of course, make sure you are using the latest version of the GWT compiler. The 2.1 compiler contains some changes that will reduce the memory footprint of your compile. On Wed, Nov 10, 2010 at 1:20 PM, Scott Blum sco...@google.com wrote: Hmmm what happens if you turn down the log level, say to WARN? Are you invoking from the command line, or are you using the Google Plugin for Eclipse? On Wed, Nov 10, 2010 at 4:16 PM, yves yves.ko...@gmail.com wrote: Scott, Thx for the tip. Anyway I can't allocate more than -Xmx1590M and I get exactly the same error. Yves On 9 nov, 07:47, Scott Blum sco...@google.com wrote: Hmm can you increase your virtual memory? On Mon, Nov 8, 2010 at 5:13 PM, yves yves.ko...@gmail.com wrote: I can't, I only have 2GB RAM, I get this error as from -Xmx1024M [java] Error occurred during initialization of VM [java] Could not reserve enough space for object heap [java] Could not create the Java virtual machine. and the log level is INFO Yves On 8 nov, 22:53, Scott Blum sco...@google.com wrote: What if you turn the heap up to -Xmx2048M? What log level are you using? On Mon, Nov 8, 2010 at 4:44 PM, yves yves.ko...@gmail.com wrote
[gwt-contrib] Re: Internal compiler error with GWT 2.1.0 RC1 when using generics
@All I replaced the array T[] by a ListT and I still get the same OOME. Summary : 1) when you break the self-referenced generics ResultNodeT extends ResultNode? by public class ResultNodeT extends IResultNode implements IResultNode and public interface IResultNode extends Result = this still produces the error 2) when you replace the array T[] by a ListT = still the same error Thus my conclusion : the only way to avoid this error is to avoid the usage of generics in a Serializable type (used in a RPC call) HTH Yves On 12 nov, 16:21, Miguel Méndez mmen...@google.com wrote: [+zhuyi] On Fri, Nov 12, 2010 at 9:52 AM, Miguel Méndez mmen...@google.com wrote: On Fri, Nov 12, 2010 at 5:34 AM, yves yves.ko...@gmail.com wrote: @Jeff As you suggested me, I tried the followig without success (same OOME problem): public class ResultNodeT extends IResultNode implements IResultNode and public interface IResultNode extends Result Again this is syntaxically correct and compiles sucessfully with javac, BUT gives again the OOME problem with the GWT compiler. So apprently the problem is NOT due to the self-referenced generics ResulNodeT extends ResultNode? @Miguel As youl suggests in your link, is the problem the serialization of an array of type T : T[] next; ? As a workarround, I'll try to replace this array T[] by an ArrayListT which serializes without know issue. Yves I do suspect that T[] is the issue. �...@zhuyi: can you take a look at http://code.google.com/p/google-web-toolkit/issues/detail?id=5582and let me know what you think. -- Miguel -- Miguel -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Internal compiler error with GWT 2.1.0 RC1 when using generics
I've found a similar old problem : look at http://code.google.com/p/google-web-toolkit/issues/detail?id=2279 Yves On 12 nov, 19:52, yves yves.ko...@gmail.com wrote: @All I replaced the array T[] by a ListT and I still get the same OOME. Summary : 1) when you break the self-referenced generics ResultNodeT extends ResultNode? by public class ResultNodeT extends IResultNode implements IResultNode and public interface IResultNode extends Result = this still produces the error 2) when you replace the array T[] by a ListT = still the same error Thus my conclusion : the only way to avoid this error is to avoid the usage of generics in a Serializable type (used in a RPC call) HTH Yves On 12 nov, 16:21, Miguel Méndez mmen...@google.com wrote: [+zhuyi] On Fri, Nov 12, 2010 at 9:52 AM, Miguel Méndez mmen...@google.com wrote: On Fri, Nov 12, 2010 at 5:34 AM, yves yves.ko...@gmail.com wrote: @Jeff As you suggested me, I tried the followig without success (same OOME problem): public class ResultNodeT extends IResultNode implements IResultNode and public interface IResultNode extends Result Again this is syntaxically correct and compiles sucessfully with javac, BUT gives again the OOME problem with the GWT compiler. So apprently the problem is NOT due to the self-referenced generics ResulNodeT extends ResultNode? @Miguel As youl suggests in your link, is the problem the serialization of an array of type T : T[] next; ? As a workarround, I'll try to replace this array T[] by an ArrayListT which serializes without know issue. Yves I do suspect that T[] is the issue. �...@zhuyi: can you take a look at http://code.google.com/p/google-web-toolkit/issues/detail?id=5582andlet me know what you think. -- Miguel -- Miguel -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Internal compiler error with GWT 2.1.0 RC1 when using generics
Hi All, @Scott The WARN does not change anything to the result. And to reduce the memory usage I already closed everything (Eclipse, MySQL service, Tomcat, ...) and ran the compilation as a command line. Naively I made a deep cleanup of my hard drive (defrag, optimization) in order to allow a higher memory allocation. But it doesn't change anything to my problem. @Chris I'll try and will come back soon with the results @Jeff I agree with you, this is certainly the problem. May be I should try to debug the compiler... Thanks for your advices :-) Yves On 11 nov, 04:04, Jeff Larsen larse...@gmail.com wrote: If I was a guessing man, I'd say you're gettting into an infinite loop with generics here and the SerializableTypeOracleBuilder. ResultNodeT extends ResultNode? The ? is probably what is causing this to break. I'm the serializer, I'm making a serialization policy for ResultNodeT extends ResultNode? since a valid value for ? is ResultNode it will continue to make serialization plolcity for an infinite number of ResultNodes ResultNodeT exends ResultNodeResultNodeT extends ResultNodeResultNodeT extends ResultNode. until the jvm runs out of heap. But that is just a guess without actually writing anything to test it, but it is a solid guess since SerializableTypeOracleBuilder is where the stack trace is blowing up. On Nov 10, 6:19 pm, Chris Conroy con...@google.com wrote: Actually, to get a more accurate picture than just looking at JConsole graphs, you could add -verbose:gc to the jvm flags and report back with the before and after logs that produces. On Wed, Nov 10, 2010 at 2:26 PM, Chris Conroy con...@google.com wrote: Yves, You say this error did not occur before your most recent change. It would be useful to get an idea for the memory usage before this change: it could be that your app is just very large and you were already on the edge of an OOME, your change really necessitates more memory, or this is a pathological case. Here are a few things to try for gathering more useful information: -Try attaching jconsole to the compile in the before and after scenario and see how the memory usage compares between both. -add -XX:-HeapDumpOnOutOfMemoryError to the JVM args for your failing compile. There may be some interesting data in the resulting dump. If you can share the heap dump with us (you can send me a link off list if you like), then I can take a look. -Of course, make sure you are using the latest version of the GWT compiler. The 2.1 compiler contains some changes that will reduce the memory footprint of your compile. On Wed, Nov 10, 2010 at 1:20 PM, Scott Blum sco...@google.com wrote: Hmmm what happens if you turn down the log level, say to WARN? Are you invoking from the command line, or are you using the Google Plugin for Eclipse? On Wed, Nov 10, 2010 at 4:16 PM, yves yves.ko...@gmail.com wrote: Scott, Thx for the tip. Anyway I can't allocate more than -Xmx1590M and I get exactly the same error. Yves On 9 nov, 07:47, Scott Blum sco...@google.com wrote: Hmm can you increase your virtual memory? On Mon, Nov 8, 2010 at 5:13 PM, yves yves.ko...@gmail.com wrote: I can't, I only have 2GB RAM, I get this error as from -Xmx1024M [java] Error occurred during initialization of VM [java] Could not reserve enough space for object heap [java] Could not create the Java virtual machine. and the log level is INFO Yves On 8 nov, 22:53, Scott Blum sco...@google.com wrote: What if you turn the heap up to -Xmx2048M? What log level are you using? On Mon, Nov 8, 2010 at 4:44 PM, yves yves.ko...@gmail.com wrote: Hi, I had a class named ResultNode and the project compiled fine. In order to improve the code, I changed this class by adding generic stuff like that : ResultNodeT extends ResultNode?. Of course I adapted the entire project where needed to take advantage of this change. Now I get an Internal compiler error This is produced with java memory settings -Xmx768M and -Xss32M . (usually the settings are -Xmx128M and default value for -Xss and I never had such problem). BTW : a javac compilation on the project is succesfull, so it is not a java error. Any suggestion ? If more information is needed do not hesitate to ask. Thanks in advance Yves [java] Compiling module com.mycompany.myproject.MyProject [java] [ERROR] Errors in 'file:/C:/java/workspace/MyProject/ src/com/mycompany/myproject/client/model/AppActivityMapper.java' [java] [ERROR] Internal compiler error [java] java.lang.OutOfMemoryError: Java heap space [java
[gwt-contrib] Re: Internal compiler error with GWT 2.1.0 RC1 when using generics
Chris, JConsole does not succeed to connect to the java compilation : I get an out of memory error in sun.rmi.transport.tcp.TCPTransport $AcceptLoop.executeAcceptLoop while trying to start a new thread. = Result: no data in jconsole The compiler is the one shipped with GWT 2.1.0RC1 I'll send you the output of -verbose:gc Yves On 10 nov, 23:26, Chris Conroy con...@google.com wrote: Yves, You say this error did not occur before your most recent change. It would be useful to get an idea for the memory usage before this change: it could be that your app is just very large and you were already on the edge of an OOME, your change really necessitates more memory, or this is a pathological case. Here are a few things to try for gathering more useful information: -Try attaching jconsole to the compile in the before and after scenario and see how the memory usage compares between both. -add -XX:-HeapDumpOnOutOfMemoryError to the JVM args for your failing compile. There may be some interesting data in the resulting dump. If you can share the heap dump with us (you can send me a link off list if you like), then I can take a look. -Of course, make sure you are using the latest version of the GWT compiler. The 2.1 compiler contains some changes that will reduce the memory footprint of your compile. On Wed, Nov 10, 2010 at 1:20 PM, Scott Blum sco...@google.com wrote: Hmmm what happens if you turn down the log level, say to WARN? Are you invoking from the command line, or are you using the Google Plugin for Eclipse? On Wed, Nov 10, 2010 at 4:16 PM, yves yves.ko...@gmail.com wrote: Scott, Thx for the tip. Anyway I can't allocate more than -Xmx1590M and I get exactly the same error. Yves On 9 nov, 07:47, Scott Blum sco...@google.com wrote: Hmm can you increase your virtual memory? On Mon, Nov 8, 2010 at 5:13 PM, yves yves.ko...@gmail.com wrote: I can't, I only have 2GB RAM, I get this error as from -Xmx1024M [java] Error occurred during initialization of VM [java] Could not reserve enough space for object heap [java] Could not create the Java virtual machine. and the log level is INFO Yves On 8 nov, 22:53, Scott Blum sco...@google.com wrote: What if you turn the heap up to -Xmx2048M? What log level are you using? On Mon, Nov 8, 2010 at 4:44 PM, yves yves.ko...@gmail.com wrote: Hi, I had a class named ResultNode and the project compiled fine. In order to improve the code, I changed this class by adding generic stuff like that : ResultNodeT extends ResultNode?. Of course I adapted the entire project where needed to take advantage of this change. Now I get an Internal compiler error This is produced with java memory settings -Xmx768M and -Xss32M . (usually the settings are -Xmx128M and default value for -Xss and I never had such problem). BTW : a javac compilation on the project is succesfull, so it is not a java error. Any suggestion ? If more information is needed do not hesitate to ask. Thanks in advance Yves [java] Compiling module com.mycompany.myproject.MyProject [java] [ERROR] Errors in 'file:/C:/java/workspace/MyProject/ src/com/mycompany/myproject/client/model/AppActivityMapper.java' [java] [ERROR] Internal compiler error [java] java.lang.OutOfMemoryError: Java heap space [java] at java.util.Arrays.copyOf(Arrays.java:2882) [java] at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java: 100) [java] at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390) [java] at java.lang.StringBuilder.append(StringBuilder.java:119) [java] at com.google.gwt.dev.util.log.PrintWriterTreeLogger.doBranch(PrintWriterTreeLogger.java: 59) [java] at com.google.gwt.dev.util.log.AbstractTreeLogger.branch(AbstractTreeLogger.java: 126) [java] at com.google.gwt.core.ext.TreeLogger.branch(TreeLogger.java:222) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 939) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkTypeArgument(SerializableTypeOracleBuilder.java: 1412) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtype(SerializableTypeOracleBuilder.java: 1219) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtypes(SerializableTypeOracleBuilder.java: 1309) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability
[gwt-contrib] Re: Internal compiler error with GWT 2.1.0 RC1 when using generics
Miguel, Here is the ResultNode class public class ResultNodeT extends ResultNode? implements Result { private static final long serialVersionUID = -3560238969723137110L; public int dataType; public int id1; public int id2; public int id3; public int id4; public int numChildren; public String data; public T[] next; public ResultNode() {} } and its parent, which is an empty placeholder for Serializable: public interface Result extends Serializable { } This class implements a node in a tree. The goal of the generics is to define the children nodes type (the next[] member). Actually ResultNode is not used by itself, only subtypes are instanciated. Subtypes of ResultNode define only additional int, boolean or float members. Nothing else. Even if the goal here is not to justify why I am doing this, this usage of the genrics allows me to remove from the code many unsafe type cast. Now with the generics I am sure of the member type (next[]). Isn't this the goal of generics ? :-) Yves On 11 nov, 17:34, Miguel Méndez mmen...@google.com wrote: @yves: What does the ResultNode class look like? It is class ResultNodeT extends ResultNode? but what about its supertype and fields? On Thu, Nov 11, 2010 at 10:50 AM, yves yves.ko...@gmail.com wrote: Chris, JConsole does not succeed to connect to the java compilation : I get an out of memory error in sun.rmi.transport.tcp.TCPTransport $AcceptLoop.executeAcceptLoop while trying to start a new thread. = Result: no data in jconsole The compiler is the one shipped with GWT 2.1.0RC1 I'll send you the output of -verbose:gc Yves On 10 nov, 23:26, Chris Conroy con...@google.com wrote: Yves, You say this error did not occur before your most recent change. It would be useful to get an idea for the memory usage before this change: it could be that your app is just very large and you were already on the edge of an OOME, your change really necessitates more memory, or this is a pathological case. Here are a few things to try for gathering more useful information: -Try attaching jconsole to the compile in the before and after scenario and see how the memory usage compares between both. -add -XX:-HeapDumpOnOutOfMemoryError to the JVM args for your failing compile. There may be some interesting data in the resulting dump. If you can share the heap dump with us (you can send me a link off list if you like), then I can take a look. -Of course, make sure you are using the latest version of the GWT compiler. The 2.1 compiler contains some changes that will reduce the memory footprint of your compile. On Wed, Nov 10, 2010 at 1:20 PM, Scott Blum sco...@google.com wrote: Hmmm what happens if you turn down the log level, say to WARN? Are you invoking from the command line, or are you using the Google Plugin for Eclipse? On Wed, Nov 10, 2010 at 4:16 PM, yves yves.ko...@gmail.com wrote: Scott, Thx for the tip. Anyway I can't allocate more than -Xmx1590M and I get exactly the same error. Yves On 9 nov, 07:47, Scott Blum sco...@google.com wrote: Hmm can you increase your virtual memory? On Mon, Nov 8, 2010 at 5:13 PM, yves yves.ko...@gmail.com wrote: I can't, I only have 2GB RAM, I get this error as from -Xmx1024M [java] Error occurred during initialization of VM [java] Could not reserve enough space for object heap [java] Could not create the Java virtual machine. and the log level is INFO Yves On 8 nov, 22:53, Scott Blum sco...@google.com wrote: What if you turn the heap up to -Xmx2048M? What log level are you using? On Mon, Nov 8, 2010 at 4:44 PM, yves yves.ko...@gmail.com wrote: Hi, I had a class named ResultNode and the project compiled fine. In order to improve the code, I changed this class by adding generic stuff like that : ResultNodeT extends ResultNode?. Of course I adapted the entire project where needed to take advantage of this change. Now I get an Internal compiler error This is produced with java memory settings -Xmx768M and -Xss32M . (usually the settings are -Xmx128M and default value for -Xss and I never had such problem). BTW : a javac compilation on the project is succesfull, so it is not a java error. Any suggestion ? If more information is needed do not hesitate to ask. Thanks in advance Yves [java] Compiling module com.mycompany.myproject.MyProject [java] [ERROR] Errors in 'file:/C:/java/workspace/MyProject/ src/com/mycompany/myproject/client/model/AppActivityMapper.java' [java] [ERROR] Internal compiler error [java
[gwt-contrib] Internal compiler error with GWT 2.1.0 RC1 when using generics
Hi, I had a class named ResultNode and the project compiled fine. In order to improve the code, I changed this class by adding generic stuff like that : ResultNodeT extends ResultNode?. Of course I adapted the entire project where needed to take advantage of this change. Now I get an Internal compiler error This is produced with java memory settings -Xmx768M and -Xss32M . (usually the settings are -Xmx128M and default value for -Xss and I never had such problem). BTW : a javac compilation on the project is succesfull, so it is not a java error. Any suggestion ? If more information is needed do not hesitate to ask. Thanks in advance Yves [java] Compiling module com.mycompany.myproject.MyProject [java][ERROR] Errors in 'file:/C:/java/workspace/MyProject/ src/com/mycompany/myproject/client/model/AppActivityMapper.java' [java] [ERROR] Internal compiler error [java] java.lang.OutOfMemoryError: Java heap space [java] at java.util.Arrays.copyOf(Arrays.java:2882) [java] at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java: 100) [java] at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390) [java] at java.lang.StringBuilder.append(StringBuilder.java:119) [java] at com.google.gwt.dev.util.log.PrintWriterTreeLogger.doBranch(PrintWriterTreeLogger.java: 59) [java] at com.google.gwt.dev.util.log.AbstractTreeLogger.branch(AbstractTreeLogger.java: 126) [java] at com.google.gwt.core.ext.TreeLogger.branch(TreeLogger.java:222) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 939) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkTypeArgument(SerializableTypeOracleBuilder.java: 1412) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtype(SerializableTypeOracleBuilder.java: 1219) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtypes(SerializableTypeOracleBuilder.java: 1309) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 1011) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkArrayInstantiable(SerializableTypeOracleBuilder.java: 1107) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 977) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkTypeArgument(SerializableTypeOracleBuilder.java: 1412) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtype(SerializableTypeOracleBuilder.java: 1219) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtypes(SerializableTypeOracleBuilder.java: 1309) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 1011) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkArrayInstantiable(SerializableTypeOracleBuilder.java: 1107) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 977) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkTypeArgument(SerializableTypeOracleBuilder.java: 1412) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtype(SerializableTypeOracleBuilder.java: 1219) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtypes(SerializableTypeOracleBuilder.java: 1309) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 1011) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkArrayInstantiable(SerializableTypeOracleBuilder.java: 1107) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 977) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkTypeArgument(SerializableTypeOracleBuilder.java: 1412) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtype(SerializableTypeOracleBuilder.java: 1219) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtypes(SerializableTypeOracleBuilder.java: 1309) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 1011) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkArrayInstantiable(SerializableTypeOracleBuilder.java: 1107) [java
[gwt-contrib] Re: Internal compiler error with GWT 2.1.0 RC1 when using generics
I can't, I only have 2GB RAM, I get this error as from -Xmx1024M [java] Error occurred during initialization of VM [java] Could not reserve enough space for object heap [java] Could not create the Java virtual machine. and the log level is INFO Yves On 8 nov, 22:53, Scott Blum sco...@google.com wrote: What if you turn the heap up to -Xmx2048M? What log level are you using? On Mon, Nov 8, 2010 at 4:44 PM, yves yves.ko...@gmail.com wrote: Hi, I had a class named ResultNode and the project compiled fine. In order to improve the code, I changed this class by adding generic stuff like that : ResultNodeT extends ResultNode?. Of course I adapted the entire project where needed to take advantage of this change. Now I get an Internal compiler error This is produced with java memory settings -Xmx768M and -Xss32M . (usually the settings are -Xmx128M and default value for -Xss and I never had such problem). BTW : a javac compilation on the project is succesfull, so it is not a java error. Any suggestion ? If more information is needed do not hesitate to ask. Thanks in advance Yves [java] Compiling module com.mycompany.myproject.MyProject [java] [ERROR] Errors in 'file:/C:/java/workspace/MyProject/ src/com/mycompany/myproject/client/model/AppActivityMapper.java' [java] [ERROR] Internal compiler error [java] java.lang.OutOfMemoryError: Java heap space [java] at java.util.Arrays.copyOf(Arrays.java:2882) [java] at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java: 100) [java] at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390) [java] at java.lang.StringBuilder.append(StringBuilder.java:119) [java] at com.google.gwt.dev.util.log.PrintWriterTreeLogger.doBranch(PrintWriterTreeLogger.java: 59) [java] at com.google.gwt.dev.util.log.AbstractTreeLogger.branch(AbstractTreeLogger.java: 126) [java] at com.google.gwt.core.ext.TreeLogger.branch(TreeLogger.java:222) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 939) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkTypeArgument(SerializableTypeOracleBuilder.java: 1412) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtype(SerializableTypeOracleBuilder.java: 1219) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtypes(SerializableTypeOracleBuilder.java: 1309) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 1011) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkArrayInstantiable(SerializableTypeOracleBuilder.java: 1107) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 977) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkTypeArgument(SerializableTypeOracleBuilder.java: 1412) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtype(SerializableTypeOracleBuilder.java: 1219) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtypes(SerializableTypeOracleBuilder.java: 1309) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 1011) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkArrayInstantiable(SerializableTypeOracleBuilder.java: 1107) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 977) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkTypeArgument(SerializableTypeOracleBuilder.java: 1412) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtype(SerializableTypeOracleBuilder.java: 1219) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkSubtypes(SerializableTypeOracleBuilder.java: 1309) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 1011) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.checkArrayInstantiable(SerializableTypeOracleBuilder.java: 1107) [java] at com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder.computeTypeInstantiability(SerializableTypeOracleBuilder.java: 977) [java
Re: uibinders - any available graphical editors and/or intellisense for attributes for uibinders?
Yes! Just tried 2.1 with GWT Designer and its awesome with uibinder! I aboslutely love GWT. Good job guys! On Nov 2, 12:57 am, Yves yveshw...@gmail.com wrote: the recently released 2.1 would suffice? i vaguely recall that the GWT Designer that produces uibinder xml requires 2.1 m4 release? please do correct me if I am wrong. On Nov 1, 3:41 pm, Thomas Broyer t.bro...@gmail.com wrote: On 1 nov, 15:25, Yves yveshw...@gmail.com wrote: hi guys, love gwt and it suits large projects nicely. i do have 2 questions regarding uibinders. 1. are there any uibinder graphical editors? for example instead of producing code when using GWT Designer, it can produce uibinder code instead? GWT Designer *can* edit and produce UiBinder XML (you have to use GWT 2.1 though; it won't work with GWT 2.0). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
uibinders - any available graphical editors and/or intellisense for attributes for uibinders?
hi guys, love gwt and it suits large projects nicely. i do have 2 questions regarding uibinders. 1. are there any uibinder graphical editors? for example instead of producing code when using GWT Designer, it can produce uibinder code instead? 2. if not, are there any auto-complete or intellisense for uibinder to show possible attributes in the elements? both eclipse and netbeans are really lacking here. direction needed. regards, Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email 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: uibinders - any available graphical editors and/or intellisense for attributes for uibinders?
the recently released 2.1 would suffice? i vaguely recall that the GWT Designer that produces uibinder xml requires 2.1 m4 release? please do correct me if I am wrong. On Nov 1, 3:41 pm, Thomas Broyer t.bro...@gmail.com wrote: On 1 nov, 15:25, Yves yveshw...@gmail.com wrote: hi guys, love gwt and it suits large projects nicely. i do have 2 questions regarding uibinders. 1. are there any uibinder graphical editors? for example instead of producing code when using GWT Designer, it can produce uibinder code instead? GWT Designer *can* edit and produce UiBinder XML (you have to use GWT 2.1 though; it won't work with GWT 2.0). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
[gwt-contrib] CellTree keyProvider value not used in GWT 2.1.0 RC
Hi, While developping a CellTree I found that the function render() in class CellTreeNodeView.NodeCellList calls render() of the Cell object always with a null value for the key parameter (cell.render(value, null, cellBuilder)). Is it a bug or is it intended to be like that ? It would be usefull to dispatch the key value (=keyProvider.getKey(value)) to the cells in the CellTree. As far as I understand the code examples that might be the aim of this parameter ? Anyway that would be very usefull for me :-) Thanks for your comments Yves -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: CellTree keyProvider value not used in GWT 2.1.0 RC
In the meantime I made the change in a local copy of the file CellTreeNodeView.java and compiled it with my files. = It works as expected. The change I made is : replace the line cell.render(value, null, cellBuilder) by cell.render(value, key, cellBuilder) HTH Yves On 31 oct, 18:01, yves yves.ko...@gmail.com wrote: Hi, While developping a CellTree I found that the function render() in class CellTreeNodeView.NodeCellList calls render() of the Cell object always with a null value for the key parameter (cell.render(value, null, cellBuilder)). Is it a bug or is it intended to be like that ? It would be usefull to dispatch the key value (=keyProvider.getKey(value)) to the cells in the CellTree. As far as I understand the code examples that might be the aim of this parameter ? Anyway that would be very usefull for me :-) Thanks for your comments Yves -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Menu Item and MVP (2)
Hi, This message was supposed to be an answer to the Menu Item and MVP discussion. But it does not appear, I probably made a mistake, so I put it here in a new discussion. The initial message posted by mic was : Just sharing some thoughts Would the MenuItem class need to implement HasClickHandler so that when a MenuItem is clicked, the action can be handled in the presenter. At this time, the MenuItem needs an object that implements the Command interface, so the view seems to know about the presenter. I would like to know what others think about this. This is probably a late answer to the initial question. Anyway, I've made a quite simple implementation that solves the lack of something like a HasClickHandlers dedicated to MenuItem. Here I give you the solution I've built. First, we need something like a HasCommandHandlers interface instead of HasClickHandler. This will allow the presenter to handle a click on a MenuItem. public interface HasCommandHandlers extends HasHandlers { // equivalent to the addClickHandler in the HasClickHandlers interface public HandlerRegistration addCommandHandler(CommandHandler handler); } We create a CommandHandler interface only to stay in line with the naming convetion for the handlers. public interface CommandHandler extends Command { // this interface is empty } The Presenter : public interface Display { HasCommandHandlers getMenu1(); HasCommandHandlers getMenu2(); ... } public void build() { view.gerMenu1().addCommandHandler(new CommandHandler() { public void execute() { // do what you need } }); } ... } So this is standard MVP implementation. Now the View. We have to create a subclass of MenuItem implementing MenuPresenter.HasCommandHandlers, so we will have a MenuItem implementing the HasCommandHandlers interface just like a PushButton implements HasClickHandlers. public class MyMenuItem extends MenuItem implements HasCommandHandlers { // // extends MenuItem // public MyMenuItem(String text) { super(text, (Command)null); } // --- // implements HasCommandHandlers // --- @Override public HandlerRegistration addCommandHandler(CommandHandler handler) { // call MenuItem setCommand() as the CommandHandler is a Command ! setCommand(handler); return new HandlerRegistration() { @Override public void removeHandler() { // remove the command MyMenuItem.this.setCommand(null); } }; } @Override public void fireEvent(GwtEvent? event) { // do nothing because we do not receive events } } The view as usual implements MenuPresenter.Display. This seems to me a quite simple and straight solution. Your comments are welcome ! HTH Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: how to use GIN ?
Thank you for these explanations, I think I begin to understand GIN. .. and I'll read the Guice tutorials :-) (or may be :-( yet another tuto...) Yves PS to GIN team : please make GIN simple to understand for those who don't know Guice and are just trying to improve their client code. I only came to GIN because it is used in some MVP explanations. On 28 juin, 09:00, PhilBeaudoin philippe.beaud...@gmail.com wrote: Thomas gives very good advice, although I personally neverusethe @ImplementedBy annotation (not entirely sure why...). To complement his answer, if you're interested in saving the addClickHandler call you may want to take a look at UiBinder the @UiHandler annotation. On Jun 27, 3:41 pm, Thomas Broyer t.bro...@gmail.com wrote: On 27 juin, 19:39, yves yves.ko...@gmail.com wrote: Olivier, Thanks for the link. If I try to summarize my problem : Which are the conventions that are implicitly used byGINto bind classes ? I've already seen gwt-presenter, but it didn't helped me to understand how to transform my code to such code : public class AppModule extends AbstractGinModule { @Override protected void configure() { bind(EventBus.class).to(DefaultEventBus.class); bind(MainPresenter.Display.class).to(MainWidget.class); bind(MenuPresenter.Display.class).to(MenuWidget.class); bind(IssueEditPresenter.Display.class).to(IssueEditWidget.class); bind(IssueDisplayPresenter.Display.class).to(IssueDisplayWidget.class); If you control all of those classes, and they only exist as an interface+implementation class for testing purpose, then I'd rather annotate the interfaces with @ImplementedBy, e.g. �...@implementedby(MainWidget.class) public interface Display { ... } That way,GINwill automaticallyuseMainWidget as if you wrote the bind().to(); and in case you want to inject some other implementation (e.g. in some complex tests), you canusebind().to() without risking a duplicate binding. Is there any doc explaining what is behind the scene with all these bind().to() calls ? In my example, if I write something like bind(SearchPresenter.Display.class).to(someWidget.class); is it equivalent to display = d; display.getSearchButton().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { doSearch(event); } }); and how to tellGINthat I need to call doSearch() ? No!GINis only about dependency injection, i.e. it saves you the new, and nothing else. With the above bind().to() and an @Inject annotation on the bind(Display) method, then whenGINis asked to instantiate a SearchPresenter (i.e. when you do not write the new yourself) it'll automatically instantiate a SomeWidget and call bind() with it as an argument (and when instantiating the SomeWidget, it'll automatically instantiate the required dependencies and inject them to @Inject- annotated constructor, fields and methods). Maybe you should look for Guice tutorials to better understand what dependency injection is, and how to configure it with Guice. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
how to use GIN ?
Hi Everybody, I've read the the official tutorial at http://code.google.com/p/google-gin/wiki/GinTutorial, but I still doesn't understand how to use GIN (as it is mainly based on Guice that I don't know) and how it could help me :-( Sorry for the tutorial writer :-) I'm currently developping an MVP based app mainly inspired by the google IO 2009 presentation http://code.google.com/intl/fr/events/io/2009/sessions/GoogleWebToolkitBestPractices.html and also the article http://code.google.com/intl/fr/webtoolkit/articles/mvp-architecture.html. Here is an example of the code I would like to simplify using DI (as I understand, GIN could do some part for me) : public class SearchPresenter implements Presenter { public interface Display { HasClickHandlers getSearchButton(); } Display display; public void bind(Display d) { display = d; display.getSearchButton().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { doSearch(event); } }); } As I understand, perhaps I am wrong, GIN could do the bind() for me ? But, how should I use GIN for that (if it is really suited for this) ? Thanks for your help ! Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: how to use GIN ?
Olivier, Thanks for the link. If I try to summarize my problem : Which are the conventions that are implicitly used by GIN to bind classes ? I've already seen gwt-presenter, but it didn't helped me to understand how to transform my code to such code : public class AppModule extends AbstractGinModule { @Override protected void configure() { bind(EventBus.class).to(DefaultEventBus.class); bind(MainPresenter.Display.class).to(MainWidget.class); bind(MenuPresenter.Display.class).to(MenuWidget.class); bind(IssueEditPresenter.Display.class).to(IssueEditWidget.class); bind(IssueDisplayPresenter.Display.class).to(IssueDisplayWidget.class); } } (found here http://code.google.com/p/gwt-mvp-sample/source/browse/branches/gwt-presenter/src/com/enunes/bit/client/gin/AppModule.java) Is there any doc explaining what is behind the scene with all these bind().to() calls ? In my example, if I write something like bind(SearchPresenter.Display.class).to(someWidget.class); is it equivalent to display = d; display.getSearchButton().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { doSearch(event); } }); and how to tell GIN that I need to call doSearch() ? Thanks ! Yves On 27 juin, 19:05, olivier nouguier olivier.nougu...@gmail.com wrote: hi Google to gwt-presenter HIH On Sun, Jun 27, 2010 at 12:51 PM, yves yves.ko...@gmail.com wrote: Hi Everybody, I've read the the official tutorial at http://code.google.com/p/google-gin/wiki/GinTutorial, but I still doesn't understand how to use GIN (as it is mainly based on Guice that I don't know) and how it could help me :-( Sorry for the tutorial writer :-) I'm currently developping an MVP based app mainly inspired by the google IO 2009 presentation http://code.google.com/intl/fr/events/io/2009/sessions/GoogleWebToolk... and also the article http://code.google.com/intl/fr/webtoolkit/articles/mvp-architecture.html. Here is an example of the code I would like to simplify using DI (as I understand, GIN could do some part for me) : public class SearchPresenter implements Presenter { public interface Display { HasClickHandlers getSearchButton(); } Display display; public void bind(Display d) { display = d; display.getSearchButton().addClickHandler(new ClickHandler() { �...@override public void onClick(ClickEvent event) { doSearch(event); } }); } As I understand, perhaps I am wrong, GIN could do the bind() for me ? But, how should I use GIN for that (if it is really suited for this) ? Thanks for your help ! Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post 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. -- Computers are useless. They can only give you answers. - Pablo Picasso - -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email 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: can not set breakpoint (2)
Kozura, Thanks for your answer. I suddenly feel very stupid... :-))) I was so confused by the terminlogy run in development mode that I forget that debugging is performed obviously in the debug mode Have a nice day Yves On 4 juin, 21:01, kozura koz...@gmail.com wrote: Maybe try Debug As instead of Run As, also make sure the ? gwt.codesvr=... parameter is in your browser's url On Jun 4, 12:45 pm, yves yves.ko...@gmail.com wrote: Hi Everybody, In GWT 2 Dev Mode, I can't make thebreakpointswork in eclipse : client app doesn't stop on any breakpoint. My config is: GWT 2.0.3, Eclipse 3.4.2 + GWT Plugin 1.3.2, JDK 1.6.0_20. Firefox 3.6.3 (+ FF GWT Plugin) As I suspected something wrong in the structure of my project in eclipse, I tried with the GWT sample Hello. Thus, after running ant eclipse.generate on Hello, I imported Hello into Eclipse. Here is an extract of the client code: public void onModuleLoad() { Button b = new Button(Click me, new ClickHandler() { public void onClick(ClickEvent event) { Window.alert(Hello, AJAX); } }); I put 2breakpointson lines Button b = ... and Window.alert... I tried 2 ways to run the dev mode. First way: select the file Hello.launch and then Run (Ctrl+F11). This opens the GWT Development Mode shell. Second way: In Properties window check the option Use Google Web Toolkit, then select menu Run As Web Application. This opens the Development Mode eclipse tab. During both trials I could play with the application running into the browser, and thebreakpointsdidn't worked in eclipse. Does anybody could help me find what is wrong ? Thanks Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
can not set breakpoint (2)
Hi Everybody, In GWT 2 Dev Mode, I can't make the breakpoints work in eclipse : client app doesn't stop on any breakpoint. My config is: GWT 2.0.3, Eclipse 3.4.2 + GWT Plugin 1.3.2, JDK 1.6.0_20. Firefox 3.6.3 (+ FF GWT Plugin) As I suspected something wrong in the structure of my project in eclipse, I tried with the GWT sample Hello. Thus, after running ant eclipse.generate on Hello, I imported Hello into Eclipse. Here is an extract of the client code: public void onModuleLoad() { Button b = new Button(Click me, new ClickHandler() { public void onClick(ClickEvent event) { Window.alert(Hello, AJAX); } }); I put 2 breakpoints on lines Button b = ... and Window.alert... I tried 2 ways to run the dev mode. First way: select the file Hello.launch and then Run (Ctrl+F11). This opens the GWT Development Mode shell. Second way: In Properties window check the option Use Google Web Toolkit, then select menu Run As Web Application. This opens the Development Mode eclipse tab. During both trials I could play with the application running into the browser, and the breakpoints didn't worked in eclipse. Does anybody could help me find what is wrong ? Thanks Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Problem with DevMode and GWT 2.0.3
Hi. I was an happy user of GWT 1.6, using its HostedMode class to debug my Java code. I've installed GWT 2.0.3 and I can't debug anymore. I've installed new Eclipse plugin, that should open a new eclipse view called Web Application Debug View, but when I try to debug my application, I don't see anything appear in this view, as I saw on some tutorials. Here's the way i launch my app: com.google.gwt.dev.DevMode -noserver -logLevel ALL -startupUrl [myUrl] [fully qualified module name] I use tomcat 6 as external server. So, when launching I get a window opening, telling me that it's OK, app has been started, but when I open given URL (with gwt.codesrv=127.0.0.1:9997), firefox doesn't ask me for a plugin installation, and breakpoints don't work. What could be the problem? Thanks. Yves. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email 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: error in javascript generated by GWT 2.0.3 for IE6 ?
I found my problem : Instead of set-property name=user.agent value=ie6 / set-property name=user.agent value=safari / it should be set-property name=user.agent value=ie6,safari / So there is no more problem, and no bug in the GWT compiler ! Yves On 3 avr, 19:39, yves yves.ko...@gmail.com wrote: Hi Everybody, Unless I missed something (I just upgraded to 2.0.3 last week) I get the following error in IE6 (SP3) with the js script generated by GWT. Note that with Chrome (5.0.366.2 dev), I don't get this error ! The browser gives this error : Object doesn't support this property or method at the line showed below input.addEventListener As from version 1.6 or 1.7, EventListeners have been replaced by EventHandlers, this let me think that the error might be in the GWT compiler : I would expect a call to addEventHandler() method instead ! The DETAILED complileStyle code is the following : function com_google_gwt_user_client_ui_impl_FocusImplStandard_ $createFocusable__Lcom_google_gwt_user_client_ui_impl_FocusImplStandard_2Lcom_google_gwt_user_client_Element_2(this $static){ var div = $doc.createElement($intern_290); div.tabIndex = 0; var input = $doc.createElement($intern_456); input.type = $intern_411; input.tabIndex = -1; input.style.opacity = 0; input.style.height = $intern_457; input.style.width = $intern_457; input.style.zIndex = -1; input.style.overflow = $intern_293; input.style.position = $intern_34; input.addEventListener($intern_224, this $static.com_google_gwt_user_client_ui_impl_FocusImplStandard_focusHandler, false); div.appendChild(input); return div; } Here is an extract of my gwt.xml file: inherits name=com.google.gwt.user.User/ set-property name=user.agent value=ie6 / set-property name=user.agent value=safari / inherits name=com.google.gwt.i18n.I18N/ extend-property name=locale values=fr_BE/ Does anybody have an idea if this is an error in GWT and / or what I should do to avoid this ? Thanks Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
error in javascript generated by GWT 2.0.3 for IE6 ?
Hi Everybody, Unless I missed something (I just upgraded to 2.0.3 last week) I get the following error in IE6 (SP3) with the js script generated by GWT. Note that with Chrome (5.0.366.2 dev), I don't get this error ! The browser gives this error : Object doesn't support this property or method at the line showed below input.addEventListener As from version 1.6 or 1.7, EventListeners have been replaced by EventHandlers, this let me think that the error might be in the GWT compiler : I would expect a call to addEventHandler() method instead ! The DETAILED complileStyle code is the following : function com_google_gwt_user_client_ui_impl_FocusImplStandard_ $createFocusable__Lcom_google_gwt_user_client_ui_impl_FocusImplStandard_2Lcom_google_gwt_user_client_Element_2(this $static){ var div = $doc.createElement($intern_290); div.tabIndex = 0; var input = $doc.createElement($intern_456); input.type = $intern_411; input.tabIndex = -1; input.style.opacity = 0; input.style.height = $intern_457; input.style.width = $intern_457; input.style.zIndex = -1; input.style.overflow = $intern_293; input.style.position = $intern_34; input.addEventListener($intern_224, this $static.com_google_gwt_user_client_ui_impl_FocusImplStandard_focusHandler, false); div.appendChild(input); return div; } Here is an extract of my gwt.xml file: inherits name=com.google.gwt.user.User/ set-property name=user.agent value=ie6 / set-property name=user.agent value=safari / inherits name=com.google.gwt.i18n.I18N/ extend-property name=locale values=fr_BE/ Does anybody have an idea if this is an error in GWT and / or what I should do to avoid this ? Thanks Yves -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Unable to see GWT.log messages
I am using GWT 2.0.3 with Eclipse on W7 I installed the GWT development mode plugin in Chrome to have access to development mode. I ma I want so see my GWT.log messages in development mode When I start my project and paste the URL ending with gwt.codesrvr=127.0.0.1:9997 the application works okay, but I still see no console window in Chrome holding my log messages. The development mode console displays only the message module has been loaded message. I see that there is a server listening on port 9997, so perhaps it's only about how to access the development mode. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Unable to see GWT.log messages
I am using GWT 2.0.3 with Eclipse on W7 I installed the GWT development mode plugin in Chrome to have access to development mode. I ma I want so see my GWT.log messages in development mode When I start my project and paste the URL ending with gwt.codesrvr=127.0.0.1:9997 the application works okay, but I still see no console window in Chrome holding my log messages. The development mode console displays only the message module has been loaded message. I see that there is a server listening on port 9997, so perhaps it's only about how to access the development mode. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
I just realized that dependency injection is possible with GWT
Hello Reading the documentation for the module xml files, i just realize that the tag replace-with .../ allows for dependency injection. Suppose i need to use different class implementation depending on my environment (real class for production, mock for development ...). I just have to have two (or more) module xml like this For production use file FooProd.gwt.xml module replace-with class=foo.FooProdImpl when-type-is class=foo.Foo / /replace-with ... For development use file FooDev.gwt.xml module replace-with class=foo.FooMockImpl when-type-is class=foo.Foo / /replace-with ... Am i wrong? Regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---