How to avoid unnecessary divs when using UiBinder with a panel, example, HTMLPanel?

2013-07-12 Thread Mohammad Al Quraian
When I use Uibinder and want to have an HTMLPanel to hold another widget 
which is also HTMLPanel, I would have 2 divs, which I only require 1, I 
don't need the external one.

Example:

> ...
> ...
> 
> ...
> ...
> public void addToPanel(Widget widget) {
> panel.clear();
> panel.add(widget);
> }


How can I avoid having the div of the fathering panel?

-- 
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: Stillborn dragstart event

2013-07-12 Thread Enrique Rodriguez
Some progress on this native drag-n-drop issue:

Drag-n-drop working only once, then failing on subsequent tries, only fails
due to a dead event when you delegate to your UiRenderer (native DnD, in
DevMode, using GWT 2.5.1, in an AbstractCell).

Fails after first time:

@Override
public void onBrowserEvent( Context context, Element parent, TaskProxy value,
NativeEvent event, ValueUpdater valueUpdater ) {
renderer.onBrowserEvent( this, event, parent, context );
}

@UiHandler("root")
void onDragStart( DragStartEvent event, Element parent, Context context ) {
event.setData( "text", String.valueOf( context.getIndex() ) );
event.getDataTransfer().setDragImage( parent, 25, 15 );
}

If you replace the delegation to ‘renderer’ with code that sets the data to
transfer directly on the NativeEvent, everything works great:

@Override
public void onBrowserEvent( Context context, Element parent, TaskProxy value,
NativeEvent event, ValueUpdater valueUpdater ) {
// TODO - Add check to ensure event came from "root."
if ( DRAGSTART.equals( event.getType() ) ) {
DataTransfer dataTransfer = event.getDataTransfer();
dataTransfer.setData( "text", String.valueOf( context.getIndex() ) );
dataTransfer.setDragImage( parent, 25, 15 );
}
}

I only found out after getting it working, that this is how
DesktopTaskEditView originally worked before UiRenderer came along:

https://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/mobilewebapp/src/main/com/google/gwt/sample/mobilewebapp/client/desktop/DesktopTaskEditView.java?spec=svn10138&r=10138

Enrique

-- 
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 classes aren't extensible

2013-07-12 Thread Ed Bras
> that way you just apply your patches back when you decide to upgrade GWT
Easy now with Git, but no so easy with SVN before ;)

-- 
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 classes aren't extensible

2013-07-12 Thread Thomas Broyer


On Saturday, July 13, 2013 1:08:03 AM UTC+2, Steve C wrote:
>
> I worry about something that needed to be fixed in one of those methods or 
> inner classes that I copied, and would probably never know about.
>

Version Control Systems FTW!

Also, don't be afraid of running patched (forked) versions of GWT (and 
contributing your patches upstream); that way you just apply your patches 
back when you decide to upgrade GWT so you never miss an upstream update, 
or drop them if they've been applied upstream.

-- 
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 classes aren't extensible

2013-07-12 Thread Ed Bras
I share your pain.
I think the same when copying code... (and I did copy a lot already ;) )...
Just unit-test it well..

-- 
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 classes aren't extensible

2013-07-12 Thread Steve C
I see your point, but, on the other hand, I worry about something that 
needed to be fixed in one of those methods or inner classes that I copied, 
and would probably never know about.

On Friday, July 12, 2013 7:05:04 PM UTC-4, Ed wrote:
>
> This is a known   issue with gwt, see the issue tracker for details.
>
> However, don't forget that this gives the GWT dev team the possibility to 
> change the internal behavior of classes as they don't have to worry about 
> breaking changes because they are extended...
> So it makes it easier for the dev team to "move on" adding/changing 
> features.
> On the other hand, copying a class and adding your own stuff isn't that 
> much work ;)
>
> But still, I have to admit, that things could be set up a bit more OO such 
>  that improves extendibility.
>

-- 
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 classes aren't extensible

2013-07-12 Thread Ed
This is a known   issue with gwt, see the issue tracker for details.

However, don't forget that this gives the GWT dev team the possibility to 
change the internal behavior of classes as they don't have to worry about 
breaking changes because they are extended...
So it makes it easier for the dev team to "move on" adding/changing 
features.
On the other hand, copying a class and adding your own stuff isn't that 
much work ;)

But still, I have to admit, that things could be set up a bit more OO such 
 that improves extendibility.

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




GWT classes aren't extensible

2013-07-12 Thread Steve C
On many occasions, I've wanted to adjust the behavior of a GWT class, but 
have found that I can't, because they tend not to be written with 
extensibility in mind.


   1. Many internal utility methods are private
   2. Many inner classes are private, or maybe package access
   

For example, I wanted to make just a few tweaks in StyleInjector. But, any 
helper logic that I might want to use from the base, such as private native 
StyleElement createElement() or private StyleElement 
createNewStyleSheet(String contents), are, um, PRIVATE.

So I basically have to copy the entire code for the class in my extension.

Similarly, when I wanted to create a "nullable" EditTextCell, I couldn't 
just extend that class, since the actual data for the cell in is static 
class ViewData, which I can't get to, because I'm in a different package. 
So, I had to copy the entire class in order to change just a few lines.
'
Why is there so much avoidance of "protected"?

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




StyleInjector issues in IE

2013-07-12 Thread Steve C
I'm using Ajax to retrieve multiple CSS files, each dedicated to a single 
media query.  or each one, I then wrap the appropriate media query around 
the contents, and then inject it via StyleInjector.injectAtEnd.

The page the app is running has a whole pile of stuff going on, including 
scripts related to social network sharing.

We've run into two issues:

1. The media queries don't seem to be applied, although IE9-10's dev tools 
are hinky enough that this may not actually be the problem

2. Image urls in the CSS sometimes get applied as if they came from some 
other domain, in this particular case, one of the social media ones.

I believe that the issue is in StyleInjector.StyleInjectorImplIE, at the 
end: 

@Override
public StyleElement injectStyleSheetAtEnd(String contents) {
  int documentStyleCount = getDocumentStyleCount();
  if (documentStyleCount == 0) {
return createNewStyleSheet(contents);
  }

  return appendToStyleSheet(documentStyleCount - 1, contents, true);
}

Where the style element it chooses to add to is likely to be one of the 
foreign ones, especially since the social media scripts tend to run late in 
the load process. It looks like IE exposes the href of the CSS, so this 
could be checked.

