Re: TabPanel and Lazy load
On 4 February 2011 23:37, Greg Dougherty dougherty.greg...@mayo.edu wrote: I just looked at it and it seems like it's all still valid (you might want to see if you're willing to use TabLayoutPanels, rather than TabPanels, since the later are deprecated). What is it that you think doesn't work? I think the ListingPlaceHolder confused me. I mean, I try to do this example but in Eclipse this class is not show up pressing CTRL-Space. -- - - -- Csanyi Andras (Sayusi Ando) -- http://sayusi.hu -- http://facebook.com/andras.csanyi -- Trust in God and keep your gunpowder dry! - Cromwell -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Gin, SingleInstanceProvider?
Maybe this will clarify what I was looking for: http://codereview.appspot.com/4128063/ I implemented the SingleProvider, here is the test(FooBar isn't a singleton): public void testProviderInGinjector() { ProviderFooBar fooProvider = injector.getFooBarProvider(); assertNotSame(fooProvider.get(), fooProvider.get());// A Provider returns always new instances } public void testSingleProviderInGinjector() { SingleProviderFooBar fooSingleProvider = injector .getFooBarSingleProvider(); assertEquals(fooSingleProvider.get(), fooSingleProvider.get());// A SingleProvider returns always the same instance } On Thu, Feb 3, 2011 at 7:40 PM, Gal Dolber gal.dol...@gmail.com wrote: Thanks On Thu, Feb 3, 2011 at 7:02 PM, zixzigma zixzi...@gmail.com wrote: I am not sure if this helps, but there is a feature called Binding Annotations, you can use BindingAnnotation to differentiate the Provider used in Class A, from the one used in Class B. http://code.google.com/p/google-guice/wiki/BindingAnnotations -- You received 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.comgoogle-web-toolkit%2bunsubscr...@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/ -- 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.
Re: CellList with ListDataProvider does not get redrawn on data change
Same also with code based on AsyncDataProvider. Does anybody have a working example of updating CellTable from within callback? -- You received 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: Next GWT Designer release
We have spent a lot of time working on that and will continue to do so. Most of the time is spent in starting up the GWT dev mode environment that is used to create and render the widgets. We are exploring a number different strategies (caching and so on). In the past, we always used a customized, optimized version of GWT within GWT Designer to make it faster at the expense of always being 2-3 week behind a GWT release. A lot of effort has gone into making GWT Designer work directly with the unmodified latest version (or even the GWT trunk) and moving our custom optimizations into GWT itself (which has to be done very carefully). We are very aware of the GWT Designer startup issue and will continue to whittle away at it until it achieves a reasonable speed. -Eric On Feb 4, 6:11 am, cri chuck.irvine...@gmail.com wrote: With GWT Designer integration being a focus of the upcoming GWT/Plugin release, I hope some time will be (or has been) spent on speeding up the time it takes to bring up the GWT design window on a GUI class. I just takes a little too long I think. Just my two cents. It's a really great tool! -- You received 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.
CellTable with all rows and columns being of same Type: eg. Thumbnail Grid View
Hello Everyone, Let me start with a concrete example: Thumbnail Grid view ! we have custom cells (images + text), layed out in X column and Y rows. with CellTable, when we are Displaying List of Items for example Contacts, each Row represents a Contact, and each Column represents a Property of Contact: eg. Address, Name but for Thumbnail Grid View, row and columns are not conceptually equivalent to CellTable row and columns. because for Thumbnail Grid View, our unit of display is not row, it is cell. and we might repeat this cell in X number of columns and Y rows. do you know what is the correct way of implementing this with CellTable ? I was thinking of using a container class C to hold X number of items, and break my items into X chunks. in other words, every X items, becoming a new type C, and displaying this C type in a CellTable, instead of individual items. can you think of another way to implement this ? Thank You -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Gin, SingleInstanceProvider?
Here is a simple way to do what you want: public class LazyT { @Inject ProviderT provider; private T instance; public T get( ) { if (instance == null) { instance = provider.get(); } return instance; } } public class Main { @Inject LazyThing thingA; @Inject LazyThing thingB; Main() { } } And then this passes: Main main = ginjector.getMain(); assert(main.thingA.get() == main.thingA.get()); assert(main.thingA.get() != main.thingB.get()); I have tested it with Gin trunk, but it needs the fix mentioned by Thomas in: http://code.google.com/p/google-gin/issues/detail?id=136 (Cross-posted in the issue.) On Feb 5, 3:34 am, Gal Dolber gal.dol...@gmail.com wrote: Maybe this will clarify what I was looking for:http://codereview.appspot.com/4128063/ I implemented the SingleProvider, here is the test(FooBar isn't a singleton): public void testProviderInGinjector() { ProviderFooBar fooProvider = injector.getFooBarProvider(); assertNotSame(fooProvider.get(), fooProvider.get()); // A Provider returns always new instances } public void testSingleProviderInGinjector() { SingleProviderFooBar fooSingleProvider = injector .getFooBarSingleProvider(); assertEquals(fooSingleProvider.get(), fooSingleProvider.get()); // A SingleProvider returns always the same instance } On Thu, Feb 3, 2011 at 7:40 PM, Gal Dolber gal.dol...@gmail.com wrote: Thanks On Thu, Feb 3, 2011 at 7:02 PM, zixzigma zixzi...@gmail.com wrote: I am not sure if this helps, but there is a feature called Binding Annotations, you can use BindingAnnotation to differentiate the Provider used in Class A, from the one used in Class B. http://code.google.com/p/google-guice/wiki/BindingAnnotations -- You received 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.comgoogle-web-toolkit%2Bunsubs cr...@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/ -- 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.
Re: GWT with Hibernate and Oracle
Hi Néstor, Thank you for the response regarding the Hibernate with GWT. However I have followed the similar approach given in the below link http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html which suggets to use DTO approach to map the hibernate domain object to DTO and passed to the data to GWT layer. I have a query on the Local Database connectivity from GWT. Is it possible to make a JDBC call(using Oracle Thin Driver). I have tried a normal jdbc connection from GWT using classes12.jar file in classpath and using Class.forName(Oracle.jdbc.driver.OracleDriver). I have deployed on Google Apps server. I am getting the below error message while while running the application. -- java.net.Socket is a restricted class. Please see the Google App Engine developer's guide for more details. [ERROR] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.Long com.google.musicstore.client.MusicStoreService.saveAccount(com.google.music store.client.dto.AccountDTO)' threw an unexpected exception: java.lang.ExceptionInInitializerError at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java: 378) - Could you please suggest me of any good links or site which provides an approach to develope GWT aplications using local database. Thanks Dev On Jan 26, 5:20 pm, Néstor Boscán nesto...@gmail.com wrote: This is very tipical in Hibernate applications that have to serialize objects through the network be it GWT, Web Services, JSON, etc. Hibernate will leave his own POJO in your objects for lazy initialization purposes. When GWT or a Web Service tries to serialize the objects and opens the hibernate POJO it will throw LazyInitializationException because the connection is already closed. What I've done in my applications is to clean the POJO of any Hibernate references. This is done with a Hibernate Cleaner class. On the web there are a couple of examples of this. Regards, Néstor Boscán On Tue, Jan 25, 2011 at 2:33 PM, Debashish mr.debash...@gmail.com wrote: Hi I am trying for a sample using GWT and database layer as Hibernate with Oracle on Google Aps server. I have done a sample for Hibernate with JSP as presentation layer, which is working fine. But the same approach is not working with GWT. Here is a verygood link on this topic http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html and my approach is almost similar. I have followed the below approach, The RemoteServiceServlet makes a call to Hibernate layer and tries the initializes the SessionFactory as below, sessionFactory = new Configuration().configure().buildSessionFactory(); I have added the jars necessary for the Hibernate layer (and classes12.jar for oracle driver). However while running , it is giving me an error as below, ---- Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: java.net.Socket is a restricted class. Please see the Google App Engine developer's guide for more details. [ERROR] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.Long com.google.musicstore.client.MusicStoreService.saveAccount(com.google.musicstore.client.dto.AccountDTO)' threw an unexpected exception: java.lang.ExceptionInInitializerError at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java: 378) ---- I have one through some of the threads which suggested me to download the google apps jar files and try it. I have downladed it. but there is no proper direction on how to make use of which jar file. Have anybody tried the same. Please let me know if anything I am doing wrong. *** Note that I am using Oracle 9.2 as local database. Thanks Dev -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups
Re: GWT with Hibernate and Oracle
Hi I checked the link that you sent and this is will work of course but you will have to create a lot of DTO objects for your application and map the POJO objects from Hibernate to the DTO which will require a lot of coding. The example should work, your DTOs should be serialized, Now what I don't understand is that if you're using Hibernate why use JDBC directly?. You can get a Connection to your database from the Session object or create an a SQLQuery. From what I'm reading it looks like you're using java.net.Socket on the GWT Client side and this is not a valid class. Regards, Néstor Boscán On Sat, Feb 5, 2011 at 2:52 PM, Debashish mr.debash...@gmail.com wrote: Hi Néstor, Thank you for the response regarding the Hibernate with GWT. However I have followed the similar approach given in the below link http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html which suggets to use DTO approach to map the hibernate domain object to DTO and passed to the data to GWT layer. I have a query on the Local Database connectivity from GWT. Is it possible to make a JDBC call(using Oracle Thin Driver). I have tried a normal jdbc connection from GWT using classes12.jar file in classpath and using Class.forName(Oracle.jdbc.driver.OracleDriver). I have deployed on Google Apps server. I am getting the below error message while while running the application. -- java.net.Socket is a restricted class. Please see the Google App Engine developer's guide for more details. [ERROR] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.Long com.google.musicstore.client.MusicStoreService.saveAccount(com.google.music store.client.dto.AccountDTO)' threw an unexpected exception: java.lang.ExceptionInInitializerError at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java: 378) - Could you please suggest me of any good links or site which provides an approach to develope GWT aplications using local database. Thanks Dev On Jan 26, 5:20 pm, Néstor Boscán nesto...@gmail.com wrote: This is very tipical in Hibernate applications that have to serialize objects through the network be it GWT, Web Services, JSON, etc. Hibernate will leave his own POJO in your objects for lazy initialization purposes. When GWT or a Web Service tries to serialize the objects and opens the hibernate POJO it will throw LazyInitializationException because the connection is already closed. What I've done in my applications is to clean the POJO of any Hibernate references. This is done with a Hibernate Cleaner class. On the web there are a couple of examples of this. Regards, Néstor Boscán On Tue, Jan 25, 2011 at 2:33 PM, Debashish mr.debash...@gmail.com wrote: Hi I am trying for a sample using GWT and database layer as Hibernate with Oracle on Google Aps server. I have done a sample for Hibernate with JSP as presentation layer, which is working fine. But the same approach is not working with GWT. Here is a verygood link on this topic http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html and my approach is almost similar. I have followed the below approach, The RemoteServiceServlet makes a call to Hibernate layer and tries the initializes the SessionFactory as below, sessionFactory = new Configuration().configure().buildSessionFactory(); I have added the jars necessary for the Hibernate layer (and classes12.jar for oracle driver). However while running , it is giving me an error as below, ---- Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: java.net.Socket is a restricted class. Please see the Google App Engine developer's guide for more details. [ERROR] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.Long com.google.musicstore.client.MusicStoreService.saveAccount(com.google.musicstore.client.dto.AccountDTO)' threw an unexpected exception: java.lang.ExceptionInInitializerError at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java: 378) ---- I have one through some of the threads which suggested me to download the google apps jar files and try it. I have downladed it. but there
Re: CellTable with all rows and columns being of same Type: eg. Thumbnail Grid View
I think you want to use CellList and set float:left on each cell. That will cause it to layout in a grid, where each xy pair is a single row item, like in most thumbnail galleries. Thanks, John LaBanca jlaba...@google.com On Sat, Feb 5, 2011 at 12:51 PM, zixzigma zixzi...@gmail.com wrote: Hello Everyone, Let me start with a concrete example: Thumbnail Grid view ! we have custom cells (images + text), layed out in X column and Y rows. with CellTable, when we are Displaying List of Items for example Contacts, each Row represents a Contact, and each Column represents a Property of Contact: eg. Address, Name but for Thumbnail Grid View, row and columns are not conceptually equivalent to CellTable row and columns. because for Thumbnail Grid View, our unit of display is not row, it is cell. and we might repeat this cell in X number of columns and Y rows. do you know what is the correct way of implementing this with CellTable ? I was thinking of using a container class C to hold X number of items, and break my items into X chunks. in other words, every X items, becoming a new type C, and displaying this C type in a CellTable, instead of individual items. can you think of another way to implement this ? Thank You -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received 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: nothing visible in IE8 while it all looks good in FF and Chrome
have you set the doctype of the HTML page to standards mode? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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: nothing visible in IE8 while it all looks good in FF and Chrome
http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#Standards Oops forgot to include the link. Here ya go. -- You received 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.
Is it possible to convert ImageResource to ImageElement?
Hi there, I´m playing around with the new Canvas API in GWT 2.2. Great stuff! And I want to use a ClientBundle to get my Images for the Canvas, to use it as some kind of image preloader. But the ClientBundle is giving me ImageResource objects but I need ImageElement objects for the Canvas. This is the only way i figured out to add images on the canvas: ImageElement imgMap = Document.get().createImageElement(); imgMap.setSrc(some URL); contextMap.drawImage(imgMap, x, y); It doesn´t seem to be possible to add normal GWT Image objects to the canvas, or am I wrong? But I would like to use the ImageResource from the ClientBundle. Any ideas? Maybe I should try a different approach for an Image preloader? cheers, Michael -- You received 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 it possible to convert ImageResource to ImageElement?
Have you tried Image img = new Image(ClientBundle.getImageResource()); ImageElement.as(img.getElement()); Haven't tested this, but it is worth a try. -- You received 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 it possible to convert ImageResource to ImageElement?
Thank you for your quick response. At first I thougth it was going to work, but the Image does not appear on the canvas. I tried this (as you said): Image map = new Image(mapResources.map()); contextMap.drawImage(ImageElement.as(map.getElement()), x, y); On Feb 6, 2:47 am, Jeff Larsen larse...@gmail.com wrote: Have you tried Image img = new Image(ClientBundle.getImageResource()); ImageElement.as(img.getElement()); Haven't tested this, but it is worth a try. -- You received 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.
RPC stubbing
Hi All, i'm wondering if there is a way of a clean way of stubbing an RPC implementation: Given this setup: 1) A project with GWT production code and a RPC implementation. 2) A Concrete Server Test implementation in a separate project. Is there a way of doing so? How to use this in eclipse? Thx. -- You received 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.
SSH + RMI in GWT
I'm working on an application using GWT 2 that needs to ssh to a remote server, retrive a directory listing and show the contents of any zip files. Then allow the user to pick a file and load the contents into a database. I'm trying to use a combination of SSH and RMI to do this. I'm concerned that some of the SSH and RMI calls won't compile or be compatible with GWT. I'm open to suggestions on a different or better way to accomplish this. I'm using the com.jcraft.jsch SSH library. I'm using RMI to get the zipfile contents, I tried use an InputStream to read the zip file contents but it was very slow. -- You received 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.
Help with Google Plugin For Eclipse setup
Hello, I'm not sure if this is the place to post this...apologies, if there is another venue... I just downloaded and reinstalled Eclipse 3.6 and the Google Plugin for Eclipse (http://marketplace.eclipse.org/content/google-plugin- eclipse) I keep getting two errors, I. Error1: when trying to create a new Web Application Project: Caused by: org.eclipse.core.internal.resources.ResourceException: A resource exists with a different case: [projectname]/war/web-inf For example, if I try to create a project, called 'test' : Java Model Exception: Core Exception [code 275] A resource exists with a different case: '/test/war/web-inf'. at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java: 50) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java: 728) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java: 1975) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4777) at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java: 106) at org.eclipse.jface.operation.ModalContext $ModalContextThread.run(ModalContext.java:121) Caused by: org.eclipse.core.internal.resources.ResourceException: A resource exists with a different case: '/test/war/web-inf'. at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java: 314) at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java: 292) at org.eclipse.core.internal.resources.Folder.assertCreateRequirements(Folder.java: 30) at org.eclipse.core.internal.resources.Folder.create(Folder.java:95) at org.eclipse.core.internal.resources.Folder.create(Folder.java:125) at com.google.gdt.eclipse.core.ResourceUtils.createFolderIfNonExistent(ResourceUtils.java: 233) at com.google.gdt.eclipse.core.ResourceUtils.createFolderStructure(ResourceUtils.java: 252) at com.google.gdt.eclipse.suite.wizards.WebAppProjectCreator.createFiles(WebAppProjectCreator.java: 379) at com.google.gdt.eclipse.suite.wizards.WebAppProjectCreator.create(WebAppProjectCreator.java: 321) at com.google.gdt.eclipse.suite.wizards.NewWebAppProjectWizard.finishPage(NewWebAppProjectWizard.java: 147) at org.eclipse.jdt.internal.ui.wizards.NewElementWizard $2.run(NewElementWizard.java:117) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java: 39) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java: 728) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java: 1975) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4777) at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java: 106) at org.eclipse.jface.operation.ModalContext $ModalContextThread.run(ModalContext.java:121) I also keep getting a error Invocation of com.google.gwt.user.tools.WebAppCreator failed Java Model Exception: Core Exception [code 0] Invocation of com.google.gwt.user.tools.WebAppCreator failed. See the error log for more details. at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java: 50) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java: 728) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java: 1975) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4777) at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java: 106) at org.eclipse.jface.operation.ModalContext $ModalContextThread.run(ModalContext.java:121) Caused by: org.eclipse.core.runtime.CoreException: Invocation of com.google.gwt.user.tools.WebAppCreator failed. See the error log for more details. at com.google.gwt.eclipse.core.runtime.tools.WebAppProjectCreatorRunner.createProject(WebAppProjectCreatorRunner.java: 53) at com.google.gdt.eclipse.suite.wizards.WebAppProjectCreator.createGWTProject(WebAppProjectCreator.java: 532) at com.google.gdt.eclipse.suite.wizards.WebAppProjectCreator.create(WebAppProjectCreator.java: 294) at com.google.gdt.eclipse.suite.wizards.NewWebAppProjectWizard.finishPage(NewWebAppProjectWizard.java: 147) at org.eclipse.jdt.internal.ui.wizards.NewElementWizard $2.run(NewElementWizard.java:117) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java: 39) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java: 728) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java: 1975) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4777) at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java: 106) at org.eclipse.jface.operation.ModalContext
send post message a PHP solved
this is a class example how to receive $_POST params in PHP, in this case, just one param, but is extensible using json objects this is a usage example: RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, ../ test.php); RequestFormData.PrepareRequestFormData(builder, jsonData, json.toString()); extra init builder.send(); this is how to read data in PHP: $_POST['jsonData'] this is the class: static class RequestFormData { static public void PrepareRequestFormData(RequestBuilder rb, String variableName, String contents) { String boundary = MakeBoundary(variableName, contents); rb.setHeader(Content-Type, multipart/form-data; boundary=.concat(boundary)); rb.setHeader(Content-Length, String.valueOf(ComputeContentLenght(boundary, variableName, contents))); rb.setRequestData(getRequestData(boundary, variableName, contents)); } static private String getRequestData(String boundary, String vn, String c) { String r; r = --; r += boundary; r += \r\n; r += Content-Disposition: form-data; name=\; r += vn; r += \\r\n\r\n; r += c; r += \r\n--; r += boundary; r += --\r\n; return r; } static private int ComputeContentLenght(String boundary, String vn, String c) { /* header: --boundary\r\n 4 bytes + strlen(boundary) Content-Disposition: form-data; name=variableName\r\n 41 + strlen(variableName) \r\n 2 bytes contents\r\n 2 + sizeof(contents) --boundary--\r\n 6 + strlen(boundary) */ return 55 + 2 * boundary.length() + c.length() + vn.length(); } static private String MakeBoundary(String vn, String c) { int i; String boundary = Xd2Zy5fb; do { i = c.indexOf(boundary); if(i -1) { char x; x = c.charAt(i + boundary.length()); boundary += (x + 1); } } while(i -1); do { i = vn.indexOf(boundary); if(i -1) { char x; x = vn.charAt(i + boundary.length()); boundary += (x + 1); } } while(i -1); return boundary; } } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to Display a Loading message when transitioning between Activities and Places ?
I solved this way: 1) i hard code a DIV (id=wait_glass1) in my html, and set this style for it: style=position: absolute; visibility:visible; top: 0px; left: 0px; width: 100%; height: 100%; background-color:#00; filter: Alpha(Opacity=50); opacity: 0.5;. 2) hardcode a second DIV (id=wait_glass2) with style=position:absolute; left:0px; top:0px; width:100%; height: 100%;, this DIV contents my loading, please wait message I hardcode both DIV's in html because them are showed inmediatly, before GWT loads 3) surround your delayed code this way (for example): public void onModuleLoad() { // force image preload Image.prefetch(img/carro.gif); Image.prefetch(img/centro.gif); Image.prefetch(img/der.gif); Image.prefetch(img/izq.gif); GWT.runAsync(new RunAsyncCallback() { @Override public void onSuccess() { code to be executed delayed .. RootPanel.get(wait_glass1).getElement().getStyle().setVisibility(Visibility.HIDDEN); RootPanel.get(wait_glass2).getElement().getStyle().setVisibility(Visibility.HIDDEN); } public void onFailure(Throwable reason) { Window.alert(error loading program); } }); } this code shows wait_glass1 and wait_glass2 during download, and hides them after all delayed code is downloaded and executed, and after all your images are downloaded On 1 feb, 01:40, zixzigma zixzi...@gmail.com wrote: it is a common practice to display a Loading message/icon when we have an operation that possibly would take some time to complete. for example when retrieving data from Datastore, etc. I was wondering how we can do the same for Activities/Places. in GWT MVP, when navigating from one place to another, an activity stops and another one gets started, however at times there is a slight delay in between. do you have any suggestions on how we can display a Loading message, when transitioning between Activity/Places ? Thank You -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
[gwt-contrib] Introduces SkipInterfaceValidation annotation. (issue1338807)
Reviewers: bobv, rjrjr, Message: I initially thought about skipping validation of the ProxyFor/ProxyForName/Service/ServiceName if the class is annotated (i.e. don't poison the RFIV, or fail in the RequestFactoryGenerator, if the ProxyFor/etc. annotation is absent), and allowing the annotation at the class level as a shortcut to annotating each and every method; but I don't think it's necessary: it's a very advanced feature, so you have to pay a bit for using it (and for the ProxyFor/etc. annotations, I simply do no longer think it's a good idea to bypass the check; my initial use case was using a naming convention outside the contexts/proxies, see http://code.google.com/p/google-web-toolkit/issues/detail?id=5761 ) We're doing two kind of things where this feature would help: 1. we need to wrap our domain objects before passing them to the service's domain method, which means the argument types don't match what RFIV expects (i.e. WrapperDomain instead of Domain); the use case is: we have embedded objects that we need to expose as EntityProxy-s; the domain object has no reference to its owner entity, so we have to use a wrapper object to pair the entity and the embedded objects (and the path from the entity to the embedded so the synthesized ID has enough information to let us implement Locator#find. 2. we add synthetic property methods to our proxies that don't match any method in the domain object. The use case is described at https://groups.google.com/d/topic/google-web-toolkit-contributors/G-O4tFXD3U4/discussion . I forgot to mention another usage of those synthetic, lazy-load, methods: when the reference is in a sub-object and we use an RFED; without them, we would have to retrieve the referenced entities before we edit() or display() the parent object, and give the mapping between the IDs (that we have in our domain objects) and the objects previously retrieved (remember, via a second HTTP request!). When you have a complex graph with several such references scatter all over, it can become very complex; much more than those synthetic methods. Don't hesitate to ask if you want more info, or even source code. We're currently bypassing the whole ResolverServiceLayer to skip the RequestFactoryInterfaceValidator (but then resolveClientType is a bit difficult to implement). With this patch, we would annotate our synthetic property methods or otherwise rewritten (signature-wise) service methods and fully benefit from the ResolverServiceLayer. Description: Introduces SkipInterfaceValidation annotation (I'm not too found of the name, it could be named @Synthetic for example). When a service method or property method in a context/proxy is annotated, the RequestFactoryInterfaceValidator (RFIV) won't be poisonned if it cannot find a compatible method in the domain object. This patch also fixes tests, that can fail for bad reasons (Domain mapped as EntityProxy but missing getId/getVersion/findDomain, and that's not what's being tested) and remove the proxyFor property in EntityProxyModel because it's not used anywhere. Please review this at http://gwt-code-reviews.appspot.com/1338807/show Affected files: M user/src/com/google/gwt/requestfactory/rebind/model/EntityProxyModel.java M user/src/com/google/gwt/requestfactory/server/RequestFactoryInterfaceValidator.java A user/src/com/google/gwt/requestfactory/shared/SkipInterfaceValidation.java M user/test/com/google/gwt/requestfactory/server/RequestFactoryInterfaceValidatorTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors