Issue with ListGrid clearCriteria method
i am using Listgrid of smartgwt api. i have set filter editor on the list grid using setShowFilterEditor(). On UI, i can filter out the list data from the particular columns using filter editor which is shown on top of listgrid. till this, everything works fine. but problem starts after this. my ListGridRecords are of type ScreenInstanceGridRecord. I cleared out the filter criteria before getting the ListGridRecord from the ListGrid using method clearCriteria(), so that i can save all the records to database ie. unfiltered records. when i try to get records from the listgrid using getRecordList(), 1000 Dummy records are added on the fly on first iteration, all my populated records are ignored . and i need here is records of ScreenInstanceGridRecord type. but on second iteration, i am getting my populated records which is of ScreenInstanceGridRecord type. why this problem is occurring. i should be getting ScreenInstanceGridRecord on the first iteration itself when i try to get records from the ListGrid using getRecordList(). i am getting no idea about this weird thing. any help from your side is most welcome.. i am giving u piece of code which give u an idea where i am getting problem public void onModuleLoad() { DataSourceIntegerField idSource = new DataSourceIntegerField(id); idSource.setPrimaryKey(true); idSource.setHidden(true); DataSourceTextField nameSource = new DataSourceTextField(name); DataSource ds = new DataSource(); ds.setFields(idSource, nameSource); ds.setClientOnly(true); final ListGrid grid = new ListGrid(); grid.setDataSource(ds); grid.setShowFilterEditor(); // problem lies here grid.setWidth(600); grid.setHeight(400); grid.setAutoFetchData(true); grid.setAlternateRecordStyles(true); grid.setShowAllRecords(false); Button savebutton = new Button(Save); saveButton.addClickHandler(){ grid.clearCriteria(); RecordList records = grid.getRecordList(); int length = recordList.getLength(); // On First Iteration, this method always giving me 1000 dummy records. its doesnt matter how many records are populated in the grid. but on second iteration, it is giving me right records length. } i don't know what the heck is happening here. i am very confused for past 3 days. please give me some light on it. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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: Do I have to use DTO if I use GWT + JPA?
Did you try GILEAD? It permits you to send Persistent entities over the RPC. On 26 ruj, 05:11, Warren Tang warren.c.t...@gmail.com wrote: Thanks for your reply. I also read this: http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html It seems that I have to go DTO anyway. -- Regards, Warren Tang http://blog.tangcs.com On Monday, September 26, 2011 10:55:51 AM, Behi wrote: Lazy loading won't work on the client side as the JPA session is only maintained on the server side and only detached objects are sent down to the client. You would need to use DTOs and send the fully-loaded domain objects to the client. On Sep 26, 12:21 pm, Warren Tang warren.c.t...@gmail.com wrote: Some say transferring entities cross the wire may cause problems, e.g. lazy loading. But I feel reluctant to introduce DTO. It's boilerplate and it's not right. I also looked at RequestFactory and it seems a solution. However I'm also using GWTP's command pattern, which doesn't seem to work with RequestFactory. Is there any alternatives? Do I have to use DTO? -- You received 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: XML parsing error when using Guice with servlets
To solve the problem, inherit the required module in project.gwt.xml file. inherits name='com.google.gwt.user.User'/ inherits name='com.google.gwt.i18n.I18N'/ S. Abraham www.DataStoreGwt.com Persist objects directly in GAE On Sep 25, 10:57 pm, Nicklas nicklas_fo...@yahoo.com wrote: Hello, I'm setting up a web application I call WineCellar using GWT with Guice. I have set up the Guice to use servlets as instructed here:http://code.google.com/p/google-guice/wiki/Servlets. I am using Eclipse 3.5 with the GWT plugin. However, when I try to run the application in debug mode, I get the error message below. Loading modules winecellar.WineCellar Loading inherited module 'com.google.gwt.user.User' Loading inherited module 'com.google.gwt.i18n.I18N' [ERROR] Unexpected error while processing XML java.lang.NoClassDefFoundError: com/google/gwt/core/ext/linker/PropertyProviderGenerator at java.lang.ClassLoader.findBootstrapClass(Native Method) at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:900) at java.lang.ClassLoader.loadClass(ClassLoader.java:316) at java.lang.ClassLoader.loadClass(ClassLoader.java:314) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at com.google.gwt.dev.cfg.ModuleDefSchema$ClassAttrCvt.convertToArg( ModuleDefSchema.java:886) at com.google.gwt.dev.util.xml.HandlerArgs.convertToArg(HandlerArgs.java:64) at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:221) at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement( ReflectiveParser.java:294) at com.sun.org.apache.xerces.internal.parsers. AbstractSAXParser.startElement(AbstractSAXParser.java:504) at com.sun.org.apache.xerces.internal.parsers. AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182) at com.sun.org.apache.xerces.internal.impl. XMLDocumentFragmentScannerImpl.scanStartElement( XMLDocumentFragmentScannerImpl.java:1320) at com.sun.org.apache.xerces.internal.impl. XMLDocumentFragmentScannerImpl$FragmentContentDriver. next(XMLDocumentFragmentScannerImpl.java:2732) at com.sun.org.apache.xerces.internal.impl. XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625) at com.sun.org.apache.xerces.internal.impl. XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl. java:488) at com.sun.org.apache.xerces.internal.parsers. XML11Configuration.parse(XML11Configuration.java:812) at com.sun.org.apache.xerces.internal.parsers. XML11Configuration.parse(XML11Configuration.java:741) at com.sun.org.apache.xerces.internal.parsers. XMLParser.parse(XMLParser.java:123) at com.sun.org.apache.xerces.internal.parsers. AbstractSAXParser.parse(AbstractSAXParser.java:1208) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser. parse(SAXParserImpl.java:525) at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser. java:347) at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$200( ReflectiveParser.java:68) at com.google.gwt.dev.util.xml.ReflectiveParser.parse( ReflectiveParser.java:418) at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:296) at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin (ModuleDefSchema.java:495) at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230) at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement( ReflectiveParser.java:294) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement( AbstractSAXParser.java:504) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser. emptyElement(AbstractXMLDocumentParser.java:182) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl. scanStartElement(XMLDocumentFragmentScannerImpl.java:1320) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$ FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2732) at com.sun.org.apache.xerces.internal.impl. XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl. scanDocument(XMLDocumentFragmentScannerImpl.java:488) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration. parse(XML11Configuration.java:812) at
Re: How to override default clean.css styles?
For every Gwt project, Eclipse generates a default css file in /war directory. Edit it to override body tag styling in the css. It will be available to the entire project. S. Abraham www.DataStoreGwt.com Persist objects directly in GAE On Sep 24, 8:55 pm, bbaychev bayc...@gmail.com wrote: Hello, GWT seems to override some of the body tag styling I want to apply, how can I set styles in a way that they are not overriden or modify the clean.css file? I can't find the clean.css file anywhere in the project. -- You received 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: Is there a limitation with GWT2.4 plugin for Eclipse3.4
Hi Sudhakar, One observation is, when I have a fresh eclipse which does not know anything about GWT at all, and if try do Project-- Properties -- Google--Web Toolkit--Configure , I will not be able to find Google option. in that case how do we proceed getting GWT2.4 in the environment. Thanks! On Sep 21, 12:05 pm, Sudhakar Abraham s.abra...@datastoregwt.com wrote: There is no limitation with GWT2.4 plugin for Eclipse3.4. Download the gwt-2.4.0.zip from the link http://code.google.com/p/google-web- toolkit/downloads/detail?name=gwt-2.4.0.zip. To extract the gwt-2.4.0.zip to your directory, in eclipse 3.4 (Ganymede) IDE try the following, Project-- Properties --Google--Web Toolkit--Configure SDks..--ADD--Installation directory using Browse button. S. Abrahamwww.DataStoreGwt.com Persist objects directly in GAE On Sep 21, 7:57 am, Sai dhana@gmail.com wrote: I am trying to install latest GWT version 2.4 on eclipse 3.4. I read the document at following URLhttp://code.google.com/eclipse/docs/getting_started.html, but this document does not state any URL for eclipse 3.4 (Ganymede). Question here: Is there plug-in ready for eclipse 3.4 to download the latest version of GWT or eclipse has to be migrtaed to 3.5/3.6/3.7 to use GWT latest version(2.4) I have also seen at other places that there is also a Google Plugin for Eclipse3.4 URLhttp://dl.google.com/eclipse/plugin/3.4 this is giving me a problem saying No Repository Found Please help me! -- You received 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: Random SerializationException
Update: I still don't know why the SerializationException was appearing each time on a different class, but in the end it turned out that a leaf-level class was responsible. Problem solved. On Sep 25, 10:32 pm, Maverick alberto.si...@gmail.com wrote: Thanks for your reply; I'll try to investigate more. What is disorienting me is that the type, which is not said to be serializable, also changes on different calls. Could you please tell me something more about your experience and possible checks to do? That would help greately, because I finished the ideas... Thanks On 25 Set, 21:28, Dennis Haupt d.haup...@googlemail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 you don't send the same data the second time. my experience says that this can have a thousand reasons which are not even hinted at by the error message. something in your class makes the gwt compiler think that it cannot be serialized or the gwt compiler assumes the class is never serialized (it's generally confused by generics) Am 25.09.2011 20:57, schrieb Maverick: Hi all I'm experiencing a problem that seems pretty absurd: I have a complex GWT app, which spans over several projects; from a while ago (not sure when it started exactly) the app is loaded successfully and a data structure is sent over RPC, but, if I reload the page, the *same* RPC call fails with this exception: com.google.gwt.user.client.rpc.StatusCodeException: 500 The call failed on the server; see server log for details at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceiv ed(RequestCallbackAdapter.java: 209) at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java: 287) at com.google.gwt.http.client.RequestBuilder $1.onReadyStateChange(RequestBuilder.java:395) at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.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.jav a: 167) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingFo rReturn(BrowserChannelServer.java: 326) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChann elServer.java: 207) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java: 132) 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.j ava: 91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214) at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.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.jav a: 167) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChanne lServer.java: 281) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan nelServer.java: 531) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java : 352) at java.lang.Thread.run(Thread.java:680) And in the exception message: com.google.gwt.user.client.rpc.SerializationException: Type 'com.conceptle.istar.shared.ConceptualModelStatus' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.: instance = com.conceptle.istar.shared.ConceptualModelStatus@5afecc75 at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali ze(ServerSerializationStreamWriter.java: 615) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write Object(AbstractSerializationStreamWriter.java: 126) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter $ValueWriter$8.write(ServerSerializationStreamWriter.java:153) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali zeValue(ServerSerializationStreamWriter.java: 535) at
Re: ie8 problem with gwt 2.4?
We can see the problem on the GWT Showcase : Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; chromeframe/14.0.835.186; .NET CLR 1.1.4322; InfoPath.1) Timestamp: Mon, 26 Sep 2011 07:52:05 UTC Message: Object doesn't support this property or method Line: 1532 Char: 127 Code: 0 URI: http://gwt.google.com/samples/Showcase/showcase/56292F4D7C74D54F38D6A0131076ACC5.cache.html Why the user agent is Mozilla (compatible IE8) ? -- 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/-/CjZJr-S8IeEJ. 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+hibernate annotations+persisting Enum
Hey everyone! I am having a problem in persisting a postgres enum using hibernate and GWT. When i follow some instructions that i found around Web, it says that client module does not support one class used to trick for persistence. Does anyone know how to do it? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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: too much code: GWT Development with Activities and Places
On Sat, Sep 24, 2011 at 4:53 PM, Thomas Broyer t.bro...@gmail.com wrote: And BTW, MVP is a design pattern, and there's no one single way of implementing it (the MVP articles in the GWT doc makes it kind of clear). And the fact that Activities and Places (which people sometimes erroneously call MVP framework) are quite new makes it clear that it's not the way to build GWT apps: there must have been ways to do it before they're introduced! Point taken, the docs do make it very clear its a pattern and one way of implementing it, and that its best suited for large scale projects and why. Though reading through the User Guide, you could be forgiven for thinking 'This is the way I should go with my app!', especially if you decide to use UiBinder, as the Activity/Places MVP article uses it and is almost like a tutorial on building an app. I guess its just because the other tutorial in the User Guide, the Stock Watcher, doesn't use UiBinder, which is a very attractive feature to anyone new to GWT. Would be nice to have a chapter/tutorial on building a small/medium sized UiBinder based app that doesn't use MVP. -- You received 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: Isn't the Activities and Places model violating the MVP pattern?
If you value theory and purity more than pragmatism and productivity, then yes, it probably violates the pattern, as it doesn't use the observer pattern. But note that even Martin Fowler warns about the dangers of the observer pattern: http://martinfowler.com/eaaDev/OrganizingPresentations.html#observer-gotchas For a great presentation of pragmatic MVP, have a look at http://www.google.com/events/io/2010/sessions/gwt-continuous-build-testing.html -- 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/-/jBt1uTYpNsMJ. 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: Edit an object in a List without a ListEditor
...and use HasRequestContext so that the editor driver passes the RequestContext down to your editor (that's exactly what it was meant for: http://code.google.com/p/google-web-toolkit/issues/detail?id=5892 ). -- 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/-/kbe9jUmGiWkJ. 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.
Performance Tip for IE browsers : Java garbage collection is NOT Javascript garbage Collection
Hi All, I've been working on GWT for a while now and noticed something important and peculiar. In GWT you code in Java and almost automatically assume Java garbage collection (because that's how you code). In this code sample: http://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunication.html#DevGuideRemoteProcedureCalls you'll see that the callback is created like the code snippet below. I imagine that every GWT project will implement it like this. The Use Case: Fill data in the new CellTable widget. The size of the data varied from 100 to 600 records. If the onSuccess results in a lot of data and this event/callback is invoked lots of times (actually 3 to 5 times is enough) , on IE6, IE7,IE8 and IE9 there will be performance degradation. In other browsers like Chrome, Firefox and Safari there is no performance loss noticed. After reading Joel Webber's note on Performance, I found out that it's not the component (like the CellTable) that causes this behavior, but it was the callback creation. It seems that IE doesn't know how to garbage collection the callback. So each time this new AsyncCallback is performed, a memory leak occurred in IE browsers. Since the Callback is stateless, we decided to create the callback only once (*static *variable) and there was no performance loss anymore. After clicking for a while, the performance was the same (even after inspecting the results of some measurement tools). This worked for us and even IE6 is blazingly fast. IE9 is now even faster that Chrome! No need for Chrome Frame Plugin (some organizations don't allow Plugins at all, think about that!) Hopefully this tip works for you. And Yes we have GWT in production. That company's browser policy is to use IE (now on 7, moving to 8). So this had to work or otherwise , it was a huge showstopper! GWT applications do perform (even in older browsers), just make sure that critical parts of your code are carefully reviewed (especially on the new). AsyncCallback callback = new AsyncCallback() { public void onSuccess(Void result) { // do some UI stuff to show success } public void onFailure(Throwable caught) { // do some UI stuff to show failure } }; // (3) Make the call... -- 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/-/3ZelaqGUGTcJ. 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: Drag Drop support and GWT 2.4
Is there any information regarding GWT 2.4 drag and drop tutorial and documentation? -- 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/-/gpKU4NCRAkwJ. 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.
UIBinder Internationalization with regular properties file?
What I don't like in the UIBinder Internationalization mechanism: 1)We must place ui.xml template file and localized properties file in the same folder. 2)localized properties file must have a large name like GenMessages.properties I need to use UIBinder with regular properties files which can reside in any package and have any names. Is it possible for now? -- You received 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: Do I have to use DTO if I use GWT + JPA?
You may find DataStoreGwt handy. It has lazy loading and does away with DTO. J.Ganesan www.DataStoreGwt.com On Sep 26, 8:11 am, Warren Tang warren.c.t...@gmail.com wrote: Thanks for your reply. I also read this: http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html It seems that I have to go DTO anyway. -- Regards, Warren Tang http://blog.tangcs.com On Monday, September 26, 2011 10:55:51 AM, Behi wrote: Lazy loading won't work on the client side as the JPA session is only maintained on the server side and only detached objects are sent down to the client. You would need to use DTOs and send the fully-loaded domain objects to the client. On Sep 26, 12:21 pm, Warren Tang warren.c.t...@gmail.com wrote: Some say transferring entities cross the wire may cause problems, e.g. lazy loading. But I feel reluctant to introduce DTO. It's boilerplate and it's not right. I also looked at RequestFactory and it seems a solution. However I'm also using GWTP's command pattern, which doesn't seem to work with RequestFactory. Is there any alternatives? Do I have to use DTO? -- You received 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: Do I have to use DTO if I use GWT + JPA?
See this threadhttp://groups.google.com/group/google-web-toolkit/browse_thread/thread/7e46e8c33e7ee5da?pli=1 2011/9/25 Warren Tang warren.c.t...@gmail.com Some say transferring entities cross the wire may cause problems, e.g. lazy loading. But I feel reluctant to introduce DTO. It's boilerplate and it's not right. I also looked at RequestFactory and it seems a solution. However I'm also using GWTP's command pattern, which doesn't seem to work with RequestFactory. Is there any alternatives? Do I have to use DTO? -- 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/-/xdLeM3KY-FcJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT+hibernate annotations+persisting Enum
Can you share the stack trace? 2011/9/26 Marko Borges markoborge...@gmail.com Hey everyone! I am having a problem in persisting a postgres enum using hibernate and GWT. When i follow some instructions that i found around Web, it says that client module does not support one class used to trick for persistence. Does anyone know how to do it? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Performance Tip for IE browsers : Java garbage collection is NOT Javascript garbage Collection
Thanks for share!!! 2011/9/26 Rokesh rjan...@gmail.com Hi All, I've been working on GWT for a while now and noticed something important and peculiar. In GWT you code in Java and almost automatically assume Java garbage collection (because that's how you code). In this code sample: http://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunication.html#DevGuideRemoteProcedureCalls you'll see that the callback is created like the code snippet below. I imagine that every GWT project will implement it like this. The Use Case: Fill data in the new CellTable widget. The size of the data varied from 100 to 600 records. If the onSuccess results in a lot of data and this event/callback is invoked lots of times (actually 3 to 5 times is enough) , on IE6, IE7,IE8 and IE9 there will be performance degradation. In other browsers like Chrome, Firefox and Safari there is no performance loss noticed. After reading Joel Webber's note on Performance, I found out that it's not the component (like the CellTable) that causes this behavior, but it was the callback creation. It seems that IE doesn't know how to garbage collection the callback. So each time this new AsyncCallback is performed, a memory leak occurred in IE browsers. Since the Callback is stateless, we decided to create the callback only once (*static *variable) and there was no performance loss anymore. After clicking for a while, the performance was the same (even after inspecting the results of some measurement tools). This worked for us and even IE6 is blazingly fast. IE9 is now even faster that Chrome! No need for Chrome Frame Plugin (some organizations don't allow Plugins at all, think about that!) Hopefully this tip works for you. And Yes we have GWT in production. That company's browser policy is to use IE (now on 7, moving to 8). So this had to work or otherwise , it was a huge showstopper! GWT applications do perform (even in older browsers), just make sure that critical parts of your code are carefully reviewed (especially on the new). AsyncCallback callback = new AsyncCallback() { public void onSuccess(Void result) { // do some UI stuff to show success } public void onFailure(Throwable caught) { // do some UI stuff to show failure } }; // (3) Make the call... -- 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/-/3ZelaqGUGTcJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT+hibernate annotations+persisting Enum
Says that the column is of type XXX (my postgres enum) and I am trying to insert varchar... I know its an hibernate problem but i cant make some solutions showed in web cause client side does not support UserType class, for example. I am trying to use Type annotation btw, and it doesnt work... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Can you share the stack trace? 2011/9/26 Marko Borges markoborge...@gmail.com Hey everyone! I am having a problem in persisting a postgres enum using hibernate and GWT. When i follow some instructions that i found around Web, it says that client module does not support one class used to trick for persistence. Does anyone know how to do it? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received 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: Edit an object in a List without a ListEditor
Thanks, HasRequestContext is in fact the right way to do it! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/qOAvwhYiyHIJ. 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: Custom cell, not responding to mouse clicks
Override the getConsumedEvents() in AbstractCellC, and specify event type as click. You might also set preventDefault(), stopPropagation() property in NativeEvent. @Override public Set getConsumedEvents() { printNative( getConsumedEvents() called ); return Collections.singleton(click); } public void onBrowserEvent(Cell.Context context, Element parent, Object value, NativeEvent event) { event.preventDefault(); event.stopPropagation(); printNative(click NativeEvent + event); } S. Abraham www.DataStoreGwt.com Persist objects directly in GAE On Sep 25, 12:57 am, Jonas sark...@gmail.com wrote: I have a CellTable with a custom cell that extends AbstractCell and overrides the render method for displaying its data. The problem is that I can't click inside the actual cell to select it, I have to click somewhere outside the cell. The default color change on mouse hover also does not work within the actual cell. I am using a SingleSelectionModel to display a popup when I select something in the cell table. What do I need to do to make my cell respond to clicks and handle the mouse over effect? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT+hibernate annotations+persisting Enum
Use JPA2 if you can, it has native support to enums. See Mapping simple propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property in hibernate manual reference, the *Enumerated *annotation. 2011/9/26 Marko Borges markoborge...@gmail.com Says that the column is of type XXX (my postgres enum) and I am trying to insert varchar... I know its an hibernate problem but i cant make some solutions showed in web cause client side does not support UserType class, for example. I am trying to use Type annotation btw, and it doesnt work... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Can you share the stack trace? 2011/9/26 Marko Borges markoborge...@gmail.com Hey everyone! I am having a problem in persisting a postgres enum using hibernate and GWT. When i follow some instructions that i found around Web, it says that client module does not support one class used to trick for persistence. Does anyone know how to do it? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com . To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received 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. -- You received 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: Custom cell, not responding to mouse clicks
Hmm, I can't get it to work. Here's my full code: public class GroupCell extends AbstractCellGroupDto { public GroupCell() { super(click); } @Override public SetString getConsumedEvents() { return Collections.singleton(click); } @Override public void onBrowserEvent(Context context, Element parent, GroupDto value, NativeEvent event, ValueUpdaterGroupDto valueUpdater) { if (value == null) { return; } event.preventDefault(); event.stopPropagation(); } @Override public void render(Context context, GroupDto group, SafeHtmlBuilder sb) { ... } } Am I missing something? -- 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/-/G5IOlqMVnIYJ. 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.
smart gwt frame option
hi all, I hope this time i get some rply plz guys help me m using smartgwt, i want to display yahoo home page to display in my portlet, and when i maximized my portlet yahoo page also maxmized In gwt Frame option is available nut in smartgwt no such option is available plz tell me how to do it .. if i used gwt frame option then it works but when i click on maximized button then portlet is maximized but that frame size remain same .. plz guide me -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT+hibernate annotations+persisting Enum
Well, thanks... I tried it and now says it tries to insert integer but i dont know why: public enum BoundType { UPPER, LOWER, REF; } Im my class i have the attribute: @Enumerated(EnumType.STRING) public BoundType getType() { return this.type; } and then i call it Boundtype bt = new Boundtype(name, BoundType.UPPER); hibernateTemplate.save(bt); and says that i try to insert type as Integer ... Thanks for trying to help me 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Use JPA2 if you can, it has native support to enums. See Mapping simple propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property in hibernate manual reference, the *Enumerated *annotation. 2011/9/26 Marko Borges markoborge...@gmail.com Says that the column is of type XXX (my postgres enum) and I am trying to insert varchar... I know its an hibernate problem but i cant make some solutions showed in web cause client side does not support UserType class, for example. I am trying to use Type annotation btw, and it doesnt work... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Can you share the stack trace? 2011/9/26 Marko Borges markoborge...@gmail.com Hey everyone! I am having a problem in persisting a postgres enum using hibernate and GWT. When i follow some instructions that i found around Web, it says that client module does not support one class used to trick for persistence. Does anyone know how to do it? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com . To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received 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. -- You received 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. -- You received 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: Performance Tip for IE browsers : Java garbage collection is NOT Javascript garbage Collection
interesting, Would it be possible to implement this optimization at the compiler level, so that programmers don't have to care about this? I mean, only on the IE permutations, or for all permutations if it doesn't have negative effects on other browsers Not something specific to callback, but for anonymous classes in general On Mon, Sep 26, 2011 at 8:32 AM, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: Thanks for share!!! 2011/9/26 Rokesh rjan...@gmail.com Hi All, I've been working on GWT for a while now and noticed something important and peculiar. In GWT you code in Java and almost automatically assume Java garbage collection (because that's how you code). In this code sample: http://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunication.html#DevGuideRemoteProcedureCalls you'll see that the callback is created like the code snippet below. I imagine that every GWT project will implement it like this. The Use Case: Fill data in the new CellTable widget. The size of the data varied from 100 to 600 records. If the onSuccess results in a lot of data and this event/callback is invoked lots of times (actually 3 to 5 times is enough) , on IE6, IE7,IE8 and IE9 there will be performance degradation. In other browsers like Chrome, Firefox and Safari there is no performance loss noticed. After reading Joel Webber's note on Performance, I found out that it's not the component (like the CellTable) that causes this behavior, but it was the callback creation. It seems that IE doesn't know how to garbage collection the callback. So each time this new AsyncCallback is performed, a memory leak occurred in IE browsers. Since the Callback is stateless, we decided to create the callback only once (*static *variable) and there was no performance loss anymore. After clicking for a while, the performance was the same (even after inspecting the results of some measurement tools). This worked for us and even IE6 is blazingly fast. IE9 is now even faster that Chrome! No need for Chrome Frame Plugin (some organizations don't allow Plugins at all, think about that!) Hopefully this tip works for you. And Yes we have GWT in production. That company's browser policy is to use IE (now on 7, moving to 8). So this had to work or otherwise , it was a huge showstopper! GWT applications do perform (even in older browsers), just make sure that critical parts of your code are carefully reviewed (especially on the new). AsyncCallback callback = new AsyncCallback() { public void onSuccess(Void result) { // do some UI stuff to show success } public void onFailure(Throwable caught) { // do some UI stuff to show failure } }; // (3) Make the call... -- 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/-/3ZelaqGUGTcJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Magno Machado Paulo http://blog.magnomachado.com.br http://code.google.com/p/emballo/ -- You received 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: Custom cell, not responding to mouse clicks
On Monday, September 26, 2011 2:36:43 PM UTC+2, Jonas wrote: Hmm, I can't get it to work. Here's my full code: public class GroupCell extends AbstractCellGroupDto { public GroupCell() { super(click); } @Override public SetString getConsumedEvents() { return Collections.singleton(click); } super(click) is redundant with the getConsumedEvents override. @Override public void onBrowserEvent(Context context, Element parent, GroupDto value, NativeEvent event, ValueUpdaterGroupDto valueUpdater) { if (value == null) { return; } event.preventDefault(); event.stopPropagation(); } @Override public void render(Context context, GroupDto group, SafeHtmlBuilder sb) { ... } } Am I missing something? Doing something on click in onBrowserEvent? How are you testing things? What's the expected behavior? -- 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/-/jsqMkmCaA-oJ. 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: TextCell in Cell Table
Subclass the ColumnT,C class, and pass the TextCell in super class constructor. Try the below code. public class MyTextCellColumn extends ColumnYourDomainClass, String { public MyTextCellColumn () { super(new TextCell()); } @Override public String getValue(YourDomainClass object) { return object.getName(); } //add the column to your celltable cellTable.addColumn(new MyTextCellColumn (),Col Name) ; S. Abraham www.DataStoreGwt.com Persist objects directly in GAE On Sep 24, 9:20 pm, gangurg gangurg gang...@gmail.com wrote: Can I add Text Cell in Cell Table . I extended TextCellbut later realzied cant add cellTable.addColumn(MyTextCell,Col Name) public class MyTextCell extends TextCell { public MyTextCell () { super(); } public void render(Context context, SafeHtml value, SafeHtmlBuilder sb) { if (value != null) { //Ren der logic} } } I just realized -- You received 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.
sevaral bugs with cssresource (try not to repeat known issues)
Hi, @if user.agent I try to make conditional if with user.agent in cssresources, i make this example and it doesn' work in ie7 : @if user.agent ie7{ .cssname{ font-style: bold; } } however when I write ie6 before ie7 (as in this example code), it works properly for ie7: @if user.agent ie6 ie7{ .cssname{ font-style: bold; } } I was trying with other user.agent too like firefox, chrome... And it only works with user.agent safari gecko1_8 but not for others. There is no repported problem, so I don't know what's happened. any idea? Another cuestion: to solve this problem I use a class that correctly detect the user.agent of my browser and i use this code: @if (com.banana.client.resources.css.CssAgentDetector.isIE6_7()){ .cssname{ font-style: bold; } } but the code above doesn't work: the error says there are two parenthesis which are expected to be closed. And i do a workaround: @if (com.banana.client.resources.css.CssAgentDetector.isIE6_7())){ .cssname{ font-style: bold; } } the extra parentheses is necesary to make it works properly, i dont know why, the css parser is buggy? thx in advice! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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.
add Handler to RichTextArea elements
Is it possible to add for example a MouseOverHandler to all my b tags inside a RichTextArea? (so far I don't know how I could solve this because these elements are no widgets) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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.
compile multiple modules commandline
Hi Folks, I am trying to get ant to compile two modules (works fine with one) but I can't seem to figure out how to pass the gwt compiler two module names. As per documentation here: http://code.google.com/webtoolkit/doc/latest /DevGuideCompilingAndDebugging.html#DevGuideCompilerOptions I can do something like java -cp gwt-dev.jar com.google.gwt.dev.Compiler com.bla.foo.Module1 ... but how would I append the second module name? neither of both of the following works: 1. java -cp gwt-dev.jar com.google.gwt.dev.Compiler com.bla.foo.Module1 com.bla.bar.Module2 2. java -cp gwt-dev.jar com.google.gwt.dev.Compiler {com.bla.foo.Module1,com.bla.bar.Module2} Thanks, Fred -- You received 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: Do I have to use DTO if I use GWT + JPA?
Thanks for your suggestions. I'll look into Gilead or something like Hibernate Filter (though I use EclipseLink). -- You received 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: Custom cell, not responding to mouse clicks
I just want to make it possible to select the cell by clicking somewhere inside it like a normal TextColumn for example. My cell just displays data using a table with an image and some headers but I can't select a row in the cell table by clicking somewhere on the image for example. If I change back to a normal TextColumn it works fine. Do I need to call my selectionmodel from onBrowserEvent to make the cell selectable? -- 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/-/_t82fmaHQPIJ. 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: Performance Tip for IE browsers : Java garbage collection is NOT Javascript garbage Collection
so just to understand just replace anonymous in call callback with a variable will fix the problem ? instead of: call(new callback(){}); use : callback c = new callback(){}; call(c); ? On Sep 26, 1:29 pm, Rokesh rjan...@gmail.com wrote: Hi All, I've been working on GWT for a while now and noticed something important and peculiar. In GWT you code in Java and almost automatically assume Java garbage collection (because that's how you code). In this code sample:http://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunicat... you'll see that the callback is created like the code snippet below. I imagine that every GWT project will implement it like this. The Use Case: Fill data in the new CellTable widget. The size of the data varied from 100 to 600 records. If the onSuccess results in a lot of data and this event/callback is invoked lots of times (actually 3 to 5 times is enough) , on IE6, IE7,IE8 and IE9 there will be performance degradation. In other browsers like Chrome, Firefox and Safari there is no performance loss noticed. After reading Joel Webber's note on Performance, I found out that it's not the component (like the CellTable) that causes this behavior, but it was the callback creation. It seems that IE doesn't know how to garbage collection the callback. So each time this new AsyncCallback is performed, a memory leak occurred in IE browsers. Since the Callback is stateless, we decided to create the callback only once (*static *variable) and there was no performance loss anymore. After clicking for a while, the performance was the same (even after inspecting the results of some measurement tools). This worked for us and even IE6 is blazingly fast. IE9 is now even faster that Chrome! No need for Chrome Frame Plugin (some organizations don't allow Plugins at all, think about that!) Hopefully this tip works for you. And Yes we have GWT in production. That company's browser policy is to use IE (now on 7, moving to 8). So this had to work or otherwise , it was a huge showstopper! GWT applications do perform (even in older browsers), just make sure that critical parts of your code are carefully reviewed (especially on the new). AsyncCallback callback = new AsyncCallback() { public void onSuccess(Void result) { // do some UI stuff to show success } public void onFailure(Throwable caught) { // do some UI stuff to show failure } }; // (3) Make the call... -- You received 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.
RequestFactory error management
Hi all, the scenario is: - I have an ententy with its requestfatory, which manages correctly constraints violations. - I want also to catch an SQLException for a duplicate key and send an error message to the client. From documentation is specified that onFailure callback receives general failure notifications. So I tought that the solution could be to use onSuccess callback putting the entity inside a wrapper RequestResult object. But Requests can be parameterized with the following types: - Built-in value types: BigDecimal, BigInteger, Boolean, Byte, Enum, Character, Date, Double, Float, Integer, Long, Short, String, Void - Custom value types: any subclass of ValueProxy - Entity types: any subclass of EntityProxy - Collections: ListT or SetT, where T is one of the above value or entity types So my RequestResult should have a proxy interface which extends ValueProxy. At this point I lost some piece because it seems to be too complicated. Any ideas? -- 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/-/zxa4OxIY0awJ. 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: Performance Tip for IE browsers : Java garbage collection is NOT Javascript garbage Collection
Almost there... method doSomething (){ callback c = createCallback(); } static AsyncCallback? callback = null; AsyncCallback? createCallBack(){ if (callback==null){ callback = new AsyncCallbackObject() { // implement onSuccess // implement onFailure } } return callback; } Since we are keeping the callbacks stateless, this really improved performance on IE! -- 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/-/0Xvfkgn9RjcJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT + SVN + Eclipse
Hi Raymond, what's the exact error message that your collegues get? On 26 Set, 02:20, Raymond Cidad raym...@globalsolutioncorp.com wrote: Hello guys I'm having a hard time setting up a GWT into eclipse to work with a team, using SVN. Where we are: 1. I created the project. Did some code. Runs fine. 2. Create the SVN repository (in the cloud with codesion.com) 3. The other team member, did checkout. He can see the code Problem: - He cannot run the project. It doesn't compile right. I THINK THE PROBLEM IS RELATED TO BUILD PATH. QUESTIONS: 1. WE ARE NOW TRYING TO ADD THE WAR/WEB-INF/DEPLOY TO THE SVN:IGNORE TO SEE IF THAT HELPS. DO YOU GUYS TELL SVN NOT TO UPLOAD SOME DIRECTORIES? 2. WHAT CHANGES DO YOU GUYS DO THE PROJECT AFTER YOU DO CHECKOUT THE FIRST TIME? I'M SURE THE PROBLEMS SHOULD BE SOLVED WITH A COUPLE OF CLICKS , BUT I CAN'T FIGURE OUT THOSE CLICKS THANKS FOR YOUR HELP -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT+hibernate annotations+persisting Enum
What jpa providers (and version) are you use? 2011/9/26 Marko Borges markoborge...@gmail.com Well, thanks... I tried it and now says it tries to insert integer but i dont know why: public enum BoundType { UPPER, LOWER, REF; } Im my class i have the attribute: @Enumerated(EnumType.STRING) public BoundType getType() { return this.type; } and then i call it Boundtype bt = new Boundtype(name, BoundType.UPPER); hibernateTemplate.save(bt); and says that i try to insert type as Integer ... Thanks for trying to help me 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Use JPA2 if you can, it has native support to enums. See Mapping simple propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property in hibernate manual reference, the *Enumerated *annotation. 2011/9/26 Marko Borges markoborge...@gmail.com Says that the column is of type XXX (my postgres enum) and I am trying to insert varchar... I know its an hibernate problem but i cant make some solutions showed in web cause client side does not support UserType class, for example. I am trying to use Type annotation btw, and it doesnt work... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Can you share the stack trace? 2011/9/26 Marko Borges markoborge...@gmail.com Hey everyone! I am having a problem in persisting a postgres enum using hibernate and GWT. When i follow some instructions that i found around Web, it says that client module does not support one class used to trick for persistence. Does anyone know how to do it? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received 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. -- You received 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. -- You received 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. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT+hibernate annotations+persisting Enum
Guess I have to update my Hibernate. I am using version 3.2.5 and maybe need at least 3.5 to use JPA2. Am I correct? Thanks Juan, really!!! 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com What jpa providers (and version) are you use? 2011/9/26 Marko Borges markoborge...@gmail.com Well, thanks... I tried it and now says it tries to insert integer but i dont know why: public enum BoundType { UPPER, LOWER, REF; } Im my class i have the attribute: @Enumerated(EnumType.STRING) public BoundType getType() { return this.type; } and then i call it Boundtype bt = new Boundtype(name, BoundType.UPPER); hibernateTemplate.save(bt); and says that i try to insert type as Integer ... Thanks for trying to help me 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Use JPA2 if you can, it has native support to enums. See Mapping simple propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property in hibernate manual reference, the *Enumerated *annotation. 2011/9/26 Marko Borges markoborge...@gmail.com Says that the column is of type XXX (my postgres enum) and I am trying to insert varchar... I know its an hibernate problem but i cant make some solutions showed in web cause client side does not support UserType class, for example. I am trying to use Type annotation btw, and it doesnt work... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Can you share the stack trace? 2011/9/26 Marko Borges markoborge...@gmail.com Hey everyone! I am having a problem in persisting a postgres enum using hibernate and GWT. When i follow some instructions that i found around Web, it says that client module does not support one class used to trick for persistence. Does anyone know how to do it? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received 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. -- You received 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. -- You received 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. -- You received 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. -- You received 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: Custom cell, not responding to mouse clicks
The problem is that you use a table in your rendering: http://code.google.com/p/google-web-toolkit/issues/detail?id=6750 Despite the issue status, I believe this is fixed (for 2.5) though: http://code.google.com/p/google-web-toolkit/issues/detail?id=5714 -- 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/-/4A9bBD07U4sJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT+hibernate annotations+persisting Enum
Actually i am using hibernate-jpa-2.0-api-1.0.0.Final.jar I think it is supposed to work... 2011/9/26 Marko Borges markoborge...@gmail.com Guess I have to update my Hibernate. I am using version 3.2.5 and maybe need at least 3.5 to use JPA2. Am I correct? Thanks Juan, really!!! 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com What jpa providers (and version) are you use? 2011/9/26 Marko Borges markoborge...@gmail.com Well, thanks... I tried it and now says it tries to insert integer but i dont know why: public enum BoundType { UPPER, LOWER, REF; } Im my class i have the attribute: @Enumerated(EnumType.STRING) public BoundType getType() { return this.type; } and then i call it Boundtype bt = new Boundtype(name, BoundType.UPPER); hibernateTemplate.save(bt); and says that i try to insert type as Integer ... Thanks for trying to help me 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Use JPA2 if you can, it has native support to enums. See Mapping simple propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property in hibernate manual reference, the *Enumerated *annotation. 2011/9/26 Marko Borges markoborge...@gmail.com Says that the column is of type XXX (my postgres enum) and I am trying to insert varchar... I know its an hibernate problem but i cant make some solutions showed in web cause client side does not support UserType class, for example. I am trying to use Type annotation btw, and it doesnt work... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Can you share the stack trace? 2011/9/26 Marko Borges markoborge...@gmail.com Hey everyone! I am having a problem in persisting a postgres enum using hibernate and GWT. When i follow some instructions that i found around Web, it says that client module does not support one class used to trick for persistence. Does anyone know how to do it? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received 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. -- You received 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. -- You received 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. -- You received 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. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT+hibernate annotations+persisting Enum
Sure, hibernate 3.2.5 not support jpa2 :), yes you must update your hibernate version, for example to 3.6.x. Version 4 I'm not sure if is stable. 2011/9/26 Marko Borges markoborge...@gmail.com Guess I have to update my Hibernate. I am using version 3.2.5 and maybe need at least 3.5 to use JPA2. Am I correct? Thanks Juan, really!!! 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com What jpa providers (and version) are you use? 2011/9/26 Marko Borges markoborge...@gmail.com Well, thanks... I tried it and now says it tries to insert integer but i dont know why: public enum BoundType { UPPER, LOWER, REF; } Im my class i have the attribute: @Enumerated(EnumType.STRING) public BoundType getType() { return this.type; } and then i call it Boundtype bt = new Boundtype(name, BoundType.UPPER); hibernateTemplate.save(bt); and says that i try to insert type as Integer ... Thanks for trying to help me 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Use JPA2 if you can, it has native support to enums. See Mapping simple propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property in hibernate manual reference, the *Enumerated *annotation. 2011/9/26 Marko Borges markoborge...@gmail.com Says that the column is of type XXX (my postgres enum) and I am trying to insert varchar... I know its an hibernate problem but i cant make some solutions showed in web cause client side does not support UserType class, for example. I am trying to use Type annotation btw, and it doesnt work... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Can you share the stack trace? 2011/9/26 Marko Borges markoborge...@gmail.com Hey everyone! I am having a problem in persisting a postgres enum using hibernate and GWT. When i follow some instructions that i found around Web, it says that client module does not support one class used to trick for persistence. Does anyone know how to do it? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received 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. -- You received 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. -- You received 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. -- You received 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. -- You received 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. -- You received 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
Re: Basic CSS question
Sorry, was a way for a week. Thanks, I got this working. I started over from scratch and it worked. Must have been something in there that I did (while experimenting) that prevented it from working. Mike On Sep 15, 12:18 pm, Ernesto Oltra ernestoka...@gmail.com wrote: The documentation you have linked is for vesion 2.0. It clearly says at the beggining: *Documentation for the GWT 2.0 release of ClientBundlehttp://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html can be found on the GWT Developer's Guide website.* 1) I have included a hyphen example in the files 2) Have you add CssResource.NotStrict? If not, the things declared in the CSS file and not declared in the interface will be reported as errors 3) Uibinder doesn't modify ClientBundle in any way. If the file (MyCSSFile.css in this example) is not found, it's a compile error, not a runtime one. This is a complete working example (Java imports excluded for shortness): *com/example/myapp/MyApp.gwt.xml* * * !DOCTYPE module PUBLIC -//Google Inc.//DTD Google Web Toolkit 2.0//EN http://google-web-toolkit.googlecode.com/svn-history/r10350/trunk/dis... module rename-to=myapp inherits name='com.google.gwt.user.User'/ entry-point class='com.example.myapp.client.MyApp'/ /module * * *com/example/myapp/client/MyCSSFile.css* * * body { background-color: red; /* only an example of changing the color */ font: bold 20pt sans-serif; } .example-with-hyphens { font-weight: bold; } *com/example/myapp/client/Resources.java* public interface Resources extends ClientBundle { public static final Resources INSTANCE = GWT.create(Resources.class); public interface Style extends CssResource { @ClassName(example-with-hyphens) exampleWithHpyhens(); } @ClientBundle.Source(MyCSSFile.css) @CssResource.NotStrict // If a class is present in the css file, Style css(); //but not in the interface, don't // return any compiler errors } *com/example/myapp/client/MyApp.java* public class MyApp implements EntryPoint { public void onModuleLoadSafe() { Resources.INSTANCE.css().ensureInjected(); Button button = new Button(Example button); String cls = Resources.INSTANCE.css().exampleWithHyphens(); // Now cls contains the obfuscated name // of .example-with-hyphens button.setStyleName(cls); RootPanel.add(button); } } 2011/9/15 Mike Dee mdichiapp...@gmail.com I've been playing around with this for a couple of days, to great frustration. Can't get it to work. I followed the example here: http://code.google.com/p/google-web-toolkit/wiki/ClientBundle#Examples That doesn't work either. The call to Window.Alert to print out the css shows no text. I also noticed a few other things. 1) I took to naming my styles with hyphens, just like in all the GWT examples. Hyphens are not allowed. 2) The app won't start. An error message appears and the fix was to add @external to the front of my styles. But WHY? Nothing I did was any different from the GWT samples and none of them used @external. So, I just did something for which I have no understanding (the documentation is not helpful). I'd like to know, when is @external not needed? 3) I am using uibinder and removed my css file from the war directory and moved it someplace where the CssResource can access it (in the class hierarchy). Now those styles are not being picked up. Probably because the enjureInjected() isn't working. Or maybe ensureInjected() doesn't work with uibinder. Haven't been able to get far enough to determine. I would like to see some decent documentation. It is nice to have step by step just-do-it-this-way instructions. But when that doesn't work, I have no idea why I am doing what I am doing. Seems like the docs are written for those who already understand GWT, which kind of defeats the purpose. Mike On Sep 8, 1:23 pm, Ernesto Oltra ernestoka...@gmail.com wrote: Sorry, I meant if you use the CssResource to bundle your stylesheets together with your app, it has a method ensureInjected(). The load process would be something like that: Host page - GWT code - standard.css - Your code - Your CSS file injected So it's easier to overwrite styles in this way. Sample code: public interface Resources extends ClientBundle { public static final Resources INSTANCE = GWT.create(Resources.class); public interface Style extends CssResource { String myCssClassHere(); String myCssClassHere2(); } @ClientBundle.Source(Style.css) @CssResource.NotStrict // If a class is present in the css file, Style css(); //but not in the interface, don't // return any compiler errors ImageResource blahBlah(); // Othere resources } public class MyApp
Re: Performance Tip for IE browsers : Java garbage collection is NOT Javascript garbage Collection
Interresting. But in this case, is not it the same problem for all anonymous classes ? Do not you have this problem with event handler ? myButton.addClickHanler(new ClickHandler() { public void onClick(ClickEvent e) {...} } 2011/9/26 Rokesh Jankie rjan...@gmail.com Almost there... method doSomething (){ callback c = createCallback(); } static AsyncCallback? callback = null; AsyncCallback? createCallBack(){ if (callback==null){ callback = new AsyncCallbackObject() { // implement onSuccess // implement onFailure } } return callback; } Since we are keeping the callbacks stateless, this really improved performance on IE! -- 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/-/0Xvfkgn9RjcJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
UiBinder
Hi fellas, I have a ui.xml file: !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui ui:style .important { font-weight: bold; } /ui:style table tr tdTexto/td tdImagem/td /tr tr tdbutton ui:field=button //td tdimg ui:field=image//td /tr /table /ui:UiBinder I'm trying to use HTMl instead of GWT components. I have this code on Java class @UiField Button button; String firstName = undefined; @UiField Image image; public SampleBinderWidget(String firstName) { initWidget(uiBinder.createAndBindUi(this)); button.setText(firstName); this.firstName = firstName; } @UiHandler(button) void onClick(ClickEvent e) { Window.alert(Hello: +this.firstName); image.setUrl(http://www.google.com/intl/en_ALL/images/logo.gif;); } When I run the code I get a error: Field 'button' does not have an 'addClickHandler' method associated, isn't the onClick() for that? How do I fix this? Thanks in advance for any help. -- *Att* *Daniel Gerep* -- You received 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: Performance Tip for IE browsers : Java garbage collection is NOT Javascript garbage Collection
No definitely not: This is only with the callback Class (and in combination with a lot of data). Somehow the callback is not garbage collected properly in IE. The GWT team covered this part (of (new ClickHandler)...) See this link https://groups.google.com/forum/#!searchin/google-web-toolkit/clear$20memory$20IE7/google-web-toolkit/jPOhtj5vZT4/cOnK6MS_EQwJ And the last post of Joel Webber was definitely worth the read! So in short: Only the callback ( AsyncCallback()) class we changed to a static class variable and that was it...No other code changes... Again: java garbage collection is (apparently) NOT the same as Javascript garbage collection. -- 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/-/rfRC1FZu3QMJ. 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.
Yet another obfuscation question, but related with Java Source Code Obfuscation
There are many topics about obfuscation, but they are about js obfuscation. I'm sure my question was asked before. But I didn't find. We have a java library which is closed source. With some effort, we modified the library as gwt-safe. The problem here is that this library should be closed source. I have tried the decompile the obfuscated code approach. But it fails. The remaining solution is to use java source code obfuscators? Is there anyone having same needs? Have you ever tried one of these java source code obfuscators? What are the results? -- You received 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: Yet another obfuscation question, but related with Java Source Code Obfuscation
you could use the unobfuscated version of the project to create the javascript, then post javascript compile you could make sure sources are not included and your obfuscation scheme is implemented. You will probably want to implement a -noserver implementation to really get this going. -- 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/-/C_QhdRxPYJ4J. 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: UiBinder
You're not using the xml namespace prefix. tdg:Button ui:field=button //td tdg:Image ui:field=image //td http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html#Simple_binding Alisson Prestes www.google.com/profiles/javalisson On Mon, Sep 26, 2011 at 12:27 PM, Daniel Gerep daniel.ge...@gmail.comwrote: Hi fellas, I have a ui.xml file: !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui ui:style .important { font-weight: bold; } /ui:style table tr tdTexto/td tdImagem/td /tr tr tdbutton ui:field=button //td tdimg ui:field=image//td /tr /table /ui:UiBinder I'm trying to use HTMl instead of GWT components. I have this code on Java class @UiField Button button; String firstName = undefined; @UiField Image image; public SampleBinderWidget(String firstName) { initWidget(uiBinder.createAndBindUi(this)); button.setText(firstName); this.firstName = firstName; } @UiHandler(button) void onClick(ClickEvent e) { Window.alert(Hello: +this.firstName); image.setUrl(http://www.google.com/intl/en_ALL/images/logo.gif;); } When I run the code I get a error: Field 'button' does not have an 'addClickHandler' method associated, isn't the onClick() for that? How do I fix this? Thanks in advance for any help. -- *Att* *Daniel Gerep* -- You received 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. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT+hibernate annotations+persisting Enum
Can you share the classpath? In what servlet container are you running or you make a test? Juan 2011/9/26 Marko Borges markoborge...@gmail.com I updated to version 3.6.7 final version and it looks that the same happens :( Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into boundtype (type, name) values ('0', 'name') was aborted. Call getNextException to see the cause. I saw the cause and it is trying to insert integer 0... i think that if some gwt library was making conflict with hibernate library it would send an error so i dont know why this happens... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Sure, hibernate 3.2.5 not support jpa2 :), yes you must update your hibernate version, for example to 3.6.x. Version 4 I'm not sure if is stable. 2011/9/26 Marko Borges markoborge...@gmail.com Guess I have to update my Hibernate. I am using version 3.2.5 and maybe need at least 3.5 to use JPA2. Am I correct? Thanks Juan, really!!! 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com What jpa providers (and version) are you use? 2011/9/26 Marko Borges markoborge...@gmail.com Well, thanks... I tried it and now says it tries to insert integer but i dont know why: public enum BoundType { UPPER, LOWER, REF; } Im my class i have the attribute: @Enumerated(EnumType.STRING) public BoundType getType() { return this.type; } and then i call it Boundtype bt = new Boundtype(name, BoundType.UPPER); hibernateTemplate.save(bt); and says that i try to insert type as Integer ... Thanks for trying to help me 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Use JPA2 if you can, it has native support to enums. See Mapping simple propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property in hibernate manual reference, the *Enumerated *annotation. 2011/9/26 Marko Borges markoborge...@gmail.com Says that the column is of type XXX (my postgres enum) and I am trying to insert varchar... I know its an hibernate problem but i cant make some solutions showed in web cause client side does not support UserType class, for example. I am trying to use Type annotation btw, and it doesnt work... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Can you share the stack trace? 2011/9/26 Marko Borges markoborge...@gmail.com Hey everyone! I am having a problem in persisting a postgres enum using hibernate and GWT. When i follow some instructions that i found around Web, it says that client module does not support one class used to trick for persistence. Does anyone know how to do it? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received 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. -- You received 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. -- You received 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. -- You received 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. -- You
Re: Yet another obfuscation question, but related with Java Source Code Obfuscation
I forgot mentioning the condition that we are creating a library (API) not a web page. The API contains a part of an IP (the gwt-safe Java library), because of that reason it should be at least obfuscated. On Sep 26, 6:48 pm, Jeff Larsen larse...@gmail.com wrote: you could use the unobfuscated version of the project to create the javascript, then post javascript compile you could make sure sources are not included and your obfuscation scheme is implemented. You will probably want to implement a -noserver implementation to really get this going. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How Is the Best way to positions ListBox textfield?
How is the best way to make this: First Name: [_] Last Name: [_] Date of Birth: [] Hi, I have seen many post and I am still in doubt as to what the best practice to position and Forms Labels textfiefilds. That is doing them and FlexTable Basicpanel (tables) or LayoutPanels (div). I made two abstract forms used in a Basic LayoutPanels and other flex panel table. And depending on the case if I use one or the other. But I like to have a slightly more permanent solution if possible if it exists. Thanks very much Jero. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How Is the Best way to positions ListBox textfield?
How is the best way to make this: First Name: [_] Last Name: [_] Date of Birth: [] Hi, I have seen many post and I am still in doubt as to what the best practice to position and Forms Labels textfiefilds. That is doing them and FlexTable Basicpanel (tables) or LayoutPanels (div). I made two abstract forms used in a Basic LayoutPanels and other flex panel table. And depending on the case if I use one or the other. But I like to have a slightly more permanent solution if possible if it exists. Thanks very much Jero. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT+hibernate annotations+persisting Enum
-src --com.nameproject.client.services (where I use Services and ServicesAsync and my EntryPoint) --com.nameproject.server (where I have my ServicesImpl) (for example: hibernateTemplate.save(object)) --com.nameproject.shared.enums (my enum that i showed u before) --com.nameproject.shared.entities (where i have my mapped objects like: @Entity @Table(name = boundtype, schema = SchemaTableConfig.SCHEMA2) public class Boundtype implements Serializable { private static final long serialVersionUID = 1L; private String nodename; private BoundType type; public Boundtype() { } public Boundtype(String nodename, BoundType type) { this.nodename = nodename; this.type = type; } @Id @Column(name = nodename, unique = true, nullable = false, columnDefinition = text) public String getNodename() { return this.nodename; } public void setNodename(String nodename) { this.nodename = nodename; } @Enumerated(EnumType.STRING) public BoundType getType() { return this.type; } ... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Can you share the classpath? In what servlet container are you running or you make a test? Juan 2011/9/26 Marko Borges markoborge...@gmail.com I updated to version 3.6.7 final version and it looks that the same happens :( Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into boundtype (type, name) values ('0', 'name') was aborted. Call getNextException to see the cause. I saw the cause and it is trying to insert integer 0... i think that if some gwt library was making conflict with hibernate library it would send an error so i dont know why this happens... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Sure, hibernate 3.2.5 not support jpa2 :), yes you must update your hibernate version, for example to 3.6.x. Version 4 I'm not sure if is stable. 2011/9/26 Marko Borges markoborge...@gmail.com Guess I have to update my Hibernate. I am using version 3.2.5 and maybe need at least 3.5 to use JPA2. Am I correct? Thanks Juan, really!!! 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com What jpa providers (and version) are you use? 2011/9/26 Marko Borges markoborge...@gmail.com Well, thanks... I tried it and now says it tries to insert integer but i dont know why: public enum BoundType { UPPER, LOWER, REF; } Im my class i have the attribute: @Enumerated(EnumType.STRING) public BoundType getType() { return this.type; } and then i call it Boundtype bt = new Boundtype(name, BoundType.UPPER); hibernateTemplate.save(bt); and says that i try to insert type as Integer ... Thanks for trying to help me 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Use JPA2 if you can, it has native support to enums. See Mapping simple propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property in hibernate manual reference, the *Enumerated *annotation. 2011/9/26 Marko Borges markoborge...@gmail.com Says that the column is of type XXX (my postgres enum) and I am trying to insert varchar... I know its an hibernate problem but i cant make some solutions showed in web cause client side does not support UserType class, for example. I am trying to use Type annotation btw, and it doesnt work... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Can you share the stack trace? 2011/9/26 Marko Borges markoborge...@gmail.com Hey everyone! I am having a problem in persisting a postgres enum using hibernate and GWT. When i follow some instructions that i found around Web, it says that client module does not support one class used to trick for persistence. Does anyone know how to do it? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received 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. -- You received this message because you are subscribed to the Google Groups Google Web
Re: GWT+hibernate annotations+persisting Enum
BoundType isn't an enum. It must be: enum BoundType { ... } 2011/9/26 Marko Borges markoborge...@gmail.com -src --com.nameproject.client.services (where I use Services and ServicesAsync and my EntryPoint) --com.nameproject.server (where I have my ServicesImpl) (for example: hibernateTemplate.save(object)) --com.nameproject.shared.enums (my enum that i showed u before) --com.nameproject.shared.entities (where i have my mapped objects like: @Entity @Table(name = boundtype, schema = SchemaTableConfig.SCHEMA2) public class Boundtype implements Serializable { private static final long serialVersionUID = 1L; private String nodename; private BoundType type; public Boundtype() { } public Boundtype(String nodename, BoundType type) { this.nodename = nodename; this.type = type; } @Id @Column(name = nodename, unique = true, nullable = false, columnDefinition = text) public String getNodename() { return this.nodename; } public void setNodename(String nodename) { this.nodename = nodename; } @Enumerated(EnumType.STRING) public BoundType getType() { return this.type; } ... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Can you share the classpath? In what servlet container are you running or you make a test? Juan 2011/9/26 Marko Borges markoborge...@gmail.com I updated to version 3.6.7 final version and it looks that the same happens :( Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into boundtype (type, name) values ('0', 'name') was aborted. Call getNextException to see the cause. I saw the cause and it is trying to insert integer 0... i think that if some gwt library was making conflict with hibernate library it would send an error so i dont know why this happens... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Sure, hibernate 3.2.5 not support jpa2 :), yes you must update your hibernate version, for example to 3.6.x. Version 4 I'm not sure if is stable. 2011/9/26 Marko Borges markoborge...@gmail.com Guess I have to update my Hibernate. I am using version 3.2.5 and maybe need at least 3.5 to use JPA2. Am I correct? Thanks Juan, really!!! 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com What jpa providers (and version) are you use? 2011/9/26 Marko Borges markoborge...@gmail.com Well, thanks... I tried it and now says it tries to insert integer but i dont know why: public enum BoundType { UPPER, LOWER, REF; } Im my class i have the attribute: @Enumerated(EnumType.STRING) public BoundType getType() { return this.type; } and then i call it Boundtype bt = new Boundtype(name, BoundType.UPPER); hibernateTemplate.save(bt); and says that i try to insert type as Integer ... Thanks for trying to help me 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Use JPA2 if you can, it has native support to enums. See Mapping simple propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property in hibernate manual reference, the *Enumerated *annotation. 2011/9/26 Marko Borges markoborge...@gmail.com Says that the column is of type XXX (my postgres enum) and I am trying to insert varchar... I know its an hibernate problem but i cant make some solutions showed in web cause client side does not support UserType class, for example. I am trying to use Type annotation btw, and it doesnt work... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Can you share the stack trace? 2011/9/26 Marko Borges markoborge...@gmail.com Hey everyone! I am having a problem in persisting a postgres enum using hibernate and GWT. When i follow some instructions that i found around Web, it says that client module does not support one class used to trick for persistence. Does anyone know how to do it? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received 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
Re: GWT+hibernate annotations+persisting Enum
no... i actually have an enum called BoundType and an entity class called Boundtype. My enum is: public enum BoundType { UPPER, LOWER, REF; } my Boundtype is what i showed u before 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com BoundType isn't an enum. It must be: enum BoundType { ... } 2011/9/26 Marko Borges markoborge...@gmail.com -src --com.nameproject.client.services (where I use Services and ServicesAsync and my EntryPoint) --com.nameproject.server (where I have my ServicesImpl) (for example: hibernateTemplate.save(object)) --com.nameproject.shared.enums (my enum that i showed u before) --com.nameproject.shared.entities (where i have my mapped objects like: @Entity @Table(name = boundtype, schema = SchemaTableConfig.SCHEMA2) public class Boundtype implements Serializable { private static final long serialVersionUID = 1L; private String nodename; private BoundType type; public Boundtype() { } public Boundtype(String nodename, BoundType type) { this.nodename = nodename; this.type = type; } @Id @Column(name = nodename, unique = true, nullable = false, columnDefinition = text) public String getNodename() { return this.nodename; } public void setNodename(String nodename) { this.nodename = nodename; } @Enumerated(EnumType.STRING) public BoundType getType() { return this.type; } ... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Can you share the classpath? In what servlet container are you running or you make a test? Juan 2011/9/26 Marko Borges markoborge...@gmail.com I updated to version 3.6.7 final version and it looks that the same happens :( Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into boundtype (type, name) values ('0', 'name') was aborted. Call getNextException to see the cause. I saw the cause and it is trying to insert integer 0... i think that if some gwt library was making conflict with hibernate library it would send an error so i dont know why this happens... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Sure, hibernate 3.2.5 not support jpa2 :), yes you must update your hibernate version, for example to 3.6.x. Version 4 I'm not sure if is stable. 2011/9/26 Marko Borges markoborge...@gmail.com Guess I have to update my Hibernate. I am using version 3.2.5 and maybe need at least 3.5 to use JPA2. Am I correct? Thanks Juan, really!!! 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com What jpa providers (and version) are you use? 2011/9/26 Marko Borges markoborge...@gmail.com Well, thanks... I tried it and now says it tries to insert integer but i dont know why: public enum BoundType { UPPER, LOWER, REF; } Im my class i have the attribute: @Enumerated(EnumType.STRING) public BoundType getType() { return this.type; } and then i call it Boundtype bt = new Boundtype(name, BoundType.UPPER); hibernateTemplate.save(bt); and says that i try to insert type as Integer ... Thanks for trying to help me 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Use JPA2 if you can, it has native support to enums. See Mapping simple propertieshttp://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/entity.html#entity-mapping-property in hibernate manual reference, the *Enumerated *annotation. 2011/9/26 Marko Borges markoborge...@gmail.com Says that the column is of type XXX (my postgres enum) and I am trying to insert varchar... I know its an hibernate problem but i cant make some solutions showed in web cause client side does not support UserType class, for example. I am trying to use Type annotation btw, and it doesnt work... 2011/9/26 Juan Pablo Gardella gardellajuanpa...@gmail.com Can you share the stack trace? 2011/9/26 Marko Borges markoborge...@gmail.com Hey everyone! I am having a problem in persisting a postgres enum using hibernate and GWT. When i follow some instructions that i found around Web, it says that client module does not support one class used to trick for persistence. Does anyone know how to do it? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are
Re: ie8 problem with gwt 2.4?
Based on your user-agent, it seems like you have chrome frame installed. GWT 2.4 added detection of chrome frame, and uses the safari user agent if it is installed and enabled. On Sep 26, 1:53 am, guillaume prime guillaume.pr...@gmail.com wrote: We can see the problem on the GWT Showcase : Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; chromeframe/14.0.835.186; .NET CLR 1.1.4322; InfoPath.1) Timestamp: Mon, 26 Sep 2011 07:52:05 UTC Message: Object doesn't support this property or method Line: 1532 Char: 127 Code: 0 URI:http://gwt.google.com/samples/Showcase/showcase/56292F4D7C74D54F38D6A... Why the user agent is Mozilla (compatible IE8) ? -- You received 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.
RF/Backend Code not working after Compiling
Hi Everyone, Probably an easy fix but for some reason my project is not working properly after i have compiled it to my application server. Specifically, when i run the project in hosed mode my pages will pull data from a database using request factory and update the text on the screen, everything works great. After i compile and run the compiled code the text does not update on the screen.not sure if it's request factory not working or something else. I do not get any errors when running the compiled version. My code is compiled to a WebContent folder which is mapped in a Glassfish server running under Windows. Maybe there is a setting i need to tweak? Any help would be greatly appreciated. Cheers, -Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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: sevaral bugs with cssresource (try not to repeat known issues)
Thanks Jens, im watching the http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/rebind/UserAgentPropertyGenerator.java... therefore the best solution for me is create a static class, why about this problem? thx! On 26 sep, 16:51, Jens jens.nehlme...@gmail.com wrote: I think you can only use the user agent values that are defined by GWT which can be found in http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/... But the naming scheme is maybe a bit unlucky. Correct my if I am wrong but I think: - ie6 means IE6 and IE7 - safari means any browser that uses the WebKit rendering engine (Safari, Chrome, ...) - gecko1_8 means any browser that uses the Gecko rendering engine (Firefox, Camino, ...) So I don't think there is anything buggy.. you just have to choose the correct user.agent value. -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: ie8 problem with gwt 2.4?
If Chrome-frame is not enabled on your page and you have it installed in your browser, you are most likely running into this issue http://code.google.com/p/google-web-toolkit/issues/detail?id=6665 On Sep 26, 10:23 am, Chi Hoang c...@chi.ca wrote: Based on your user-agent, it seems like you have chrome frame installed. GWT 2.4 added detection of chrome frame, and uses the safari user agent if it is installed and enabled. On Sep 26, 1:53 am, guillaume prime guillaume.pr...@gmail.com wrote: We can see the problem on the GWT Showcase : Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; chromeframe/14.0.835.186; .NET CLR 1.1.4322; InfoPath.1) Timestamp: Mon, 26 Sep 2011 07:52:05 UTC Message: Object doesn't support this property or method Line: 1532 Char: 127 Code: 0 URI:http://gwt.google.com/samples/Showcase/showcase/56292F4D7C74D54F38D6A... Why the user agent is Mozilla (compatible IE8) ? -- You received 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.
Deffered Binding failure when adding
I have a working project and tried to internationalize it. Added the Constants-Interface and one transcription file. After adding extend-property name=locale values=de/ to gwt.xml of my project i'm always getting Deferred binding failed for RateExchangeConstants'; expect subsequent failures. My code is herehttp://code.google.com/p/ratesexchange/source/browse/#svn%2Ftrunk%2Fratesexchange The interface is twice initialized within both ViewImpl files. -- 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/-/yY3T9nvm7gwJ. 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.
UIBinder, HTMLPanel, and style interactions
I'm noticing something weird. It is my first attempt at using HTMLPanel. The app is laid out with a DockLayoutPanel. The south panel is a footer panel and simply has a piece of text in it, which is always there. I want the text to be right justified with a bit of padding. g:HTMLPanel width=100% height=100% styleName=my-footer-panel- style div ui:msgSome Text Here/ui:msg /div /g:HTMLPanel The style, my-footer-panel, has a font, color, and padding. The padding doesn't appear to work. When I look at the page in Firebug I seem some strange things (see below). The style is in there (as a class), but the style attribute looks to be overriding the class with some inline styles. div style=position: absolute; overflow: hidden; left: 0px; right: 0px; bottom: 0px; height: 24px; div class=my-footer-panel-style style=height: 100%; width: 100%; position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; divSome Text Here/div /div /div Why does the DIV have both a class and a style? Where does the style come from (the DockLayoutPanel)? Mike -- You received 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: too much code: GWT Development with Activities and Places
I am personally happy with a strong gwt core, and that just keep getting better with each release. I couldn't agree more Gal. It is the bugs in the GWT core that I feel need to be strongly prioritized. That is where any development resources that Google assigns to GWT are most profitably deployed. My worry is that I see those valuable resources being applied to new high level architectural concepts which may or may not be useful to users, while nasty reported bugs remain for months or even years in the core functionality. A solid core is critical. John On Sep 26, 10:12 am, Gal Dolber gal.dol...@gmail.com wrote: I also agree, but I don't think google is responsable for improving the user framework on gwt. It is great that they put together uibinder, gwt-rpc, the editors framework and other goodies, but its your choice to use them or not. I am personally happy with a strong gwt core, and that just keep getting better with each release. On Sun, Sep 25, 2011 at 8:32 PM, camerojo jadcpub-goo...@yahoo.com.auwrote: I also agree - I hope the Google folk look at this. GWT is a wonderful concept, and we should all be very grateful for it, but some of the implementation is certainly over engineered. In particular I wish that more focus was given to fixing basic bugs (of which there are quite a few) rather than coming up with new high level architectural concepts. Of course all developers would prefer to be playing around with new concepts rather than fixing bugs in existing code, but production software demands that basic debugging must always take priority. -- You received 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. -- Guit: Elegant, beautiful, modular and *production ready* gwt applications. http://code.google.com/p/guit/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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.
Deferred locale selection/re-selection?
Hi, I need to write a multi-locale app that allows the user to change their locale at runtime. I would like to design the app so that I get the maximum benefits of GWT's deferred binding functionality with respect to locale. I must allow the user to log in to the app in one locale (say de-DE), and then later allow them to switch their locale setting to something else (say es-ES) without logging out. Ideally I would initially only load code and localization resources for the de-DE locale, and for most users that would be sufficient. Other users may wish to spontaneously change their locale, and at that point I would like to only load the code and localization resources for the new locale (es- ES or whatever). My problem is that the nocache.js script does its locale-specific code- swapping magic at boot time, and I would like to put that off until a bit later in the app. Can anyone recommend a strategy for achieving this design? Thanks in advance! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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: too much code: GWT Development with Activities and Places
Maybe you should have a look at this: http://code.google.com/p/mvp4g/ I have never used it, but it looks like a great alternative to reduce the amount of work. On Mon, Sep 26, 2011 at 6:14 AM, Aidan O'Kelly aida...@gmail.com wrote: On Sat, Sep 24, 2011 at 4:53 PM, Thomas Broyer t.bro...@gmail.com wrote: And BTW, MVP is a design pattern, and there's no one single way of implementing it (the MVP articles in the GWT doc makes it kind of clear). And the fact that Activities and Places (which people sometimes erroneously call MVP framework) are quite new makes it clear that it's not the way to build GWT apps: there must have been ways to do it before they're introduced! Point taken, the docs do make it very clear its a pattern and one way of implementing it, and that its best suited for large scale projects and why. Though reading through the User Guide, you could be forgiven for thinking 'This is the way I should go with my app!', especially if you decide to use UiBinder, as the Activity/Places MVP article uses it and is almost like a tutorial on building an app. I guess its just because the other tutorial in the User Guide, the Stock Watcher, doesn't use UiBinder, which is a very attractive feature to anyone new to GWT. Would be nice to have a chapter/tutorial on building a small/medium sized UiBinder based app that doesn't use MVP. -- You received 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. -- Felipe Martim -- You received 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: Edit an object in a List without a ListEditor
Thanks Thomas, I had no idea that interface existed. It works a charm now (although, now I'm considering from a design perspective whether this sort of manipulation should be done in the editor or the presenter but that's a philosophical problem :) ) -- You received 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: compile multiple modules commandline
in ant you have to add every module as a single arg value= / xml element and not all modules in one arg value=/ element. target name=gwtc java failonerror=true fork=true classname=com.google.gwt.dev.Compiler classpath ... /classpath arg value=com.company.module1 / arg value=com.company.module2 / /java /target On 26 Sep., 14:48, Fred pfiste...@gmail.com wrote: Hi Folks, I am trying to get ant to compile two modules (works fine with one) but I can't seem to figure out how to pass the gwt compiler two module names. As per documentation here: http://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebu... I can do something like java -cp gwt-dev.jar com.google.gwt.dev.Compiler com.bla.foo.Module1 ... but how would I append the second module name? neither of both of the following works: 1. java -cp gwt-dev.jar com.google.gwt.dev.Compiler com.bla.foo.Module1 com.bla.bar.Module2 2. java -cp gwt-dev.jar com.google.gwt.dev.Compiler {com.bla.foo.Module1,com.bla.bar.Module2} Thanks, Fred -- You received 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: Isn't the Activities and Places model violating the MVP pattern?
Thanks for the response. I shall have a look at those links later tonight. If you value theory and purity more than pragmatism and productivity, then yes, it probably violates the pattern, as it doesn't use the observer pattern. My concern is not that passing the presenter to the view is a bad thing per se, but that when doing so we can not say we have implemented the MVP pattern anymore, as in each design pattern the collaborators, their responsibilities, and the relationships between them are set in stone so that when I say that Foo is Singleton it is universally clear what Foo is. In other words, design patterns make it possible to communicate ideas clearly as long as they have a clear and universal definition. So maybe we should call this design pattern something else. However looks like there's not a clear definition of MVP available anyway, as for example in Dolphin Smalltalk it means something different to ASP.NET. Now back to passing the Presenter to the View, what methods of the presenter should be exposed to the view? Should the view still be ignorant about the model? or should we expose PresenterImpl.getContacts(): ArrayListContact to the view as well? -- You received 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.
Permutation, code splitting and deferred property
Hi, I got an issue with deferred property and code splitting. In my GWT configuration file, I have defined the following property: define-property name=myProperty values=value1,value2 / set-property name=myProperty value=value1 when-property-is name=user.agent value=gecko1_8 / /set-property set-property name=myProperty value=value1 none when-property-is name=user.agent value=gecko1_8 / /none /set-property and I have a generator with the following code that generates one implementation depending on this deferred property value: public String generate( TreeLogger logger, GeneratorContext context, String typeName ) throws UnableToCompleteException { String value = propertyOracle.getSelectionProperty( logger, myProperty ); if(value1.equals(value)){ return generateImpl1(); } else { return generateImpl2(); } } According to my settings for each browser, you can have only one value, ie for each permutation my generator should generate either Impl1 or Impl2 but not both. However in my soyc report, I noticed that for each browser/permutation, both implementations are generated. The issue I have is that my generator generates the same GWT.runAsync call for both implementation and since the 2 implementations are generated for each permutation (even if only one can be used for each permutation), GWT believes there are 2 split points and since it's the same code inside the 2 split points, all the code is added to the left fragment code. My question is how come my generator is called twice for each permutation? Since only one value is possible for each permutation shouldn't it be called only once? Am I doing something wrong in my configuration which could explain why my generator is called twice? Thanks for your help, Pierre -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: [gwt-contrib] Re: Multiple leftover fragments with a tree of code split points?
Alan Leung of the GWT team is working on a partial fix for this, called Automatic Fragment Merging, it merges together fragments automatically in order to reduce the size of leftovers while increasing the size of the exclusive fragments (which in many cases are too small and should be bigger). If code X is in fragment A and B, but not C and D, then if we merge A and B, X becomes exclusive. This means # of split points != # fragments, so you could have 30 split points, but only 15 fragments. On Sun, Sep 25, 2011 at 11:38 AM, John Patterson jdpatter...@gmail.comwrote: I am also hitting this problem with the left overs fragment and Lex suggestion does not seem to help. I have split points A and B which both use GWT-RPC and so all the RPC code gets moved into the left overs fragment which adds 30Kb to its size. I've created a new split point C, in front of A and B but the RPC code remains in the leftovers fragment - not in C as Lex seems to suggest it should. Problem is that split points D, E etc don't use RPC at all but still haee to download all that code. Every new split point a add (one for every html page) adds a bit more to the left overs fragment and I see no way to control this. Does anyone have suggestions how to limit the size of this growing leftovers? Is any fix in the works? Thanks, John -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Multiple leftover fragments with a tree of code split points?
On 26/09/2011 14:11, Ray Cromwell wrote: Alan Leung of the GWT team is working on a partial fix for this, called Automatic Fragment Merging, it merges together fragments automatically in order to reduce the size of leftovers while increasing the size of the exclusive fragments (which in many cases are too small and should be bigger). If code X is in fragment A and B, but not C and D, then if we merge A and B, X becomes exclusive. This means # of split points != # fragments, so you could have 30 split points, but only 15 fragments. Thanks very much Ray for the info. I have another approach to try - I may replace all RPC code with a Command executor and restrict access to it behind a runAsync() so all RPC code is in the single split point (and thus not in the left overs) The problem with using RPC directly is that the actual plumbing code is auto-generated so I can't restrict its access to behind a split point. Would this work: create all RPC services in a factory class that can only be instantiated behind a runAsync(). Perhaps I could also break other classes out into such split point factories such as Calendar widgets (large size also). Have you, or anyone else used such an architecture to reduce the left over fragment? Any better suggestions? Thanks, John -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Multiple leftover fragments with a tree of code split points?
Great ! It was one of my main concern when runAsync was released, there is a discussion on that topic on Lex's blog in 2009 http://blog.lexspoon.org/2009/09/exclusively-live-code.html?showComment=1254499021340#c6923160152357980710 Do you know how those specific split points will be highlighted in SOYC reports ? Thanx Sami On Mon, Sep 26, 2011 at 9:11 AM, Ray Cromwell cromwell...@google.comwrote: Alan Leung of the GWT team is working on a partial fix for this, called Automatic Fragment Merging, it merges together fragments automatically in order to reduce the size of leftovers while increasing the size of the exclusive fragments (which in many cases are too small and should be bigger). If code X is in fragment A and B, but not C and D, then if we merge A and B, X becomes exclusive. This means # of split points != # fragments, so you could have 30 split points, but only 15 fragments. On Sun, Sep 25, 2011 at 11:38 AM, John Patterson jdpatter...@gmail.comwrote: I am also hitting this problem with the left overs fragment and Lex suggestion does not seem to help. I have split points A and B which both use GWT-RPC and so all the RPC code gets moved into the left overs fragment which adds 30Kb to its size. I've created a new split point C, in front of A and B but the RPC code remains in the leftovers fragment - not in C as Lex seems to suggest it should. Problem is that split points D, E etc don't use RPC at all but still haee to download all that code. Every new split point a add (one for every html page) adds a bit more to the left overs fragment and I see no way to control this. Does anyone have suggestions how to limit the size of this growing leftovers? Is any fix in the works? Thanks, John -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r10672 committed - Rolling back 24166710. It's broken on IE7/WinXP....
Revision: 10672 Author: rdcas...@google.com Date: Mon Sep 26 13:26:56 2011 Log: Rolling back 24166710. It's broken on IE7/WinXP. Review by: rj...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=10672 Modified: /trunk/user/src/com/google/gwt/user/client/ui/PotentialElement.java /trunk/user/src/com/google/gwt/user/client/ui/RenderablePanel.java === --- /trunk/user/src/com/google/gwt/user/client/ui/PotentialElement.java Fri Sep 23 05:24:04 2011 +++ /trunk/user/src/com/google/gwt/user/client/ui/PotentialElement.java Mon Sep 26 13:26:56 2011 @@ -17,8 +17,6 @@ import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.dom.client.Element; -import com.google.gwt.dom.builder.shared.HtmlElementBuilder; -import com.google.gwt.dom.builder.shared.HtmlBuilderFactory; /** * EXPERIMENTAL and subject to change. Do not use this in production code. @@ -39,10 +37,6 @@ */ public class PotentialElement extends Element { - static { -declareShim(); - } - public static PotentialElement as(Element e) { assert isPotential(e); return (PotentialElement) e; @@ -64,34 +58,34 @@ * that is needed. */ public static native PotentialElement build(UIObject o, String tagName) /*-{ -var el = new $wnd.GwtPotentialElementShim(); -el.tagName = tagName; -el.__gwt_resolve = @com.google.gwt.user.client.ui.PotentialElement::buildResolveCallback(Lcom/google/gwt/user/client/ui/UIObject;)(o); -return @com.google.gwt.dom.client.Element::as(Lcom/google/gwt/core/client/JavaScriptObject;)(el); +return @com.google.gwt.dom.client.Element::as(Lcom/google/gwt/core/client/JavaScriptObject;)({ + className: '', + clientHeight: 0, + clientWidth: 0, + dir: '', + getAttribute: function(name, value) { +return this[name]; + }, + href: '', + id: '', + lang: '', + // should be @com.google.gwt.dom.client.Node.ELEMENT_MODE, but the compiler + // doesn't like that. + nodeType: 1, + removeAttribute: function(name, value) { +this[name] = undefined; + }, + setAttribute: function(name, value) { +this[name] = value; + }, + src: '', + style: {}, + tagName: tagName, + __gwt_resolve: @com.google.gwt.user.client.ui.PotentialElement::buildResolveCallback(Lcom/google/gwt/user/client/ui/UIObject;)(o), + title: '' +}); }-*/; - /** - * Creates an {@link HtmlElementBuilder} instance inheriting all attributes - * set for the given PotentialElement. - * - * @param potentialElement assumed to be a PotentialElement, used as basis for - * the builder - * @return a propertly configured {@link HtmlElementBuilder} instance - */ - public static HtmlElementBuilder createBuilderFor(Element potentialElement) { -PotentialElement el = PotentialElement.as(potentialElement); -HtmlElementBuilder builder = HtmlBuilderFactory.get().trustedCreate( -el.getTagName()); -el.mergeInto(builder); -return builder; - } - - /** - * Tests whether a given {@link JavaScriptObject} represents a PotentialElement. - * - * @param o the {@link JavaScriptObject} to be tested - * @return true if the given object is a PotentialElement instance - */ public static native boolean isPotential(JavaScriptObject o) /*-{ try { return (!!o) (!!o.__gwt_resolve); @@ -123,35 +117,6 @@ throw A PotentialElement cannot be resolved twice.; }-*/; - private static final native void declareShim() /*-{ -var shim = function() {}; -shim.prototype = { - className: '', - clientHeight: 0, - clientWidth: 0, - dir: '', - getAttribute: function(name, value) { -return this[name]; - }, - href: '', - id: '', - lang: '', - // should be @com.google.gwt.dom.client.Node.ELEMENT_MODE, but the compiler - // doesn't like that. - nodeType: 1, - removeAttribute: function(name, value) { -this[name] = undefined; - }, - setAttribute: function(name, value) { -this[name] = value; - }, - src: '', - style: {}, - title: '' -}; -$wnd.GwtPotentialElementShim = shim; - }-*/; - protected PotentialElement() { } @@ -159,53 +124,6 @@ this.__gwt_resolve = @com.google.gwt.user.client.ui.PotentialElement::buildResolveCallback(Lcom/google/gwt/user/client/ui/UIObject;)(resolver); }-*/; - /** - * Copy only the fields that have actually changed from the values in the shim - * prototype. Do this by severing the __proto__ link, allowing us to iterate - * only on the fields set in this specific instance. - */ - private native void mergeInto(HtmlElementBuilder builder) /*-{ -var savedProto = this.__proto__; -var tagName = this.tagName; -var gwtResolve = this.__gwt_resolve; -var className = this.className; - -