Re: Can the GWT eclipse validator be threaded to more than one class at once?
the current implementation On Tuesday, May 8, 2012 11:51:20 PM UTC-4, Brandon Donnelson wrote: What would stop it doing its job concurrently? -- 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/-/K_NkkUPAF5kJ. 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: help : app engine datasource
Yes, it does. You'll get a warning on startup but otherwise everything works as it should On Tuesday, May 8, 2012 6:06:32 PM UTC-4, Akram.Moncer wrote: the google app engine datastore don't accepte the fetchtype.Eager, so this oblige me use the fetchtype.lazy 2012/5/8 Brandon Donnelson branflake2...@gmail.com [image: Boxbe] https://www.boxbe.com/overview google-web-toolkit@googlegroups.com is not on your Guest Listhttps://www.boxbe.com/approved-list| Approve sender https://www.boxbe.com/anno?tc=11293988326_289452507 | Approve domain https://www.boxbe.com/anno?tc=11293988326_289452507dom I'd recommend downloading the GWT SDK, unzip and goto samplesExpenses and check out the examples. I might suggest changing the FetchType.Lazy to .Eager if your having problems and back off later if you need. Have a good day, Brandon Donnelson +Follow Me https://plus.google.com/u/0/111739836936169749229/posts On Tue, May 8, 2012 at 2:15 PM, Akram Moncer akram.mon...@gmail.comwrote: i use RPC and i need the query thanks 2012/5/8 Brandon Donnelson branflake2...@gmail.com [image: Boxbe] https://www.boxbe.com/overview google-web-toolkit@googlegroups.com is not on your Guest Listhttps://www.boxbe.com/approved-list| Approve sender https://www.boxbe.com/anno?tc=11293510977_580511628 | Approve domain https://www.boxbe.com/anno?tc=11293510977_580511628dom Are you using RPC or RequestFactory? Do you need the query or are you wondering why the results for the collection aren't coming back? -- 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/-/rPphmktafzAJ. 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. -- Akram MONCER Personne -- 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. -- Akram MONCER Personne -- 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/-/B7DOZieuNxkJ. 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: Enumerated Type
Just use JPA's @Enumerated use @Enumerated(EnumType.ORDINAL) to only store a number or @Enumerated(EnumType.String) to get the textual representation of your enum On Monday, May 7, 2012 3:45:38 AM UTC-4, Akram.Moncer wrote: hello ; can someone tell me how can i use the Enumerated Type in JPA, and how can i persist it thanks -- Akram MONCER Personne -- 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/-/85dMSMeffZUJ. 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: Can the GWT eclipse validator be threaded to more than one class at once?
not currently On Tuesday, May 8, 2012 3:34:38 PM UTC-4, Brandon Donnelson wrote: I want to know if the eclipse Validating GWT components (21%) be threaded into concurrent processing? Instead of walking the classes serially, can they be threaded? Brandon Donnelson http://c.gwt-examples.com -- 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/-/SYuRoL-DrGgJ. 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: JSR303 Pre-Persist / Pre-Persist / Pre-Remove Validation not covered by onConstraintViolations() and throws Exception
Only the default validation group is supported GWT at this time. I have no good solution for using another validation group because if you throw a validation exception from an handler, it triggers the wrong method of the ReceiverT on the client side (onServerFailure instead of on constraint violation) On Tuesday, April 3, 2012 4:40:04 PM UTC-4, Romain BIARD wrote: Hi all, I'm writing Custom Validators (server side I mean) in order to validate an entity before a persist() call (and only in this specific case). Actually my final goal is to display localized messages when users want to insert a duplicate entry in my CRUD Webapp. To do this, i have tried to play with validation groups and validation triggers. In Hibernate you can associate Custom ValidationGroup (Here com.test.cis.server.validator.PreRemove , com.test.cis.server.validator.PrePersist, com.test.cis.server.validator .PreUpdate) and validation triggers. * * *persistence.xml* property name=javax.persistence.validation.group.pre-remove value= com.test.cis.server.validator.PreRemove/ property name=javax.persistence.validation.group.pre-persist value= javax.validation.groups.Default,com.test.cis.server.validator.PrePersist / property name=javax.persistence.validation.group.pre-update value= javax.validation.groups.Default,com.test.cis.server.validator.PreUpdate / On my bean, I've put my custom annotation with com.test.cis.server.validator.PrePersist.class as validation group. @MyConstraint(groups=com.test.cis.server.validator.PrePersist.class) So my problem turns around the GWT validation with requestfactory : the validation is done *before* (so the validation will not execute my custom validator at this time ) the call to persist (which will trigger myConstraint validator) so GWT can't handle Constraint Violation exception that occurs during a method call(i.e during method execution). In this case, the exception is catch by the standard ExceptionHandling mechanism and every informations / Localized messages are lost. javax.validation.ConstraintViolationException: validation failed for classes [com.test.domain.entity.CatalogueEntity] during persist time for groups [javax.validation.groups.Default, com.test.cis.server.validator.PrePersist, ] Have you ever been in this case ? Another solution ? -- 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/-/fP_Sv_g8V-4J. 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: To any Editors Gurus: I could use some ListEditor use help for the GWT demo I've made...
Start by checking your paths. PeopleDataProxy has a field called todos but PersonEditor has @UiField called todosEditor with no custom path -- 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/-/2dGWzRfXQNYJ. 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: g:ListBox g:item use i18n
http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinderI18n.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/-/aWLqgmI4oKsJ. 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: To any Editors Gurus: I could use some ListEditor use help for the GWT demo I've made...
On Friday, February 3, 2012 11:58:16 AM UTC-5, Brandon Donnelson wrote: Thanks for the comments and looking at my code! :) I may be getting close to the solution. I have forgotten .with(todos) in the request factory request so they aren't being loaded in the initial request. Not sure if this triggers the correct backing. But all the chaining and list editor stuff seems to have been instantiated correctly from what I can tell. Although the listwrapper never gets used b/c the value is null. You don't need .with(todos), you need to RequestFactoryEditorDriver#getPaths. Your driver knows all the paths you need to put in your request. http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/requestfactory/client/RequestFactoryEditorDriver.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/-/OKsV-lRV27cJ. 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: History onValueChange() not called when application is loaded?
You either have to call PlaceHistoryHandlerhttp://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/place/shared/PlaceHistoryHandler.html#handleCurrentHistory()# handleCurrentHistoryhttp://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/place/shared/PlaceHistoryHandler.html#handleCurrentHistory()or History#fireCurrentHistoryState depending on what you're currently using http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/place/shared/PlaceHistoryHandler.html#handleCurrentHistory()http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/place/shared/PlaceHistoryHandler.html#handleCurrentHistory() http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/user/client/History.html#fireCurrentHistoryState() -- 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/-/UaIgqXv8qX0J. 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: RequestFactory: Get entity ID on success of persist
in request is of type ? extends RequestContext add your own persist method that returns the newly created entity instead of void. The you receive it using ReceiverXEntity instead of ReceiverVoid -- 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/-/aZ4ZeqV0XBIJ. 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: AsyncProxy and ActivityMapper
See this patch for a model you can follow. Pay close attention to the reviews and you should be fine using RunAsyncActivity http://gwt-code-reviews.appspot.com/1386806/ -- 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/-/66iWeUbvdjgJ. 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 application using hibernate and postgresql
I think you should use RequestFactory in conjunction with guice-persist. It works with any JPA layer. -- 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/-/TVLYHjXjqCQJ. 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] Typed Arrays and WebGL
Philip, are you saying WebGL is in IE10 proper? -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: RequestFactory Value Proxy Use Case
A ValueProxy acts as a bridge to existing data types or objects that do get persisted but are outside your control, e.g., you can proxy a User from AppEngine to your client: http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/users/User.html See the gwt expense sample. It does exactly that, it uses a locator and a ValueProxy to expose GAE User's to the client. -- 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/-/RU9mFibsNc4J. 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: beans validation other other then hibernate-validator for gwt?
I use a SEPARATE validation framework. OpenJPA implements javax.validation too. Did you want them to change their name because they added an implementation of javax.validation? but if you're using EclipseLink, what's the problem with using hibernate-validator? Hibernate-validator doesn't contain the JPA implementation of hibernate -- 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/-/b63j1rStY6kJ. 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: beans validation other other then hibernate-validator for gwt?
I use OpenJPA and I know it works, it's able to validate them. -- 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/-/oGiIbdflCW8J. 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: I could use some Guru recommendations on MapV3 API Event bindings model?
Perhaps looking at the now deprecated API ( http://code.google.com/apis/maps/documentation/mapsdata/) and its replacement ( http://googlegeodevelopers.blogspot.com/2010/11/maps-data-api-deprecation-announcement.html ) will prove useful -- 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/-/-Abfj9GJrUIJ. 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: Editors and Lists
You need a composite editor, most likely a ListEditor. http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/editor/client/adapters/ListEditor.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/-/Ef4-zaRvhIMJ. 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: Editors and Lists
you still need to implement a UI that implements an editor for your individual strings. You then use instances of that class from your ListEditor. The editor for your string can be your custom UI or it can be an already existing editor like TextBox: http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/user/client/ui/TextBox.html Notice that it implements IsEditorhttp://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/editor/client/IsEditor.html ValueBoxEditorhttp://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/editor/ui/client/adapters/ValueBoxEditor.html java.lang.String -- 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/-/068ucv9j0iUJ. 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: RequestFactory - One to Many relationships set to null on server's side
sample: http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/#samples%2Fexpenses -- 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_P5ykwX6FsJ. 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: Extend RequestFactory to Make Use of None Primitive Types
RequestFactory is already over http. If you're looking to shoot over a String, just use a String. You can use, but don't recommend, DefaultProxyStore for this purpose which you can obtain from RequestFactory. but again, RF is already over http -- 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/-/mxa5wOpmtgcJ. 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: RequestFactory with Use of Locator
If you use InstanceRequest, that means the method you're calling must be non-static, which is what you want here but also be of your entity type. Here @Service(value = EmployeeService.class, locator = DaoServiceLocator.class) public interface EmployeeRequest extends RequestContext { ... RequestVoid persist(EmployeeProxy employee); with your EmployeeService should do it. InstanceRequest is for calling a method of EmployeeGWT in this case will do it. However, you need to use fire, not using RequestVoid createReq = request.persist(newEmployee).fire(new ReceiverVoid() { ... -- 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/-/QKN_e4nJw8kJ. 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: Activities and Places - Handling several views
You need to adopt a different strategy to the problem: http://tbroyer.posterous.com/gwt-21-activities-nesting-yagni -- 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/-/qUILl-sVQygJ. 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: Has anybody setup an owned Collection in RequestFactory? Does know how to set the ParentKey/ChildKey?
I didn't see this thread earlier but you might find this information useful. Looking at some of your code, some observations: 1. For WalletData and WalletItemData, you don't have to manually set up the owning key yourself. See the following: http://code.google.com/appengine/docs/java/datastore/jdo/relationships.html#Owned_One_to_Many_Relationships 2. /** * I'm not really using the tokenizer here, but good for example */ @Prefix(Entry) public static class Tokenizer implements PlaceTokenizerSignInPlace { private RequestFactory requestFactory; public Tokenizer(RequestFactory requestFactory) { this.requestFactory = requestFactory; } You can't have ctor arguments on a tokenizer, it's created by the framework using GWT.create() 3. Callling r.with() If you're using an EditorDriver, the driver provides a getPath() method that you give to with(). http://code.google.com/webtoolkit/doc/latest/DevGuideUiEditors.html 4. Lastly, even if the AppEngine documentation seems to favor JDO, I've found that JPA is nonetheless easier to use and it's supported on AppEngine too, albeit only 1.0, not = 2 -- 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/-/OH9hocxOES0J. 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: Has anybody setup an owned Collection in RequestFactory? Does know how to set the ParentKey/ChildKey?
1. Well, the previous post has the link to the AppEngine JDO documentation on how to do that but it doesn't work in JPA the same way, more on that later in #4 2. You're right. I've been using gin for so long that I've forgotten about the setFactory method. The reason it works is not because of the class you pointed me too but this one here: http://code.google.com/p/gwt-examples/source/browse/trunk/WalletInventory/src/com/gonevertical/client/app/ClientFactoryImpl.java You're constructing your place tokenizers manually. You gain complete control of how you construct you tokenizers but at the expense of having to write the code yourself. In my code, I don't have anything implementing ApplicationPlaceHistoryMapper like you do, it's provided by gin. However, now that i think about, gin should be able to do the same with ctor arguments provided the necessary ProviderTs are in place 4. So you did: @ElementCollection(targetClass=WalletItemData.class) @CollectionTable(name=items) @MapKey(name=key) private ListWalletItemData items; What you're asking for is exactly: @OneToMany(mappedBy=items) // mappedBy is ignored on AppEngine private ListWalletItemData items; and in WalletItemData: @ManyToOne private WalletData parent; but @ManyToOne isn't supported on AppEngine and what I think you're looking for is something with automatic management of the child's relationship which is: @OneToMany(mappedBy=items, cascade=ALL) // mappedBy is ignored on AppEngine private ListWalletItemData items; Now, from inside a transaction, any new object you put in items will be persisted, any modified object will be updated and anything removed from the collection will be automatically deleted. You never need to call merge, persist or remove on an EntityManager for any of these operations since this collection is already managed and known to the entity manager. If you absolutely need to know your parent from the child, outside of it being present in the parent's collection that is, you do it exactly the way you did it by setting and managing the parent key manually. The difference is the object type will be of the key type instead of the actual parent type. -- 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/-/Q2MGeA0tb9sJ. 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: Removing entities in OneToMany with RequestFactory JPA
do you have nulls in your expert collection in your product object? If you have detach in your CascadeType, it works anyway if you do this product.getExperts().remove(expert); em.merge(product); em.remove(expert); The remove cascade type removes the need for a distinct remove 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/-/JonRtZVXdnsJ. 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: Removing entities in OneToMany with RequestFactory JPA
In fact, you don't even need to call merge either since you're inside a transaction -- 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/-/RqTtXYD8ovoJ. 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: Removing entities in OneToMany with RequestFactory JPA
add CascadeType.Delete or use ALL, then removing the object from the collection will be sufficient to remove it from the underlying storage product.getExperts().remove(expert); -- 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/-/qe76-SD3iHUJ. 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 + GAE common issues.
1. I don't think so. They're meant to be used from the server side of GWT. For exposing server objects you use RequestFactory in combination with ValueProxy 2. I suggest you take a look at the expenses sample that comes with GWT. http://code.google.com/p/google-web-toolkit/source/browse/#svn%2Ftags%2F2.4.0%2Fsamples%2Fexpenses You can see the Employee object in its server version here: http://code.google.com/p/google-web-toolkit/source/browse/tags/2.4.0/samples/expenses/src/main/java/com/google/gwt/sample/expenses/server/domain/Employee.java and its client representation here: http://code.google.com/p/google-web-toolkit/source/browse/tags/2.4.0/samples/expenses/src/main/java/com/google/gwt/sample/expenses/shared/EmployeeProxy.java RequestFactory intro here: http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html 3. MVP won't really touch this since it's client side so it only sees proxy types So if you want to expose an AppEngine key, you would use KeyFactory to convert it to a string for the client and back to a string for the server. If you want to expose AppEngine's User object, you would use a ValueProxy instead of an EntityProxy, e.g., @ProxyForName(com.google.appengine.api.users.User) public interface UserProxy extends ValueProxy { String getNickname(); String getEmail(); } -- 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/-/Jwbi4juIGvkJ. 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: Maven + Eclipse + RequestFactory validation tool: Duplicate class error
only include generated-sources/apt in your maven build using build-helper-maven-plugin !-- Google Plugin for Eclipse (GPE) won't see the source generated above by requestfactory-apt unless it is exposed as an additional source dir -- plugin groupIdorg.codehaus.mojo/groupId artifactIdbuild-helper-maven-plugin/artifactId version1.7/version executions execution idadd-source/id phasegenerate-sources/phase goals goaladd-source/goal /goals configuration sources source${project.build.directory}/generated-sources/apt/source /sources /configuration /execution /executions /plugin For eclipse, make sure you have the m2e connector for build-helper-maven-plugin installed -- 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/-/-Ah7mSu2iX4J. 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-servlet.jar wrong after GWT update
just squash the gwt-servlet.jar found in your project with the one found in your gwt installation -- 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/-/8TnV1ce12vgJ. 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: Maven + Eclipse + RequestFactory validation tool: Duplicate class error
Probably, you're always free to write a ticket to the gwt team -- 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/-/GunUBGXUIW8J. 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: Error when migrating to GWT 2.4.0
I would check if an earlier gwt 2.x is still found on your classpath, like a local copy in web-inf -- 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/-/4KXIHOP3ckkJ. 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: CellTable styles incorrectly on IE9
I just tried the showcase link in IE9, it looks identical to chrome. I can select the controls. I don't know what could be wrong but it's working here -- 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/-/hyIsNfsoxZoJ. 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: SplitLayoutPanel and Widgets using UiBinder
You need to put an additional layout in the center, like SimplePanel, you then remove and add your widget there. -- 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/-/e3TuaSoB8VsJ. 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: SplitLayoutPanel and Widgets using UiBinder
OK, so use a SimplePanel or whatever you need in the west area and assign to that -- 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/-/Qt_vrQii8ZcJ. 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: Cannot get JPA enhanced object from GAE server through GWT-RPC
In order for this to be solved by GWT 2, you need to be using RequestFactory instead of GWT-RPC. http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html List, Set and Collection will be properly copied to a shim when using this facility -- 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/-/6JD0lFmmqQUJ. 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: Shouldn't ListEditor.setValue allow the replacement of a List property on an edited proxy?
No, you'll need to assign an empty list to your proxy before editing can begin if you're only using ListEditor -- 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/-/ts-k3WnxWXQJ. 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 Composite open/visible Handler
Doesn't the user use something to make this composite visible? Like some kind of control? Why not just fire an event from there? -- 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/-/iuzg4UHD_isJ. 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: Shouldn't ListEditor.setValue allow the replacement of a List property on an edited proxy?
The setValue in ListEditor is actually coming in from ValueAwareEditor. This is what the framework uses to setup the initial value of the editor based on what's in your proxy. I usually find it's best to think of all editors in GWT has opaque instances of Editor. That is, no methods you can use directly. -- 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/-/nVarigRIFnwJ. 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 Composite open/visible Handler
So why not add a handler on the the the tab being selected? -- 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/-/-M-9Nx-ZFXMJ. 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: Shouldn't ListEditor.setValue allow the replacement of a List property on an edited proxy?
You work with OptionalFieldEditor. http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/editor/client/adapters/OptionalFieldEditor.html This adapter can be used when a type being edited has an optional field that may be nullified or reassigned as part of the editing process On Mon, Oct 24, 2011 at 12:33 PM, Tiago cave...@gmail.com wrote: Thank you, Patrick and Thomas. Just for curiosity then - as for my case I can just set an empty list before editing, no problem - what's the way to redefine the instance of List property when using the Editor framework? Is there a way? At least for non-list properties it normally works (I've used SimpleEditor.setValue to do that, for example) On Oct 24, 6:24 pm, Thomas Broyer t.bro...@gmail.com wrote: setValue is part of the ValueAwareEditor interface. The point is that the Editor framework will call it when editing/displaying an object. -- 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: can we control what element will build in widget?
If you want this level of control you can use Element directly or an HTMLPanel http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/user/client/Element.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/-/mnZzWfE2CF4J. 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 test multiple interfaces of a widget in MVP ?
Make multiple methods, both returning the same value interface ContactView { HasValueBoolean getHasMobilePhone(); HasEnabled getMobilePhoneNumberEnabled(); HasValueString getMobilePhoneNumber(); } in the implementation, both methods return the same TextField -- 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/-/7dfnpFUKa8AJ. 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] Was the lack of server side templating in GWT one of the reasons why Google+ team did not choose GWT ?
Why don't you feature the Google products that use GWT in the gallery? http://gwtgallery.appspot.com/ I'm always coming up against the argument that Google doesn't use GWT, always. It's annoying and I shouldn't have to make that sale and I wouldn't need to if the gallery featured those products On Wed, Jul 20, 2011 at 10:07 AM, David Chandler drfibona...@google.com wrote: Thanks for pointing it out. I've already answered this in the best way I know how, so I'm happy to let the community hash this one out. https://groups.google.com/d/msg/google-web-toolkit/-/eSqUVQ8gKEMJ /dmc On Mon, Jul 18, 2011 at 10:13 AM, karthik reddy karthik.ele...@gmail.com wrote: Note: I am cross-posting this on GWT-contributors group to solicit the responses of the GWT team. The original post on the GWT group is at : https://groups.google.com/forum/?fromgroups#!topic/google-web-toolkit/CnjBcJsknS0 The following were two direct quotes from Joseph Smarr (tech lead of google plus -- plus.google.com): (FYI: The full Q A with the Google+ Tech Lead can be found at: http://anyasq.com/79-im-a-technical-lead-on-the-google+-team) we often render our Closure templates server-side so the page renders before any JavaScript is loaded, then the JavaScript finds the right DOM nodes and hooks up event handlers, etc. to make it responsive (as a result, if you're on a slow connection and you click on stuff really fast, you may notice a lag before it does anything, but luckily most people don't run into this in practice). The cool thing about Closure templates is they can be compiled into both Java and JavaScript. So we use Java server-side to turn the templates into HTML, but we can also do the same in JavaScript client-side for dynamic rendering. For instance, if you type in a profile page URL directly, we'll render it server-side, but if you go to the stream say and navigate to someone's profile page, we do it with AJAX and render it client-side using the same exact template. Going from the tone of the above two quotes, it seems to me that the lack of server-side templating system in GWT (GWT has client-side templating in the form of UiBinder but not server-side templating) , could have been one of the reasons for not choosing GWT for the Google+ project. What do you guys think?? Was the lack of server side templating in GWT one of the reasons why Google+ team did not choose GWT ?? PS: If you guys haven't tried Google+ yet, I would recommend you try it. Setting aside how good of a social network/social collaboration tool it is, I suggest you guys try it just to get a feel of its UI architecture. Every once in a while, an application comes along and raises the bar(eg., Gmail in 2004) in the area of UI design/UI development and I think Google plus has done it this time around. Also, I really appreciate the fact that GWT is an exceptional work of engineering. My desire is to just provoke discussion in a direction that hopefully leads to making the product even more better and increases its technological moat (Warren Buffet lingo: http://37signals.com/svn/posts/333-warren-buffett-on-castles-and-moats) -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- David Chandler Developer Programs Engineer, GWT+GAE w: http://code.google.com/ b: http://turbomanage.wordpress.com/ b: http://googlewebtoolkit.blogspot.com/ t: @googledevtools -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: Hierachy of autobean for state serialization
On Jun 2, 2011 3:48 AM, Panam pandem...@googlemail.com wrote: Hm, I am just looking for a way to enocde and persist (webstore) state (some POJO properties) on the client. http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/requestfactory/shared/RequestFactory.html#getSerializer(com.google.gwt.requestfactory.shared.ProxyStore) I have difficulties to see see how the RequestFactory will help me here as my intention is that it is for client server communication. I think you should read the link I posted, that's what RequestFactory is used for As I understand autobeans, they are that part of the bindery framework that is used for this purpose (amongst all by the request factory itself). That's why I am trying to use them here. I don't think autobeans are meant to be used directly by end users but by proxy in other GWT features like requestfactory -- 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: Strange bug with Editor and context.create() (With code example)
UserProxy editable = request.edit(request.create(UserProxy.class)); That's your problem right there. You don't call RequestContext#edit() on the proxy that's returned from RequestContext#create On Thu, Jun 2, 2011 at 4:13 PM, chris chris.hins...@gmail.com wrote: When submitting RequestContext with a new EntityProxy I get error Autobean is frozen but when editing an existing proxy no error. I also get two EntityChangeEvent's when submitting the context for the newly created entity. So I have searched for a while and I believe this may be an issue with having a ValueListBox subeditor and creating a new EntityProxy. I have two functions that use the same editor. I have tried multiple things including making sure I am not reusing EditorDriver, Editor or RequestContext. 15:13:51.332 [ERROR] [virtualFactory] Uncaught exception escaped java.lang.IllegalStateException: The AutoBean has been frozen at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.checkFrozen(AbstractAutoBean.java: 195) at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.setProperty(AbstractAutoBean.java: 270) at sun.reflect.GeneratedMethodAccessor524.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 43) at java.lang.reflect.Method.invoke(Method.java:613) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java: 167) /** This function throws Autobean frozen exeption and I see two EntitiProxyChange events when this fires. The function is successful though but I am wondering if there is something I am doing wrong */ private void showAddAccountView() { UserEditor editor = new UserEditor(); UserEditorDriver driver = GWT.create(UserEditorDriver.class); driver.initialize(editor); editor.setDriver(driver); UserRequest request = clientFactory.daoRequestFactory().userRequest(); UserProxy editable = request.edit(request.create(UserProxy.class)); request.saveAndReturn(editable).with(driver.getPaths()); driver.edit(editable, request); DialogBox db = new DialogBox(); db.setAutoHideEnabled(true); db.setAnimationEnabled(true); db.setGlassEnabled(true); db.setWidget(editor); db.center(); } /** This function has no problems when firing context as it is editing an already created EntitiyProxy */ private void onAccountSelected(SelectionChangeEvent event) { UserEditor editor = new UserEditor(); UserEditorDriver driver = GWT.create(UserEditorDriver.class); driver.initialize(editor); editor.setDriver(driver); UserRequest request = clientFactory.daoRequestFactory().userRequest(); UserProxy editable = request.edit(selectionModel.getSelectedObject()); request.saveAndReturn(editable).with(driver.getPaths()); driver.edit(editable, request); accountEditorPanel.setWidget(editor); } --- Editor View. public class UserEditor extends Composite implements EditorUserProxy { @UiTemplate(templates/UserEditor.ui.xml) interface Binder extends UiBinderWidget, UserEditor { } @UiField TextBox name; @UiField TextBox email; @UiField (provided=true) ValueListBoxUserRole role = new ValueListBoxUserRole(new AbstractRendererUserRole() { @Override public String render(UserRole object) { return object == null ? : object.name(); } }); @UiField Button submit; private RequestFactoryEditorDriverUserProxy, UserEditor driver; public UserEditor() { initWidget(GWT.Bindercreate(Binder.class).createAndBindUi(this)); role.setAcceptableValues(Arrays.asList(UserRole.values())); } @UiHandler(submit) void onClick(ClickEvent event) { UserRequest request = (UserRequest) driver.flush(); // Check for errors if (driver.hasErrors()) { ListEditorError errors = driver.getErrors(); for (EditorError error : errors) { Logger.getLogger(UserEditor).info(Errors occurred in user editor + error.getMessage()); } return; } request.fire(); } public void setDriver(RequestFactoryEditorDriverUserProxy, UserEditor driver) { this.driver = driver; } } Thank you in advance for your assistance. -- 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,
Re: Hierachy of autobean for state serialization
Honestly, this is all gibberish to me. Why are you even doing this? RequestFactory offers you a way to encode/decode your data, supports polymorphism, etc. Intro to requestfactory here: http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html Keep in mind here that the entity (http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html#entities), doesn't actually have to be a JPA entity. On Wed, Jun 1, 2011 at 6:59 PM, Panam pandem...@googlemail.com wrote: Can sombody just comment on this? I have a decision to make Related to 2): is polymorphism indeed impossible with autobeans so that I lose subtype specifics when serialzing lists of objects with different subypes (but a common supertype of course)? Thanks panam -- 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: Whats the use of this(); in the AppEngine Example
it's calling the default constructor On Mon, May 30, 2011 at 4:39 PM, jmbz84 jmb...@gmail.com wrote: Hello, I'm completing the tutorial of GWT with Google App Engine http://code.google.com/intl/es/webtoolkit/doc/1.6/tutorial/appengine.html In one example I see this: public Stock(User user, String symbol) { this(); this.user = user; this.symbol = symbol; } What's the use of the method : this(); Is it a constructor initializing the class? Any Ideas? 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. -- 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 and OpenJPA not working together
I think that's specific enough: Caused by: java.lang.NoClassDefFoundError: java.io.FileOutputStream is a restricted class. Please see the Google App Engine developer's guide for more details. On Mon, May 30, 2011 at 4:29 AM, roman roman.za...@gmail.com wrote: Thank you for your quick response. I followed your advise and changed the underlying technology of my JPA layer to DataNucleus. But i ran into a different problem log4j:WARN No appenders could be found for logger (DataNucleus.Connection). log4j:WARN Please initialize the log4j system properly. [ERROR] javax.servlet.ServletContext log: unavailable javax.persistence.PersistenceException: Provider error. Provider: org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider at javax.persistence.Persistence.createFactory(Persistence.java:176) ... at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 409) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:582) Caused by: javax.jdo.JDOFatalInternalException: Unexpected exception caught. NestedThrowables: java.lang.reflect.InvocationTargetException at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java: 1186) at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java: 803) at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java: 698) ... Caused by: java.lang.NoClassDefFoundError: java.io.FileOutputStream is a restricted class. Please see the Google App Engine developer's guide for more details. at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java: 51) at org.apache.derby.impl.services.stream.SingleStream.PBmakeFileHPW(Unknown Source) at org.apache.derby.impl.services.stream.SingleStream.run(Unknown Source) Well I see that i probably have got an error in the configuration of the DataStorePersistenceProvider. Unfortunately, I am not sure what the error could be. Is there any way to get a more specific description of what is causing the problem? cheers, roman On 27 Mai, 15:28, Patrick Julien pjul...@gmail.com wrote: If you wan't to use JPA with AppEngine, you have to use the JPA that comes with AppEngine which is based on datanucleus. See http://code.google.com/appengine/docs/java/datastore/jpa/overview.html for an overview On Fri, May 27, 2011 at 5:56 AM, roman roman.za...@gmail.com wrote: Hi, I'm trying to implement a UserManagement based on GoogleWebToolkit (Adding, deleting, assigning privileged; nothing special there). The GWT-module is using a serparate persistence module, which I included as a jar-file and which is based onOpenJPA. The persistence layer is working fine as long is I run it standalone. But when I wire it to myGWTproject, I can't create the EntityManagerFactory any more. I get a NullPointerException in one of theOpenJPAclasses, which I think is because that Google App Engine replaced the default java.lang.ClassLoader. Is it a bad idea to useOpenJPAwithGWT? Is there anything to consider when combining these libraries? For better understanding find the source code attached. Any help would be greatly appreciated. thx, roman The server is running athttp://localhost:/ [WARN] Error for /usermgmtui/userInformation java.lang.ExceptionInInitializerError at org.apache.openjpa.kernel.Bootstrap.invokeFactory(Bootstrap.java: 116) at org.apache.openjpa.kernel.Bootstrap.getBrokerFactory(Bootstrap.java: 96) at org.apache.openjpa.persistence.OpenJPAPersistence.getEntityManagerFactory(OpenJPAPersistence.java: 92) at com.mycompany.commons.jpa.JpaUserManagement.init(JpaUserManagement.java: 64) at com.mycompany.commons.UserManagementImpl.setDatasoure(UserManagementImpl.java: 71) at com.mycompany.ui.server.UserInformationServiceImpl.init(UserInformationServiceImpl.java: 36) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153) at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java: 428) at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java: 339) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java
Re: GWT and OpenJPA not working together
OpenJPA works fine with GWT. Your issues have to do with the fact you're running on AppEngine. I don't even see how it's possible you got derby running on AppEngine unless you're using an all memory database. On Mon, May 30, 2011 at 12:31 PM, roman roman.za...@gmail.com wrote: allright. your push made me look into it a little deeper :-) My solution to the NoClassDefFoundError: java.io.FileOutputStream is a restricted class is disabling the usage of Google's App engine under Project - Properties | Google | App Engine | Use Google App Engine -- uncheck After that i got ClassCastException: org.datanucleus.store.rdbms.RDBMSManager cannot be cast to org.datanucleus.store.appengine.DatastoreManager which made me banning the datanucleus-appengine-1.0.8.final.jar from the projects classpath as well. I have no clue if this is a good idea, but my code is running so far and I am able to make calls to the Derby database. Which brings me back to my other question: Is it utterly impossible to have the persistence layer running with OpenJPA along with a GWT frontend? As I fear Apache James is dependent on its familiar JPA technology. again, thanks for your advice. you helped me loads alltogether I spent already a week on these issues, and I'm craving for answers cheers On 30 Mai, 14:48, Patrick Julien pjul...@gmail.com wrote: I think that's specific enough: Caused by: java.lang.NoClassDefFoundError: java.io.FileOutputStream is a restricted class. Please see the Google App Engine developer's guide for more details. On Mon, May 30, 2011 at 4:29 AM, roman roman.za...@gmail.com wrote: Thank you for your quick response. I followed your advise and changed the underlying technology of my JPA layer to DataNucleus. But i ran into a different problem log4j:WARN No appenders could be found for logger (DataNucleus.Connection). log4j:WARN Please initialize the log4j system properly. [ERROR] javax.servlet.ServletContext log: unavailable javax.persistence.PersistenceException: Provider error. Provider: org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider at javax.persistence.Persistence.createFactory(Persistence.java:176) ... at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 409) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:582) Caused by: javax.jdo.JDOFatalInternalException: Unexpected exception caught. NestedThrowables: java.lang.reflect.InvocationTargetException at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java: 1186) at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java: 803) at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java: 698) ... Caused by: java.lang.NoClassDefFoundError: java.io.FileOutputStream is a restricted class. Please see the Google App Engine developer's guide for more details. at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java: 51) at org.apache.derby.impl.services.stream.SingleStream.PBmakeFileHPW(Unknown Source) at org.apache.derby.impl.services.stream.SingleStream.run(Unknown Source) Well I see that i probably have got an error in the configuration of the DataStorePersistenceProvider. Unfortunately, I am not sure what the error could be. Is there any way to get a more specific description of what is causing the problem? cheers, roman On 27 Mai, 15:28, Patrick Julien pjul...@gmail.com wrote: If you wan't to use JPA with AppEngine, you have to use the JPA that comes with AppEngine which is based on datanucleus. See http://code.google.com/appengine/docs/java/datastore/jpa/overview.html for an overview On Fri, May 27, 2011 at 5:56 AM, roman roman.za...@gmail.com wrote: Hi, I'm trying to implement a UserManagement based on GoogleWebToolkit (Adding, deleting, assigning privileged; nothing special there). The GWT-module is using a serparate persistence module, which I included as a jar-file and which is based onOpenJPA. The persistence layer is working fine as long is I run it standalone. But when I wire it to myGWTproject, I can't create the EntityManagerFactory any more. I get a NullPointerException in one of theOpenJPAclasses, which I think is because that Google App Engine replaced the default java.lang.ClassLoader. Is it a bad idea to useOpenJPAwithGWT? Is there anything to consider when combining these libraries? For better understanding find the source code attached. Any help would be greatly appreciated. thx, roman The server is running athttp://localhost:/ [WARN] Error for /usermgmtui/userInformation java.lang.ExceptionInInitializerError
Re: GWT and OpenJPA not working together
If you wan't to use JPA with AppEngine, you have to use the JPA that comes with AppEngine which is based on datanucleus. See http://code.google.com/appengine/docs/java/datastore/jpa/overview.html for an overview On Fri, May 27, 2011 at 5:56 AM, roman roman.za...@gmail.com wrote: Hi, I'm trying to implement a UserManagement based on GoogleWebToolkit (Adding, deleting, assigning privileged; nothing special there). The GWT-module is using a serparate persistence module, which I included as a jar-file and which is based on OpenJPA. The persistence layer is working fine as long is I run it standalone. But when I wire it to my GWT project, I can't create the EntityManagerFactory any more. I get a NullPointerException in one of the OpenJPA classes, which I think is because that Google App Engine replaced the default java.lang.ClassLoader. Is it a bad idea to use OpenJPA with GWT? Is there anything to consider when combining these libraries? For better understanding find the source code attached. Any help would be greatly appreciated. thx, roman The server is running at http://localhost:/ [WARN] Error for /usermgmtui/userInformation java.lang.ExceptionInInitializerError at org.apache.openjpa.kernel.Bootstrap.invokeFactory(Bootstrap.java: 116) at org.apache.openjpa.kernel.Bootstrap.getBrokerFactory(Bootstrap.java: 96) at org.apache.openjpa.persistence.OpenJPAPersistence.getEntityManagerFactory(OpenJPAPersistence.java: 92) at com.mycompany.commons.jpa.JpaUserManagement.init(JpaUserManagement.java: 64) at com.mycompany.commons.UserManagementImpl.setDatasoure(UserManagementImpl.java: 71) at com.mycompany.ui.server.UserInformationServiceImpl.init(UserInformationServiceImpl.java: 36) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153) at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java: 428) at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java: 339) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java: 35) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java: 58) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java: 122) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java: 94) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:351) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.java:938) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at
Re: GWT client server communication
The gwt servlet may be a singleton but it supports a multi-threading environment So in short there are 2 problems. 1.Can i have TCP library on client side.(If yes then no need for second problem) no 2.If not then i need to create a new TCP client at GWT server (RPC) and keep track of which client did that and send updates to that client.Since each client would have a different data on TCP server read. -- 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: Presenters management
If you're talking about replacing the presenter, use PlaceController to trigger a place refresh. See the samples on how they use a shell as place holders for presenters/views On Fri, May 27, 2011 at 9:49 AM, Issam boualem.is...@gmail.com wrote: Hi all, I have some difficulties to manage many presenters.For example, I have a principal presenter and of course its appropriate view.So what I want to do is to call another presenter (which is attached to another view )from the principle one. How to do it ? I have already define in my uibinder file the second view that I want to integrate to the principal one ; Any suggestions are welcome Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-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: Presenters management
if you're embedding an activity into another one, just use new to create the other activity. To embed the sub-activity's view in your view, just make sure your parent activity view is holding something that implements AcceptsOneWidget. e.g., public class ParentActivity extends AbstractActivity { public interface View extends IsWidget { AcceptsOneWidget childActivityDisplayArea(); } private final View view; private final ChildActivity childActivity = new ChildActivity(...); // use GIN here instead //... public void start(AcceptsOneWidget panel, EventBus eventBus) { // ... childActivity.start(view.childActivityDisplayArea(), eventBus); } On Fri, May 27, 2011 at 12:01 PM, Issam boualem.is...@gmail.com wrote: That's it. I'm looking how to do it It means how to do this call from parent presenter :) On 27 mai, 17:47, Nicolas Antoniazzi nicolas.antonia...@gmail.com wrote: Maybe that I did not really understand, but you cannot instantiate sub presenters directly from uiBinder. You have to instantiate it from the parent one, and the child presenter has to instantiate its own view. 2011/5/27 Issam boualem.is...@gmail.com Sorry but I'm not talking about replacing a presenter On 27 mai, 16:04, Patrick Julien pjul...@gmail.com wrote: If you're talking about replacing the presenter, use PlaceController to trigger a place refresh. See the samples on how they use a shell as place holders for presenters/views On Fri, May 27, 2011 at 9:49 AM, Issam boualem.is...@gmail.com wrote: Hi all, I have some difficulties to manage many presenters.For example, I have a principal presenter and of course its appropriate view.So what I want to do is to call another presenter (which is attached to another view )from the principle one. How to do it ? I have already define in my uibinder file the second view that I want to integrate to the principal one ; Any suggestions are welcome Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@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-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 client server communication
you can use websockets but not many browsers support it. You can use comet google gwt comet On Fri, May 27, 2011 at 12:36 PM, hamish tushar chandola hamish.tus...@gmail.com wrote: Hi Patrick, Is there a way in GWT to push data from server to client. Right now i am using RPC asyncallback but for that client needs to make request to server and then it responds. So its more like pull mechanism .I wud need push . Thanks Hamish On Fri, May 27, 2011 at 6:31 AM, Patrick Julien pjul...@gmail.com wrote: The gwt servlet may be a singleton but it supports a multi-threading environment So in short there are 2 problems. 1.Can i have TCP library on client side.(If yes then no need for second problem) no 2.If not then i need to create a new TCP client at GWT server (RPC) and keep track of which client did that and send updates to that client.Since each client would have a different data on TCP server read. -- 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. -- ~Hamish ~Hope is a good thing, maybe the best of things, and no good thing ever dies. -- 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.
[gwt-contrib] rfc on 6068 fix
Here is what I am planning to do to fix issue 6068 http://code.google.com/p/google-web-toolkit/issues/detail?id=6068 1. Add to BeanMethod.java (package com.google.web.bindery.autobean.vm.impl;) an TO_ARRAY value 2. Add to JBeanMethod.java (com.google.web.bindery.autobean.gwt.rebind.model;) an TO_ARRAY value 3. in AutoBeanFactoryGenerator#writeShim (package com.google.web.bindery.autobean.gwt.rebind;) handle the TO_ARRAY case by checking the: a. if the type is assignable to Collection? b. Determine if toArray has one of two supported method signatures in Collection? c. Generate code that assigns each element of the newly created array by wrapping it first 4. Add a unit test to check for unfrozen beans. a. Get a collection of AutoBeans b. assert they are frozen c. Initialize an ArrayList using this other collection d. Assert the objects stored the second ArrayList are unfrozen Open Questions: 1. Should I try to handle immutable collections, i.e., Collections.unmodifiable* or guava's Immutable*? -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] HasRequestContext and 2.3.0rc1
The log is this: Compiling module net.odgn.plasma.Plasma Scanning for additional dependencies: file:/C:/Users/pjulien/Documents/odgn/bin/plasma/src/net/odgn/plasma/client/presenter/admin/game/ui/EditGameView.java Adding '17' new generated units Validating newly compiled units [ERROR] Errors in 'generated://3AE2F7E937C7B6ED6978FDAF26D34D18/net/odgn/plasma/client/presenter/admin/game/ui/EditGameView_RequestFactoryEditorDelegate.java' [ERROR] Line 62: The constructor EditGameView_possibleAchievements_Context(GameDefinitionHandle, AchievementDefinitionTable, String) is undefined See snapshot: C:\Users\pjulien\AppData\Local\Temp\net.odgn.plasma.client.presenter.admin.game.ui.EditGameView_RequestFactoryEditorDelegate4638522755171937904.java [ERROR] Errors in 'generated://3AE2F7E937C7B6ED6978FDAF26D34D18/net/odgn/plasma/client/presenter/admin/game/ui/EditGameView_RequestFactoryEditorDelegate.java' [ERROR] Line 62: The constructor EditGameView_possibleAchievements_Context(GameDefinitionHandle, AchievementDefinitionTable, String) is undefined [ERROR] Cannot proceed due to previous errors I am trying with this: public final class AchievementDefinitionTable extends Composite implements IsEditorHasDataEditorAchievementDefinitionHandle, HasRequestContextAchievementDefinitionHandle { or this: public final class AchievementDefinitionTable extends Composite implements IsEditorHasDataEditorAchievementDefinitionHandle, HasRequestContextHasDataEditorAchievementDefinitionHandle { Removing HasRequestContext fixes the error On Thu, Apr 28, 2011 at 12:44 PM, BobV b...@google.com wrote: On Wed, Apr 27, 2011 at 10:56 PM, Patrick Julien pjul...@gmail.com wrote: How does this actually work? class MyEditor implements HasRequestConextFoo { // HasRequestContext extends the Editor interface } If I implement HasRequestContextT anywhere, the containing request factory editor driver that is generated no longer compiles, saying that there is a missing constructor Can you attach the log output? What is the type declaration for the offending Editor class? -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: Re : Re: [gwt-contrib] HasRequestContext and 2.3.0rc1
Thanks Thomas, I'm starting to think you know all 6000~ tickets in the issue tracker from memory. However, I was only pointing it out here, this is a nice feature to have since this was a 2.2 code base where I was propagating the RequestContext myself On Thu, Apr 28, 2011 at 2:44 PM, Thomas Broyer t.bro...@gmail.com wrote: I believe you're experiencing this issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=6016 You're probably running into it because you implement both IsEditor and Editor (through HasRequestContext), so the link between the parent editor and an instance of AchievementDefinitionTable now generates two EditorContext-s, or actually should do so, but both are being tentatively generated using the same class name, so the other actually reuses the first class, whic obviously doesn't use the apropriate types. As a workaround, IIRC, you can try replacing IsEditor with a subeditor with @Path() -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] GWT SDK 2.3.0.RC1
Since you asked so nicely, I can confirm that changing imports and the gwt.xml file was all I needed to do to fix 2 large gwt applications. On Tue, Apr 26, 2011 at 8:48 PM, Chris Ramsdale cramsd...@google.com wrote: Hey GWTC folks, We have a GWT SDK 2.3.0.RC1 build that we would love feedback on. A big change since M1 is the move of AutoBean and RequestFactory to a new package, com.google.web.bindery. The old locations of AutoBean and RequestFactory should still work, but are deprecated. Fixing the deprecation warnings for the most part should be as simple as changing some import lines. If early adopters could verify that assumption, we would be grateful. The RC1 download can be found here: http://code.google.com/p/google-web-toolkit/downloads/detail?name=gwt-2.3.0.rc1.zip -- Chris/Ray, on behalf of the GWT team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] HasRequestContext and 2.3.0rc1
How does this actually work? If I implement HasRequestContextT anywhere, the containing request factory editor driver that is generated no longer compiles, saying that there is a missing constructor -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] RR: Promoting RequestFactory to a higher package
My reaction is that EventBus/SimpleEventBus and friends should be part of this On Fri, Mar 25, 2011 at 5:19 PM, Ray Ryan rj...@google.com wrote: RequestFactory is proving itself useful in non-GWT contexts, so we would like to give it more independence. Our plan with the GWT 2.3 release is to copy com.google.gwt.requestfactory to com.google.requestfactory, and deprecate everything in the old location. We will also provide a jar that includes the pure JRE version of request factory with no other GWT dependencies. (This change will probably not make the first 2.3 milestone release.) With 2.4, we'll delete the code in the old location. This is faster than usual promise of keeping deprecated code in place for two releases, but we really don't want to leave so much redundant code around any longer than we have to. The API will not change; client code should be able to migrate by simply by changing import statements. Reactions? rjrjr -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] ListEditorWrapper frozen autobeans
I don't think so, this issue started showing up when workingCopy was added to ListEditorWrapper. If I backtrack to a version before it, I'm fine. The other thing is I don't seem to have the problem reported in 6081. Mine has to do with the method toArray() being called, so there isn't anything left to unfreeze the bean when List#get is called. On Tue, Mar 1, 2011 at 5:29 AM, Thomas Broyer t.bro...@gmail.com wrote: Could this rather be a symptom of http://code.google.com/p/google-web-toolkit/issues/detail?id=6081 ? -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] ListEditorWrapper frozen autobeans
yes, with patch http://gwt-code-reviews.appspot.com/1159801/show On Mon, Feb 28, 2011 at 8:43 PM, Ray Ryan rj...@google.com wrote: Patrick, did you file an issue about this? On Tue, Feb 22, 2011 at 7:15 AM, Patrick Julien pjul...@gmail.com wrote: http://gwt-code-reviews.appspot.com/1159801/show Introduces an autobean is frozen issue. The problem is that the workingCopy variable that is introduced doesn't cause autobeans to be unfrozen. The scenario that I have is pretty simple: public class XEditor extends composite implements EditorSomeProxy { private SomeChildTable pathToChildren; } SomeChildTable has a CellTable which uses the HasDataEditor wrapper. If I remove workingCopy, the various FieldUpdater inside the table are fine. If I don't, I get an autobeans is frozen exception. I believe this is because workingCopy is a regular ArrayListT instead of the generated RequestFactory list wrapper type -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] ListEditorWrapper frozen autobeans
sorry, wrong link http://gwt-code-reviews.appspot.com/1361802/ On Mon, Feb 28, 2011 at 10:55 PM, Patrick Julien pjul...@gmail.com wrote: yes, with patch http://gwt-code-reviews.appspot.com/1159801/show On Mon, Feb 28, 2011 at 8:43 PM, Ray Ryan rj...@google.com wrote: Patrick, did you file an issue about this? On Tue, Feb 22, 2011 at 7:15 AM, Patrick Julien pjul...@gmail.com wrote: http://gwt-code-reviews.appspot.com/1159801/show Introduces an autobean is frozen issue. The problem is that the workingCopy variable that is introduced doesn't cause autobeans to be unfrozen. The scenario that I have is pretty simple: public class XEditor extends composite implements EditorSomeProxy { private SomeChildTable pathToChildren; } SomeChildTable has a CellTable which uses the HasDataEditor wrapper. If I remove workingCopy, the various FieldUpdater inside the table are fine. If I don't, I get an autobeans is frozen exception. I believe this is because workingCopy is a regular ArrayListT instead of the generated RequestFactory list wrapper type -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] ListEditorWrapper frozen autobeans
http://gwt-code-reviews.appspot.com/1159801/show Introduces an autobean is frozen issue. The problem is that the workingCopy variable that is introduced doesn't cause autobeans to be unfrozen. The scenario that I have is pretty simple: public class XEditor extends composite implements EditorSomeProxy { private SomeChildTable pathToChildren; } SomeChildTable has a CellTable which uses the HasDataEditor wrapper. If I remove workingCopy, the various FieldUpdater inside the table are fine. If I don't, I get an autobeans is frozen exception. I believe this is because workingCopy is a regular ArrayListT instead of the generated RequestFactory list wrapper type -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: RequestFactory access from Android
Ah, never mind, I think the idea is to use this new JSON-RPC support. This will also solve the issue of accessing from wp7 On Tue, Feb 15, 2011 at 4:40 PM, Patrick Julien pjul...@gmail.com wrote: Thanks Bob, do you mind if I file an issue to formally request this? At this stage, I have it compiling but unable to parse requests on the server On Tue, Feb 15, 2011 at 1:09 PM, BobV b...@google.com wrote: RequestFactoryMagic works on Android, but you'll need to do some build hacking to get RF it to compile against the Android SDK. Here's what I did as an experiment: 1) Extract autobean/{shared, server}/** and requestfactory{shared, server/testing}/** from gwt-user.jar. 1a) There are a few other build dependencies to tease out. 2) Write a RequestTransport that uses java.net.HttpUrlConnection or the Apache HttpClient libs. 3) IIRC, there's one or two minor API incompatibilities in the org.json APIs built into the ADK, but they're simple to fix. Being able to put together a self-contained requestfactory-client.jar would go a long way to improving code re-use for GWT devs who want Android clients (and hopefully the other way around). -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: RequestFactory access from Android
Thanks Bob, do you mind if I file an issue to formally request this? At this stage, I have it compiling but unable to parse requests on the server On Tue, Feb 15, 2011 at 1:09 PM, BobV b...@google.com wrote: RequestFactoryMagic works on Android, but you'll need to do some build hacking to get RF it to compile against the Android SDK. Here's what I did as an experiment: 1) Extract autobean/{shared, server}/** and requestfactory{shared, server/testing}/** from gwt-user.jar. 1a) There are a few other build dependencies to tease out. 2) Write a RequestTransport that uses java.net.HttpUrlConnection or the Apache HttpClient libs. 3) IIRC, there's one or two minor API incompatibilities in the org.json APIs built into the ADK, but they're simple to fix. Being able to put together a self-contained requestfactory-client.jar would go a long way to improving code re-use for GWT devs who want Android clients (and hopefully the other way around). -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] RequestFactory access from Android
Anywhere I should start looking? This is JSON and everything but I want to access GWT services from Android and wp7. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: RequestFactory access from Android
Thanks. The worst thing is, is that I remember seeing this thing a while back now that you point it out again. That will help for android and other java based platforms. On Mon, Feb 14, 2011 at 5:35 PM, Thomas Broyer t.bro...@gmail.com wrote: The RequestFactoryMagic type can be used to instantiate RequestFactory instances in non-GWT runtimes. […] If you implement your ownRequestTransport (perhaps based on a java.net.HttpUrlConnection or Apache HttpClientlibrary), you can write console apps, bulk-query apps, or health probers using your production RequestFactory endpoints. This is a huge improvement over GWT`s old RPC system, which only supports GWT-based clients. — Source: http://stackoverflow.com/questions/4853188/unit-testing-of-gwt-requestfactory-services-without-gwttestcase/4926160#4926160 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Stack overflow problem in HashMap.hashCode() and possible fix
This behavior happens outside of GWT too in regular Java. This has nothing to do with GWT. HashMap does not support null values or keys On Sun, Jan 2, 2011 at 1:37 PM, sinelaw jones.noa...@gmail.com wrote: Problem can be reproduced with four lines of code: HashMapString,Object testMap = new HashMapString, Object(); testMap.put(me, testMap); HashMapObject,Object testMap2 = new HashMapObject, Object(); testMap2.put(testMap, null); // causes a stack overflow. The problem is in the following line of HashMap.hashCode(): result += keyHashCode(unmaskNullKey(key)) ^ valueHashCode(values[i]); since value[i] could equal this (the current instance), valueHashCode will recurse into hashCode causing an infinite recursion and stack overflow. It can be fixed by not calling valueHashCode on values that are this instance. Is this a bug or a feature? Thanks! EntireOne, Inc. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] child entities modifications still not accessible in 2.1.1
Originally from http://groups.google.com/group/google-web-toolkit-contributors/browse_thread/thread/1b67cfebede416b7/e958579badd4613a?lnk=gstq=pjulien+dvsDataMap#e958579badd4613a and other posts. I've now reported http://code.google.com/p/google-web-toolkit/issues/detail?id=5776 and included a sample. The sample is concise and direct and shows off an assertion failure. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Breaking change proposed: future proofing Activity in 2.1.1
On Thu, Dec 9, 2010 at 1:04 PM, Ray Ryan rj...@google.com wrote: Nnnnevermind. I think it's too late for me to make this not-terribly-popular change. It's already more widely adopted than I realized internally, so I have to assume that's even more true externally. I can't imagine such a break being well received. I think it's for the best. (Yes, we're making more significant changes to RequestFactory in 2.1.1, but I suspect that has a lower adoption rate so far, and client side the impact is actually fairly minimal, except for the dropped UserInfo stuff.) That and RequestFactory on the server is still pretty hellish effort wise. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Breaking change proposed: future proofing Activity in 2.1.1
making it a class instead of an interface means we can't mock it anymore. On Thu, Dec 2, 2010 at 10:55 PM, Ray Ryan rj...@google.com wrote: We're making a few breaking changes in 2.1.1 to the new features introduced in 2.1. (We're not supposed to do that kind of thing, but are hoping to get away with it in this quick follow up release before there is much adoption.) I'd like to add a change to Activity to that list, in order to allow it to evolve in later releases when breakage of any kind won't be an option: I'd like to make Activity an abstract class instead of an interface, basically rename AbstractActivity. Any objections? rjrjr -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Breaking change proposed: future proofing Activity in 2.1.1
I don't know since I don't know what your plans are, will just have to trust you. That being said, the Activity interface is currently really nice and it doesn't tie us down to a single class for inheritance. On Fri, Dec 3, 2010 at 2:20 PM, Ray Ryan rj...@google.com wrote: Any part of my point is that making sure it remains a trivial class with only no-ops means you don't need to mock it. Is that a reasonable assumption? On Fri, Dec 3, 2010 at 11:11 AM, Patrick Julien pjul...@gmail.com wrote: making it a class instead of an interface means we can't mock it anymore. On Thu, Dec 2, 2010 at 10:55 PM, Ray Ryan rj...@google.com wrote: We're making a few breaking changes in 2.1.1 to the new features introduced in 2.1. (We're not supposed to do that kind of thing, but are hoping to get away with it in this quick follow up release before there is much adoption.) I'd like to add a change to Activity to that list, in order to allow it to evolve in later releases when breakage of any kind won't be an option: I'd like to make Activity an abstract class instead of an interface, basically rename AbstractActivity. Any objections? rjrjr -- 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 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Breaking change proposed: future proofing Activity in 2.1.1
This is more in line with what we're doing. With what we experienced with the ramp up to 2.1.0, we only use the Activity interface, we don't use the default implementation and instead make our own for common classes of use cases. On Fri, Dec 3, 2010 at 3:02 PM, John Tamplin j...@google.com wrote: On Fri, Dec 3, 2010 at 2:58 PM, Patrick Julien pjul...@gmail.com wrote: I don't know since I don't know what your plans are, will just have to trust you. That being said, the Activity interface is currently really nice and it doesn't tie us down to a single class for inheritance. I have been very happy with the recent cases where I have used an interface for the API but provided a default implementation, with the admonishment that implementing the interface without extending the default implementation is likely to be broken in the future. That way the people that care more about being able to substitute alternate implementations or to use it without having to extend the implementation can implement the interface, and those that care more about not being broken by future updates can extend the default implementation. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Breaking change proposed: future proofing Activity in 2.1.1
On Fri, Dec 3, 2010 at 3:18 PM, Ray Ryan rj...@google.com wrote: Patrick, you're the case in point. Because you don't use the abstract class, if we change the API later we will break your app. I guess I don't understand how you're making it better then. I'm currently working on Android and I have two problems that I hope won't be introduced in GWT: 1. The activity class is huge. Anything that doesn't seem to fit somewhere else either goes in Context or Activity (with Activity inheriting from Context) 2. Activity isn't Guice friendly because the framework creates activities for you, we don't get absolute control of the ctors. It's driving me insane. It's nice we don't have to worry about creating activities and other system level objects but kind of sucks that we can't get any kind of support beyond that. Your argument about keeping the class simple helps reassure #1 won't come true... for now at least, I'm more worried about the implications of someone else becoming the steward of such a class. I can only hope #2 will remain like it is now in GWT and not like Android. Were you unable to use the abstract class? If the Activity interface were documented to encourage you to do so, would you have? When we break your app, will you be okay with that? The abstract class didn't provide anything useful so multiple abstract base classes were made. In all, I have list, detail and edit abstract base activities and each define a view interface. Each of those scenarios provided a better, more suitably precise implementation than what's already in AbstractActivity. So even if you add breaking changes to Activity here, and I'm assuming by changes, you mean new methods with a default implementation, otherwise an abstract class wouldn't do much better, I have at most 3 classes to fix. All other activities are rooted in one of those 3 and are pretty light. But again, I wanted to voice my concern, not really trying to change the tide. I don't really mind Activity becoming a class under the conditions you mentioned. At first, I was just a little bit worried of getting something that, sooner or later, would match the stature of android's activity class. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Breaking change proposed: future proofing Activity in 2.1.1
On Fri, Dec 3, 2010 at 3:35 PM, Ray Ryan rj...@google.com wrote: One more question for Patrick: would you be better able to use AbstractActivity if the IsActivity interface were available? I don't want to speak for anybody else but not to me no. What AbstractActivity provides is so little that it's either sufficient or not. In my case, it's not. Introducing IsActivity doesn't make it any more useful to me. For list and edit, you can edit, so we need to take charge of all the Activity entry point in order to provide the user with a message about discarding changes. For details, it's fine, but it hasn't really saved us much now has it? I'm just surprised that you would want to make it an abstract class. If we were to re-live the gwt 2.1.0 development cycle, I would have to say that the activity package of classes was one of the most volatile out there. Why? Because making an activity that is both useful and generic for everyone out there is extremely hard and complex. AbstractActivity is certainly generic enough for everyone but how useful is it in its current implementation? If you want to improve on that, great, but how much experimentation would be involved in such a process? I'm just saying that anything added to an abstract Activity that works for all GWT users/applications would have to be out of this world crazy good or be benign like it currently is. That being said, I don't know what new additions you're planning. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Comment on Editors in google-web-toolkit
On Tue, Nov 23, 2010 at 11:18 AM, codesite-nore...@google.com wrote: Comment by vinays.work: I am seriously disappointed with the Editor framework. What we need is a Bean Binding framework much like those that have existed in Swing. You just associate the bean property with the widget and the interchange of UI value with the bean needs to be automatic. JSF has a pretty effective Bean Binding framework as well. As a developer, your work needs to get minimized. Here, it is a silly mapping scheme that results in little benefit. I was expecting more from Google. the values you have in your beans and the UI are bound. It's just by default the paths to the properties are matched with what's in the UI by default. When you call driver.edit(someObjectGraph);, or display(), those values are filled in the UI. If you save from the driver, all the values from the UI will make it back to your beans. The framework must also have bindings with tables, where in, you specify the ListT as associated with a Table and the information exchange is automatic - much the same way as: This is already possible. See ListEditor and HasDataEditor. HasDataEditor is an adapter for any HasData implementer. CellTable being an implementation of HasData, you already have that. interface User extends EntityProxy { // ... ListAddress addresses; } interface Address extends EntityProxy { //... } class UserEditor extends Composite { // ... HasDataEditorAddress addresses = HasDataEditor.of(cellTable); // named the same otherwise use @Path, assuming cellTable here is from uibinder } When you bind an instance of a UserEditor to a user, addresses in UserEditor will have the data from the user address list. If you modify this list via its CellTable, when you save, the entity proxy will have the modifications too. http://publicobject.com/glazedlists/ Vaadin Toolkit - build on the top of GWT - has data binding containers, which can be used as datasources in ... that the way of programming is like programming any Swing application I think the editor framework is still missing a bit of documentation/samples, mainly dealing with how you pull in object graphs using information provided by the editor driver, but yes, what you're talking about is all possible. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Overhaul the RequestFactory server code. (issue1080801)
I think this is still missing one core feature that makes it unusable. The problem is still validators. ConstraintViolation cannot be returned or thrown from our methods which means only the default group validation can be used. e.g., let's say we have a UserAccount. Depending if the user has a validated email, I might require different validation groups. The way this is done in javax.validation is to use validation groups, instead of SetConstraintViolationObject errors = service.validate(domainObject); we get SetConstraintViolationObject errors = service.validate(domainObject, ValidationGroup.class); Otherwise we're stuck with only the default group which makes javax validation in GWT very much a toy. The main problem however why we can't call a validation group ourselves is because we need to translate back the ConstraintViolation violation into something the client side will interpret correctly, i.e., as a constraint violation versus a generic exception. When calling a user method from the service layer, this should be guarding for constraint violations and re-translating any errors that it gets the way it does now for the default group On Fri, Nov 5, 2010 at 10:14 AM, b...@google.com wrote: Reviewers: rjrjr, Description: Overhaul the RequestFactory server code. Make RequestFactory usable from non-GWT code. http://code.google.com/p/google-web-toolkit/wiki/RequestFactory_2_1_1 Move AutoBeans to a top-level package and add AutoBeanCodex. Add explicit support for Collections and Maps to AutoBeanVisitor. Add support to AutoBean and AutoBeanCodex for Map properties. Add @PropertyName annotation to decrease the size of the RF payload. http://code.google.com/p/google-web-toolkit/wiki/AutoBean Patch by: bobv Review by: rjrjr, rchandia Please review this at http://gwt-code-reviews.appspot.com/1080801/show Affected files: A samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/console/Console.java A samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/console/HttpClientTransport.java M tools/api-checker/config/gwt20_21userApi.conf A user/src/com/google/gwt/autobean/AutoBean.gwt.xml A user/src/com/google/gwt/autobean/client/impl/AbstractAutoBeanFactory.java A user/src/com/google/gwt/autobean/client/impl/JsoSplittable.java A user/src/com/google/gwt/autobean/rebind/AutoBeanFactoryGenerator.java A user/src/com/google/gwt/autobean/rebind/model/AutoBeanFactoryMethod.java A user/src/com/google/gwt/autobean/rebind/model/AutoBeanFactoryModel.java A user/src/com/google/gwt/autobean/rebind/model/AutoBeanMethod.java A user/src/com/google/gwt/autobean/rebind/model/AutoBeanType.java A user/src/com/google/gwt/autobean/server/AutoBeanFactoryMagic.java A user/src/com/google/gwt/autobean/server/BeanMethod.java A user/src/com/google/gwt/autobean/server/BeanPropertyContext.java A user/src/com/google/gwt/autobean/server/Configuration.java A user/src/com/google/gwt/autobean/server/FactoryHandler.java A user/src/com/google/gwt/autobean/server/GetterPropertyContext.java A user/src/com/google/gwt/autobean/server/MethodPropertyContext.java A user/src/com/google/gwt/autobean/server/ProxyAutoBean.java A user/src/com/google/gwt/autobean/server/ShimHandler.java A user/src/com/google/gwt/autobean/server/SimpleBeanHandler.java A user/src/com/google/gwt/autobean/server/impl/JsonSplittable.java A user/src/com/google/gwt/autobean/server/impl/TypeUtils.java A user/src/com/google/gwt/autobean/shared/AutoBean.java A user/src/com/google/gwt/autobean/shared/AutoBeanCodex.java A user/src/com/google/gwt/autobean/shared/AutoBeanFactory.java A user/src/com/google/gwt/autobean/shared/AutoBeanUtils.java A user/src/com/google/gwt/autobean/shared/AutoBeanVisitor.java A user/src/com/google/gwt/autobean/shared/Splittable.java A user/src/com/google/gwt/autobean/shared/ValueCodex.java A user/src/com/google/gwt/autobean/shared/impl/AbstractAutoBean.java A user/src/com/google/gwt/autobean/shared/impl/LazySplittable.java A user/src/com/google/gwt/autobean/shared/impl/StringQuoter.java M user/src/com/google/gwt/core/client/impl/WeakMapping.java M user/src/com/google/gwt/editor/Editor.gwt.xml D user/src/com/google/gwt/editor/client/AutoBean.java D user/src/com/google/gwt/editor/client/AutoBeanFactory.java D user/src/com/google/gwt/editor/client/AutoBeanUtils.java D user/src/com/google/gwt/editor/client/AutoBeanVisitor.java D user/src/com/google/gwt/editor/client/impl/AbstractAutoBean.java D user/src/com/google/gwt/editor/client/impl/AbstractAutoBeanFactory.java D user/src/com/google/gwt/editor/rebind/AutoBeanFactoryGenerator.java D user/src/com/google/gwt/editor/rebind/model/AutoBeanFactoryMethod.java D user/src/com/google/gwt/editor/rebind/model/AutoBeanFactoryModel.java D user/src/com/google/gwt/editor/rebind/model/AutoBeanMethod.java D user/src/com/google/gwt/editor/rebind/model/AutoBeanType.java M
Re: [gwt-contrib] Overhaul the RequestFactory server code. (issue1080801)
On Fri, Nov 5, 2010 at 11:35 AM, BobV b...@google.com wrote: Just to be explicit, this is just the first in a series of patches to graduate RequestFactory from toy status into something that's usable with real systems. understood. http://code.google.com/p/google-web-toolkit/wiki/RequestFactory_2_1_1 On Fri, Nov 5, 2010 at 11:21 AM, Patrick Julien pjul...@gmail.com wrote: I think this is still missing one core feature that makes it unusable. The problem is still validators. ConstraintViolation cannot be returned or thrown from our methods which means only the default group validation can be used. Would it be sufficient for your use case for the service layer to delegate the validation work to a helper? Does it achieve the desired effect? Yes, I think so, but I also think that validation is so core to the server piece that we're just creating extra classes for no real reason. If we're using javax.validation groups, those helper classes will be mostly empty unless they have to understand the context they are in. I also worry we would need to duplicate access and security checks that we implement in the service methods. Basically, I think you need the full context of the service handler in order to make an intelligent choice about which validation group you should be using, hence, I still think what makes the most sense is to provide support at the service method level. - Read payload - Load all objects and apply property changes - Validate (possibly delegating to helper) - Invoke service methods - Return values Do you need a post-invocation validation pass or the ability for an invocation to return both validation errors and a result object? If I would have to choose, I would definitely go for invocation to return both validation errors and a result object. Otherwise, all these independent handlers, (pre-validation, service, post-validation) are going to end up having to check what's passed in before they can do any real work. If these passes are separate, we just end up doing the same checks over and over again in different spots of the same service call because each spot now becomes a different state in a state machine that can, especially with post-validation, have many different entry points. If that's the case, it becomes tedious to figure out which validation group needs to be applied without reproducing the work the service handler method did. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Overhaul the RequestFactory server code. (issue1080801)
I know it is, but the idea to have direct support is that constraint violations must be translated properly in order to make it back to the UI, I'm talking mainly about the editor framework here. Currently, a first pass is done to validate, any constraints are translated and then the service method is invoked. When invoked, there is no catch for that exception, so we would get the raw exception back on the client instead of a payload that the GWT machinery expects in order to bind this properly to the UI On Fri, Nov 5, 2010 at 4:08 PM, Nick Chalko ncha...@google.com wrote: If I would have to choose, I would definitely go for invocation to return both validation errors and a result object. ContraintViolationExcpetion, is serializable, but it does not return the the root object. see http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/org/hibernate/validator/engine/ConstraintViolationImpl_CustomFieldSerializer.java -- Generate you java flags for easier testing. go/java_flags -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] 2.1 is here -- thanks
Thank you but all I really did was complain :-) Seriously, I'm in love with this editor framework, it is fantastic and it will only get better as it matures to handle corner cases. I can only hope it gets the samples, documentation and demos it so rightly deserves in the short term so that developers adopt it. MVP has been highly publicized already thanks to Google I/O and will be immediately adopted. The editor framework is even more important due to the amount of code it eliminates especially when used in conjunction with javax validation. On Sat, Oct 30, 2010 at 12:10 AM, Ray Ryan rj...@google.com wrote: If you were paying careful attention, you just may have noticed that we shipped GWT 2.1 yesterday. http://googlewebtoolkit.blogspot.com/2010/10/announcing-final-release-of-gwt-21.html I'd like to thank the GWT Contrib community for all of your interest in and support with this release. It simply could not have happened without your participation in design discussions, your patches, and your scrutiny of patches. I'd particularly like to thank Thomas Broyer and Patrick Julien, who were very vocal pioneering adopters of all the new stuff. You found bugs, found design flaws, and had tremendous patience as we pulled the api rug out from under you again and again. Of course it's dangerous to single people out for praise, for fear making the many other contributors feel neglected — I hope I'm not doing that. Many, many thanks again to everyone. rjrjr -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] HandlerManager is going way of the dodo!
In the case of HandlerManager, you just need to replace it with EventBus/SimpleEventBus. The interface is nice if you're working with gin and it's also nice for unit testing. If you don't want to be bothered too much, just substitute all instances of HandlerManager with SimpleEventBus and you're done. On Sun, Oct 17, 2010 at 1:47 PM, dmen dmenou...@gmail.com wrote: I love how you deprecate core stuff, just like that. It shows how much thought you put before introducing APIs. By now, it seems like half of GWT API must be at deprecated state. No problem, simply slap @Deprecated, @SuppressWarnings(deprecation) all over the place and you 're done. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Not using dvsDataMap on child entities
Do you have any idea on how I could get to the modified sub-entity? I have no way of reaching it right now. Even if this is outside your design for request factory it kind of conflicts with the design of editors. Editors want to get an object graph and that's what we would want to send back since this is what we got. Also, I don't understand if you're using manual or javax validations on how you're suppose to make an informed decision if something passes a validation or not in the service handler if pieces of the object graph come in one at a time. On Fri, Oct 15, 2010 at 10:48 AM, BobV b...@google.com wrote: On Thu, Oct 14, 2010 at 8:17 PM, Patrick Julien pjul...@gmail.com wrote: As a follow up this, the internal persist() method isn't called on these modified entities either. Chained persistence is explicitly outside the RequestFactory design because RequestFactory doesn't know anything about persistence. Introducing a proper service layer into the server code should make this easier to implement. -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Not using dvsDataMap on child entities
Not to mention that it's right there, it's in dvsDataMap, the only problem is that it's sending the copy from the wrong map, that's it. On Fri, Oct 15, 2010 at 11:01 AM, Patrick Julien pjul...@gmail.com wrote: Do you have any idea on how I could get to the modified sub-entity? I have no way of reaching it right now. Even if this is outside your design for request factory it kind of conflicts with the design of editors. Editors want to get an object graph and that's what we would want to send back since this is what we got. Also, I don't understand if you're using manual or javax validations on how you're suppose to make an informed decision if something passes a validation or not in the service handler if pieces of the object graph come in one at a time. On Fri, Oct 15, 2010 at 10:48 AM, BobV b...@google.com wrote: On Thu, Oct 14, 2010 at 8:17 PM, Patrick Julien pjul...@gmail.com wrote: As a follow up this, the internal persist() method isn't called on these modified entities either. Chained persistence is explicitly outside the RequestFactory design because RequestFactory doesn't know anything about persistence. Introducing a proper service layer into the server code should make this easier to implement. -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] JsonRequestProcessor can't execute validation groups
Namely this: violations = validator.validate(entityInstance); we can't do violations = validator.validate(entityInstance, SomeGroup.class); I'm bringing it up, I don't have a solution for this right now but I feel we should have at least have a way to disable the validator inside the processor so we can do our own -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Not using dvsDataMap on child entities
Simple test case: User Office hours I will get back entity proxies that are represent this information on the client. If I call edit. The entire tree is now mutable thanks to the latest fixes. However, if I update a sub-entity, when I fire this request back to the server, I have the following: 1. Client side, office hours has the right value 2. The json request has the right value in JsonRequestProcessor 3. OfficeHours.findOfficeHours is called with the right id 4. The right setter method is called with the right value on the object, again all good. 5. The newly modified entity is stored in dvsDataMap. Since this is a delta, this is again good. 6. The user object that is passed to the service method is the right one, again all good However, 7. The office hours object passed in with the user object in step #6 is a pristine db copy. It's not the one from dvsDataMap, it's the one that was collected when the user was first grabbed. So when I commit the object graph, I commit without any modifications so we have public static void persist(sessionId, userAccount) { userAccount is the right one, modifications and all but userAccount.ListofficeHours and its contents are the one from returned from UserAccount.findUserAccount instead of what's in dvsDataMap -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Not using dvsDataMap on child entities
and forgot to mention, adding is fine. So if I add a new office hour to an existing user, I get a new entity as a child of the user. Also somewhat related and that I forgot to mention, the user itself, if modified, is also the right value, and is coming in from dvsDataMap On Thu, Oct 14, 2010 at 2:15 PM, Patrick Julien pjul...@gmail.com wrote: Simple test case: User Office hours I will get back entity proxies that are represent this information on the client. If I call edit. The entire tree is now mutable thanks to the latest fixes. However, if I update a sub-entity, when I fire this request back to the server, I have the following: 1. Client side, office hours has the right value 2. The json request has the right value in JsonRequestProcessor 3. OfficeHours.findOfficeHours is called with the right id 4. The right setter method is called with the right value on the object, again all good. 5. The newly modified entity is stored in dvsDataMap. Since this is a delta, this is again good. 6. The user object that is passed to the service method is the right one, again all good However, 7. The office hours object passed in with the user object in step #6 is a pristine db copy. It's not the one from dvsDataMap, it's the one that was collected when the user was first grabbed. So when I commit the object graph, I commit without any modifications so we have public static void persist(sessionId, userAccount) { userAccount is the right one, modifications and all but userAccount.ListofficeHours and its contents are the one from returned from UserAccount.findUserAccount instead of what's in dvsDataMap -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] GWT Editors - wiki documentation review requested
EditorComposite, it's not clear if you make your own when, or if, you should add sub-editor values to the collection that backs the EditorComposite. This burned us big time. driver.getPath() needs to be exposed somehow, I understand it isn't exposed here since entities are not mentioned Should explicitly state editors can be read-only, would be worthwhile I think. Not everyone is going to assume that editors can be used for details. The document uses Label but why not make it a bullet point? I also sent in a use case a while back, you might want to give it a look. It asks how you should do layout of editors when you don't have a 1:1 object hierarchy to match the editors. On Mon, Oct 11, 2010 at 2:54 PM, BobV b...@google.com wrote: http://code.google.com/p/google-web-toolkit/wiki/Editors What's missing? What's unclear? If you have been using the Editor framework, what gotchas have you run into? -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Ensure that EntityProxy instances returned from Collections returned from an editable EntityProx... (issue976801)
thank you On Sat, Oct 9, 2010 at 11:28 AM, b...@google.com wrote: Reviewers: rjrjr, Description: Ensure that EntityProxy instances returned from Collections returned from an editable EntityProxy are editable. Patch by: bobv Review by: rjrjr Found by: pjulien Please review this at http://gwt-code-reviews.appspot.com/976801/show Affected files: M user/src/com/google/gwt/requestfactory/client/impl/EntityProxyCategory.java M user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java Index: user/src/com/google/gwt/requestfactory/client/impl/EntityProxyCategory.java === --- user/src/com/google/gwt/requestfactory/client/impl/EntityProxyCategory.java (revision 8983) +++ user/src/com/google/gwt/requestfactory/client/impl/EntityProxyCategory.java (working copy) @@ -49,8 +49,7 @@ return stableId(bean).hashCode(); } - public static AbstractRequestContext requestContext( - AutoBean? extends EntityProxy bean) { + public static AbstractRequestContext requestContext(AutoBean? bean) { return (AbstractRequestContext) bean.getTag(REQUEST_CONTEXT); } @@ -70,13 +69,11 @@ * EntityProxy, that its return values are mutable. */ // CHECKSTYLE_OFF - public static T T __intercept(AutoBean? extends EntityProxy bean, - T returnValue) { + public static T T __intercept(AutoBean? bean, T returnValue) { // CHECKSTYLE_ON - if (!(returnValue instanceof EntityProxy)) { - return returnValue; - } + AbstractRequestContext context = requestContext(bean); + /* * The context will be null if the bean is immutable. If the context is * locked, don't try to edit. @@ -85,8 +82,26 @@ return returnValue; } - �...@suppresswarnings(unchecked) - T toReturn = (T) context.edit((EntityProxy) returnValue); - return toReturn; + /* + * EntityProxies need to be recorded specially by the RequestContext, so + * delegate to the edit() method for wiring up the context. + */ + if (returnValue instanceof EntityProxy) { + �...@suppresswarnings(unchecked) + T toReturn = (T) context.edit((EntityProxy) returnValue); + return toReturn; + } + + /* + * We're returning some object that's not an EntityProxy, most likely a + * Collection type. At the very least, propagate the current RequestContext + * so that editable chains can be constructed. + */ + AutoBeanT otherBean = AutoBeanUtils.getAutoBean(returnValue); + if (otherBean != null) { + otherBean.setTag(EntityProxyCategory.REQUEST_CONTEXT, + bean.getTag(EntityProxyCategory.REQUEST_CONTEXT)); + } + return returnValue; } } Index: user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java === --- user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java (revision 8983) +++ user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java (working copy) @@ -1762,6 +1762,10 @@ @Override public void onSuccess(SimpleFooProxy response) { assertEquals(2, response.getOneToManyField().size()); + + // Check lists of proxies returned from an mutable object are mutable + response = simpleFooRequest().edit(response); + response.getOneToManyField().get(0).setUserName(canMutate); finishTestAndReset(); } }); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Ensure that EntityProxy instances returned from Collections returned from an editable EntityProx... (issue976801)
thanks, I've got the patch already On Sat, Oct 9, 2010 at 11:42 AM, Patrick Julien pjul...@gmail.com wrote: thank you On Sat, Oct 9, 2010 at 11:28 AM, b...@google.com wrote: Reviewers: rjrjr, Description: Ensure that EntityProxy instances returned from Collections returned from an editable EntityProxy are editable. Patch by: bobv Review by: rjrjr Found by: pjulien Please review this at http://gwt-code-reviews.appspot.com/976801/show Affected files: M user/src/com/google/gwt/requestfactory/client/impl/EntityProxyCategory.java M user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java Index: user/src/com/google/gwt/requestfactory/client/impl/EntityProxyCategory.java === --- user/src/com/google/gwt/requestfactory/client/impl/EntityProxyCategory.java (revision 8983) +++ user/src/com/google/gwt/requestfactory/client/impl/EntityProxyCategory.java (working copy) @@ -49,8 +49,7 @@ return stableId(bean).hashCode(); } - public static AbstractRequestContext requestContext( - AutoBean? extends EntityProxy bean) { + public static AbstractRequestContext requestContext(AutoBean? bean) { return (AbstractRequestContext) bean.getTag(REQUEST_CONTEXT); } @@ -70,13 +69,11 @@ * EntityProxy, that its return values are mutable. */ // CHECKSTYLE_OFF - public static T T __intercept(AutoBean? extends EntityProxy bean, - T returnValue) { + public static T T __intercept(AutoBean? bean, T returnValue) { // CHECKSTYLE_ON - if (!(returnValue instanceof EntityProxy)) { - return returnValue; - } + AbstractRequestContext context = requestContext(bean); + /* * The context will be null if the bean is immutable. If the context is * locked, don't try to edit. @@ -85,8 +82,26 @@ return returnValue; } - �...@suppresswarnings(unchecked) - T toReturn = (T) context.edit((EntityProxy) returnValue); - return toReturn; + /* + * EntityProxies need to be recorded specially by the RequestContext, so + * delegate to the edit() method for wiring up the context. + */ + if (returnValue instanceof EntityProxy) { + �...@suppresswarnings(unchecked) + T toReturn = (T) context.edit((EntityProxy) returnValue); + return toReturn; + } + + /* + * We're returning some object that's not an EntityProxy, most likely a + * Collection type. At the very least, propagate the current RequestContext + * so that editable chains can be constructed. + */ + AutoBeanT otherBean = AutoBeanUtils.getAutoBean(returnValue); + if (otherBean != null) { + otherBean.setTag(EntityProxyCategory.REQUEST_CONTEXT, + bean.getTag(EntityProxyCategory.REQUEST_CONTEXT)); + } + return returnValue; } } Index: user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java === --- user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java (revision 8983) +++ user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java (working copy) @@ -1762,6 +1762,10 @@ @Override public void onSuccess(SimpleFooProxy response) { assertEquals(2, response.getOneToManyField().size()); + + // Check lists of proxies returned from an mutable object are mutable + response = simpleFooRequest().edit(response); + response.getOneToManyField().get(0).setUserName(canMutate); finishTestAndReset(); } }); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] AutoBean frozen bug repeat
thanks, I've got the patch already On Sat, Oct 9, 2010 at 11:42 AM, BobV b...@google.com wrote: On Fri, Oct 8, 2010 at 8:01 PM, Patrick Julien pjul...@gmail.com wrote: Proxies reached from getters from a mutable proxy aren't mutable In the meantime, you can can edit() for the entity that should be mutable, but isn't. http://gwt-code-reviews.appspot.com/976801 -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] AutoBean frozen bug repeat
Proxies reached from getters from a mutable proxy aren't mutable doc for edit: /** * Returns a mutable version of the proxy, whose mutations will accumulate in * this context. Proxies reached via getters on this mutable proxy will also * be mutable. */ T extends EntityProxy T edit(T object); reduced code showing problem: final Driver driver = GWT.create(Driver.class); driver.initialize(requests, view); requests.domainRequest().get(getSessionId(), getId()).with(driver.getPaths()).fire(chain.add(new ReceiverPracticeHandle() { @Override public void onSuccess(final DomainHandle response) { final PracticeRequest rc = requests.practiceRequest(); final PracticeHandle practiceHandle = rc.edit(response); final RequestLong r = rc.persist(getSessionId(), practiceHandle); // for loop added to show problem for (final PatientNotificationHandle handle : practiceHandle.getPatientNotifications()) { handle.setNotificationScheme(PatientNotificationScheme.Daily); } // rest removed } })); handle.setNotificationScheme throws here with AutoBean is frozen sub-editors aren't able to set values either unlike my phantom problem I reported earlier -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] [google-web-toolkit] r8965 committed - Resolves ROO-1508 by requiring CompositeEditors to return a canonical ...
Thank you, my editor works now, and on the first try too, I have a very complex object graph and it just handles' it. GWT has never been so good. On Thu, Oct 7, 2010 at 10:52 AM, codesite-nore...@google.com wrote: Revision: 8965 Author: b...@google.com Date: Wed Oct 6 10:46:19 2010 Log: Resolves ROO-1508 by requiring CompositeEditors to return a canonical component Editor instance for path traversal. Patch by: bobv Review by: rjrjr Review at http://gwt-code-reviews.appspot.com/965801 http://code.google.com/p/google-web-toolkit/source/detail?r=8965 Modified: /trunk/user/src/com/google/gwt/editor/client/CompositeEditor.java /trunk/user/src/com/google/gwt/editor/client/adapters/ListEditor.java /trunk/user/src/com/google/gwt/editor/client/adapters/OptionalFieldEditor.java /trunk/user/src/com/google/gwt/editor/rebind/AbstractEditorDriverGenerator.java /trunk/user/src/com/google/gwt/editor/rebind/model/EditorModel.java /trunk/user/test/com/google/gwt/requestfactory/client/ui/EditorTest.java === --- /trunk/user/src/com/google/gwt/editor/client/CompositeEditor.java Mon Sep 13 09:30:34 2010 +++ /trunk/user/src/com/google/gwt/editor/client/CompositeEditor.java Wed Oct 6 10:46:19 2010 @@ -80,6 +80,12 @@ */ C getValue(E subEditor); } + + /** + * Returns an canonical sub-editor instance that will be used by the driver + * for computing all edited paths. + */ + E createEditorForTraversal(); /** * Used to implement {...@link EditorDelegate#getPath()}. === --- /trunk/user/src/com/google/gwt/editor/client/adapters/ListEditor.java Mon Sep 13 09:30:34 2010 +++ /trunk/user/src/com/google/gwt/editor/client/adapters/ListEditor.java Wed Oct 6 10:46:19 2010 @@ -51,6 +51,12 @@ protected ListEditor(EditorSourceE source) { this.editorSource = source; } + + public E createEditorForTraversal() { + E toReturn = editorSource.create(0); + editorSource.dispose(toReturn); + return toReturn; + } public void flush() { list.flush(); === --- /trunk/user/src/com/google/gwt/editor/client/adapters/OptionalFieldEditor.java Sun Oct 3 11:35:25 2010 +++ /trunk/user/src/com/google/gwt/editor/client/adapters/OptionalFieldEditor.java Wed Oct 6 10:46:19 2010 @@ -62,6 +62,10 @@ protected OptionalFieldEditor(E subEditor) { this.subEditor = subEditor; } + + public E createEditorForTraversal() { + return subEditor; + } public void flush() { currentValue = chain.getValue(subEditor); === --- /trunk/user/src/com/google/gwt/editor/rebind/AbstractEditorDriverGenerator.java Wed Sep 29 11:01:14 2010 +++ /trunk/user/src/com/google/gwt/editor/rebind/AbstractEditorDriverGenerator.java Wed Oct 6 10:46:19 2010 @@ -194,8 +194,8 @@ for (EditorData d : data) { String mutableObjectExpression; if (d.getBeanOwnerExpression().length() 0) { - mutableObjectExpression = mutableObjectExpression(d, String.format( - (getObject()%s), d.getBeanOwnerExpression())); + mutableObjectExpression = mutableObjectExpression(d, + String.format((getObject()%s), d.getBeanOwnerExpression())); } else { mutableObjectExpression = getObject(); } @@ -294,7 +294,8 @@ editor.getQualifiedSourceName(), List.class.getName()); sw.indent(); for (EditorData d : data) { - if (d.isDelegateRequired() || d.isDeclaredPathNested()) { + if (d.isDelegateRequired() || d.isDeclaredPathNested() + || d.isCompositeEditor()) { // if (editor.subEditor != null) { sw.println(if (editor.%s != null) {, d.getSimpleExpression()); sw.indent(); @@ -308,6 +309,15 @@ sw.println(%s.traverseEditor(editor.%s, localPath, paths);, getEditorDelegate(d), d.getSimpleExpression()); } + if (d.isCompositeEditor()) { + /* + * composedDelegate.traverseEditor(editor.subEditor. + * createEditorForTraversal(), localPath, paths); + */ + sw.println( + %s.traverseEditor(editor.%s.createEditorForTraversal(), localPath, paths);, + getEditorDelegate(d.getComposedData()), d.getSimpleExpression()); + } sw.outdent(); sw.println(}); } @@ -330,7 +340,7 @@ * @param context * @param model * @param sw - * + * * @throws UnableToCompleteException */ protected void writeAdditionalContent(TreeLogger logger, === --- /trunk/user/src/com/google/gwt/editor/rebind/model/EditorModel.java Sun Oct 3 11:35:25 2010 +++ /trunk/user/src/com/google/gwt/editor/rebind/model/EditorModel.java Wed Oct
[gwt-contrib] Other use case for editor framework
Hi Bob, If you're interested in more use cases for the editor framework, here's another one for you... The problem is actually pretty common, the idea is that if you want to create, or layout, an object in the hierarchy where it technically isn't, you can't. This happens quite a bit, and when it does, we have to step out of the editor framework and now that I'm using it, I never, ever want to do that again. Consider the following scenario from our application: 1. We create a practice 2. We create offices for this practice 3. We create a list of physician, nurses, etc. for the practice. These objects, the users, are now siblings of offices since they're both part of a practice Later on, say a physician, will login and assign availability for the offices. He can't create an office in the practice but he can create availability objects for each office. These new objects, his availability, are now owned by the user but obviously have a weak reference to an office. The layout on page would be practice (read only) - list of offices (read only) - list of availabilities per office for this (edit/create) But an availability object is not owned by an office, it's owned by a user. Using the editor framework, it's very easy to pull down an object graph that represents the practice and offices and lay them out. Even if it's read only, the data binding part of the editor framework is just too good to pass up. Then, however, we're kind of stuck on the list of availabilities. We have no way to tell the framework these availability objects need to be filled in for this office. Nor do we have the ability to receive a value, the user object, when creating it. We're using various kludges to get around this but I was thinking this scenario might be popular enough to expose. The solution could be as simple as having another EntityProxy for the entity, one that would support not having a @ProxyFor annotation, and we just fill it out before we pass data to the driver. We could make the point that we're setting data either way, we've just moved setting the values from somewhere to somewhere else but in the second case, we could do it all from one place, in a Receiver, that has no UI knowledge other than it needs to build a graph that makes sense for the current context. The other argument is once you've done the Editor framework, you can't come back from that, it's just too good and easy for getting things done quickly, so more data binding features are needed. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] AutoBean frozen bug
I believe I've encountered the bug. What I see is on reception, all the entities proxies are made immutable. They stay frozen, and finally, when flushing the driver, there is yet another loop to freeze all the AutoBeans. Nowhere in between were the beans made mutable. This is necessary because we sometimes have custom setters we must call. In this case, we have the following: @Override public void saveTriggered() { getValue().setActive(!view.isPracticeDeactivated()); save(); } We need to invert the value of the check box, so we can't use the checkbox directly as an editor. If I am creating a practice here where the EntityProxy comes in from RequestContext.create() instead of the server, everything is fine, the value is set to the proxy via this call and save() proceeds to use the driver to flush changes. If the entity proxy originated on the server however, calling set active throws IllegalStateException(The AutoBean has been frozen); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Sub entities not being filled in
r8965 fixed the remaining issue. The other issue was on the AutoBean itself and was previously fixed. However, I believe I have found another issue in AbstractAutoBean which I just posted. On Thu, Oct 7, 2010 at 4:57 PM, Ray Cromwell cromwell...@gmail.com wrote: Patrick, Are you using an ORM like hibernate or JDO? One of my concerns is, unless you wrap the entire request in an transaction, the result of any find() calls within JsonRequestProcessor are going to be detached objects. Different ORMs have different pre-fetched semantics, for example, some of them will by default, fetch 1-level deep references. After detachment, generally trying to retrieve a relational field returns null. JsonRequestProcessor is ORM agnostic, so it is generally up to the developer to ensure that objects will be completely filled out or lazily fillable before RequestFactory tries to serialize them. On Mon, Oct 4, 2010 at 11:15 AM, Ray Ryan rj...@google.com wrote: https://jira.springsource.org/browse/ROO-1488 On Mon, Oct 4, 2010 at 11:13 AM, Ray Ryan rj...@google.com wrote: Bob is in transit today. We're working on a fix. On Mon, Oct 4, 2010 at 9:07 AM, Patrick Julien pjul...@gmail.com wrote: Bob, any suggestions for a work around for the moment? On Mon, Oct 4, 2010 at 9:41 AM, Patrick Julien pjul...@gmail.com wrote: For the editor part, I can see in the generated code for my editor that public static void traverseEditor(com.*.client.ui.EditorContainer editor, String prefix, java.util.ListString paths) { } is completely empty but in this case, EditorContainer contains OfficeEditor because it's a composite. OfficeEditor has one AddressEditor and a HasDataEditorPhone so getPath() is currently buggy unless there's a way I can fill in my own traverseEditor somehow On Sun, Oct 3, 2010 at 9:47 PM, Patrick Julien pjul...@gmail.com wrote: I'm still having difficulties even with this syntax, again the collections seem to be the problem so having offices give me back all my offices. but putting offices.address, or offices.office.address or office.address still gives me null On Sun, Oct 3, 2010 at 9:07 PM, Ray Cromwell cromwell...@gmail.com wrote: the syntax of with() is with(property.subProperty.subSubProperty, property2.subProperty2.subPropertyProperty2). Bob can answer the question as to how to make deeply composited editors do the right thing. On Sun, Oct 3, 2010 at 6:02 PM, Patrick Julien pjul...@gmail.com wrote: No, it's not just me, anything one level deep doesn't get picked up. So my offices also have on address and it's not in the getPath() array either. Even if it was, what's the syntax for sub path elements? On Sun, Oct 3, 2010 at 8:38 PM, Patrick Julien pjul...@gmail.com wrote: Getting there. So now getPaths() gets me the data for my offices and patients but not the phones inside the offices. Since offices is using my own composite editor, I'm going to assume that's where the problem is On Sun, Oct 3, 2010 at 8:22 PM, BobV b...@google.com wrote: On Sun, Oct 3, 2010 at 7:24 PM, Patrick Julien pjul...@gmail.com wrote: Yeah, because even with using with(). The problem is the entire object graph isn't there So I have a practice that has offices and each office has phones. So if I ask for offices. It fills in the offices but the phones inside it are not. This could get laborious if I need to do this manually for each editing activity Use RequestFactoryEditorDriver.getPaths(); interface MyOfficeDriver extends RequesFactoryEditorDriverOfficeProxy, OfficeEditor {} MyOfficeDriver driver = GWT.create(MyOfficeDriver.class); driver.initialize(requestFactory, editor); requestFactory.officeService().fetchOffice(1234).with(driver.getPaths()).to(receiver).fire(); -- Bob Vawter Google Web Toolkit Team -- 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 -- 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 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] AutoBean frozen bug
Yes, I know, rc.edit() is called, this is just before the flush, rc.edit has been called well before this. On Thu, Oct 7, 2010 at 5:23 PM, BobV b...@google.com wrote: On Thu, Oct 7, 2010 at 1:55 PM, Patrick Julien pjul...@gmail.com wrote: They stay frozen, and finally, when flushing the driver, there is yet another loop to freeze all the AutoBeans. Nowhere in between were the beans made mutable. This is necessary because we sometimes have custom setters we must call. In this case, we have the following: This is as designed. All mutations to EntityProxy objects must be be accumulated somewhere in order to be sent to the server. That somewhere is the RequestContext. It's always necessary to call RequestContext.edit() before mutating an EntityProxy. -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] AutoBean frozen bug
And I might add, otherwise the flush would fail, values coming from the editors directly are fine On Thu, Oct 7, 2010 at 5:25 PM, Patrick Julien pjul...@gmail.com wrote: Yes, I know, rc.edit() is called, this is just before the flush, rc.edit has been called well before this. On Thu, Oct 7, 2010 at 5:23 PM, BobV b...@google.com wrote: On Thu, Oct 7, 2010 at 1:55 PM, Patrick Julien pjul...@gmail.com wrote: They stay frozen, and finally, when flushing the driver, there is yet another loop to freeze all the AutoBeans. Nowhere in between were the beans made mutable. This is necessary because we sometimes have custom setters we must call. In this case, we have the following: This is as designed. All mutations to EntityProxy objects must be be accumulated somewhere in order to be sent to the server. That somewhere is the RequestContext. It's always necessary to call RequestContext.edit() before mutating an EntityProxy. -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors