Expanding the reach of GWT by improving the ease of creation and ease of use of GWT-based JS libraries

2013-09-16 Thread Litmus
Am I the only one that finds it strange that there aren't more people in 
the GWT community interested in creating JS libraries using GWT? It may 
seem counterintuitive, I don't know, but I really think one vector for 
expanding GWT use is by creating more building blocks that can be used by 
the greater web community. 

You'd think there'd be lots more companies that have made management 
decisions to adopt JS that have cool Java libraries sitting around that 
their teams would like to expose for the next generation of apps. What's 
more likely, that a decent-sized company greenlights a breadwinner app 
being developed with GWT, or that it greenlights a team to create a library 
using GWT as long as it provides an JS API to play nice with the rest of 
the company's tech?

Which brings me to a concern: that there is still no out-of-the-box support 
JS library creation in GWT and that we still have to rely on other tools 
(which are very helpful, thanks Ray Cromwell) or workarounds to achieve 
these goals. And of course at the end of the day the JS user is not going 
to care why some JS methods failed to be generated or why the JS docs 
weren't as complete as their javadoc counterparts, they are simply going to 
seek alternative solutions...

So I'm wondering if there are people in the community that feel they've 
"perfected" the automated JS API & doc creation process for large 
maintainable libraries...another ease of use factor is being able to feed 
the generated JS library to IDEs like IntelliJ for javascript 
autocompletion, which is not normally possible due to the way the JS is 
generated in GWT. Could there be any workaround to 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: Problems with resizable display

2013-09-16 Thread Jens
You have to change the default alignment (which is top and left) by using 
setCellVerticalAlignment and setCellHorizontalAlignment.

Alternatively you could also just use HTMLPanel or FlowPanel and use CSS 
along with absolute positioning for the buttons. Using CSS it would look 
similar to http://jsfiddle.net/zy3RV/

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


Problems with resizable display

2013-09-16 Thread Blake McBride
Greetings,

I am having a problem with what I would think would be a common goal.  I am
trying to create a browser screen that automatically resizes and/or
repositions widgets on a browser screen.  My first attempt was to create a
browser screen that has four buttons, one on each corner of the screen.  As
the screen is resized the buttons automatically reposition to remain in the
four corners.

The code I show below gets close to this goal.  It creates four buttons
that automatically reposition as the browser is resized.  (In this case the
buttons correctly stay the same size.)  The problem I am having is that the
buttons on the bottom are not flush to the bottom.  Same problem with the
right side.  While the top and left correctly stay flushed, the bottom and
right reposition well but I can't get them flush with the bottom and right.
 How can I do that?

The code is as follows:

private boolean test() {RootLayoutPanel rootPanel = RootLayoutPanel.get();

 rootPanel.clear();

  rootPanel.setHeight("100%");

 rootPanel.setWidth("100%");

  VerticalPanel vp = new VerticalPanel();

 vp.setWidth("100%");

 vp.setHeight("100%");

 rootPanel.add(vp);

HorizontalPanel hp = new HorizontalPanel();

 hp.setWidth("100%");

 hp.add(new Button("Button 1"));

 Label lbl = new Label(" ");

 lbl.setWidth("100%");

 hp.add(lbl);

 hp.add(new Button("Button 2"));

 vp.add(hp);

  lbl = new Label(" ");

 lbl.setHeight("100%");

 vp.add(lbl);

  hp = new HorizontalPanel();

 hp.setWidth("100%");

 hp.add(new Button("Button 3"));

 lbl = new Label(" ");

 lbl.setWidth("100%");

 hp.add(lbl);

 hp.add(new Button("Button 4"));

 vp.add(hp);

}

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


Storing uploaded file in gwt (server side)

2013-09-16 Thread Pradeep Kumar








 
  
Hi All,   

I am new to GWT, I am facing some issue with file creation.

I am uploading a file from client side and want to store that file in 
server side and parse it and create tables in database for the data present 
in the file.

When I try to create a file at server side there is some file.io permission 
issue App engine is not allowing me to create the file.

Please let me know how can I solve this issue.

I did browse net, didn't find any solutions.

In the mean time I did read about sandboxing and some data store concept

