Re: GWT request factory - Fire request inside of success method of another request

2013-07-17 Thread salk31
Assuming you removed the extra GWT.create (as Thomas mentioned on 
stackoverflow).. if might be worth trying putting the second call inside a 
Scheduler.get().scheduleFinally...

Seems odd. I'm sure we do this sort of thing (less directly) all the time.

On Wednesday, July 17, 2013 8:21:30 PM UTC+1, Jan wrote:
>
> You mean renaming the inner request method? I tried that -> doesn't change 
> anything.
>
> It is not only in prod mode. It's a GWT test case that I run locally.
>
> Am Montag, 15. Juli 2013 23:29:14 UTC+2 schrieb Thomas Broyer:
>>
>> It's always worth mentionning when you also posted to StackOverflow: 
>> http://stackoverflow.com/q/17577892/116472
>>
>> Just an idea: did you try renaming your variables so you don't have 
>> shadowing? (if it happens only in prod mode, there could be a bug in the 
>> GWT compiler)
>>
>> On Monday, July 15, 2013 10:10:48 PM UTC+2, Jan wrote:
>>>
>>> I am trying to nest two request factory calls in each other. I retrieve 
>>> a post object and in the success-method i use the same object again (just 
>>> for testing purposes, I get the same behavior for other request like for 
>>> example persisting).
>>>
>>> The problem is: Only the first request reaches the server.
>>>
>>> I don't get any error message. If I debug the code, everything works 
>>> until the second request is fired. Nothing happens then. The method on the 
>>> backend is not called, the frontend shows no error, even if I implement the 
>>> "onFailure"-method for the receiver of the second request.
>>>
>>> public class RequestFactoryFindTest extends GWTTestCase{
>>>
>>> /**
>>>  * must refer to a valid module that sources this class.
>>>  */
>>> public String getModuleName() {
>>> return "com.Test.MyTest";
>>> }
>>>
>>> public void test(){
>>> final ClientFactory clientFactory = 
>>> GWT.create(ClientFactoryImpl.class);
>>> final MyRequestFactory requestFactory = 
>>> clientFactory.getRequestFactory();
>>> final PostRequest request = requestFactory.postRequest();
>>>
>>>
>>> request.findPost(1l).fire(new Receiver() {
>>>
>>> @Override
>>> public void onSuccess(PostProxy response) {
>>>
>>>
>>> final ClientFactory clientFactory = 
>>> GWT.create(ClientFactoryImpl.class);
>>> final MyRequestFactory requestFactory = 
>>> clientFactory.getRequestFactory();
>>> final PostRequest request = requestFactory.postRequest();
>>>
>>> System.out.println("outer success");
>>>
>>> request.findPost(1l).fire(new Receiver() {
>>>
>>> @Override
>>> public void onSuccess(PostProxy response) {
>>> System.out.println("inner success");
>>>
>>> }
>>>
>>> });
>>>
>>> }
>>> });
>>>
>>>
>>> }}
>>>
>>> Can someone explain this?
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Re: GWT request factory - Fire request inside of success method of another request

2013-07-17 Thread Jan
You mean renaming the inner request method? I tried that -> doesn't change 
anything.

It is not only in prod mode. It's a GWT test case that I run locally.

Am Montag, 15. Juli 2013 23:29:14 UTC+2 schrieb Thomas Broyer:
>
> It's always worth mentionning when you also posted to StackOverflow: 
> http://stackoverflow.com/q/17577892/116472
>
> Just an idea: did you try renaming your variables so you don't have 
> shadowing? (if it happens only in prod mode, there could be a bug in the 
> GWT compiler)
>
> On Monday, July 15, 2013 10:10:48 PM UTC+2, Jan wrote:
>>
>> I am trying to nest two request factory calls in each other. I retrieve a 
>> post object and in the success-method i use the same object again (just for 
>> testing purposes, I get the same behavior for other request like for 
>> example persisting).
>>
>> The problem is: Only the first request reaches the server.
>>
>> I don't get any error message. If I debug the code, everything works 
>> until the second request is fired. Nothing happens then. The method on the 
>> backend is not called, the frontend shows no error, even if I implement the 
>> "onFailure"-method for the receiver of the second request.
>>
>> public class RequestFactoryFindTest extends GWTTestCase{
>>
>> /**
>>  * must refer to a valid module that sources this class.
>>  */
>> public String getModuleName() {
>> return "com.Test.MyTest";
>> }
>>
>> public void test(){
>> final ClientFactory clientFactory = 
>> GWT.create(ClientFactoryImpl.class);
>> final MyRequestFactory requestFactory = 
>> clientFactory.getRequestFactory();
>> final PostRequest request = requestFactory.postRequest();
>>
>>
>> request.findPost(1l).fire(new Receiver() {
>>
>> @Override
>> public void onSuccess(PostProxy response) {
>>
>>
>> final ClientFactory clientFactory = 
>> GWT.create(ClientFactoryImpl.class);
>> final MyRequestFactory requestFactory = 
>> clientFactory.getRequestFactory();
>> final PostRequest request = requestFactory.postRequest();
>>
>> System.out.println("outer success");
>>
>> request.findPost(1l).fire(new Receiver() {
>>
>> @Override
>> public void onSuccess(PostProxy response) {
>> System.out.println("inner success");
>>
>> }
>>
>> });
>>
>> }
>> });
>>
>>
>> }}
>>
>> Can someone explain this?
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Re: GWT request factory - Fire request inside of success method of another request

2013-07-15 Thread Thomas Broyer
It's always worth mentionning when you also posted to 
StackOverflow: http://stackoverflow.com/q/17577892/116472

Just an idea: did you try renaming your variables so you don't have 
shadowing? (if it happens only in prod mode, there could be a bug in the 
GWT compiler)

On Monday, July 15, 2013 10:10:48 PM UTC+2, Jan wrote:
>
> I am trying to nest two request factory calls in each other. I retrieve a 
> post object and in the success-method i use the same object again (just for 
> testing purposes, I get the same behavior for other request like for 
> example persisting).
>
> The problem is: Only the first request reaches the server.
>
> I don't get any error message. If I debug the code, everything works until 
> the second request is fired. Nothing happens then. The method on the 
> backend is not called, the frontend shows no error, even if I implement the 
> "onFailure"-method for the receiver of the second request.
>
> public class RequestFactoryFindTest extends GWTTestCase{
>
> /**
>  * must refer to a valid module that sources this class.
>  */
> public String getModuleName() {
> return "com.Test.MyTest";
> }
>
> public void test(){
> final ClientFactory clientFactory = 
> GWT.create(ClientFactoryImpl.class);
> final MyRequestFactory requestFactory = 
> clientFactory.getRequestFactory();
> final PostRequest request = requestFactory.postRequest();
>
>
> request.findPost(1l).fire(new Receiver() {
>
> @Override
> public void onSuccess(PostProxy response) {
>
>
> final ClientFactory clientFactory = 
> GWT.create(ClientFactoryImpl.class);
> final MyRequestFactory requestFactory = 
> clientFactory.getRequestFactory();
> final PostRequest request = requestFactory.postRequest();
>
> System.out.println("outer success");
>
> request.findPost(1l).fire(new Receiver() {
>
> @Override
> public void onSuccess(PostProxy response) {
> System.out.println("inner success");
>
> }
>
> });
>
> }
> });
>
>
> }}
>
> Can someone explain this?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Gwt Request factory

2013-04-15 Thread deepak chauhan
@Stefan: I am using Spring for injecting the implementation.

@Thomas: This is the answer I was looking for. Multiple requestContext is
good solution.

Thanks for your precious support.


On Mon, Apr 15, 2013 at 6:46 PM, Thomas Broyer  wrote:

>
>
> On Monday, April 15, 2013 10:38:49 AM UTC+2, deepak chauhan wrote:
>>
>> Hi All,
>>
>> I am using gwt request factory. But, there is one design issue I am
>> facing. As per the proxy design in RequestContext interface I can only
>> declare one service in @service annotation. But there are situations where
>> many methods in the context can be served by different services. But, due
>> to design constraint, I have to put the all context methods in same service.
>>
>
> Why is it so? Why can't you create several RequestContext? If it's about
> batching, there's RequestContext#append().
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Deepak Chauhan

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




Re: Gwt Request factory

2013-04-15 Thread Thomas Broyer


On Monday, April 15, 2013 10:38:49 AM UTC+2, deepak chauhan wrote:
>
> Hi All,
>
> I am using gwt request factory. But, there is one design issue I am 
> facing. As per the proxy design in RequestContext interface I can only 
> declare one service in @service annotation. But there are situations where 
> many methods in the context can be served by different services. But, due 
> to design constraint, I have to put the all context methods in same service.
>

Why is it so? Why can't you create several RequestContext? If it's about 
batching, there's RequestContext#append(). 

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




Re: Gwt Request factory

2013-04-15 Thread Stefan Ollinger
Can you create a service implementation which forwards to the concrete 
services?

Alternatively you can create a proxy for each service.

On 15.04.2013 10:38, deepak chauhan wrote:

Hi All,

I am using gwt request factory. But, there is one design issue I am 
facing. As per the proxy design in RequestContext interface I can only 
declare one service in @service annotation. But there are situations 
where many methods in the context can be served by different services. 
But, due to design constraint, I have to put the all context methods 
in same service.


Can somebody tell me the better way to get it done


--
Deepak Chauhan
--
You received this message because you are subscribed to the Google 
Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to google-web-toolkit+unsubscr...@googlegroups.com.

To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.




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




Re: GWT Request Factory Entity @NotNull Validation doesnt seem to be working

2011-04-17 Thread Owen Ilagan
Thanks!

On Apr 16, 6:46 am, Thomas Broyer  wrote:
> Annotating your classes/fields/accessors is not enough; you need a tool that
> uses those annotations. gwt-servlet-deps only contains the javax.validation
> annotations, not any actual validator.
> Try adding hibernate-validator.jar in your classpath, and see if it makes a
> difference (I bet it will)

-- 
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 Request Factory Entity @NotNull Validation doesnt seem to be working

2011-04-15 Thread Thomas Broyer
Annotating your classes/fields/accessors is not enough; you need a tool that 
uses those annotations. gwt-servlet-deps only contains the javax.validation 
annotations, not any actual validator.
Try adding hibernate-validator.jar in your classpath, and see if it makes a 
difference (I bet it will)

-- 
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 Request Factory Entity @NotNull Validation doesnt seem to be working

2011-04-15 Thread Owen Ilagan
I meant, I just use plain appengine via JDO.

On Apr 15, 6:11 pm, Owen Ilagan  wrote:
> I dont use Hibernate, just JDO and the javax.validation annotation
> classes that came with
> gwt-servlet-deps.jar which I already included in my classpath. Am I
> supposed to use another
> library? I dont see any "Unable to initialize a JSR 303 Bean
> Validator" errors on my console
> either.
>
> On Apr 15, 5:36 pm, Thomas Broyer  wrote:
>
>
>
>
>
>
>
> > Just in case: I suppose you have some JSR 303 validator (hibernate
> > validator, for instance) in your classpath?
> > If you see the "Unable to initialize a JSR 303 Bean Validator" log in the
> > console, then it's not going to work, as it simply won't validate anything.

-- 
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 Request Factory Entity @NotNull Validation doesnt seem to be working

2011-04-15 Thread Owen Ilagan
I dont use Hibernate, just JDO and the javax.validation annotation
classes that came with
gwt-servlet-deps.jar which I already included in my classpath. Am I
supposed to use another
library? I dont see any "Unable to initialize a JSR 303 Bean
Validator" errors on my console
either.

On Apr 15, 5:36 pm, Thomas Broyer  wrote:
> Just in case: I suppose you have some JSR 303 validator (hibernate
> validator, for instance) in your classpath?
> If you see the "Unable to initialize a JSR 303 Bean Validator" log in the
> console, then it's not going to work, as it simply won't validate anything.

-- 
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 Request Factory Entity @NotNull Validation doesnt seem to be working

2011-04-15 Thread Thomas Broyer
Just in case: I suppose you have some JSR 303 validator (hibernate 
validator, for instance) in your classpath?
If you see the "Unable to initialize a JSR 303 Bean Validator" log in the 
console, then it's not going to work, as it simply won't validate anything.

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