Re: Workaround for Embedded objects

2011-05-18 Thread Jerome Thoma
Cheers, but that didn't help. Maybe David can elaborate on what he said 
above about the enum being declared in the proxy? The strange thing is that 
persisting works for a newly created object, but not for an existing one 
that I edit. The same mechanism is used for other proxy types which work 
fine, so it must have something to do with the fact that it contains an enum 
type. I am stuck here, so any help is appreciated...

Greetings
Jerome

-- 
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: Workaround for Embedded objects

2011-05-18 Thread Jerome Thoma
Never mind, I've finally found my mistake. I forgot to make my find method 
accessible in the locator object. Someone else just posted the same problem 
a short while ago.
Sorry to bother anyone...

-- 
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: Workaround for Embedded objects

2011-05-12 Thread Hamzeh
I am not sure, but try:
public enum PermissionEnum implements Serializable{ ...

On May 11, 5:23 pm, Jerome Thoma thoma...@googlemail.com wrote:
 Could you please provide more information on using enums? I am trying to use
 a custom enum type:
 public enum PermissionEnum{
 ...}

 in an EntityProxy as:
     PermissionEnum getPermission();
     void setPermission(PermissionEnum permission);

 The PermissionEnum type is declared in a package that is accessible from
 both the server and the client.
 When I request an object from the server, it all works fine, but when I try
 to send an object to the server for persisting I get a ServerFailure
 exception stating that:
 Server Error: The requested entity is not available on the server
 Does this have anything to do with the use of the enum type?

 Cheers
 Jerome

-- 
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: Workaround for Embedded objects

2011-05-11 Thread Jerome Thoma
Could you please provide more information on using enums? I am trying to use 
a custom enum type:
public enum PermissionEnum{
...
}
in an EntityProxy as:
PermissionEnum getPermission();
void setPermission(PermissionEnum permission);

The PermissionEnum type is declared in a package that is accessible from 
both the server and the client.
When I request an object from the server, it all works fine, but when I try 
to send an object to the server for persisting I get a ServerFailure 
exception stating that:
Server Error: The requested entity is not available on the server
Does this have anything to do with the use of the enum type?

Cheers
Jerome

-- 
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: Workaround for Embedded objects

2011-01-26 Thread Daghan
David, 
This has driven me nuts. Any update on the sample app?

-- 
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.



Workaround for Embedded objects

2011-01-04 Thread Aldo Neto
Hi,

I've been struggling with RequestFactory lately and I just found that it
doesn't support what I need, i.e. Embedded objects.

Note that RequestFactory does not currently support embedded objects
(@Embedded in various ORM frameworks) because it expects every entity to
exist independently with its own ID (from
http://code.google.com/intl/pt-BR/webtoolkit/doc/latest/DevGuideRequestFactory.html#relationships
).

I'd like to know how I can achieve the same result as using @Embedded /
@EmbeddedId. Any clue?

One last information: What I need is to map a N:M relationship and add some
extra data to it, so I followed these instructions:
http://sieze.wordpress.com/2009/09/04/mapping-a-many-to-many-join-table-with-extra-column-using-jpa/

Thanks,
Aldo

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Workaround for Embedded objects

2011-01-04 Thread Y2i
ValueProxy can help with @Embedded, please take a look at Thomas' post
here:

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/743631b8460d931b/4242f0ef5de751e7?lnk=gstq=ValueProxy#4242f0ef5de751e7


On Jan 4, 3:43 pm, Aldo Neto tumo...@gmail.com wrote:
 Hi,

 I've been struggling with RequestFactory lately and I just found that it
 doesn't support what I need, i.e. Embedded objects.

 Note that RequestFactory does not currently support embedded objects
 (@Embedded in various ORM frameworks) because it expects every entity to
 exist independently with its own ID 
 (fromhttp://code.google.com/intl/pt-BR/webtoolkit/doc/latest/DevGuideReque...
 ).

 I'd like to know how I can achieve the same result as using @Embedded /
 @EmbeddedId. Any clue?

 One last information: What I need is to map a N:M relationship and add some
 extra data to it, so I followed these 
 instructions:http://sieze.wordpress.com/2009/09/04/mapping-a-many-to-many-join-tab...

 Thanks,
 Aldo

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Workaround for Embedded objects

2011-01-04 Thread David Chandler
Yes, as of 2.1.1, you can use @Embedded with RequestFactory. The
embedded type needs to extend ValueProxy instead of EntityProxy, and
you'll need to use .with(embedded_field_name) when firing the request
in order for RF to populate the field. I expect to have a sample up in
the next week. Note that enums now work, too, as long as you declare
the enum type in the proxy, which is shared between client and server.

/dmc

On Tue, Jan 4, 2011 at 7:16 PM, Y2i yur...@gmail.com wrote:
 ValueProxy can help with @Embedded, please take a look at Thomas' post
 here:

 http://groups.google.com/group/google-web-toolkit/browse_thread/thread/743631b8460d931b/4242f0ef5de751e7?lnk=gstq=ValueProxy#4242f0ef5de751e7


 On Jan 4, 3:43 pm, Aldo Neto tumo...@gmail.com wrote:
 Hi,

 I've been struggling with RequestFactory lately and I just found that it
 doesn't support what I need, i.e. Embedded objects.

 Note that RequestFactory does not currently support embedded objects
 (@Embedded in various ORM frameworks) because it expects every entity to
 exist independently with its own ID 
 (fromhttp://code.google.com/intl/pt-BR/webtoolkit/doc/latest/DevGuideReque...
 ).

 I'd like to know how I can achieve the same result as using @Embedded /
 @EmbeddedId. Any clue?

 One last information: What I need is to map a N:M relationship and add some
 extra data to it, so I followed these 
 instructions:http://sieze.wordpress.com/2009/09/04/mapping-a-many-to-many-join-tab...

 Thanks,
 Aldo

 --
 You received this message because you are subscribed to the Google Groups 
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-web-toolkit?hl=en.





-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.