Please let me know how can I use for my problem.

Thanks in Advance, Pradeep

-- 
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 Code Splitting : RPC issue

2013-09-16 Thread dilantha silva
Hi Jens,

Since BootstrapDataService and ModuleADataService both going to be
subclasses of RemoteService ,is there a possibility that ModuleADataService
will get serialize initially and endup with the same situation ?


On Fri, Sep 13, 2013 at 4:50 PM, dilantha silva
wrote:

> Hi,
>
> Thanks a lot for your reply. I will try out the method that you have
> suggested
>
>
> On Fri, Sep 13, 2013 at 1:43 PM, Jens  wrote:
>
>> The problem is that when you use a generic type like Action then GWT will
>> generate serializers for all implementations of Action and attaches this
>> serializer information to the service. The first time you use the service,
>> all data needs to be loaded.
>>
>> Lets assume you have three logical modules that you want to code split:
>> bootstrap, moduleA, moduleB where "bootstrap" contains the code to load
>> your app.
>>
>> What you need now are three service interface (one for each module) and
>> three narrower action interfaces, e.g. for the bootstrap module:
>>
>> interface BootstrapAction extends Action {}
>> interface BootstrapResponse extends Response {}
>>
>> BootstrapDataService extends RemoteService {
>>   BootstrapResponse execute(BootstrapAction action)
>> }
>>
>> All those interfaces (BootstrapDataService, ModuleADataService, etc.) can
>> point to the same server servlet.
>>
>> So on the client you split up your command pattern into a command pattern
>> per module with each module having its own action/response root interface.
>>
>> -- 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.
>>
>
>
>
> --
> Regards,
>
> Dilantha Silva,
> http://www.linkedin.com/in/dilanthasilva| https://launchpad.net/~dilantha
> http://stackoverflow.com/users/825297
>



-- 
Regards,

Dilantha Silva,
http://www.linkedin.com/in/dilanthasilva| https://launchpad.net/~dilantha
http://stackoverflow.com/users/825297

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


Usage of gwt-comet on gwt RequestFactory?

2013-09-16 Thread Jamel Hamas


1- I have already used the following frameworks (Event based client-server) 
on GWT projects, and works fine with RPC call architecture.

   - 
   
   GWT-Comet 
   - 
   
   GwtEventService 
   
After searching, i found a lot of frameworks that treat the client server 
messaging exchange problem:

*2- Jboss Errai framework *

Great messaging service but i've not used it. I searched for only errai bus 
usage with gwt but nothing founded.

*3- Atmosphere Framework *

Seem to do same thing like comet but i've not used it. 
http://async-io.org/tutorial.html

*4- WebSocket *

*5- 
Spring-Integration-Cometd
*

*6- Spring 
WebSocket
*

NOW :

I want to develop a project with Spring roo and GWT. As Spring roo gwt 
based on RequestFactory architecture.

I think that we can use Comet or gwteventservice with RequestFactory 
architecture, but we 
needAutoBean to 
generate client side Entity interface on server side.

*My question concern GWT RequestFactory :*

How to integrate one of the frameworks above in gwt projects based on 
RequestFactory architecture? Is there any example ?!

Thanks

-- 
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 Code Splitting : RPC issue

2013-09-16 Thread Jens
Don't think so. RemoteService is just a marker interface so that GWT can 
find your services during compilation and generate their implementation.

They should end up in the split point where you call GWT.create() 
the first time. Maybe some serializer will be in the left over fragment 
because they are used in both services which makes them non-unique. These 
could be ArrayList, Date, String, etc. but also your own classes if they 
are shared between your modules.

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


Style problems with Firefox+LayoutPanel

2013-09-16 Thread vincent vigon
ListBox has a weird behavior with fireFox (23.0.1), not with Chrome and 
Safari. 

Here is my code :

public void onModuleLoad(){  

ListBox list= new ListBox(false);

RootLayoutPanel.get().add(list); 

RootLayoutPanel.get().setWidgetLeftWidth(list,0,Unit.PCT,50,Unit.PCT);

for (int i=0;i<100;i++){

list.addItem("item "+i);

}

}


The result is weird with FireFox : the list does not occupy 50% of the 
width, but it occupies 100% of the height.

