New article on using Cell Widgets for every day GWT development
http://lithosphere.lithium.com/t5/tech-blog/Lithium-Engineering-Using-Cell-Widgets-for-every-day-GWT/ba-p/117929 Google Web Toolkit provides Cell Widgets as a way to write web pages that render large volumes of data quickly. This is a primer on using Cell Widgets for everything, not just when there is lots of data. The payoff is a faster app that is often easier to write. If you have any questions or suggestions for improvement I'd love to hear it. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Blog article on using Canvas and GWT to create a client side image crop tool
I created this article because I couldn't find a similar article when I built the solution: http://lithosphere.lithium.com/t5/tech-blog/Lithium-Engineering-Using-GWT-and-HTML-5-Canvas-for-online/ba-p/100833 Full code is provided for anyone that wants to play around with the solution. -Dave -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: [POLL] Maven project layout, what to standardize?
I think a major goal should be to cooperate with other container plugins, specifically Jetty. I've been struggling with getting the Jetty plugin to fully cooperate w/ the gwt plugin and am astounded at how hard it is to: 1. Get my server code to be updated without a server restart (if the compiled code goes in WEB-INF/classes, just bouncing the webapp is enough. 2. Running in dev mode w/o having to do a compile to get the code in the right place in the exploded src/main/webapp directory 3. Start the jetty container w/ also doing a gwt compile (it should just compile the server side code) I'd like to see an option in the GWT plugin where it runs much like it does with the GWT embedded jetty but with the jetty maven plugin instead. Why do I want the jetty plugin instead of the embedded jetty: 1. I get a later version of Jetty 2. I can customize Jetty more easily (authentication, jdbc, etc) 3. I can control the startup of Jetty more easily 4. I can use the same mvn to run and control a production version of Jetty On Tuesday, November 13, 2012 6:51:37 AM UTC-6, Thomas Broyer wrote: Hi all, As some of view may already know, I'm porting GWT to use Maven as the build system (instead of Ant). I'm also about to reboot GWT+Maven integration (more to come by the end of the week, stay tuned). As part of this effort, I'm wondering which project structure to use as the default, standard layout for GWT projects using Maven? I'm particularly looking for advice/preferences for GWT library projects (such as GWT itself, mgwt, Errai, GXT, etc.), not much for GWT applications (the one you run the GWT Compiler on). NOTE: this poll is cross-posted to the GWT and gwt-maven-plugin groups, please answer only once! (wherever you want) The question is about where to put files such as: GWT module descriptors (*.gwt.xml), GWT processed resources (*.ui.xml, etc.), and super-sources. It comes without saying (for me at least) that Java sources would go into src/main/java and public resources (i.e. the things within **/public/**, e.g. the CSS and image files from the themes) into src/main/resources, so the everything below only refers to those other files listed above. Remember I'm only interested in defining the standard layout for GWT * libraries*, and please think about them as *GWT-only* libraries, not the kind with server-side and client/server-shared code! Note that in any case, src/main/java is also added as a resource folder (packaged within the JAR) Here are the alternatives I thought about: 1. everything in src/main/java super-sources in src/main/resources 2. everything in src/main/resources 3. everything in src/main/resources super-sources in src/main/super (or gwt-super, or some other name, let's discuss that later as I suspect it's a bikeshed) When casting your vote, do not hesitate to explain *why* you prefer that particular layout over the others, or why you don't like one of the proposed layouts. Also feel free to propose a fourth alternative. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Eclipse compile not generating i18n properties file
Has anyone solved this? It's not working for me either. Here's my class: package dparish.client.view.impl; import com.google.gwt.i18n.client.Messages; import com.google.gwt.i18n.client.LocalizableResource.Generate; import com.google.gwt.i18n.client.LocalizableResource.GenerateKeys; @Generate(format=com.google.gwt.i18n.server.PropertyCatalogFactory) @GenerateKeys public interface StudentMessages extends Messages { public String saveError(); @DefaultMessage(There are {0} students) @AlternateMessage({one, There is one student}) public String studentCount(@PluralCount int studentCount); } No files are created during the GWT compile. I suspect the problem relates to this note in the docs: Requests that a message catalog file is generated during the compilation process. If the filename is not supplied, a default name based on the interface name is used. The output file is created under the -out directory. There is no -out for the GWT compiler. There IS for i18nCreator, but that command is listed for creating .java files from property files, not the other way around as @Generate seems to claim it will do. On Monday, January 11, 2010 3:46:17 PM UTC-6, Todd Vierling wrote: On Jan 1, 11:01 am, Todd Vierling t...@duh.org wrote: I'm trying to get the GWT compile phase to spit out a template properties file that I can hand to translators to make it easy to do translation work. Is there some way I should attempt to invoke the GWT compiler by hand to try this a different way? What I'm hoping to get out of this is similar to what xgettext does: provide a template file where the constants are initially equal to the @Default* values -- and if possible, comments generated from @Meaning or @Description annotations as an aid to the translators. They could then return translated versions to me, which I would simply check in to source control alongside the default-locale versions, and never have to deal with the Java code in-between. Maybe I'm missing the point of @Generate here, but I'm not exactly sure what it's supposed to do otherwise. :( Any insight on this? The GWT compile phase says it's generating a properties file, but there's none to be found -- 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/-/cPgh1GirOhQJ. 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: Eclipse compile not generating i18n properties file
I should note that I am using the -extra compiler flag and it IS generating the property files for UiBinder messages. I also tried changing the classname for the format to: format=com.google.gwt.i18n.rebind.format.PropertiesFormat but that did not help. Interestingly changing it to: @Generate(format=fudge) Didn't throw an error so best as I can tell, my interface or the annotation isn't even being seen!! -- 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/-/dOSCZJp5Ti4J. 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: Eclipse compile not generating i18n properties file
I figured it out. I had created the messages file but hadn't started using it in the app at all. The compiler must not scan for all interfaces with that annotation, but instead for all classes IN USE by the app with those annotations. -- 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/-/BAQAs2vGiu4J. 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: MVP framework
Thomas, I'm working on restructuring AppActivityMapper so that I inject in the Activities. My reasoning for the static injector was it kept me from having gigantic constructor arguments. If AppActivityMapper has 30 activities, that's alot of constructor arguments. MyApp.getInjector().getActivityFoo() seemed like a very clean way to get around that. I get that it breaks injection though. I could pass in the injector but I suspect that's bad form as well ;) I could have injected fields, but that's pretty heavily frowned upon, but it sure makes for more readable code. Any options? How about a Provider that can provide mutliple classes. Something like ProviderActivity parentProvider that could return child classes? From reading the Guice docs that doesn't seem it would work. -- 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/-/sgjxUSjgn5cJ. 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: MVP framework
Great tips. I'll take a look at each points. If I find I have a reason not to implement one of the comments I'll let you know. -- 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/-/OUO1rNgoa04J. 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 complexity (Frozen Beans et. all)
I really want to like RequestFactory, really I do, but I'm astounded by the complexity. I finally got my head around the Locator, the proxies, etc and now I'm getting Frozen beans and edited by another RequestContext errors. I took a look at: http://fascynacja.wordpress.com/tag/autobean-has-been-frozen/ and this helped alot, but I'm astounded that my code has to trap for all this stuff. 1. Does anyone know if the GWT is going to change so that this state doesn't have to be managed? 2. Anyone have any helper classes that can trap for this stuff? 3. Any best practices? All I want to do is: 1. Edit a previously loaded entity 2. Create a new entity and save it I must be making this harder than it actually is or else very few folks use this successfully. -- You received 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: MVP framework
I recently finished an example app with MVP, Activities and Places, Gin and Guice, Request Factory and a few other GWT components. Feel free to grab the source and see if it gets you started. http://code.google.com/p/gwt-best-practices-soup/ -- 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/-/JbAh6_oO8zUJ. 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.
Custom widget with custom UiBinder markup
I have a widget that would benefit from custom UiBinder markup (like DockLayoutPanel) I've looked through the docs, the source and the web and not found an example of how this is implemented. Has anyone done this? I'm looking to do something like this custom:mywidget ui:field=widget left!-your widget/left right!- your widget/right left!-your widget/left right!- your widget/right left!-your widget/left right!- your widget/right !- your widget!- your widget!- your widget /custom:mywidget -- You received 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 widget with custom UiBinder markup
That will work. I'd still prefer to use descriptive xml like DocLayoutPanel. From what I see of @UiChild it just enforces the types of children it does not allow for quite what I was looking for. (but probably good enough) -Dave On Feb 3, 8:09 am, Jens jens.nehlme...@gmail.com wrote: You can use @UiChild, see: http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/googl... -- 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: Custom widget with custom UiBinder markup
I take that back. UiChild should do it perfect. Good example here: http://stackoverflow.com/questions/8375480/gwt-custom-widget-with-child-elements-configuration-in-uibinder-like-custombutt On Feb 3, 8:09 am, Jens jens.nehlme...@gmail.com wrote: You can use @UiChild, see: http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/googl... -- 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.
Acivities and Places - passing by reference
I'm refactoring a MVP app I have that currently uses Events and an AppController to handle navigation transitions. Activities and Places appear to only pass state via tokens, not by passing by reference. is there another way? A use case may help here: Think of two screens, A Student List screen and an Add Edit Student screen. Without places using events, clicking on a Student in Student List fires off an event CONTAINING the student, so when the Add Edit Student view picks it up, it already knows about the student. With Places when you click on a student in student list, the PlaceManager gives you a place and an id for that student. The Add Edit Student Actiivity has to look up the student based off the passed in id. This seems like a major design drawback. What I was expecting was some method to pass the object. In the case where someone navigates straight to: #AddEditStudentPlace:2 I would expect my code to handle the fact that it does not have a passed in student and in THAT case, fetch it from the server. If you've already clicked on the Student in a list view, it's insane to look it up again. That's about as un GWT as you can get. Yes I could put it in a app cache, but that's a hack and introduces client side memory issues. There must be some way to handle this that keeps the model simple. The only thing I can think of is putting my events back in on top of places, but what good is that?? If I do that, why even use Places? -- You received 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: Acivities and Places - passing by reference
SWEET. That was exactly it. I added a setStudent and getStudent to StudentAddEditPlace In my activity mapper I get the activity for the place, then set the student into the activity that I get from the place. Subtle but obvious now that I see it. Thank you very much. -Dave On Feb 2, 2:44 pm, John99 smy...@gmail.com wrote: you need to put your student into EditStudentPlace and initialize new EditStudentActivity with it in ActivityMapper -- You received 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: The RequestFactory ValidationTool must be run for the RequestFactory type
I had the same problem. There are two other possible reasons you see this: 1. Your java compliance level in the project is set to 1.5 2. Your classes are already compiled. I don't know why, but touching the my RequestContext classes had NO affect until I deleted the classes that were compiled before I added annotations. Now it all works just fine. Attention Google: This stuff is w tooo complicated. I'm good. really I am, but this is just misdirection at it's worst. On Nov 20, 5:47 pm, oerten25 ozgur.er...@gmail.com wrote: I've been getting the same error and tried the things mentioned in the discussion without any luck. Finally i realised that i don't have the apt_generated folder. So i changed the generated source directory option to something other than apt_generated in Annotation Processing setting. That fixed it. On Oct 2, 11:29 pm, TULC evan.a.te...@gmail.com wrote: I just get the sameerroras posted by Eric at the beginning of the thread, but I have copied/pasted the full dump below. Thomas, I'm not sure what you mean about the .apt_generated being in my build path? Thanks for the help, guys... Evan Console: log4j:WARN No appenders could be found for logger (org.apache.jasper.compiler.Js pRuntimeContext). log4j:WARN Please initialize the log4j system properly. log4j:WARN Seehttp://logging.apache.org/log4j/1.2/faq.html#noconfig for more in fo. 03/10/2011 8:24:49 AM com.google.web.bindery.requestfactory.server.RequestFactor yServlet doPost SEVERE: Unexpectederror java.lang.RuntimeException: TheRequestFactoryValidationToolmustberunfor th e com.google.gwt.sample.dynatablerf.shared.DynaTableRequestFactory RequestFactor y type at com.google.web.bindery.requestfactory.vm.impl.Deobfuscator $Builder.load(Deob fuscator.java:59) at com.google.web.bindery.requestfactory.server.ResolverServiceLayer.updateDeo b fuscator(ResolverServiceLayer.java:43) at com.google.web.bindery.requestfactory.server.ResolverServiceLayer.resolveRe q uestFactory(ResolverServiceLayer.java:176) at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveR e questFactory(ServiceLayerDecorator.java:172) at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveR e questFactory(ServiceLayerDecorator.java:172) at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveR e questFactory(ServiceLayerDecorator.java:172) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l .java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.web.bindery.requestfactory.server.ServiceLayerCache.getOrCache(S e rviceLayerCache.java:233) at com.google.web.bindery.requestfactory.server.ServiceLayerCache.resolveReque s tFactory(ServiceLayerCache.java:198) at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process ( SimpleRequestProcessor.java:207) at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process ( SimpleRequestProcessor.java:127) at com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(R e questFactoryServlet.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler .java:1097) at com.google.gwt.sample.dynatablerf.server.SchoolCalendarService.doFilter(Sch o olCalendarService.java:89) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler .java:1088) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java: 49 ) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
com.google.web.bindery.requestfactory.shared.RequestContext; did you forget to inherit a required module?
I'm trying to use RequestFactory in GWT 2.3. I noticed that the original RequestFactory has been depricated in favor of: com.google.web.bindery.requestfactory.shared.RequestContext My problem is that when I try to run my app I get: [ERROR] [retain] - Line 10: No source code is available for type com.google.web.bindery.requestfactory.shared.RequestContext; did you forget to inherit a required module? I noticed that the GWT RequestFactory docs aren't very good. For instance they neglect to mention adding the servlet to web.xml. I tried adding the above RequestContext as a module but that didn't work either. Anyone know what I'm missing? -Dave -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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: com.google.web.bindery.requestfactory.shared.RequestContext; did you forget to inherit a required module?
Thanks. After I posted I cracked open gwt-user.jar and found it. I needed to add the following to my gwt project xml file: inherits name='com.google.web.bindery.requestfactory.RequestFactory'/ The coding docs for this stuff is pretty good but the setup / config is terrible. If they expect you to use Spring Roo they should doc that. On Jun 11, 11:47 am, Y2i yur...@gmail.com wrote: The new one is in com.google.web.bindery.requestfactory.RequestFactory module -- You received 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.
2.3 local storage api and client side gwt objects
I have a client side entity object (let's call it person) and I want to store it locally. It looks like the current 2.3 local storage api only stores Strings with a String key. Is there a way to get the json of an object (or any common understood string representation) so I can store it? something like myPerson.toJavascriptString(); Obviously that's not a real method, I'm looking for a way to simply and quickly serialize and deserialize my gwt generated java (really javascript) objects to and from a string so I can store the fully realized object in local storage. -Dave -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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.
Custom widget is blocking all events.
I've got a simple custom widget designed to display two column data. Any widgets I put in this custom widget can't fire events. I've tried even the simplest Button and it fails. Is there something about the nature of my widget that is keeping events from widgets it contains from firing? public class LabeledValueWidget extends Composite { private String caption; private MapWidget, Widget items = null; private CaptionPanel container = new CaptionPanel(); private Style style; static boolean isInjected = false; public LabeledValueWidget () { this.initWidget(container); } public void setItems (MapWidget, Widget items) { this.items = items; } @Override public void setStyleName (String styleName) { super.setStyleName(styleName); } @Override public void addStyleName (String styleName) { super.addStyleName(styleName); } public void setCaption (String caption) { this.caption = caption; } public void render() { style = LabeledValueWidgetResource.INSTANCE.style(); if (!isInjected) { isInjected = style.ensureInjected(); } container.setCaptionText(caption); Element dl = DOM.createElement(dl); writeDefinitions (dl); container.getElement().appendChild(dl); } public LabeledValueWidget (MapWidget,Widget items, String caption) { this.initWidget(container); this.items = items; render(); } private void writeDefinitions (Element dl) { for (Widget key: items.keySet()) { Element dt = DOM.createElement(dt); dt.addClassName(style.label()); dl.appendChild(dt); Element label = DOM.createElement(label); dt.appendChild(label); label.appendChild(key.getElement()); Element dd = DOM.createElement(dd); dd.addClassName(style.value()); dl.appendChild(dd); dd.appendChild(items.get(key).getElement()); } } When I instantiate this and call setItems and pass it a map with Label, Button and I've defined the button to have a click handler. The click handler never gets fired ;( -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
2.1 RequestFactory design frustrations
I'm switching some of my work from RPC to RequestFactory. I'm doing this because I use open jpa on the backend and keep having to hack through serialization problems (such as proxy objects that won't serialize). RequestFactory seems like the perfect option. I'm caught off guard by some GWT design decisions that make it difficult and make me need to re-tool quite a few Entities. I have to have my data access methods in my entity class (findEmployee for instance). I've always felt the entity was just that.. a stand alone entity, not the actions for that entity. I keep finders and other things in a DataHandler. Yes I can still create a findEmployee method and put the work in EmployeeHandler, but it just seems un- necessary. Most of my work is primitive types. For instance, I need to change public int getId() to public Integer getId(). It's interface spaghetti. I though annotations were designed to help us get rid of not just xml files, but interfaces of interfaces that point to other interfaces The interfaces don't enforce compile time correctness. EntityProxies should show errors in Eclipse if the methods don't match the Entity methods.The request service stub should let me know in my IDE that I've got a method that's not implemented in the Entity. I'm sure I'll get this to all work and that in the end it will solve my serialization problems and perform very well. Perhaps the GWT team can write some Eclipse wizards (such as the UIHandler wizard) that will at least streamline the interface mess. Point it at the entity and let all the interfaces get generated. Change the entity and the intefaces show errors and you can correct them (as you can now with RPC if your service interface doesn't match your async and server side impl classes). -Dave -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: OpenJPA GWT serialization problem.
I tried using em.clear(). I did this after loading and accessing my object. I also changed my fetch type to EAGER. Sadly it still fails ; ( -Dave On Nov 9, 6:59 am, dparish dpar...@gmail.com wrote: Thanks David. I tried LAZY and EAGER. Both caused the problem. For #2, that seems promising. There's an EntityManager clear method, but that would affect all threads using the entity manager. Any thoughts on how to do that detach? On Nov 8, 8:20 pm, David Chandler drfibona...@google.com wrote: Hi dparish, There are three issues here: 1. GWT needs a fully populated object graph to send back to the client. Lazy fetching will not work across the client / server boundary, so you must ensure that your code fetches all relations eagerly (via an annotation or a separate call if needed). 2. JDO and JPA implementations use proxy classes for objects attached to a persistence manager. Before they can be sent back to the client, you must detach all objects from the PM. 3. Even then, GWT won't be able to serialize any types for which it doesn't know the source (like App Engine's Key class). The open source Gilead project and others like Objectify provide GWT wrappers for these. HTH, /dmc On Mon, Nov 8, 2010 at 8:17 PM, dparish dpar...@gmail.com wrote: I have an entity with a member like this: @Entity public class Foo implements Serializable{ �...@onetomany(mappedBy=foo,targetEntity=InternalText.class, fetch=FetchType.EAGER) // I tried Lazy too. private ArrayListInternalTextinternalTextEntries; When I try to use Foo I get this error: Throwable occurred: com.google.gwt.user.client.rpc.SerializationException: Type 'org.apache.openjpa.util.java$util$ArrayList$proxy' 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 = [blah.blah.entities.internalt...@36ae36ae, blah.bhla.entities.internalt...@3fca3fca, blah.blah.retain.entities.internalt...@42474247, blah.blah.entities.internalt...@48724872] at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali ze(ServerSerializationStreamWriter.java: 610) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write Object(AbstractSerializationStreamWriter.java: 129) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter $ValueWriter$8.write(ServerSerializationStreamWriter.java:152) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali zeValue(ServerSerializationStreamWriter.java: 534) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali zeClass(ServerSerializationStreamWriter.java: 700) From what I can tell openjpa is creating a helper representation of ArrayList that it uses to assist in monitoring and lazy loading the child table. I've tried eager and lazy fetching. I tried this: ArrayListInternalText newText = new ArrayListInternalText(); for (InternalText textItem: foo.getInternalTextEntries()) { newText.add(textItem); } foo.setInternalTextEntries(newText); It got past my error, but then the next layer down had trouble (Date in the InternalText class) Type 'org.apache.openjpa.util.java$util$Date$proxy' was not included in the set of types which can be serialized by this SerializationPolicy -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- David Chandler Developer Programs Engineer, Google Web Toolkithttp://googlewebtoolkit.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: OpenJPA GWT serialization problem.
Thanks David. I tried LAZY and EAGER. Both caused the problem. For #2, that seems promising. There's an EntityManager clear method, but that would affect all threads using the entity manager. Any thoughts on how to do that detach? On Nov 8, 8:20 pm, David Chandler drfibona...@google.com wrote: Hi dparish, There are three issues here: 1. GWT needs a fully populated object graph to send back to the client. Lazy fetching will not work across the client / server boundary, so you must ensure that your code fetches all relations eagerly (via an annotation or a separate call if needed). 2. JDO and JPA implementations use proxy classes for objects attached to a persistence manager. Before they can be sent back to the client, you must detach all objects from the PM. 3. Even then, GWT won't be able to serialize any types for which it doesn't know the source (like App Engine's Key class). The open source Gilead project and others like Objectify provide GWT wrappers for these. HTH, /dmc On Mon, Nov 8, 2010 at 8:17 PM, dparish dpar...@gmail.com wrote: I have an entity with a member like this: @Entity public class Foo implements Serializable{ �...@onetomany(mappedBy=foo,targetEntity=InternalText.class, fetch=FetchType.EAGER) // I tried Lazy too. private ArrayListInternalTextinternalTextEntries; When I try to use Foo I get this error: Throwable occurred: com.google.gwt.user.client.rpc.SerializationException: Type 'org.apache.openjpa.util.java$util$ArrayList$proxy' 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 = [blah.blah.entities.internalt...@36ae36ae, blah.bhla.entities.internalt...@3fca3fca, blah.blah.retain.entities.internalt...@42474247, blah.blah.entities.internalt...@48724872] at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali ze(ServerSerializationStreamWriter.java: 610) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write Object(AbstractSerializationStreamWriter.java: 129) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter $ValueWriter$8.write(ServerSerializationStreamWriter.java:152) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali zeValue(ServerSerializationStreamWriter.java: 534) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali zeClass(ServerSerializationStreamWriter.java: 700) From what I can tell openjpa is creating a helper representation of ArrayList that it uses to assist in monitoring and lazy loading the child table. I've tried eager and lazy fetching. I tried this: ArrayListInternalText newText = new ArrayListInternalText(); for (InternalText textItem: foo.getInternalTextEntries()) { newText.add(textItem); } foo.setInternalTextEntries(newText); It got past my error, but then the next layer down had trouble (Date in the InternalText class) Type 'org.apache.openjpa.util.java$util$Date$proxy' was not included in the set of types which can be serialized by this SerializationPolicy -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- David Chandler Developer Programs Engineer, Google Web Toolkithttp://googlewebtoolkit.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
OpenJPA GWT serialization problem.
I have an entity with a member like this: @Entity public class Foo implements Serializable{ @OneToMany(mappedBy=foo,targetEntity=InternalText.class, fetch=FetchType.EAGER) // I tried Lazy too. private ArrayListInternalTextinternalTextEntries; When I try to use Foo I get this error: Throwable occurred: com.google.gwt.user.client.rpc.SerializationException: Type 'org.apache.openjpa.util.java$util$ArrayList$proxy' 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 = [blah.blah.entities.internalt...@36ae36ae, blah.bhla.entities.internalt...@3fca3fca, blah.blah.retain.entities.internalt...@42474247, blah.blah.entities.internalt...@48724872] at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java: 610) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java: 129) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter $ValueWriter$8.write(ServerSerializationStreamWriter.java:152) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java: 534) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java: 700) From what I can tell openjpa is creating a helper representation of ArrayList that it uses to assist in monitoring and lazy loading the child table. I've tried eager and lazy fetching. I tried this: ArrayListInternalText newText = new ArrayListInternalText(); for (InternalText textItem: foo.getInternalTextEntries()) { newText.add(textItem); } foo.setInternalTextEntries(newText); It got past my error, but then the next layer down had trouble (Date in the InternalText class) Type 'org.apache.openjpa.util.java$util$Date$proxy' was not included in the set of types which can be serialized by this SerializationPolicy -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Custom Widget ui Binder and a constructor that takes other widgets
I've got a custom widget (code below) that takes in two widget's as a constructor. I'd like to use this widget in UI Binder. I can see from the docs (http://code.google.com/webtoolkit/doc/latest/ DevGuideUiBinder.html#Using_a_widget) that it's pretty easy to do this if the constructor is a set of strings, but how would I do this if I want the constructor args to be Widget. I'm sure this isn't right, but I'm looking for something like this: my:FocusChangeWidget ui:field='nameField' g:LabelDoctor Suess/g:Label g:TextBox ui:field=nameInputField/ /my:FocusChangeWidget Here's the code so you can see what I'm referring to: public class FocusChangeWidget extends Composite { private FocusPanel container = new FocusPanel(); // the container for the custom widget Widget displayWidget; // the main display widget and what we display first Widget changeWidget; // what we display when we get focus public FocusChangeWidget (Widget displayWidget, Widget changeWidget) { this.displayWidget = displayWidget; this.changeWidget = changeWidget; container.add(displayWidget); initWidget(container); container.addFocusHandler(new FocusChangedHandler()); } private class FocusChangedHandler implements FocusHandler { @Override public void onFocus(FocusEvent event) { container.clear(); container.add(changeWidget); } } } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Rounded Corners with UIBinder
If gwt has a failing it's making the app look well rounded. Ok bad pun. The uibinder makes you think you are sculpting a ui. You really aren't. You are writing a skeleton that needs CSS for the flesh. The client side generated HTML is complex which makes the task harder. It's worth it considering the power and flexibility gwt gives you -Dave On Apr 15, 7:14 pm, Jonny jonny.bren...@gmail.com wrote: Despite all my searching (and mostly because of the limited information available regarding proper use of UIBinder) I cannot find a simple, elegant way to use UIBinder with rounded corners. The Google I have a vary simple, one page business card site with the with the outline of the page as a rounded corner pod. There are a few pods within that, one of which I want to use as the new TabLayoutPanel (requiring strict browser support). I considered using the older DecoratorPanel but that requires quirks mode. Is there an equivalent for the new layout structures? My original code just laid out css in the default html page and I anchored all my widgets using the RootPanel.get('id') operation but that does not work with RootLayoutPanel.get(), thereby limiting my ability to use the new TabLayoutPanel. I'm considering avoiding the new UIBinder features altogether, at least until more tutorials are available but I have to say I'm am very tempted I hope this all makes some sense. I'd be happy to clarify as this simple webpage project in GWT has turned into much more of a design barrier than anything else. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Gwt 2 dev mode, refresh time very slow, any hints ?
I'm seeing this as well. When I switch from embedded jetty to noserver, everything is MUCH slower, despite being all local on the same machine with PLENTY of RAM and CPU to spare. It's bad enough that development time is severely impacted. On Apr 1, 6:11 am, Skal pasvinc...@gmail.com wrote: Hi all, We are developping an application with many panels and remote services (about an hundred) and we are facing a very annoying issue with the oophm dev mode, the browser refresh time takes up 30 000 to 90 000 ms. The -Dgwt.perflog jvm option shows that most of the time is spent in the Oophm.SessionHandler.loadModule call (all the app is in a single module). Also, we don't use the embedded jetty server (-noServer, we use an another jetty server). I notice that in dev mode, *.gwt.rpc and *.cache.png files are still generated in the war directory after each refresh, even if the code modification doesn't have an impact on this ressources (for example just a label change), why that ? I've heard about a rpc.blacklist property config extension, does it make sense to use this property to block some remote service compilation thus accelerating the refresh time ? Thanks a lot for any clue. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.