How are the acceptable values of the ValueListBox populated? The difference between scenarios 1 and 3 is that in the former the value is not changed (stored in a field in setValue, returned as-is from getValue), while in the latter it is set to the equivalent value from the list of acceptable values.
It might be related to http://code.google.com/p/google-web-toolkit/issues/detail?id=7189 but it depends how you setup your Hibernate sessions. With RF, you're supposed to use the OpenSessionInView paradigm, and then use one transaction per service method. On Tuesday, June 12, 2012 3:54:32 PM UTC+2, Tiago wrote: > > Hello all, > > I'm having a weird scenario in my application, and I guess that if I could > understand better how RF picks the domain objects instances it will provide > to a service, maybe I could understand what's going on. > > Here's my scenario: > > I have an Editor<AProxy>. The domain class A has a property B which is > another domain entity. > In the editor there's a ValueListBox<BProxy>. > > Use cases: > * If I just load the editor and hit submit without touching anything, > everything works nicely. > * If I change the value of B by picking another entity in the > ValueListBox, it also works nicely. > * If I change the value of B as above, but before submitting I change my > mind and return the ValueListBox to its original value, RF will send to my > service an object A whose property B is a non-initialized Hibernate proxy, > linked to a closed session. That will result in a > LazyInitializationException. In the other two cases, it was sending me an > instance of B, not a hibernate proxy. > > Can somebody kindly help me understand how RF composes my object A after > receiving the request payload? Where is it getting this uninitialized proxy > from? > > Thank you, > -- > Tiago Rinck Caveden > > -- 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/-/MD2ZmbOiTF4J. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
