Re: MVP with multiple EntryPoints

2012-11-16 Thread Joseph R Lust
Cristian,

We are running Spring, we we use Spring DI in the Spring container.


Sincerely,
Joseph

~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
Joseph R Lust
(919) 355-8785
joseph.r.l...@gmail.com


On Mon, Nov 12, 2012 at 11:48 AM, Cristian Rinaldi csrina...@gmail.comwrote:

 Joseph, thanks a lot for your predisposition
 Another question but no less important:

 You are using injection of dependency in the projects, e.g: peaberry with
 Guice or Weld?

 Greetings!!

 -Cristian


 El jueves, 8 de noviembre de 2012 22:53:39 UTC-3, Joseph Lust escribió:

 Christian,

 Sorry I missed your gchat the other day. Most gServices are blocked at my
 office.

 Thanks a lot, it was an interesting answer. Beyond GWT, I'm curious about
 how are you managing dynamic ORM extensions, i.e. if you are using JPA, how
 are you merging domain classes from several OSGi bundles.


 We have a totally isolated model to deal with the domain objects.
 module_B has its own Spring services running in the OSGi container that
 serves up the dynamic content for module_B and uses its own schema and JNDI
 connection pool. The static content (compiled GWT) for module_B is served
 up by the aforementioned fragment attached to the module_B context. This
 way module_B and module_A can be upgraded completely independently of each
 other.

 Of course there are some objects which are shared in the GWT codebase
 (DTO's). These are in a common library inherited by all the modules that
 use it. Because we use Maven and versioning, we don't have to update all
 consumers of the common library and can run multiple versions on multiple
 modules.

 There are some shared services that multiple modules use, but these are
 consumed via JSON and Autobean (have not tried RequestFactory yet) since
 GWT-RPC is compile dependent for each module.

 I hope that helps.

 Sincerely,
 Joseph

  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/_Am7ZwyGMQkJ.

 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.


-- 
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: Google Geocoder

2012-08-04 Thread Joseph R Lust
The following should get you started, but could have found them through
Google.


   - Communicating with the server
   - Example of using
JSONPRequestBuilderhttp://stackoverflow.com/questions/2445057/gwt-how-can-i-use-jsonprequestbuilder-to-handle-a-json-response-of-a-list
   - Geocoder API
Requestshttps://developers.google.com/maps/documentation/geocoding/#GeocodingRequests


Sincerely,
Joseph

-- 
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: Working with Dates/Timezones

2012-08-03 Thread Joseph R Lust
Jens,

Here is the TZ script from my hobby running site. It is a tad hackish (from
4 years ago), set to update a hidden select menu in forms. I have not yet
had any complaints about it's output, but I don't promise anything either.
Hopefully you might find it helpful and can make a JSNI derivative if it
meets your needs.


Sincerely,
Joseph

// original script by Josh Fraser (http://www.onlineaspect.com)
function calculate_time_zone() {
var rightNow = new Date();
var jan1 = new Date(rightNow.getFullYear(), 0, 1, 0, 0, 0, 0);  // jan 1st
var june1 = new Date(rightNow.getFullYear(), 6, 1, 0, 0, 0, 0); // june 1st
var temp = jan1.toGMTString();
var jan2 = new Date(temp.substring(0, temp.lastIndexOf( )-1));
temp = june1.toGMTString();
var june2 = new Date(temp.substring(0, temp.lastIndexOf( )-1));
var std_time_offset = (jan1 - jan2) / (1000 * 60 * 60);
var daylight_time_offset = (june1 - june2) / (1000 * 60 * 60);
var dst;
if (std_time_offset == daylight_time_offset) {
dst = 0; // daylight savings time is NOT observed
} else {
// positive is southern, negative is northern hemisphere
var hemisphere = std_time_offset - daylight_time_offset;
if (hemisphere = 0)
std_time_offset = daylight_time_offset;
dst = 1; // daylight savings time is observed
}
var i;
// check just to avoid error messages (hidden select posted with forms)
if (document.getElementById('timezone_name')) {
for (i = 0; i 
document.getElementById('timezone_name').options.length; i++) {
if (document.getElementById('timezone_name').options[i].value
== convert(std_time_offset)+,+dst) {
document.getElementById('timezone_name').selectedIndex = i;
break;
}
}
}
}

function convert(value) {
var hours = parseInt(value);
   value -= parseInt(value);
value *= 60;
var mins = parseInt(value);
   value -= parseInt(value);
value *= 60;
var display_hours = hours;
// handle GMT case (00:00)
if (hours == 0) {
display_hours = 00;
} else if (hours  0) {
// add a plus sign and perhaps an extra 0
display_hours = (hours  10) ? +0+hours : ++hours;
} else {
// add an extra 0 if needed
display_hours = (hours  -10) ? -0+Math.abs(hours) : hours;
}

mins = (mins  10) ? 0+mins : mins;
return display_hours+:+mins;
}

-- 
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: Simple GWT Dual list

2012-07-07 Thread Joseph R Lust
Juan,

Works great! I just suggested it since when people decide they need a
component, they'll be much more likely to use one if they can play with a
live demo.

I hope folks like it!


Sincerely,
Joseph

~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
Joseph R Lust
(919) 355-8785
joseph.r.l...@gmail.com


On Sat, Jul 7, 2012 at 11:06 PM, Juan Pablo Gardella 
gardellajuanpa...@gmail.com wrote:

 Hi Joseph,

 I put a working demo here, http://dualistexample.appspot.com/.

 Juan


 2012/7/7 Joseph Lust lifeofl...@gmail.com

 Nice work. Any chance you can add a link to a working demo. All I found
 on the BitBucket page was a static image. Thx.


 Sincerely,
 Joseph

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/qzZGnpZIcywJ.
 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.


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


-- 
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: What is the minimum Internet speed connexion that the GWT team is considering when testing their GWT application ?

2012-07-04 Thread Joseph R Lust

 *#1
 *I have not used *inline CSS*, I mean, I did not put any css code in my
 *ui binder* files. I just use 3 stylesheets (admin.css, common.css,
 normal.css) that are declarated in the client bundle.
 - Will *inline css *reduce the code to download ?
 - How could I do to not download the admin.css at startup but just when
 the user go to the admin ?


Sorry, that was confusion. Using CSS directly in the *style* attribute is
an anti-pattern. What I meant was that if you use the
CssResourcehttp://code.google.com/p/google-web-toolkit/wiki/CssResourceCookbookinterfaces,
then GWT will combine and minify your CSS automatically for the
smallest possible package. This is great since if you point the Chrome
audit tool at most sites, they will show that they have downloaded 3000+
unused styles. Further, only these are inlined into your JS file by the
compiler (what I was referring to), then you no longer need to download any
CSS files at load.


 *#3
 *As Joseph tolds me, the server should  compress the content (RPC +
 images) ?
  - Could I do that with *YUI **Compressor** *?
  - I heard about a tool to compress images
  - I heard about a tool to compress images (Webp -
 https://developers.google.com/speed/webp/index )...Should I use a combination
 of YUI Compressor AND Webp ?
  - How to compress RPC ?


I was not referring to the YUI compressor. The compiler in GWT (and the
Closure Compiler in 2.5) do a far better job than the minimizer that is YUI
Compressor.

I meant you should enable gzipping of compressible resources (not images).
This depends on your server. I'm running Apache, so I just use mod_gzip.
There are many 
tutorialshttp://www.techiepark.com/tutorials/how-to-enable-gzip-compression-in-apache-server-to-speed-up-website/out
there. As long as the sender accepts gzip encoding, you'll be fine.


Sincerely,
Joseph

-- 
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: how to export a ArrayListString in gwt to external file?

2012-06-18 Thread Joseph R Lust
Are you calling this from an RPC? It looks like you are (rpc.
InvocationExceptionhttp://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/rpc/InvocationException.html).
An RPC expects an RPC serialized response, not what it is getting. To get a
file back like this, you'll need to just open it like a new browser window.

i.e. window.open(yourServerUrl,_blank);
The above will get stopped by popup blockers. However, if you open it by
posting a form to the URL with a target=_blank tag, it should just open.

If you're not using RPC, the docs say it is a communications error, which
could be many things.

Also, you might want to redact the titles of those images as they show your
whole package name.




Sincerely,
Joseph

~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
Joseph R Lust
(919) 355-8785
joseph.r.l...@gmail.com


On Mon, Jun 18, 2012 at 10:04 PM, tong123123 tong123...@gmail.com wrote:

 I have added the catch (Exception e) in ExportServiceImpl.java and found
 there is no any exception, but when the rpc return to client, it go to
 onFailure with InvocationException as shown in attachment OnFailure.png. I
 don't know is this HTTP error.

 But what is the cause of this error?


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/eZcgULVFo14J.
 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.


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