So, I'm going to try changing it to use injectStylesheet, which looks like 
it chooses the shortest to add to if there are already 30 in place (but 
isn't that going to affect ordering of the rules?)

I would try to write an extension of StyleInjectorImplIE, except that, like 
many GWT classes, it isn't extensible.  I've finally gotten annoyed enough 
at that to write a separate post about it.

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




Re: Gwt RF and Junit - did you forget to inherit a required module

2013-07-12 Thread Thomas Broyer
You're trying to test your RF setup using 
RequestFactorySource+InProcessRequestProcessor yet you're running it as a 
GWTTestCase.
Either you use "VM code" and this is a pure JUnit test, or you use only 
"client" code and you use a GWTTestCase.

You can mix things only in a single way: have your GWTTestCase return 
'null' from getModuleName() so it's run like a pure JUnit test; this is 
helpful when you want to run the same set of tests in both modes 
(RequestFactorySource and GWT.create()): create a GWTTestCase with only 
"client" code and make sure you put the GWT.create() code in an 
overrideable method, then create another test inheriting the previous class 
and overriding the RF creation to use RequestFactorySource and 
getModuleName to return 'null'. This is used quite a few times in GWT 
proper.

Also note that GWTTestCase is JUnit 3, so you cannot use @Test or @Before, 
you have to use the naming conventions instead.

On Friday, July 12, 2013 4:43:05 PM UTC+2, aurelie...@gmail.com wrote:
>
> Hi There,
> Trying to understand how i could use Junit with my gwt rf project ( Using 
> maven )
> I'm using this 
> link
>  
>
> After running a gwt test junit, i have the following error.
> My first intention could be to add an inherit line somewhere in a .xml 
> file. But what exactly and which one ?
> mvtJUnit.gwt.xml or project.xml ?
> I tried by adding a requestfactory-server dependency on pom.xml but 
> obviously, i misunderstood sth important.
>
> May i have a help on this ?
>
> [INFO] Running junit.framework.TestSuite@7e3bfb66
> [INFO] DEBUG 12/07/2013 16:20:21 [JspRuntimeContext.java.(104)] Le 
> chargeur de classe parent (class loader) est: ContextLoader@null
> [INFO] DEBUG 12/07/2013 16:20:21 [JspServlet.java.init(80)] Le répertoire 
> de travail (scratch dir) pour le moteur de JSP est: 
> D:\TEMP\Jetty_0_0_0_0_0_www-test-7lfhqt\jsp
> [INFO] DEBUG 12/07/2013 16:20:21 [JspServlet.java.init(82)] IMPORTANT: Ne 
> pas modifier les servlets générées
> [INFO] [ERROR] Errors in 
> 'file:/D:/path/src/test/java/com/test/client/GwtTestmvt.java'
> [INFO][ERROR] Line 27: No source code is available for type 
> com.test.persistance.dao.IMvtEnteteDAO; did you forget to inherit a 
> required module?
> [INFO][ERROR] Line 28: No source code is available for type 
> com.test.server.CEMMvt; did you forget to inherit a required module?
> [INFO][ERROR] Line 59: No source code is available for type 
> com.google.web.bindery.requestfactory.server.ServiceLayer; did you forget 
> to inherit a required module?
> [INFO][ERROR] Line 60: No source code is available for type 
> com.google.web.bindery.requestfactory.server.SimpleRequestProcessor; did 
> you forget to inherit a required module?
> [INFO][ERROR] Line 61: No source code is available for type 
> com.google.web.bindery.requestfactory.vm.RequestFactorySource; did you 
> forget to inherit a required module?
> [INFO][ERROR] Line 62: No source code is available for type 
> com.google.web.bindery.requestfactory.server.testing.InProcessRequestTransport;
>  
> did you forget to inherit a required module?
>
> Here are the following import i have within the test class.
>
> import org.junit.Before;
>> import com.google.gwt.junit.client.GWTTestCase;
>> import com.google.web.bindery.event.shared.SimpleEventBus;
>> import com.google.web.bindery.requestfactory.server.ServiceLayer;
>> import 
>> com.google.web.bindery.requestfactory.server.SimpleRequestProcessor;
>> import 
>> com.google.web.bindery.requestfactory.server.testing.InProcessRequestTransport;
>> import com.google.web.bindery.requestfactory.shared.RequestFactory;
>> import com.google.web.bindery.requestfactory.vm.RequestFactorySource;
>> import com.test.persistance.dao.IMvtEnteteDAO;
>> import com.test.server.CEMMvt;
>>
>
> Regards,
> pierre
>

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




GWT 2.0.3 with IE10 - some pages are not well rendered

2013-07-12 Thread pepgrifell
hi,

We have and old application that was implemented with GWT 2.0.3 and GXT 
2.2.0 library.

It was working ok with IE7,IE8 but now I have tried with  IE10 and some 
things are not rendered correctly.(didn't tested with IE9).

I have added the line  ** in the first page but some pages are still renderer 
wrongly.

I have tested the application with Firefox 20.0.1 and it works ok.

In my configuration file I have defined the user agents as:

* *

Are there other solutions ? or does I have to update to a newer GWT version 
? 

Thanks in advance,
pep.

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




Gwt RF and Junit - did you forget to inherit a required module

2013-07-12 Thread aurelie . virgile
Hi There,
Trying to understand how i could use Junit with my gwt rf project ( Using 
maven )
I'm using this 
link
 

After running a gwt test junit, i have the following error.
My first intention could be to add an inherit line somewhere in a .xml 
file. But what exactly and which one ?
mvtJUnit.gwt.xml or project.xml ?
I tried by adding a requestfactory-server dependency on pom.xml but 
obviously, i misunderstood sth important.

May i have a help on this ?

[INFO] Running junit.framework.TestSuite@7e3bfb66
[INFO] DEBUG 12/07/2013 16:20:21 [JspRuntimeContext.java.(104)] Le 
chargeur de classe parent (class loader) est: ContextLoader@null
[INFO] DEBUG 12/07/2013 16:20:21 [JspServlet.java.init(80)] Le répertoire 
de travail (scratch dir) pour le moteur de JSP est: 
D:\TEMP\Jetty_0_0_0_0_0_www-test-7lfhqt\jsp
[INFO] DEBUG 12/07/2013 16:20:21 [JspServlet.java.init(82)] IMPORTANT: Ne 
pas modifier les servlets générées
[INFO] [ERROR] Errors in 
'file:/D:/path/src/test/java/com/test/client/GwtTestmvt.java'
[INFO][ERROR] Line 27: No source code is available for type 
com.test.persistance.dao.IMvtEnteteDAO; did you forget to inherit a 
required module?
[INFO][ERROR] Line 28: No source code is available for type 
com.test.server.CEMMvt; did you forget to inherit a required module?
[INFO][ERROR] Line 59: No source code is available for type 
com.google.web.bindery.requestfactory.server.ServiceLayer; did you forget 
to inherit a required module?
[INFO][ERROR] Line 60: No source code is available for type 
com.google.web.bindery.requestfactory.server.SimpleRequestProcessor; did 
you forget to inherit a required module?
[INFO][ERROR] Line 61: No source code is available for type 
com.google.web.bindery.requestfactory.vm.RequestFactorySource; did you 
forget to inherit a required module?
[INFO][ERROR] Line 62: No source code is available for type 
com.google.web.bindery.requestfactory.server.testing.InProcessRequestTransport; 
did you forget to inherit a required module?

Here are the following import i have within the test class.

import org.junit.Before;
> import com.google.gwt.junit.client.GWTTestCase;
> import com.google.web.bindery.event.shared.SimpleEventBus;
> import com.google.web.bindery.requestfactory.server.ServiceLayer;
> import com.google.web.bindery.requestfactory.server.SimpleRequestProcessor;
> import 
> com.google.web.bindery.requestfactory.server.testing.InProcessRequestTransport;
> import com.google.web.bindery.requestfactory.shared.RequestFactory;
> import com.google.web.bindery.requestfactory.vm.RequestFactorySource;
> import com.test.persistance.dao.IMvtEnteteDAO;
> import com.test.server.CEMMvt;
>

Regards,
pierre

-- 
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: HELP: HyperLink, Image and Text in one Cell of CellTable

2013-07-12 Thread Tham
Hi Andrei,
I am also in the need of implementing this one. My requirement is to show a 
popup when user clicks on the link only. How to do that?

Thanks,
Tham

On Sunday, 16 September 2012 22:16:49 UTC+5:30, Andrei wrote:
>
> Do you need to show the DialogBox when a user clicks the link only, or 
> when a user clicks anywhere in that cell? Both are doable, but the second 
> option is much easier.

-- 
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: RequestFactory queue manager (network retry etc)... already exist and/or worth making FOSS?

2013-07-12 Thread salk31
Thanks Thomas,

I think I get what RequestBatcher does. We do the same but just passing 
around the RequestContext...

Seems like I wasn't making life difficult by mistake. Sort of a relief.

I've asked permission to share our code. I've a horrible feeling it will 
get stuck with the lawyers.

Many thanks

Sam

On Friday, July 12, 2013 12:25:11 PM UTC+1, Thomas Broyer wrote:
>
>
>
> On Friday, July 12, 2013 12:18:36 PM UTC+2, salk31 wrote:
>>
>> Sadly I've looked at the source quite a few times.
>>
>> Can it be used for our use case (Send contents of the Editor to the 
>> server multiple times and perform different service methods each time)?
>>
>
> No. RequestBatcher only manages the lifecycle of a RequestContext (create 
> one if we don't have one, then schedule a command at the end of the "event 
> tick" that will fire() the RequestContext and immediately forget about it), 
> really nothing more.
>
> We got stuck as we could only add (not remove) Requests to the 
>> RequestContext.
>>
>> The code looks to me that if a Request is a success or failure then it 
>> shuts down the RequestContext? So RequestContext doesn't fail but is shut 
>> down. AbstractRequestContext:409 ?
>>
>
> Yes. RequestContexts can only be used once, unless there are constraint 
> violations, a transport failure (network error) or a general failure (that 
> one should be very rare).
>

-- 
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: RequestFactory queue manager (network retry etc)... already exist and/or worth making FOSS?

2013-07-12 Thread Thomas Broyer


On Friday, July 12, 2013 12:18:36 PM UTC+2, salk31 wrote:
>
> Sadly I've looked at the source quite a few times.
>
> Can it be used for our use case (Send contents of the Editor to the server 
> multiple times and perform different service methods each time)?
>

No. RequestBatcher only manages the lifecycle of a RequestContext (create 
one if we don't have one, then schedule a command at the end of the "event 
tick" that will fire() the RequestContext and immediately forget about it), 
really nothing more.

We got stuck as we could only add (not remove) Requests to the 
> RequestContext.
>
> The code looks to me that if a Request is a success or failure then it 
> shuts down the RequestContext? So RequestContext doesn't fail but is shut 
> down. AbstractRequestContext:409 ?
>

Yes. RequestContexts can only be used once, unless there are constraint 
violations, a transport failure (network error) or a general failure (that 
one should be very rare).

-- 
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: DataGrid on a hidden tab

2013-07-12 Thread Federico De Faveri
I'm using GWT 2.5.1.
The problem seems related to 
https://code.google.com/p/google-web-toolkit/issues/detail?id=7188


On Friday, July 12, 2013 11:34:39 AM UTC+2, Thomas Broyer wrote:
>
> This was (supposedly) fixed in GWT 2.5.0: 
> https://code.google.com/p/google-web-toolkit/issues/detail?id=7065
> Which version of GWT are you using?
>
> On Friday, July 12, 2013 11:19:17 AM UTC+2, Federico De Faveri wrote:
>>
>> Same problem but with a DeckLayoutPanel.
>>
>> On Monday, August 15, 2011 12:32:38 AM UTC+2, P.G.Taboada wrote:
>>>
>>> Hi, 
>>>
>>> I am using a DataGrid on a TabLayouPanel. As long as the the DataGrid 
>>> is on the viewable tab it gets rendered. As soon as it is on the 
>>> hidden tab it does not. 
>>>
>>> What am I doing wrong? 
>>>
>>> brgds, 
>>>
>>> Papick
>>
>>

-- 
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: how to clone shared object in gwt

2013-07-12 Thread Bhumika Thaker
Thanks for reply  @Thomas Broyer and @Jens

@Jens thanks for sharing good example and  technique for making copy of
object.

Thanks & Regards,
Bhumika


On Fri, Jul 12, 2013 at 3:04 PM, Jens  wrote:

> You can emulate CloneNotSupportedException yourself to make the GWT
> compiler happy. The only thing that you do not have in GWT is
> Object.clone() as its not implemented by GWT. This means you do not get a
> copy of an instance if you call super.clone() in one of your top level
> classes. In GWT trunk I think you will get an exception now when you call
> Object.clone().
>
> In general I would never really use clone() of Java. Instead I define my
> own interface and use it to replicate clone().
>
> Example:
>
> interface Copyable {
>   T copy();
>   T deepCopy();
> }
>
> class Person implements Copyable {
>   String name;
>   Person friend;
>
>   protected Person(Person other, boolean deep) {
> // super(other, deep) if Person would extend HumanBeing or similar.
> name = other.name;
> friend = other.friend;
> if(deep) {
>   friend = friend.deepCopy();
> }
>   }
>
>   public Person copy() {
> return new Person(this, false);
>   }
>
>   public Person deepCopy() {
> return new Person(this, true);
>   }
> }
>
> -- J.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google Web Toolkit" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/8tgvSPOODH0/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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.
>
>
>

-- 
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: RequestFactory queue manager (network retry etc)... already exist and/or worth making FOSS?

2013-07-12 Thread salk31
Sadly I've looked at the source quite a few times.

Can it be used for our use case (Send contents of the Editor to the server 
multiple times and perform different service methods each time)? We got 
stuck as we could only add (not remove) Requests to the RequestContext.

The code looks to me that if a Request is a success or failure then it 
shuts down the RequestContext? So RequestContext doesn't fail but is shut 
down. AbstractRequestContext:409 ?

Also much of the time we are interested in validation errors.

We have our own tiny UasSimpleRequestProcessor.

The budget for the UI that has been specified seems to be infinite so it 
has full bells and whistles (for good or ill).

Cheers

Sam

On Friday, July 12, 2013 11:00:30 AM UTC+1, Thomas Broyer wrote:
>
>
>
> On Friday, July 12, 2013 11:48:56 AM UTC+2, salk31 wrote:
>>
>> Hi Thomas,
>>
>> I really do struggle with RequestBatcher sorry... However is it correct 
>> that it uses a single RequestContext? and that if any Request in a 
>> RequestContext is a success or a failure then the whole RequestContext is 
>> locked? That is the basis I was working on. Be very glad (if feel a bit 
>> foolish) if that is not the case.
>>
>
> RequestBatcher only handles creation and firing of a RequestContext, whose 
> lifetime is an "event tick". Go look at the code, it's rather 
> straightforward.
> So yes, it only uses a single RequestContext.
> However, the success or failure of service methods are independent from 
> each other. Only errors that cannot be attributed to a given service method 
> call (i.e. network errors, creating the payload on the client-side, parsing 
> it on the server-side, validating the domain objects, serializing them 
> back, and parsing the response on the client-side) can cause the 
> RequestContext to "fail" (either onFailure or onConstraintViolations).
>  
>
>> NonAtomicBatch sends things over the same HTTP request but with multiple 
>> RequestContexts.
>>
>
> How do you handle it on the server-side? I suppose you have a specific 
> RequestFactoryServlet?
>

-- 
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: RequestFactory queue manager (network retry etc)... already exist and/or worth making FOSS?

2013-07-12 Thread Thomas Broyer


On Friday, July 12, 2013 11:48:56 AM UTC+2, salk31 wrote:
>
> Hi Thomas,
>
> I really do struggle with RequestBatcher sorry... However is it correct 
> that it uses a single RequestContext? and that if any Request in a 
> RequestContext is a success or a failure then the whole RequestContext is 
> locked? That is the basis I was working on. Be very glad (if feel a bit 
> foolish) if that is not the case.
>

RequestBatcher only handles creation and firing of a RequestContext, whose 
lifetime is an "event tick". Go look at the code, it's rather 
straightforward.
So yes, it only uses a single RequestContext.
However, the success or failure of service methods are independent from 
each other. Only errors that cannot be attributed to a given service method 
call (i.e. network errors, creating the payload on the client-side, parsing 
it on the server-side, validating the domain objects, serializing them 
back, and parsing the response on the client-side) can cause the 
RequestContext to "fail" (either onFailure or onConstraintViolations).
 

> NonAtomicBatch sends things over the same HTTP request but with multiple 
> RequestContexts.
>

How do you handle it on the server-side? I suppose you have a specific 
RequestFactoryServlet?

-- 
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: RequestFactory queue manager (network retry etc)... already exist and/or worth making FOSS?

2013-07-12 Thread salk31
Thomas,

Here is our client setup code for the pipes:
transport = new QosRequestTransport();


QosManager manager = new QosManager();


QosQueue root = new QosQueue();
root.setTarget(manager);

final QosQueue primary = injector.getDefaultPipe();
primary.setTarget(root);

// pipe we don't bug the user about
QosQueue background = injector.getBackgroundPipe();
background.setTarget(root);
background.addModifier(new Priority(0.5f));

final BusyDisplay busyDisplay = 
UasInjector.INSTANCE.getBusyDisplay();

manager.addListener(new QosListener() {
@Override
public void tick(List list) {
boolean block = false;
for (QosEntry entry : list) {
if (entry.getScore() >= 1.0f) {
block = true;
break;
}
}
if (busyDisplay.isShowing()) {
if (!block) {
busyDisplay.hide();
}
} else {
if (block) {
busyDisplay.show();
}
}
}

@Override
public void retryStarting(int retryCount) {
busyDisplay.setMessage("Possible network problem. Retry " + 
retryCount + "...");
}
});

manager.start();

transport.setDefaultSource(primary);

NB if you fire a RequestContext in the normal way it gets captured by the 
QosManager... Really ugly code relying on the single threaded nature of JS. 
Might ask for more hooks from the core GWT/RequestFactory.

btw This is definitely meant to be sugar on top of an amazingly good 
framework.

Cheers

Sam

-- 
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: RequestFactory queue manager (network retry etc)... already exist and/or worth making FOSS?

2013-07-12 Thread salk31
Hi Thomas,

I really do struggle with RequestBatcher sorry... However is it correct 
that it uses a single RequestContext? and that if any Request in a 
RequestContext is a success or a failure then the whole RequestContext is 
locked? That is the basis I was working on. Be very glad (if feel a bit 
foolish) if that is not the case.

NonAtomicBatch sends things over the same HTTP request but with multiple 
RequestContexts.

I'll try and get the OK from my boss to get this onto github.

Cheers

Sam

On Friday, July 12, 2013 10:29:05 AM UTC+1, Thomas Broyer wrote:
>
>
>
> On Friday, July 12, 2013 10:42:05 AM UTC+2, salk31 wrote:
>>
>> Hi Jens,
>>
>> Thomas has tried to explain RequestBatcher to me but my understanding is 
>> that this essentially merges multiple RequestContexts.
>>
>
> RequestBatcher is about automatically firing the RequestContext in a 
> scheduleFinally; merging RequestContexts is distinct, it's the append() 
> method from RequestContext, which can be used independently of 
> RequestBatcher.
>  
>
>> One of our uses cases is to send the current contents of a form to the 
>> server then have the server generate a report on the latest state of that 
>> form. The user then goes on to just save that form as usual.
>>
>> If we used RequestBatcher wouldn't that mean the extra RequestContexts 
>> are attached for good?
>>
>> We have fiddled with the RequestTransport. I think our requirements are 
>> pretty generic though so worth having a community effort for an off the 
>> shelf solution?
>>
>
> If you think it's worth open-sourcing, then I'd say just do it and see 
> what feedback you get.
> For my own needs, I only needed to handle authentication failure, and this 
> is rather easy: 
> https://github.com/tbroyer/gwt-maven-archetypes/blob/master/guice-rf-activities/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/AuthAwareRequestTransport.java
> But I'd be interested in seeing your code, particularly how you handle the 
> feedback in this case (and what your "pipes" are about and how you use 
> them); actually, I think I'd like to see a more complete sample, but I so 
> much love digging into libraries' code that I'd like to see it too ;-)
>
>>
>> Cheers
>>
>> Sam
>>
>> On Friday, July 12, 2013 9:24:32 AM UTC+1, Jens wrote:
>>>
>>> Batching in RequestFactory can be done using RequestBatcher [1] and 
>>> retries, as well as sending status events about pending requests, can be 
>>> done by implementing a custom RequestTransport [2] for RequestFactory. Not 
>>> sure if there is anything pre-implemented in case of the RequestTransport 
>>> though.
>>>
>>> [1] 
>>> http://www.gwtproject.org/javadoc/latest/com/google/web/bindery/requestfactory/gwt/client/RequestBatcher.html
>>> [2] 
>>> http://www.gwtproject.org/javadoc/latest/com/google/web/bindery/requestfactory/shared/RequestTransport.html
>>>
>>> -- J.
>>>
>>

-- 
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: DataGrid on a hidden tab

2013-07-12 Thread Thomas Broyer
This was (supposedly) fixed in GWT 2.5.0: 
https://code.google.com/p/google-web-toolkit/issues/detail?id=7065
Which version of GWT are you using?

On Friday, July 12, 2013 11:19:17 AM UTC+2, Federico De Faveri wrote:
>
> Same problem but with a DeckLayoutPanel.
>
> On Monday, August 15, 2011 12:32:38 AM UTC+2, P.G.Taboada wrote:
>>
>> Hi, 
>>
>> I am using a DataGrid on a TabLayouPanel. As long as the the DataGrid 
>> is on the viewable tab it gets rendered. As soon as it is on the 
>> hidden tab it does not. 
>>
>> What am I doing wrong? 
>>
>> brgds, 
>>
>> Papick
>
>

-- 
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: how to clone shared object in gwt

2013-07-12 Thread Jens
You can emulate CloneNotSupportedException yourself to make the GWT 
compiler happy. The only thing that you do not have in GWT is 
Object.clone() as its not implemented by GWT. This means you do not get a 
copy of an instance if you call super.clone() in one of your top level 
classes. In GWT trunk I think you will get an exception now when you call 
Object.clone().

In general I would never really use clone() of Java. Instead I define my 
own interface and use it to replicate clone().

Example:

interface Copyable {
  T copy();
  T deepCopy();
}

class Person implements Copyable {
  String name;
  Person friend;

  protected Person(Person other, boolean deep) {
// super(other, deep) if Person would extend HumanBeing or similar.
name = other.name;
friend = other.friend;
if(deep) {
  friend = friend.deepCopy();
}
  }

  public Person copy() {
return new Person(this, false);
  }

  public Person deepCopy() {
return new Person(this, true);
  }
}

-- J.

-- 
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: how to clone shared object in gwt

2013-07-12 Thread Thomas Broyer


On Friday, July 12, 2013 10:43:19 AM UTC+2, Bhumika Thaker wrote:
>
> Hi,
>
> I want to implement* audit mechanism* for some entity of hibernate. Those 
> entities are in shared package. That mean it will accessible for client and 
> server both package.  
> I am doing below steps to achieve audit feature:
>
> ->Entity has one variable which hold clone copy of itself 
> Just example:
>
> class Data implements Cloneable
> {
> Data oldData;
>
> public Data getOldDataCopy() {
>  return oldDataCopy;
> }
>
> public void setOldDataCopy() {
>   try { 
> this.oldDataCopy = (Data) this.clone(); // This will clone this object 
> when I ferxg
> } catch (CloneNotSupportedException e) {  
> e.printStackTrace();
> }
> }
>
> }
>
>
> So while any *changes made in object then original copy remained as 
> original stage. *
> It throw exception like
>
> [TRACE] [v4workflow] - Finding entry point classes
> [ERROR] [v4workflow] - Errors in 
> 'file:/E:/workspace/V4Common_V17/src/com/v4common/shared/beans/workflowengine/Data/Data.java'
> [ERROR] [v4workflow] - Line 612: The method clone() is undefined for the 
> type Data
> [ERROR] [v4workflow] - Line 613: No source code is available for type 
> java.lang.CloneNotSupportedException; did you forget to inherit a required 
> module?
> [ERROR] [v4workflow] - Unable to find type 
> 'com.nextenders.client.WorkFlowEntryPoint'
> [ERROR] [v4workflow] - Hint: Previous compiler errors may have made this 
> type unavailable
> [ERROR] [v4workflow] - Hint: Check the inheritance chain from your module; 
> it may not be inheriting a required module or a module may not be adding 
> its source path entries properly
> [ERROR] [v4workflow] - Failed to load module 'v4workflow' from user agent 
> 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0' at 
> pwd.mp.etenders.in:54479
>
> but As I goggled then came to know that clone does not support with GWT. 
> *So is there any alternative other then clone?*
>

No (some people used hacks in JSNI, but it's rather fragile; search in the 
issue tracker)
 

> *should I have to make copy of each property manually?*
>

Yes.

FYI, java/lang/Object#clone() isn't in any released version of GWT, but 
it's under review: https://gwt-review.googlesource.com/3616 It's not the 
same clone() as in the JVM though, it always throws 
CloneNotSupportedException (which means that class will be emulated)

-- 
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: RequestFactory queue manager (network retry etc)... already exist and/or worth making FOSS?

2013-07-12 Thread Thomas Broyer


On Friday, July 12, 2013 10:42:05 AM UTC+2, salk31 wrote:
>
> Hi Jens,
>
> Thomas has tried to explain RequestBatcher to me but my understanding is 
> that this essentially merges multiple RequestContexts.
>

RequestBatcher is about automatically firing the RequestContext in a 
scheduleFinally; merging RequestContexts is distinct, it's the append() 
method from RequestContext, which can be used independently of 
RequestBatcher.
 

> One of our uses cases is to send the current contents of a form to the 
> server then have the server generate a report on the latest state of that 
> form. The user then goes on to just save that form as usual.
>
> If we used RequestBatcher wouldn't that mean the extra RequestContexts are 
> attached for good?
>
> We have fiddled with the RequestTransport. I think our requirements are 
> pretty generic though so worth having a community effort for an off the 
> shelf solution?
>

If you think it's worth open-sourcing, then I'd say just do it and see what 
feedback you get.
For my own needs, I only needed to handle authentication failure, and this 
is rather easy: 
https://github.com/tbroyer/gwt-maven-archetypes/blob/master/guice-rf-activities/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/AuthAwareRequestTransport.java
But I'd be interested in seeing your code, particularly how you handle the 
feedback in this case (and what your "pipes" are about and how you use 
them); actually, I think I'd like to see a more complete sample, but I so 
much love digging into libraries' code that I'd like to see it too ;-)

>
> Cheers
>
> Sam
>
> On Friday, July 12, 2013 9:24:32 AM UTC+1, Jens wrote:
>>
>> Batching in RequestFactory can be done using RequestBatcher [1] and 
>> retries, as well as sending status events about pending requests, can be 
>> done by implementing a custom RequestTransport [2] for RequestFactory. Not 
>> sure if there is anything pre-implemented in case of the RequestTransport 
>> though.
>>
>> [1] 
>> http://www.gwtproject.org/javadoc/latest/com/google/web/bindery/requestfactory/gwt/client/RequestBatcher.html
>> [2] 
>> http://www.gwtproject.org/javadoc/latest/com/google/web/bindery/requestfactory/shared/RequestTransport.html
>>
>> -- J.
>>
>

-- 
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: DataGrid on a hidden tab

2013-07-12 Thread Federico De Faveri
Same problem but with a DeckLayoutPanel.

On Monday, August 15, 2011 12:32:38 AM UTC+2, P.G.Taboada wrote:
>
> Hi, 
>
> I am using a DataGrid on a TabLayouPanel. As long as the the DataGrid 
> is on the viewable tab it gets rendered. As soon as it is on the 
> hidden tab it does not. 
>
> What am I doing wrong? 
>
> brgds, 
>
> Papick

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




how to clone shared object in gwt

2013-07-12 Thread Bhumika Thaker
Hi,

I want to implement* audit mechanism* for some entity of hibernate. Those 
entities are in shared package. That mean it will accessible for client and 
server both package.  
I am doing below steps to achieve audit feature:

->Entity has one variable which hold clone copy of itself 
Just example:

class Data implements Cloneable
{
Data oldData;

public Data getOldDataCopy() {
 return oldDataCopy;
}

public void setOldDataCopy() {
  try { 
this.oldDataCopy = (Data) this.clone(); // This will clone this object when 
I ferxg
} catch (CloneNotSupportedException e) {  
e.printStackTrace();
}
}

}


So while any *changes made in object then original copy remained as 
original stage. *
It throw exception like

[TRACE] [v4workflow] - Finding entry point classes
[ERROR] [v4workflow] - Errors in 
'file:/E:/workspace/V4Common_V17/src/com/v4common/shared/beans/workflowengine/Data/Data.java'
[ERROR] [v4workflow] - Line 612: The method clone() is undefined for the 
type Data
[ERROR] [v4workflow] - Line 613: No source code is available for type 
java.lang.CloneNotSupportedException; did you forget to inherit a required 
module?
[ERROR] [v4workflow] - Unable to find type 
'com.nextenders.client.WorkFlowEntryPoint'
[ERROR] [v4workflow] - Hint: Previous compiler errors may have made this 
type unavailable
[ERROR] [v4workflow] - Hint: Check the inheritance chain from your module; 
it may not be inheriting a required module or a module may not be adding 
its source path entries properly
[ERROR] [v4workflow] - Failed to load module 'v4workflow' from user agent 
'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0' at 
pwd.mp.etenders.in:54479

but As I goggled then came to know that clone does not support with GWT. 
*So is there any alternative other then clone? should I have to make copy 
of each property manually?*

Thanks,
Bhumika

-- 
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: RequestFactory queue manager (network retry etc)... already exist and/or worth making FOSS?

2013-07-12 Thread salk31
Hi Jens,

Thomas has tried to explain RequestBatcher to me but my understanding is 
that this essentially merges multiple RequestContexts.

One of our uses cases is to send the current contents of a form to the 
server then have the server generate a report on the latest state of that 
form. The user then goes on to just save that form as usual.

If we used RequestBatcher wouldn't that mean the extra RequestContexts are 
attached for good?

We have fiddled with the RequestTransport. I think our requirements are 
pretty generic though so worth having a community effort for an off the 
shelf solution?

Cheers

Sam

On Friday, July 12, 2013 9:24:32 AM UTC+1, Jens wrote:
>
> Batching in RequestFactory can be done using RequestBatcher [1] and 
> retries, as well as sending status events about pending requests, can be 
> done by implementing a custom RequestTransport [2] for RequestFactory. Not 
> sure if there is anything pre-implemented in case of the RequestTransport 
> though.
>
> [1] 
> http://www.gwtproject.org/javadoc/latest/com/google/web/bindery/requestfactory/gwt/client/RequestBatcher.html
> [2] 
> http://www.gwtproject.org/javadoc/latest/com/google/web/bindery/requestfactory/shared/RequestTransport.html
>
> -- J.
>

-- 
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: RequestFactory queue manager (network retry etc)... already exist and/or worth making FOSS?

2013-07-12 Thread Jens
Batching in RequestFactory can be done using RequestBatcher [1] and 
retries, as well as sending status events about pending requests, can be 
done by implementing a custom RequestTransport [2] for RequestFactory. Not 
sure if there is anything pre-implemented in case of the RequestTransport 
though.

[1] 
http://www.gwtproject.org/javadoc/latest/com/google/web/bindery/requestfactory/gwt/client/RequestBatcher.html
[2] 
http://www.gwtproject.org/javadoc/latest/com/google/web/bindery/requestfactory/shared/RequestTransport.html

-- J.

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




RequestFactory queue manager (network retry etc)... already exist and/or worth making FOSS?

2013-07-12 Thread salk31
Hello,

We have some code that lets us manage the requests from the RequestFactory. 
So do things like retry after auth failure or network outage...

So simple usage is something like:
NonAtomicBatch batch = new NonAtomicBatch();
batch.add(new RfEntry(someRequestFactoryRequest));
batch.add(new RfEntry(someOtherFactoryRequest));

// do this without indicating in the UI
// both requests will be processed on the server
backgroundPipe.add(batch);

// tell the user the client is busy while this is in progresss
foregroundPipe.add(new RfEntry(moreImportantRequest));


We use NonAtomicBatch so we can send the contents of an Editor to the 
server, fail it on validation but still execute another request
(e.g. to get the server to do something with the latest contents of the 
Editor)

In setting up the queues you can add listeners etc to feed the UI.

So... This already exist? If not does it seem worth open sourcing? We have 
no particular interest in owning this code but it is the only
way we could see to do what the customer wanted.

Cheers

Sam

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