It seems that the Layout Mechanism does not work on Firefox.

It is probably a problem with Css because I have a second problem (probably 
linked) : on firefox, all my drawing on canvas are black (no colors). 


Thank you for helping me

Vincent





-- 
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: ScriptInjector async /defer

2013-09-16 Thread Thomas Broyer


On Monday, September 16, 2013 9:39:41 AM UTC+2, Oliver Krylow wrote:
>
> Thank you for the clarification! 
>
> I wasn't aware of the different handling of "script-inserted" scripts and 
> I must admit I misunderstood the async /defer attributes. I was hoping to 
> get on-demand parsing out of it; control over the point in time the browser 
> starts parsing a previously downloaded script.
>

You could download the script using an XMLHttpRequest (or RequestBuilder, 
or whatever) and then inject it with the ScriptInjector (either as text, or 
with the URL, using the pre-load request to warm the browser cache only).
With code splitting, you have com.google.gwt.core.client.prefetch already 
to support that exact use-case. You can also customize how fragments are 
loaded using a custom AsyncFragmentLoader.LoadingStrategy (you could, for 
example, embed the fragments in the HTML host page in a way that does not 
parse them and have the LoadingStrategy load them from here, see 
http://googlecode.blogspot.fr/2009/09/gmail-for-mobile-html5-series-reducing.html;
 
or maybe load them to into/from HTML5 storage); note that this is an "impl" 
API though, so it can theoretically change between GWT releases (put 
differently, we don't guarantee any forward/backward compatibility for 
".impl" APIs).

-- 
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: Patch installation in GWT

2013-09-16 Thread Jens
GWT creates one monolithic file per browser (+ one file per split point 
living in a folder having the browser permutation name). If you change 
anything in a file all the permutation names change and you have redeploy 
everything.

The only way to patch a single module is if this single module is an app on 
its own having its own entry point. But if you divide your larger app into 
multiple smaller apps you have to download common library code (GWT lib, 
custom common libs, etc.) for each smaller app because this common library 
code can not be shared at JavaScript level (because GWT only creates a 
single file per browser).

If you want to pay this tradeoff then go ahead and make multiple apps. Some 
people have also used OSGI to manage these smaller apps along with a 
general app that build its menu based on the current active/deployed OSGI 
modules.

-- 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: ScriptInjector async /defer

2013-09-16 Thread Oliver Krylow
Thank you for the clarification!

I wasn't aware of the different handling of "script-inserted" scripts and I
must admit I misunderstood the async /defer attributes. I was hoping to get
on-demand parsing out of it; control over the point in time the browser
starts parsing a previously downloaded script.

The idea is to test if we can get better perceived performance by loading
scripts during the apps idle times, but defer parsing and executing it
until user interaction necessitates it.
If my assumption is correct, one could more easily balance between startup
time and perceived performance on low-bandwidth ,high-latency networks.




On Fri, Sep 13, 2013 at 12:36 PM, Thomas Broyer  wrote:

>
>
> On Friday, September 13, 2013 11:33:49 AM UTC+2, Oliver Krylow wrote:
>>
>> Are there any plans to support the 'async' and 'defer' attributes of the
>> 'script' tag in 
>> ScriptInjector
>>  ?
>>
>
> There's no real *reason* to support them.
>
> Script-inserted scripts always run async; the only reason to be able to
> set async (to false) is to enforce execution in insertion order.
> As for 'defer', it only affects elements that are "parser inserted", not
> those inserted by scripts, so it's pointless to set it from GWT.
>
> See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
>
> That said, I'm not aware of any plan to add support for async.
>
> Also, is it true that since the injected script in ScriptInjector is of
>> type 
>> 'text/javascript',
>>  browsers will hold the execution of the UI-Thread until that script is
>> loaded because of a potential 'document.write()'?
>>
>
> No. Script-inserted scripts are always async.
> BTW, the type of the script only affects whether the script will run or
> not, depending on whether or not it's understood by the browser.
>
>
>> If so, is the Code Splitting Feature of Gwt also affected by this, since
>> it uses ScriptInjector internally?
>>
>
> N/A
>
> --
> 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.
>

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