Issue with development mode plugin and Custom selection script / hosted.html that allows separate debugging of multiple GWT applications on a single page

2013-10-09 Thread Jamie Cramb
Hi all,

I have a page which has multiple GWT applications running on it.  When it 
comes to development mode / debugging from eclipse (using the dev mode 
plugin in chrome) we start to hit issues because if we put the 
"gwt.codesvr" param in the URL then all of the GWT applications on the page 
will try to debug and will fail (because the debugger we have running only 
has the source code for one of the applications in its classpath).

My goal is to update the implementation of the bootstrapping process for 
dev mode to achieve the following:

   1. Externalize the decision on which GWT applications on a page should 
   debug based on some other JS function that is resident on the page so it 
   can be controlled via a custom mechanism / server-side decision.
   2. Have the ability to assign a custom "$hosted" URL (e.g. 
   "localhost:9997") for each of the GWT applications on a page that should be 
   debugging.

I have achieved the first goal by:

   - Providing my own primary linker (an extension of the IFrameLinker) 
   that overrides the location of the selection script template so that it 
   uses my modified selection script
   - Making my modified selection script provide a custom "isHostedMode()" 
   implementation that calls out to a JS function that is resident on the host 
   page for the decision of whether or not to go into dev mode:

function isHostedMode() {
> $wnd.shouldDebug('__MODULE_NAME__');
> }


I thought I was close to achieving my second goal by:

   - Using the same primary linker to override the hosted.html location 
   with my own custom hosted.html page.
   - Making my hosted.html pickup the $hosted URL from a global var 
   resident in the host page instead of trying to pick it up from the 
   "gwt.codesvr" param:

$hosted = decodeURIComponent(parent.debugHostUrl);



However, I get a failure (return false) from the following line of code 
unless I have the "gwt.codesvr" param in the URL:

if (plugin.connect(url, topWin.__gwt_SessionID, $hosted, $moduleName, 
> $hostedHtmlVersion)) { ... } else { ...}


On debugging the code everything looks fine going into the plugin.connect() 
call.

Does anyone know:

   1. If there is a better approach to achieving my goals?
   2. If the dev mode plugin is hard coded in someone to expect the 
   "gwt.codesvr" param to be in the URL even though the $hosted var is passed 
   in on the call to connect?


Thanks in advance.

Cheers,
Jamie

-- 
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: Can't find postgres driver from debug mode

2013-04-19 Thread Jamie
Yes, it was in there.

However: I have a number of projects, all connected, and I have a 'common' 
project to share the libraries.
My hibernate jars were in the common project.

Copying the hibernate jars into WEB-INF/lib did the trick!
Thanks for the hint.  


On Thursday, 18 April 2013 17:11:50 UTC-4, Thomas Broyer wrote:
>
> I'd bet your driver's JAR is not in WEB-INF/lib.
>
>
>> I have confirmed that all the connection properties are the same when 
>> connecting.
>> There are two things that I am considering:
>> - The classpath is incorrect
>> - GWT is including hibernate code that is interfering with my EMF.
>>
>> Has anyone ever seen anything like this?  I really want to use the 
>> debugger!!!
>> Thanks for your time!
>>
>> -- Jamie
>>
>>

-- 
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: Can't find postgres driver from debug mode

2013-04-18 Thread Jamie
Update: I grabbed the hibernate code, extracted parts, and here's the 
interesting bit:

PersistenceProviderResolver ppr = 
PersistenceProviderResolverHolder.getPersistenceProviderResolver();
List list = ppr.getPersistenceProviders();

On the good machine, the list has the hibernate provider.
On the bad machines, the list is empty.
Ugh.
I even have the provider listed specifically in the persistence unit.

ARGH!

On Thursday, 18 April 2013 16:04:35 UTC-4, Jamie wrote:
>
> This is driving me crazy.
>
> My (large) project uses Hibernate and Postgres.
> On one machine it works perfectly.
>
> On two machines:
> - All works fine when running externally (from the web server)
> - Other (non gwt) programs work fine, using the same eclipse project, same 
> classpath, same config (persistence.xml) etc.
> - If I launch my project in GWT debug mode, the following code fails 
> immediately:
> emf = Persistence.createEntityManagerFactory("dpu", connectionProperties);
>
> I have confirmed that all the connection properties are the same when 
> connecting.
> There are two things that I am considering:
> - The classpath is incorrect
> - GWT is including hibernate code that is interfering with my EMF.
>
> Has anyone ever seen anything like this?  I really want to use the 
> debugger!!!
> Thanks for your time!
>
> -- Jamie
>
>

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




Can't find postgres driver from debug mode

2013-04-18 Thread Jamie
This is driving me crazy.

My (large) project uses Hibernate and Postgres.
On one machine it works perfectly.

On two machines:
- All works fine when running externally (from the web server)
- Other (non gwt) programs work fine, using the same eclipse project, same 
classpath, same config (persistence.xml) etc.
- If I launch my project in GWT debug mode, the following code fails 
immediately:
emf = Persistence.createEntityManagerFactory("dpu", connectionProperties);

I have confirmed that all the connection properties are the same when 
connecting.
There are two things that I am considering:
- The classpath is incorrect
- GWT is including hibernate code that is interfering with my EMF.

Has anyone ever seen anything like this?  I really want to use the 
debugger!!!
Thanks for your time!

-- Jamie

-- 
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: Using OAuth2Login Google authenticator with Security constraint

2012-11-15 Thread Jamie
That is something that is not going to happen... the servlet container 
knows nothing about OpenID or OAuth2Login.
Well, at least, any servlet container that I've worked with.

Your best bet would probably be to write a 
Filter that 
checks for a session variable login token;  
If the token does exists, then you're okay.
If the token does not exist
{
check to see if the response contains the OAuth2Login response.
if it does
set the session variable login token
else
redirect to the OAuth2 URL
}

Then apply the filter to any protected resources or servlets.



On Monday, 12 November 2012 20:55:29 UTC-5, Allen Zhou wrote:
>
> I want to use the Google authenticator as described here: 
> https://developers.google.com/accounts/docs/OAuth2Login 
> as the authentication link used for a security constraint.
>
>   
>   
>   /
>   
>   
>   *
>   
>   
>
> Does anyone know where I can configure security constraint so that it uses 
> a different login url than the default setting?  
>

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



Drag and Drop Tutorial

2012-11-12 Thread Jamie
Hi,

I required Drag and Drop for a project I am working on.
I couldn't find a lot of info on it, so I wrote a tutorial on how to add 
Drag and Drop to a Tree, using GWT 2.4+'s built-in DnD.

You can read the tutorial here:
http://jamies-gwt.blogspot.ca/2012/11/gwt24-drag-drop-in-tree.html

I hope it helps somebody out!

Jamie.

-- 
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/-/pM2qWXpkjHEJ.
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: rpc serialization without the rpc

2012-11-02 Thread Jamie
While not answering your question exactly, I have seen posts around on 
writing your own caching filter for Java, and they seem pretty easy to do.
And, it would then be really easy to invalidate your cached items.

However, as Jens says, putting all the request parameters into the URL is 
not a good idea.
If you really want, you could write your caching filter to cache POST 
requests.

-- 
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/-/dAKJ1pBy_HcJ.
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: iOS 6 Bug: Safari caches POST requests

2012-11-02 Thread Jamie
You could write the filter to only affect POSTs
Or, you could configure the filter mapping to only apply the filter to your 
Servlet(s).

Jamie.

On Friday, 2 November 2012 14:23:44 UTC-4, Jeffrey Roe wrote:
>
> So this will cause all files to be downloaded over and over again. 
> Is there a way to do this fix just for IOS devices. 
> Jeffrey Roe, 
>
>
>
> On Tue, Oct 2, 2012 at 5:42 PM, Nicolas Hoby 
> > 
> wrote: 
> > Works perfect, thank you! 
> > 
> > Just for completion, to install the filter add the following to your 
> > Web.xml: 
> > 
> >  
> > HeaderFilter 
> > 
> server.services.HeaderFilter 
> >  
> >  
> > HeaderFilter 
> > /* 
> >  
> > 
> > On Sep 27, 11:40 am, Christian Kuetbach  wrote: 
> >> Implement a Header-Filter: 
> >> 
> >> public class HeaderFilter implements Filter { 
> >> 
> >> public void destroy() { 
> >> } 
> >> 
> >> public void doFilter(ServletRequest req, ServletResponse res, 
> >> FilterChain filterChain) 
> >> throws IOException, ServletException { 
> >> 
> >> HttpServletResponse response = (HttpServletResponse) 
> res; 
> >> response.addHeader("Cache-Control", "no-cache"); 
> >> filterChain.doFilter(req, res); 
> >> } 
> >> 
> >> public void init(FilterConfig arg0) throws ServletException { 
> >> } 
> >> 
> >> } 
> >> 
> >> If you set this filter to filter all your reqests to your 
> dispatch-servlet, 
> >> no results should be cached. 
> >> 
> >> Regards, 
> >> Christian Kuetbach 
> > 
> > -- 
> > 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-we...@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 view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Gi-1f3SaepUJ.
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 nocache filter

2012-03-22 Thread Jamie
I use the same filter, with no problems.  However, my web.xml is
probably configured a little differently:
I remember from where I got that filter, it just applied it to every
request.
Instead of that, I only apply the filter to URLs that end in
nocache.js like so - (note the url-pattern)

  
NoCache
com.whatever.web.GWTCacheControlFilter
  
  
NoCache
*nocache.js
  




On Mar 20, 3:05 pm, SrArcos  wrote:
> Hello all,
>
> I am using GWT 2.2.0 for an application I started a year ago. And I
> can't update now to lastest version. I use a filter on this
> application and It works fine for IE8 but when I use it in Chrome
> there are some RPC callbacks that don't work. This is the filter. Does
> Someone know  the reason?
>
> [code]
> package ea.ciges.gesres.server.filters;
>
> import java.io.IOException;
> import java.util.Date;
> import javax.servlet.Filter;
> import javax.servlet.FilterChain;
> import javax.servlet.FilterConfig;
> import javax.servlet.ServletException;
> import javax.servlet.ServletRequest;
> import javax.servlet.ServletResponse;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
>
> /**
>  * {@link Filter} to add cache control headers for GWT generated files
> to
>  * ensure
>  *
>  * that the correct files get cached.
>  *
>  * @author See Wah Cheng
>  * @since 24 Feb 2009
>  */
> public class GWTCacheControlFilter implements Filter {
>
>         private static final long ONE_DAY = 8640L;
>         public void destroy() {
>         }
>
>         public void init(FilterConfig config) throws ServletException {
>         }
>         public final void doFilter(ServletRequest request, ServletResponse
> response,
>                         FilterChain filterChain) throws IOException, 
> ServletException {
>                 HttpServletRequest httpRequest = (HttpServletRequest) request;
>                 String requestURI = httpRequest.getRequestURI();
>                 if (requestURI.contains(".nocache.")) {
>                         Date now = new Date();
>                         if (response instanceof HttpServletResponse){
>                                 HttpServletResponse httpResponse = 
> (HttpServletResponse) response;
>                                 httpResponse.setDateHeader("Date", 
> now.getTime()); // one day old
>                                 httpResponse.setDateHeader("Expires", 
> now.getTime() - ONE_DAY);
>                                 httpResponse.setHeader("Pragma", "no-cache");
>                                 httpResponse.setHeader("Cache-control", 
> "no-cache, no-store, must-
> revalidate");
>                         }
>                 }
>                 filterChain.doFilter(request, response);
>         }}
>
> [/code]

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



Project Creator: GWTRPC Interfaces in 'client'?

2012-03-22 Thread Jamie
Maybe this is the wrong board for this... but here goes.

When I create a new project using the aw3s0m GWT Eclipse plugin, it
always creates the GWT RPC interfaces in the client package, instead
of the shared package.
So, that means I must compile the client package (or bits of it).
It seems to me that the shared package is the proper place for these
interfaces.

So the first thing I always do is move the GWT RPC interfaces
(GreetingService and GreetingServiceAsync) to the shared package, and
then, later when I compile using an ant build file, I don't have to
compile the client package.

Should I post this on the GWT developer forum?  I didn't think this
quite fit the description.
I imagine it is really the projectCreator, and not necessarily the
Eclipse plugin.

Thanks,

Jamie.

-- 
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 Chat Widget with Jetty

2012-03-22 Thread Jamie
For use in Jetty, check out Ignite Realtime's smack.
http://www.igniterealtime.org/projects/smack/index.jsp

Jamie.



On Mar 22, 2:23 pm, Joseph Lust  wrote:
> Use GWT on AppEngine with the XMPP.
>
> See their example 
> code<http://code.google.com/appengine/docs/java/xmpp/overview.html>
> .
>
> 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: GWT DEveloper Plugin for Chrome

2012-02-15 Thread Jamie
You could try Firefox.  It also has a GWT developer plugin.  Maybe
that will install correctly for you?


On Feb 11, 10:06 pm, Ragsh  wrote:
> Hi All,
> I am using GWT for the first time. I created project in Eclipse after
> installing the relevant plug-ins. When I Run the application. The
> Sample page is not running in any of the browsers.
> It is asking me to install the GWT Developer plug-in. After installin
> it always goes to the page that says me again to install.
> Can you please help me here.
> I am doing the steps as mentioned in the Google Docs. Building Sample
> GWT,
>
> Kind Regards,
> Sham.

-- 
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: Menubar Sub-menu Arrows .

2012-02-15 Thread Jamie
Usually, you can inspect the element in Firebug, and locate the CSS
file/line/classname that is affecting a given control.
You might have to watch what changes when you hover over the control.
Usually you can see a name being added and removed from the control's
class attribute when it changes style.
That might give you a clue towards what is wrong, anyway.


On Feb 13, 6:26 am, Chris  wrote:
> Hello,
>
> I currently building a website using GWT, with few panels and some CSS
> styles .
> I encountered a problem when i was building this menubar . On this
> menubar's sub-menus, there's an arrow in the right side of the sub-
> menus, and some background-color (or image?) that i cant change or get
> rid of no matter how much i change the code .
>
> The arrow is like this :http://i39.tinypic.com/2w4bo91.png
>
> Why there are color differences on my sub-menus? i tried to change the
> CSS style on one of the sub-menu (now colored black in the picture
> above), but the standard silver-colored sub-menus that showed
> everytime i hover on my sub menus seems unchangeable . Is there some
> way I can change the CSS style of that standard silver color ?
>
> Is that arrow on the right side of my sub-menus is the reason why i
> cant change my CSS ? is there any way to get rid of those arrows ?
>
> Any help / suggestions will be greatly appreciated .
> Thanks .
>
> Chris .

-- 
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: Casting from raw JS to GWT class

2012-02-15 Thread Jamie
I don't think you can do that... bringing in a common pre-compiled-js
module.  That would be pretty cool.

If your two sites are not that big, then you could compile them into
one app, and then decide which widget(s) to show based on the URL in
the onModuleLoad.

Or perhaps you could try communicating between the modules using JSON,
with the built-in GWT JSON library.



On Feb 14, 6:48 pm, Allyn  wrote:
> We have the following setup:
>
> Two GWT-based web pages, built separately but hosted on the same web
> server and used side-by-side in iframes in the same browser window/
> tab. The two web pages both include a common module that defines
> common data model objects (i.e.POJOs). Instances of these objects are
> sent from one of the pages to the other via JavaScript.
>
> While each projects is using the same shared GWT module for the common
> data model classes, each appears to use different class IDs behind the
> scenes when GWT builds it into JavaScript for each web page project.
> These IDs are what are used to map from raw JS objects to the GWT
> classes. Unfortunately, since each project is creating different IDs
> for the same classes, it cannot properly cast an instance of a class
> received from the other web page.
>
> Is there any way to compile the common module once and include the
> compiled JavaScript in both other projects, rather than including the
> raw Java code and compiling it two different times, to ensure that the
> class template mapping metadata is the same across web pages?
>
> I realize this is an odd (and probably not recommended) setup, but it
> is a requirement from the customer for reasons I won't go into here.

-- 
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: googlemaps library

2012-02-15 Thread Jamie
That would be gwt-maps.  You can find it in this list.

http://code.google.com/p/gwt-google-apis/downloads/list

On Feb 14, 6:10 pm, gwt33  wrote:
> Hello,
>
> I want to implement googlemap in my GWT application.
> What is the gwt library to use ?
>
> Thanks

-- 
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: Canvas and anti-aliasing

2011-09-09 Thread Jamie
I do not believe you can control this, but rather, it is left up to
the browser / OS.
I have done some html5 drawings that are anti-aliased, with FF on
Windows and Linux.

What browser and OS are you using?

Also, you can just try adjusting the line width.


On Sep 9, 11:54 am, Christopher Piggott  wrote:
> Hi,
>
> I made an analog gauge using GWT Canvas but the needle isn't anti-
> aliased so it doesn't look so hot.  Is there a way to draw
> using .lineTo() and get a nice anti-aliased line?
>
> --Chris

-- 
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: scalable server backend for browser games

2011-09-09 Thread Jamie
I think this may depend on what you intend to do on the server.
Database? CPU intensive calculations? Calling out to some other web
services?

If you use Apache plus Tomcat, then you can set up load balancing.
Depending on the system it's running on, it should be able to process
a large volume of 'fast' calls.  (Calls that don't need to do much
computation or IO).

If you are thinking of making calls to other servers or slow
processes, you might also consider Jetty, with it's super nice
'continuations' feature, although it can be tough to make work with
GWT.  Once it's set up though, you can handle a very large number of
concurrent requests.
I am not sure if Tomcat has support for suspendable requests.

In fact, if you are planning on some sort of event-driven interaction,
then continuations may be a necessity.


On Sep 9, 1:36 pm, Karel  wrote:
> Hey guys,
>
> I'm currently investigating the possibilities of using GWT to develop
> a facebook browser game. The client should pose no problem; the main
> issue here seems to be the server. For starters, I don't want to use a
> php backend, because that would give up one of the main advantages of
> using GWT: that you can share code between client and server. So I
> need a java-based solution for the server.
>
> I'm not sure if Tomcat is up to the task of being the backend for a
> browser game with potentially millions of concurrent users. I looked
> into alternatives, but I can't really find any suitable. Node.js seems
> interesting; it's very scalable and powerful, but it's obviously in
> javascript. If I could somehow use the client-side compiler to
> translate the server-side code from java to js as well, then I might
> be able to use a wrapper around node.js to build a java-based server
> which runs entirely on javascript. I'm not sure if this would be
> faster or more scalable than Tomcat though...
>
> What's your opinion? Do you think Tomcat is up to the task of hosting
> the backend of a farmville-style game, or not? And what of potential
> alternatives such as node.js? I would like to hear your opinion!
>
> Kind regards,
> Karel

-- 
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: chrome - prompting me to install gwt plugin but already installed

2011-01-27 Thread Jamie
On Jan 28, 11:54 am, Chris Conroy  wrote:
> A fix for the Chrome plugin on windows and fix for OSX Leopard users of the
> Chrome/Firefox plugins  is in the process of being pushed out. It will be
> live at 4pm Pacific / 7pm Eastern time.

I'm not having much luck with the Windows plugin - I revert to the old
version referenced upthread & everything works, then several hours
later I guess I'm being automagically updated to the new version,
which isn't working. Here's the version string from about:plugins:

GWT DMP Plugin - Version: 0.9.0

I'll manually revert to the old version & hope it's just a cache
problem which means I'm getting the broken version rather than the
fixed version - Chris, what's the version string for the Jan 28th
fixed version?

thanks

Jamie



-- 
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: chrome - prompting me to install gwt plugin but already installed

2011-01-26 Thread Jamie
I'm seeing the same issue - no gray GWT toolbox, just the "Development
mode requires..." yellow box.  Was working earlier today. Restart of
Chrome doesn't help, I'll try a reboot to see if that clears it.

Jamie

On Jan 27, 10:02 am, Thomas Broyer  wrote:
> Seehttp://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM
>
> Do you see a gray GWT toolbox in the location bar next to the "bookmark
> star"?

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



Issues creating new web application project

2011-01-18 Thread Jamie
When creating a new web application project I get the following errors
in the eclipse problems pane.

Any help would be appreciated, I'm using Aptana Studio 2 which is
built on Eclipse 3.5.

Description ResourcePathLocationType
Syntax error, annotations are only available if source level is 1.5
GreetingService.java/Test GWT/src/com/skybet/testgwt/client line 9
Java Problem
Syntax error, annotations are only available if source level is 1.5
GreetingServiceImpl.java/Test GWT/src/com/skybet/testgwt/server line
10  Java Problem
Syntax error, parameterized types are only available if source level
is 1.5  GreetingServiceAsync.java   /Test GWT/src/com/skybet/testgwt/
client  line 9  Java Problem
Syntax error, parameterized types are only available if source level
is 1.5  Test_GWT.java   /Test GWT/src/com/skybet/testgwt/client line 122
Java Problem
The type new AsyncCallback(){} must implement the inherited abstract
method AsyncCallback.onSuccess(Object)  Test_GWT.java   /Test GWT/src/com/
skybet/testgwt/client   line 122Java Problem
Type mismatch: cannot convert from Object to GreetingServiceAsync
Test_GWT.java   /Test GWT/src/com/skybet/testgwt/client line 35 Java
Problem
Missing 'title' tag link-variations.htm /_lib/tests/generic Unknown
Web Problem
Missing required attribute 'content'500.html/_lib/errors/myaccount
line 4  Web Problem
Missing required attribute 'type'   500.html/_lib/errors/myaccount  
line
7   Web Problem
Missing required attribute 'type'   funcunit.html   /_lib/funcunit/0.1.2
line 5  Web Problem
Missing required attribute 'type'   funcunit.html   /_lib/funcunit/beta-5/
demoline 5  Web Problem
Missing required attribute 'type'   myapp.html  /_lib/funcunit/beta-5/
demoline 10 Web Problem
Unclosed tag 'body' test.html   /_lib/docs/syntaxhighlighter_2.1.364
line 30 Web Problem

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



HTML5 and canvas

2010-08-11 Thread Jamie
I've been doing some more work with HTML5 and canvas.
Writing out canvas scripts by hand is a pain, especially when you get
into curves.

So, have a look here if you're interested in canvas.

For now, it's just plain JavaScript.
However, javascript can be integrated into GWT, or you could transform
it to Java if you want.
Hope it's of some use.

http://jamies-gwt.blogspot.com/2010/08/html5-canvas-editing.html

Jamie.

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



Re: Making GWT look good...

2010-08-11 Thread Jamie
One thing that I have been doing lately is to *not* use the tab
panel.  It's boring.  Instead, I create my own tab bar, which I have
full css control of, and then a separate stack of widgets.

This lets me turn boring looking tabs into something really nice, much
like the tabs you find here:
http://www.counterpath.com/
(Yes, I work for CounterPath.)

I haven't taken the time to figure out how to do that with the
tabpanel, especially the part about having the tabs a different width
and start position from the stack.
As well, I can then make the page header stay in place, and the stack
have scrollbars.



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



GWT + canvas + gwt-canvas

2010-06-30 Thread Jamie
I have started playing with the  element, GWT, and the cool
gwt-canvas project.
However, it's really slow when you have to recompile every time.

I posted a very short tutorial on experimenting with the canvas
element using a command line:
http://jamies-gwt.blogspot.com/2010/06/experimenting-with-html-canvas.html

The short of it is:  Use firefox + firebug, open a HTML document with
a canvas element in it, and then use the firebug console command line.

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



Tutorial on integrating EJB + GWT + JBoss 5.1 using Eclipse

2010-04-08 Thread Jamie
Hello,

I have written what was supposed to be a short walkthrough on
integrating Google Web Toolkit with JBoss and EJB3, but it turned out
to be a bit longer than I expected.
This walkthrough ultimately lets you use some of the nicer Eclipse
tools such as start/stop server, debugging the live web-deployed
system, and the Project Facets system.

Hopefully it is of some use to someone!

http://jamies-gwt.blogspot.com/2010/03/walkthrough-integrating-gwt-with-jboss.html

Jamie S.

---
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/

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



Re: GWT-GAE integration

2010-03-24 Thread Jamie Gennis
I also ran into this recently.  My understanding is that the new RPC
mechanism in GWT 2 (called deRPC or direct-eval RPC) is currently not
compatible with GAE for a couple reasons (I worked around one, but stopped
when I immediately ran into another).  However, GWT 2 still supports the
old-style RPC mechanism, and I was able to get GWT 2 and GAE to play nice
together by going back to using that.  This means using RemoteService and
RemoteServlet (old-style) rather than RpcService and RpcServlet (new-style /
deRPC).

Objectify is server-side only and should have nothing to do with RPC other
than the fact that it doesn't get in the way of sending entity objects over
GWT's RPC  transports.  It should work just fine once you the GWT deRPC /
GAE conflict.

Jamie

On Wed, Mar 24, 2010 at 7:01 AM, laurent  wrote:

> I'm trying to use GWT 2.0.3 together with GAE (using the Eclipse
> plugin).
>
> I have got the following exception on the server whenever I want to
> make a RPC call:
>
> Caused by: java.lang.RuntimeException: Unable to get Unsafe instance
>at
>
> com.google.gwt.rpc.server.CommandSerializationUtil.(CommandSerializationUtil.java:
> 443)
>... 47 more
>
> I have found a couple of posts related to this problem:
>
>
> http://groups.google.com/group/google-web-toolkit/browse_thread/thread/4af798cf1fc70ab9/fbf404e58ad9e86f?lnk=gst&q=Unable+to+get+Unsafe+instance#fbf404e58ad9e86f
>
> http://code.google.com/p/google-web-toolkit/issues/detail?id=4185
>
> They seem to indicate that GWT 2.0 does not work with the current
> version of GAE (1.3.1). That's surprised me a little bit ...
>
> So Objectify is not working with GWT 2.0 using the normal RPC
> workflow ?
>
> Locally on dev mode, I have the following error:
> 'java.lang.NoClassDefFoundError: java.net.InetAddress is a restricted
> class.
>
> Does some of you manage a correct setting with GWT 2, Objectify 2 and
> GAE 1.3 ? Am I missing something ?
>
> Thanks so much for your help.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: gwt-dispatch, gwt-presenter, mvp4g

2010-03-21 Thread Jamie Gennis
I'll take this opportunity to insert a shameless plug for
gwt-remote-action<http://code.google.com/p/gwt-remote-action/> as an
alternative to gwt-dispatch.  The idea behind gwt-remote-action is that it
enables use of the command pattern using the same RPC interface as
traditional GWT RPC.  This means you don't have to build your app from the
ground up with the command pattern in mind, but rather you can just use
normal GWT RPC and then augment it later when you need caching,
transactions, undo, or any other command pattern goodness.

You can also check out
gwt-remote-action-extension<http://code.google.com/p/gwt-remote-action-extension/>
for
a library than enables the use of Gilead with gwt-remote-action as well as a
demo app.

Best,
Jamie

On Sun, Mar 21, 2010 at 8:35 AM, zggame  wrote:

> I second that idea.  I start to really understand the gwt-presenter by
> reading its code.  It is actually not that complicated and teach me
> some really nice lessons.  And you also see a few short-coming of it.
> It is open-source under BSD.  So you can do whatever to fit it for
> your purpose.
>
> On Feb 28, 5:58 pm, Geraldo Lopes  wrote:
> > Initiatives like gwt-dispatch andgwt-presenterare welcome.
> > Reading others code is a very good way to improve our skills.
> > Even if one don't adopt the library it can be very helpful.
> >
> > Keep small (but useful) libraries river flow :)
> >
> > Regards,
> >
> > Geraldo
> >
> > On 28 fev, 15:40, Ed  wrote:
> >
> > > Be careful using many third party lib's which are more like hobby-
> > > projects and will not be updated when gwt will come out with a new
> > > version such that you can't make the switch to the new gwt version
> > > I try to do everything myself and learn from others... I already had a
> > > few times that I was using other frameworks and couldn't make the gwt
> > > update when I wanted, but had to wait till all frameworks made the
> > > switch... or didn't made the switch at all. :(
> >
> > > GWT is awesome, short learning curve for simple things, and makes it
> > > very easy to create nice things which people then want to share with
> > > others... So they drop it in a google code project and never look back
> > > to it anymore
> >
> > > Of course there are also very good lib's like smartgwt and gxt
> > > (before: mygwt)... The latter one cost a bit, but there for future
> > > proof and has a very nice MVC implementation with dispatcher
> > > integration that is well suited for more complex app's and is very
> > > lean and mean...
> >
> > > Goodluck,
> > > Ed
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: How to resubmit RPC after session timeout/login

2010-02-08 Thread Jamie
Can you give me an example on how I'd be able to resubmit an RPC with
Ray's command pattern approach?

On Feb 6, 5:50 am, Thomas Broyer  wrote:
> On Feb 5, 10:24 pm, Jamie  wrote:
>
>
>
>
>
> > Hi everybody.  I'm trying to extend AsyncCallback to always have the
> > same behavior onFailure.  I can successfully catch the session timeout
> > exception that I'm looking for, open a login dialog, and have the user
> > login.  What I want to do after that is done is to resubmit the
> > original RPC call that caused the onfailure.  Here's what I have so
> > far:
>
> > 
> > public abstract class MyAsyncCallback implements AsyncCallback {
>
> >         public final void onFailure(Throwable caught) {
> >                 if(caught instanceof StatusCodeException &&
> > ((StatusCodeException)caught).getStatusCode() == 401) {
> >                         final LoginDialog login = new LoginDialog();
> >                         login.addLoginDialogListener(new 
> > LoginDialogListener() {
> >                                 public void loginSuccess() {
> >                                         login.hide();
> >                                         //RESUBMIT THE ORIGINAL RPC HERE
> >                                 }
> >                         });
> >                 } else {
> >                         Window.alert("An error has occurred.  Contact your 
> > system
> > administrator.");
> >                 }
> >         }
>
> >         public final void onSuccess(T result) {
> >                 uponSuccess(result);
> >         }
>
> >         public abstract void uponSuccess(T result);
>
> > }
>
> > 
>
> > Does anybody know how I can capture the original RPC before it is sent
> > so I can resubmit it?
>
> I suppose Ray Ryan's proposal to use a command pattern for your RPC
> calls [1] would help you in solving it.
>
> [1]http://code.google.com/events/io/2009/sessions/GoogleWebToolkitBestPr...

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



How to resubmit RPC after session timeout/login

2010-02-05 Thread Jamie
Hi everybody.  I'm trying to extend AsyncCallback to always have the
same behavior onFailure.  I can successfully catch the session timeout
exception that I'm looking for, open a login dialog, and have the user
login.  What I want to do after that is done is to resubmit the
original RPC call that caused the onfailure.  Here's what I have so
far:


public abstract class MyAsyncCallback implements AsyncCallback {

public final void onFailure(Throwable caught) {
if(caught instanceof StatusCodeException &&
((StatusCodeException)caught).getStatusCode() == 401) {
final LoginDialog login = new LoginDialog();
login.addLoginDialogListener(new LoginDialogListener() {
public void loginSuccess() {
login.hide();
//RESUBMIT THE ORIGINAL RPC HERE
}
});
} else {
Window.alert("An error has occurred.  Contact your 
system
administrator.");
}
}

public final void onSuccess(T result) {
uponSuccess(result);
}

public abstract void uponSuccess(T result);

}


Does anybody know how I can capture the original RPC before it is sent
so I can resubmit it?

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



Re: Cancel treeitem selection

2010-01-28 Thread Jamie
Bump.  Any ideas?

On Jan 26, 12:41 pm, Jamie  wrote:
> Hi.  I have a GWT tree of folders.  When a folder i do an RPC call to
> load a list of files on the right side of the screen.  If the user
> were to rapidly change folders it queues up the RPC calls and takes a
> very long time to load whatever the last folder clicked was.  I want
> to prevent a folder change while the files are still being loaded for
> the just clicked on folder, so basically I want to cancel the
> selection event.  I've tried a few approaches, but it seems difficult
> since SelectionEvent cannot be cancelled.  I can get it to not select
> the new treeitem, but it also looses selection of the old treeitem
> even if i explicitly reselect it.
>
> What is the best way to cancel treeitem selection?

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



Cancel treeitem selection

2010-01-26 Thread Jamie
Hi.  I have a GWT tree of folders.  When a folder i do an RPC call to
load a list of files on the right side of the screen.  If the user
were to rapidly change folders it queues up the RPC calls and takes a
very long time to load whatever the last folder clicked was.  I want
to prevent a folder change while the files are still being loaded for
the just clicked on folder, so basically I want to cancel the
selection event.  I've tried a few approaches, but it seems difficult
since SelectionEvent cannot be cancelled.  I can get it to not select
the new treeitem, but it also looses selection of the old treeitem
even if i explicitly reselect it.

What is the best way to cancel treeitem selection?

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



Re: request builder

2010-01-07 Thread Jamie
You should then probably install something like TamperData or Firebug
for firefox, and see if your request is actually being sent from the
browser.  Or you could use wireshark, but that's not as easy to read.
As well, tamperdata or wireshark will let you see the data in the
responses.

BTW, if you are running a separate PHP web server, firefox considers a
different port to be cross-site.
You can work around that by deploying your compiled javascript via the
PHP server, or you can use (eg) Apache to do proxy forwarding so the
browser thinks it is all one site.

On Jan 7, 5:51 am, ben fenster  wrote:
> ???
>
> On Jan 7, 11:56 am, ben fenster  wrote:
>
> > its not cross site and it works ok in hosted more over it doesnt fail
> > in compile but keep getting empty responses and in hosted they are ok
> > i cant understand why
>
> > On Jan 7, 10:47 am, olivier nouguier 
> > wrote:
>
> > > SOP ?
>
> > > or some GWT SOP
>
> > > All I known is that when using GWT-RPC the standard policy doesn't want
> > > cross webapp access!
>
> > > HIH
>
> > > On Thu, Jan 7, 2010 at 9:39 AM, ben fenster  wrote:
> > > > does any one know why would a request sent using equest builder works
> > > > in hosted mode  but dont work in compile mode i am using it to access
> > > > php scripts running on the same xamp server
>
> > > > --
> > > > You received this message because you are subscribed to the Google 
> > > > Groups
> > > > "Google Web Toolkit" group.
> > > > To post to this group, send email to 
> > > > google-web-tool...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > google-web-toolkit+unsubscr...@googlegroups.com
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > > --
> > > A coward is incapable of exhibiting love; it is the prerogative of the
> > > brave.
> > > --
> > > Mohandas Gandhi
-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.




Re: Articles / Tutorials

2009-12-21 Thread Jamie
Ooops,

just found this link that describes it...

http://code.google.com/webtoolkit/articles.html

--

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




Articles / Tutorials

2009-12-21 Thread Jamie
Hi there,

This is a question for the group owners:
How would I go about posting an article to the group?
I would like to post a tutorial article that shows how you can
integrate a GWT project into an EAR using Eclipse and JBoss AS 5, and
how to make it work with EJB3, including EJB injection.

I think it's a bit too long for a post.

Thanks,
Jamie.

--

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




Re: Unittesting a Generator ?

2009-12-17 Thread Jamie Gennis
I have a solution to this in
gwt-remote-action<http://code.google.com/p/gwt-remote-action/>.
 I create a real TypeOracle and feed it the actual .java files from GWT for
the JRE and some GWT classes, then I feed it the .java files for the test
interfaces that are to be generated and run my unit tests using that
TypeOracle.  See
here<http://code.google.com/p/gwt-remote-action/source/browse/core/src/test/java/com/google/gwt/dev/javac#javac>for
the code that builds the TypeOracle and
here<http://code.google.com/p/gwt-remote-action/source/browse/core/src/test/java/com/google/code/gwt/remoteaction/rebind/RebindTestCase.java>
for
how it gets used for a test case.  It takes a couple seconds to build the
TypeOracle so I use a static to save it and reuse it for multiple tests.  If
this is useful to others I can factor it out of gwt-remote-action into a
separate library that folks can use.

It turns out there actually are mocks for some Generator related things in
GWT, but there's basically just enough to support the unit tests in GWT.
 They also don't get included in any of the GWT jars, so you'd have to just
grab them from the GWT source to use them. See
here<http://code.google.com/p/google-web-toolkit/source/browse/trunk/dev/core/test/com/google/gwt/dev/javac/impl/>
and
here<http://code.google.com/p/google-web-toolkit/source/browse/trunk/dev/core/test/com/google/gwt/dev/javac/TypeOracleTestingUtils.java>
for
some of that code.

Jamie

On Thu, Dec 17, 2009 at 8:58 AM, Gal Dolber  wrote:

> I am asking myself the same. I couldn't find any way to do that, but you
> can always test the generated one.
>
> There is another tip:
> If you compile the project and specify the -gen argument to the compiler,
> then execute the project on debug mode and attach to the project the gen
> directory like source lookup and you can debug the generated class line by
> line, thats pretty nice to find bugs.
>
> 2009/12/17 hjo1620 
>
> I have a "class MyGenerator extends Generator", that I want to test.
>>
>> I need pointers to existing unit test code of a Generator unittest.
>>
>> Looked in the GWT code for readymade mocks to no avail.
>>
>> /hw
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-tool...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

--

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




Re: GWT TDD

2009-12-07 Thread Jamie Gennis
GWTTestCase tests do run in DevMode normally.  The reason they take so long
to run (I believe) is because at least some of the code for the GWT module
being tested is dynamically generated at test runtime.  At the present the
best one can do for GWTTestCase tests is to use a GWTTestSuite to allow GWT
to group tests that share a module together so the same module doesn't have
to be compiled multiple times.  See
here<http://code.google.com/webtoolkit/doc/1.6/DevGuideTesting.html#DevGuideJUnitSuites>for
instructions on doing that.

The reason running your app in DevMode is able to refresh so quickly is
because most of the code was compiled on the first page load.  On refreshes
DevMode only recompiles the things that have changed.  Two consecutive runs
of a GWTTestCase test, however, are run in separate processes so later runs
can't take advantage of the work done by earlier runs.

In general I think it's best to test as much as possible using pure Java
unit tests that don't run through GWT at all, as they'll run much faster.
 You can use 
GWTMockUtilities<http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/junit/GWTMockUtilities.java>
to
stub out calls to GWT.create(), allowing you to create mocks of most GWT
objects.  See here <http://blog.danielwellman.com/2009/02/index.html> for a
blog post on the subject.

Jamie

On Mon, Dec 7, 2009 at 10:02 AM, Robert Zaleski  wrote:

> Hey Guys,
> I've been trying to do some more TDD in places where I haven't
> been able to.  With GWT, I was looking and for some of the small
> samples, a GWT Test Case takes 30 seconds.  I timed doing a refresh of
> Dev mode on 2.0-rc2 and that's taking like 6 seconds for our app.
>
>So my thought is, is there any framework for running Tests either
> in Dev mode, or running them in GWT Test Case.  I think the dual mode
> is key, so in dev I can quickly rerun tests, to make sure things work,
> and then cruise can automatically rerun them for me on every commit.
>
>I know another practice is to do MVP so we can just do straight up
> JUnits, but I've been working on  a lot of widget level work which we
> don't have any coverage on right now due to the GWTTestCase slowness.
>
>Let me know if there's anything on this.  For now I mocked out
> something like so in a test main which I use for debugging the widget
> by itself, which is cruder than I like, but it works.
>
>public interface Test {
>public void doTest();
>public String getName();
>}
>
>ArrayList tests = new ArrayList();
>
>   public void makeTests() {
>  // Make other tests
>tests.add(new Test() { public void doTest() {
>}
>public String getName() { return "No-Op Test"; }
>});
>   }
>
>public void runTests() {
>Document d = Document.get();
>int failed = 0;
>for ( Test t : tests ) {
>try {
>t.doTest();
>} catch ( Throwable e) {
>failed++;
>ParagraphElement p = d.createPElement();
>StringBuilder sb = new StringBuilder();
>sb.append("ERROR during
> \"").append(t.getName()).append("\":
> ").append(e.getMessage()).append("");
>
>StackTraceElement[] stack =
> e.getStackTrace();
>for ( int i = 0; i < stack.length; i++ ) {
>StackTraceElement el = stack[i];
>
>  sb.append(el.getFileName()).append('.').append(el.getMethodName
> ())
>.append("() :
> ").append(el.getLineNumber()).append("");
>}
>
>p.setInnerHTML(sb.toString());
>d.getBody().appendChild(p);
>}
>}
>ParagraphElement p = d.createPElement();
>p.setInnerHTML("Passed " + ( tests.size() - failed ) + " / "
> +
> tests.size() );
>d.getBody().appendChild(p);
>}
>
> Longer term, I'd like to do something generator based, but I was
> curious what other thoughts there were on doing development like
> this.  Dev Mode seems to be optimized to refresh/re-run faster
>
> --
>
> You received this message because you are subscribed to the Google Groups
> &q

Re: Has any one written new annotations for GWT Client side ?

2009-12-05 Thread Jamie Gennis
> Can you provide more information on the generator side and how can i
> accomplish this ?

It's not really well documented as far as I know, so the best place to get
information is by reading the source code of GWT and other libraries that
implement generators.  The basic idea is that in your .gwt.xml file you
specify an interface and a
Generator<http://code.google.com/p/google-web-toolkit/source/browse/trunk/dev/core/src/com/google/gwt/core/ext/Generator.java>class.
 When the GWT compiler comes across a GWT.create(Foo.class) call
where Foo.class extends the interface you specified, it calls your Generator
class to create the implementation of that interface.  Your Generator class
can then generate the Java code for the implementation of the interface, and
an instance of that generated class will be returned by the GWT.create()
call.

This is how GWT's RPC interfaces work (see
RemoteService.gwt.xml<http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/RemoteService.gwt.xml>
 and 
ServiceInterfaceProxyGenerator<http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/rebind/rpc/ServiceInterfaceProxyGenerator.java>)
as well as many other GWT features (localization, UI binder, client
bundles).  You can also define a class that gets invoked at the GWT
compiler's link phase, but I don't think you'd need to do this just for
JSON marshaling.

Jamie

On Sat, Dec 5, 2009 at 7:10 AM, keyboard_samurai  wrote:

> Thanks for the reply ...
>
> Can you provide more information on the generator side and how can i
> accomplish this ?
>
> I would definitely look into the lovely json rpc code. Any directions
> on this would be greatly appreciated.
>
> Thank you !
>
> Cheers!
>
> On Dec 4, 9:43 pm, Jamie Gennis  wrote:
> > Annotations in client code can be used during GWT's rebind phase of the
> > compilation, but they are not accessible at runtime on the client side.
>  GWT
> > doesn't support much of Java's reflection functionality on the client
> side
> > in order to keep the compiled Javascript code smaller.
> >
> > You can write a custom generator, which can be called to create
> > implementation code for specific interfaces during the rebind phase, to
> > generate your marshaling code at compile-time.  This is the approach
> taken
> > by lovely-gwt-jsonrpc <http://code.google.com/p/lovely-gwt-jsonrpc/>,
> for
> > example, and is how all of GWT's built-in RPC functionality works.  You
> may
> > be able to leverage some or all of the work in that project to accomplish
> > what you're trying to do.
> >
> > Jamie
> >
> >
> >
> > On Thu, Dec 3, 2009 at 7:21 PM, keyboard_samurai 
> wrote:
> > > Hi,
> >
> > > I am a newbie to GWT. Need to know if GWT can support custom
> > > annotations on client side ?. The reason for custom annotations is i
> > > would be communicating with the backend service through json and not
> > > gwt rpc and i wouldnt like each developer to write the same piece of
> > > code. So i was planning to annotated my entity classes which can be
> > > used for marshalling and unmarshalling json response.
> >
> > > Please do let me know if this can be done in GWT.
> >
> > > Thanks in advance
> >
> > > cheers!
> >
> > > --
> >
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Google Web Toolkit" group.
> > > To post to this group, send email to
> google-web-tool...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-web-toolkit+unsubscr...@googlegroups.com cr...@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-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>

--

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




Re: DefaultStyles of Button

2009-12-04 Thread Jamie Gennis
The CSS depends on which theme you inherit in your .gwt.xml file.  If
you  then you
get this CSS 
file<http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard.css#47>
(note
that that's the CSS you will get using the GWT Subversion trunk code).

Jamie


On Fri, Dec 4, 2009 at 11:10 AM, abhiram  wrote:

> Can someone tell me where can i get the default CSS which is being
> used for the button. I mean, i want the actual CSS of  ".gwt-Button"
>
> Regards,
> Abhiram
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>

--

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




Re: Has any one written new annotations for GWT Client side ?

2009-12-04 Thread Jamie Gennis
Annotations in client code can be used during GWT's rebind phase of the
compilation, but they are not accessible at runtime on the client side.  GWT
doesn't support much of Java's reflection functionality on the client side
in order to keep the compiled Javascript code smaller.

You can write a custom generator, which can be called to create
implementation code for specific interfaces during the rebind phase, to
generate your marshaling code at compile-time.  This is the approach taken
by lovely-gwt-jsonrpc <http://code.google.com/p/lovely-gwt-jsonrpc/>, for
example, and is how all of GWT's built-in RPC functionality works.  You may
be able to leverage some or all of the work in that project to accomplish
what you're trying to do.

Jamie

On Thu, Dec 3, 2009 at 7:21 PM, keyboard_samurai  wrote:

> Hi,
>
> I am a newbie to GWT. Need to know if GWT can support custom
> annotations on client side ?. The reason for custom annotations is i
> would be communicating with the backend service through json and not
> gwt rpc and i wouldnt like each developer to write the same piece of
> code. So i was planning to annotated my entity classes which can be
> used for marshalling and unmarshalling json response.
>
> Please do let me know if this can be done in GWT.
>
> Thanks in advance
>
> cheers!
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>

--

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




Re: Some gwt.xml elements, unneeded in GWT 2.0?

2009-11-27 Thread Jamie Gennis
The  element is still used when running GWTTestCase tests.

I believe the  element is still useful for having the GWT compiler
package up the public files along with the compiled files from multiple GWT
modules.  It allows, for example, the .png files needed for the 'standard'
GWT theme on ie6 to be included with your compiled files just by having your
module  the standard theme.

Jamie

On Fri, Nov 27, 2009 at 6:17 PM, fker...@gmail.com wrote:

> Are the  and  elements in the gwt.xml file still
> needed with GWT 2.0? If I understand it correctly, servlet definitions
> go in the web.xml file, and the public directory is war/WEB-INF, so
> are the gwt.xml definitions needed, or are they a legacy of older GWT
> versions?
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>

--

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




Re: Making command pattern RPC look like traditional GWT RPC

2009-11-25 Thread Jamie Gennis
Another thing that I came across that other authors of generator libraries
may also have problems with is testing classes that interact with a
TypeOracle.  I spent a couple hours last night updating my
TypeOracleBuilder<http://code.google.com/p/gwt-remote-action/source/browse/core/src/test/java/com/google/gwt/dev/javac/TypeOracleBuilder.java>
while
moving from GWT 2.0.0-ms1 to 2.0.0-rc1.  I'm not sure what the right
solution is here.  The TypeOracleBuilder and MockJavaResource classes that
are used for GWT's internal tests could be included in gwt-dev.jar for
external libs to use.  Maybe they belong in a new GWT testing jar.  I could
also factor these out of gwt-remote-action and maintain a 3rd party lib in
lock-step with GWT versions.  Or maybe nobody other than me wants this
functionality and it's not worth spending any time on.

Anyone have any thoughts on this?

Jamie

On Mon, Nov 23, 2009 at 7:08 AM, Jamie Gennis  wrote:

> Hi all,
>
> I posted this on the GWT Contributors group last week hoping to start a
> discussion about the GWT internals that I'm using for the library I'm
> working on (and whether they all need to be internals), but I haven't gotten
> any responses about that so I'm reposting to the GWT developers group...
>
> I've been writing a GWT library to implement the command pattern for GWT
> RPC calls using the same interfaces that traditional GWT RPC uses.
>  Basically, when an app calls a method of the FooAsync action service
> interface, an action object is created from the method arguments, processed
> by some action filters on the client, then passed to the server.  The server
> then pulls the method arguments out of the action object and passes them as
> arguments to the appropriate method of the Foo interface implementation
> class.  The return value (or thrown Throwable) from that method then gets
> put into an action result object on the server and sent back to the client,
> where it gets processed by filters and eventually has the return value or
> throwable pulled out and passed to the onSuccess or onFailure methods of the
> async callback.
>
> I have a working (albeit not extensively tested) implementation at
> http://code.google.com/p/gwt-remote-action/, but the implementation relies
> on some GWT internals, so it's rather brittle at the moment. I'd like to get
> some feedback on how I can change my implementation to be more future-proof
> (or correct if it isn't), and which (if any) of the GWT internals that I'm
> using might be candidates for becoming a part of GWT's public interface.
>
> To get a better idea of how this library is intended to be used, check out
> the Usage 
> Guide<http://code.google.com/p/gwt-remote-action/wiki/UsageGuide>(still a 
> work in progress).
>
> The tricky part of the implementation is the action result.  The purpose of
> an action result object is to encapsulate the result of executing an action
> in such a way that action filters can manipulate it without having any
> knowledge of what the action was.  It needs to contain an arbitrary return
> value object or an arbitrary Throwable object (as well as an indication that
> the Throwable was thrown rather than returned).  These objects are exposed
> via the 
> ActionResult<http://code.google.com/p/gwt-remote-action/source/browse/core/src/main/java/com/google/code/gwt/remoteaction/client/ActionResult.java>
>  interface.
>  Simply having a general action result class that contains a return value
> field of type Object and an exception field of type Throwable is not
> desirable because it would cause deserialization code for every class that
> GWT knows about to be included in the compiled javascript.
>
> The current implementation works by generating one action result class for
> each RPC method.  Identical action result classes are generated by a GWT
> Generator at gwtc-time (for the client) and via Java byte code generation at
> run-time (for the server).  My original idea was that this method-specific
> action result class could have a result field of the specific return type of
> the method along with a field for each type in the method's throws list.
>  This turned out not to be necessary (at least for the cases I've tested),
> because when GWT calls the Generator for the 
> ActionExecutionService<http://code.google.com/p/gwt-remote-action/source/browse/core/src/main/java/com/google/code/gwt/remoteaction/client/ActionExecutionService.java>
>  (the
> traditional GWT RPC that sends the action objects to the server) it doesn't
> find any of the generated method-specific action result classes.  Because of
> this I simplified the action result classes to just have one field of type
> Throwable, and I verified that n

Making command pattern RPC look like traditional GWT RPC

2009-11-23 Thread Jamie Gennis
ature that may not make
it into GWT 2.0.  Step 2 is somewhat wasteful since it takes gwtc time
generating a proxy class that it will ultimately throw away via dead code
elimination.  Step 3 is pretty gross since the action proxy generator
basically just divines the name of the _TypeOverridesFactory via string
manipulation (see the
getArtificialRescue<http://code.google.com/p/gwt-remote-action/source/browse/core/src/main/java/com/google/code/gwt/remoteaction/rebind/RemoteActionProxyCreator.java#359>
method).
 It may make sense to factor the _TypeOverridesFactory generation into its
own public *Creator class that could return the generated class name (or
maybe there's a better way for me to leverage that functionality).  Also,
the comments for the ArtificialRescue class make me feel like a bad person
for using it, so  if there's a better way to achieve what I'm trying to do
(or could be in the future with some GWT changes) let me know.

The one last bit of black magic required to make this work has to do with
GWT's aggressive dead code elimination.  The action service proxy class that
gets generated has code that essentially does:

Throwable thrown = actionResult.getException();
if (thrown != null)
  callback.onFailure(thrown);
else
  callback.onSuccess(actionResult.getResult())

However, because the field returned from the getException method never gets
written (except by the eval'd code returned from the deRPC call), the GWT
compiler thinks it can eliminate the whole if-block, resulting in an
unconditional call to callback.onSuccess.  I'm not sure whether this is
specific to how I'm doing things or if this is a bug with the deRPC code in
general.  I currently work around it by creating a dummy action result
object (of the generated action result class type) and I set the field
returned to 'new Exception()'.  This currently tricks the compiler into
thinking that the field gets written to a non-null value, but I don't have
too much faith that it will continue to trick it in the future.  Who knows
how smart that compiler will get?

If you've gotten this far then... Wow, I'm impressed!  If you actually
followed what I was trying to explain then I'm even more impressed.  I'd
love to hear what more GWT-knowledgeable folk than me think about this
implementation.  I think being able to add command pattern capabilities to
existing GWT RPC services is pretty cool, but if it can't be implemented in
a robust and maintainable way then it probably won't fly.

Thanks,
Jamie

--

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




Re: Help: Adding Login to an existing app.

2009-10-14 Thread Jamie

Oops, when I say login filter, I mean a class that implements
javax.servlet.Filter configured in your web.xml, applied to incoming
requests to your RPC servlet.

---
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/
--~--~-~--~~~---~--~~
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: Help: Adding Login to an existing app.

2009-10-14 Thread Jamie

The most successful method I have used is to use a login filter.

- The filter will redirect to a login form if not logged in
- If the user is logged in (for example, checking a session var,
cookie, or database), the filter wraps the request with a
HttpServletRequestWrapper that implements getUserPrincipal() and
isUserInRole(String role), and then proceeds to execute the request.
- With this, you get some benefits:
  - You can guarantee that your RPC requests are from an already
logged in user
  - Your RPC code can call getThreadLocalRequest().getUserPrincipal()
to find out who is logged in
  - You can switch to https just for the login, if you wish
- For extra credit, you can add a parameter to your filter, to
implement roles.
For example, apply the filter with a parameter that specifies the
'user' role to your UserRPC servlet, and another filter with a
parameter that specifies a required role of 'admin' for your AdminRPC
servlet.  If the current user tries to access the adminRPC but does
not have that role assigned to them, they get denied or redirected to
the login page.

To allow persistent logins like the webmail "log in for two weeks"
idea, I set a persistent cookie that contains a large random number,
and save that in my database, possibly combined with some other key
information;  If an incoming request does not have a login in the
session, I check for the persistent cookie, and validate it and their
IP address against the database; if it matches, they're in.
The IP address qualifier can be problematic; it can be faked out by
SBCs, NATs, and ip spoofing.  As well, it sucks for mobile devices
that have changing IP addresses.


Well I hope that is of some sort of help...

Jamie.

---
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/


--~--~-~--~~~---~--~~
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: Repeating http requests

2009-08-31 Thread Jamie

You might have a bit of debugging in your future...

Is there anything different about the last request?  Check this with
eg., TamperData, FireBug console, or server logging.
Is it handled properly?
Perhaps you have some sort of referencing issue within the handler,
that is not allowing all the previous callbacks to be freed?

Jamie.
---
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/


--~--~-~--~~~---~--~~
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: Integrate GWT + Servlet in Eclipse

2009-08-31 Thread Jamie

Perhaps you could give a bit more detail about your problems.
Eclipse is capable of debugging mulitple interacting projects at the
same time.

I suspect that you might be having trouble trying to run your GWT
project in 'hosted' mode, while trying to access the other project's
server.  If that is the case, you might try rewriting your GWT server
code to be a proxy for the other project.

But I am not sure what the problem is; I have both merged and split
GWT and web projects before, without much trouble, so long as you
understand where everything is supposed to go, how to configure the
deployment descriptors, and how to configure the GWT project(s).

---
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/


--~--~-~--~~~---~--~~
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: Setting bg color of a panel?

2009-06-18 Thread Jamie

First off, I would recommend installing Firefox + Firebug; firebug
lets you inspect the layout of elements, and will give you a good idea
of how the browser is placing things.  It is really cool; if you click
the "Inspect" button, you can hover over your page and see what
elements are where, and click on one to find it in the DOM.

Next, the HorizontalPanel, by default, is only as wide as it needs to
be.
You can try calling hp.setWidth("100%").  The HorizontalPanel also has
an alignment parameter, so you can align left, right, or center.

Jamie.
---
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/

--~--~-~--~~~---~--~~
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: Using Filters

2009-06-11 Thread Jamie

I have implemented something similar using a filter.

In the doFilter, you can cast the ServletRequest parameter to an
HttpServletRequest.
You will then have access to cookies and the container's session.

For example,

HttpServletRequest hRequest = (HttpServletRequest)request;
Cookie[] cookies = hRequest.getCookies();
hRequest.getSession().setAttribute("someattr", object);
(MyObject)myObject = hRequest.getSession().getAttribute("blap");

You could store your sessionid in a cookie, or in the container
session.

This can provide a pretty decent auth mechanism, I think.

1. My filter takes an initialization parameter, named "requiredrole".
If set, then the user must have that role or else the request is
denied or redirected or whatever.
2. If you use a cookie to send the sessionid, you can get it back
using hRequest.getCookies().
3. You can avoid sending your own sessionid to the client altogether,
and instead, store it in the container's session if you wish, using
hRequest.getSession().setAttribute().
(that is dependent on the container's session cookie coming from the
browser.)

You can stop there can continue on your way...
The following is some detail on how I have used this to create my own
login filter.


As for the user logged in, I have implemented a class that implements
java.security.Principal,
This must implement getName().  To that I added a set of roles.

public class MyPrincipal implements Principal
{
String name;
Set roles = new HashSet();
etc...
public String getName() { return name; }
public boolean isUserInRole(String role) { return roles.contains
(role); }
}


Additionally, I have a class that extends HttpServletRequestWrapper.

private class UserPrincipalRequestWrapper extends
HttpServletRequestWrapper
{
  MyPrincipal p;
  public UserPrincipalRequestWrapper(HttpServletRequest arg0,
MyPrincipal p)
  {
 super(arg0);
 this.p = p;
  }
  public Principal getUserPrincipal()
  {
 return p;
  }
  public boolean isUserInRole(String role)
  {
return p.isUserInRole(role);
  }


So!  How does this all work?
- A request comes in to the filter.
- The filter looks in the container session for a MyPrincipal object
- If not found, then redirect to the login page
- If found, then
  - if requiresRole is set, verify the MyPrincipal object has that
role.
  - create a UserPrincipalRequestWrapper using that MyPrincipal object
  - call chain.doFilter(wrapper, response);

The login page is therefore required to assign a MyPrincipal object to
the session using
hRequest.getSession().setAttribute("principal", new MyPrincipal(...));


Inside the Servlet method, I can then call the standard auth methods,
for example:

  // Get the request inside GWT servlet
  HttpServletRequest request = getThreadLocalRequest();
  request.getUserPrincipal();
  request.isUserInRole("admin");


Finally, in my web.xml, I initialize multiple filters, with
requiredRole set to different things; I then apply that to different
servlets.
EG., I have a servlet for admin functions, and another for user
functions.

For bonus points, you can implement a persistent cookie (random
number?) that will reload the MyPrincipal into the container session,
if the container session does not already have one.  This is to
support 'log in for two weeks' feature of many popular email sites for
example.

Well there you go, more detail than you ever needed to know...

Jamie.
---
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/

--~--~-~--~~~---~--~~
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: LoginSecurityFAQ and sessionID/tokens

2009-06-10 Thread Jamie

java.util.Random random = new Random();
String sessionID = Long.toHexString(random.nextLong());

This will generate a 64 bit random number.

or you could use a Base64 encoder instead of using a hex string.

You might consider also adding the user's IP address into your table,
so that you can tie the sessionID to an IP address.  This is far from
un-spoof-able, but better than nothing, I suppose.
The IP address can also be unreliable when going through a NAT
appliance.

Jamie.

---
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/
--~--~-~--~~~---~--~~
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: Server initialization

2009-06-10 Thread Jamie

You might try using the servlet configuration 'load-on-startup'
setting in your web.xml servlet definition.

You could also define your own base class and derive your servlets
from that so you at least have the code in one place...

Jamie.
---
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/

--~--~-~--~~~---~--~~
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 Eclipse/Java/GWT question

2009-06-08 Thread Jamie

You need to make sure that you define a module xml for each source
folder you want to make use of,  or add a 'source' element within your
module for each client source folder.
I am not sure about the 'expected package' problem... are you still
importing org.json somewhere?

Jamie.
---
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/
--~--~-~--~~~---~--~~
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 Eclipse/Java/GWT question

2009-06-08 Thread Jamie

GWT comes with it's own JSON library.

See here:
http://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#DevGuideJSON
and
http://code.google.com/webtoolkit/tutorials/1.6/JSON.html

I am not saying that you can't use the org.json in your client code,
however it will end up being a lot of work, and the GWT team have
already done it for you!


Jamie.
---
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/

--~--~-~--~~~---~--~~
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: Multiple modules but deploy common code to common place

2009-06-04 Thread Jamie

If you are using GWT 1.6 and the new project layout, put your images
and css in the war folder of the project, not the source folder(s),
and reference them from there.

If you are using the old structure, making use of the 'public' folder
of the GWT module, you could merge the output of all of your modules
into the same folder.  The generated filenames will not clash, and
being in the same deployed folder will make use of the same image&css
files.

Jamie.
---
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/

--~--~-~--~~~---~--~~
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: Add javascript to html

2009-06-03 Thread Jamie

I think you are talking about this:
http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html#DevGuideAutomaticResourceInclusion

Or are you talking about adding some javascript to a GWT HTML( )
object?

Jamie
---
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/

--~--~-~--~~~---~--~~
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: Multiple Entry Points in the same module

2009-05-28 Thread Jamie

There are lots of postings on this group about this already...  search
for "entry points" and you should find some.  There are some really
good suggestions.

It sounds like you should either:
1. Merge to ONE entrypoint, and in the onModuleLoad() search for a
marker of some sort (meta tag, div with id, or just based on the
page's URL), and then display the content you want based on that.
or
2. Split your project into two separate GWT projects, with one
entrypoint each.  You can most likely merge the generated projects
back together (into the same folder) without clashing.

entrypoints will always be run in a serial fashion.

Jamie.

---
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/


--~--~-~--~~~---~--~~
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: Role-based validation for RPC calls on a separate server

2009-05-28 Thread Jamie

Here is what I usually do:  I split the RPC API into pieces;  one
servlet for user functions, one servlet for admin functions, etc...,
each at it's own URL of course.

Then I add role based access using filters;  The filters are
configured against the servlet URL.

This way I do not need to deserialize or analyze the RPC call, to
determine what authorization is required.

Jamie.

---
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/

--~--~-~--~~~---~--~~
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: Geting a stack trace?

2009-05-25 Thread Jamie

You will probably need to make use of JSNI.
Check out hit #1 on googling for "javascript stack trace",

http://www.google.ca/search?hl=en&q=javascript+stack+trace&btnG=Google+Search&meta=&aq=f&oq=

http://eriwen.com/javascript/js-stack-trace/


Jamie
---
Find television broadcast antennas in your area:
http://www.antennamap.com/
--~--~-~--~~~---~--~~
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: ColumnTree

2009-05-25 Thread Jamie

As you no doubt know, the Tree does not support multiple columns.
For one project, I also needed a very simple column-tree

As a no-frills tree with support for columns, I simply used a regular
Grid, and in the first column I always added a horizontalpanel.

In this horizontalpanel, I added a 'spacer' Image, followed by my
'tree' icon Image, followed by a Label for the item text.
The spacer image was a transparent 1x1 gif, and I would adjust it's
width depending on the desired indent for that item.

Obviously, this does not support the usual treeitem hierarchy (adding
treeitems to other treeitems), but it worked for my needs at the time,
and it looked pretty good too.
I did not require collapsable treeitems either, but that could be
accomplished using a listener.

Jamie.

---
Search for analog and digital television broadcasts in your area (US &
Canada):
http://www.antennamap.com/

--~--~-~--~~~---~--~~
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: Navigate between a list and details screen

2009-05-22 Thread Jamie

Oops, I was cutting and pasting from the GWT Reference docs...

That should say:

onClick(ClickEvent event)
{
Hyperlink sender = (Hyperlink) event.getSource();

Jamie

---
Find television broadcast antennas in your area (US & Canada):
http://www.antennamap.com/


--~--~-~--~~~---~--~~
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: Navigate between a list and details screen

2009-05-22 Thread Jamie

You do not appear to be associating the clicked item with the correct
token...

> String token = History.getToken();

This is accessing the global History singleton, not the Hyperlink's
history token.

If you really want to use a hyperlink, then you could get the
hyperlink that was clicked on, and then extract the historyToken from
it.
EG.,

onClick(ClickEvent event)
{
Hyperlink sender = (Hyperlink) click.getSource();
String token = sender.getHistoryToken()
:
}


Or you could use a TableListener and listen for table clicks instead,
and then you do not need to put the itemId into a hyperlink history
token.  You would have to keep track of it elsewhere, for example a
List object that is maintained in parallel with the FlexTable.

Jamie

---
Find television broadcast antennas in your area (US & Canada):
http://www.antennamap.com/


--~--~-~--~~~---~--~~
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: Best approach for saving and displaying images

2009-05-22 Thread Jamie

Performance-wise,  a folder on the server is the way to go.

- Much less CPU
- Server container will automatically handle HTTP caching, meaning
once the image is downloaded to the browser's cache, the server will
send UNMODIFIED on the next request (unless it's been modified!)


Of course, you could probably code up the 'unmodified' response
yourself, but as I understand it, web containers are usually very good
at serving resources.

Jamie.

---
Find television broadcast antennas in your area (US & Canada):
http://www.antennamap.com/
--~--~-~--~~~---~--~~
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: Tomcat and GWT 1.6

2009-05-22 Thread Jamie

I would suggest using Firefox + TamperData.

Then you should be able to see what URL the browser is trying to
access when you use the relative URL, or if in fact it is sending the
request at all.

Jamie.
--~--~-~--~~~---~--~~
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: Images for Push Buttons

2009-05-22 Thread Jamie

Have you tried the 'PushButton' class?

http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/PushButton.html

The constructor takes a single image, or a pair of images for up/down.

Jamie.


On May 22, 9:46 am, abhiram wuntakal  wrote:
> Hi Donald,
>
>   Thanks for your reply, but i am sorry, i guess u have misunderstood my
> problem. My problem is...
>
>   I have 3 buttons Button1, Button2 and Button3. All three have different
> functionalities. So I have a different image to be displayed on each of the
> buttons. If i use CSS then i need to have a different style for each of the
> buttons. But all the buttons look similar except for the image that gets on
> top of the button.
>
>  My doubt is, is there a way to have the image displayed on the Button by
> setting the image directly from the Code (Not from the css), so that when i
> define the button i have the image defined for it as well.
>
>  Hope my doubt is much clear now. Please let me know if you can suggest any
> solution for this problem.
> Best Regards,
> Abhiram
>
> On Fri, May 22, 2009 at 7:07 PM, Donald.W.Long <
>
> donald.w.l...@thelongsfamily.com> wrote:
>
> > If I understand you correctly you just wish to control each button in
> > your application.
>
> > If you wish to replace the complete default style that is used for
> > button then use the following
>
> >    button.setStyleName("mystyle");
>
> > CSS file would be
>
> > .mystyle {
> >  
> > }
>
> > Create a style for each button and you are done.  By doing this it
> > allows you to change the program look without changing the code.
>
> > You can also use the CSS cascading ability by appending a style to
> > your button, I have found issues in this area from time to time, but
> > works most of the time.
>
> >    button.addStyleName("myextstyle");
>
> > CSS
>
> > .myextsyle {
> >  
> > }
>
> > From what I understand this should still use the normal style and add
> > this to the list.  I have not used this
>
> > or you can
>
> >            button.addStyleDependentName("myextstyle")'
>
> > .gwt-Button-myextsyle {
> >  
> > }
>
> > I hope I got the above correct if not some else please show the
> > correct method.
>
> > Hope this helps Donald W. Long
>
> > On May 22, 3:32 am, abhiram  wrote:
> > > Hi,
>
> > >   I wanted to know the procedure to add images to PushButtons.
> > >   I have found a css style by which i can add it. But that would mean
> > > that for every button with an image, i need to write a style rather
> > > than having a single style. Is there any way to specify the image for
> > > the face of the push button from the code itself?
>
> > > regards,
> > > Abhiram
--~--~-~--~~~---~--~~
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: Gilead GWT not getting configured

2009-05-11 Thread Jamie

Oh yeah, one other thing, have you tried running in the debugger, and
breaking in your service method?  The GWT RPC mechanism will catch
everything, so that may be hiding what is really going wrong.


On May 11, 1:00 pm, Jamie  wrote:
> Do your pojos / schemas contain any relations?
> As in, does class A reference class B?
>
> I had to put a 'join fetch' clause into my queries to get that working
> properly.
>
> As in, something like
>   "select object from MyClassA object join fetch object.myClassB"
> which tells hibernate to fetch it immediately I guess.
>
> Jamie.
--~--~-~--~~~---~--~~
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: Calling GWT RPC method from external JavaScript???

2009-05-11 Thread Jamie

Please refer to the GWT documentation, "Coding Basics", and look for a
section called
"Invoking Java methods from JavaScript".

http://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#DevGuideJavaScriptNativeInterface


On May 11, 5:53 am, Eric Chow  wrote:
> Hello,
>
> How can I call a GWT RPC method from an external JavaScript?
>
> For example,
>
> 
> function getUserInfo(username) {
>     return _the_GWT_RPC_METHOD_HERE_$$$(username);}
>
> 
>
> ..
>
> in the GWT EntryPoint :
>
> public static String[] getUserInfo(String uid) {
>
>      SERVICES.getUserInfo(uid, new AsyncCallback() {
>          public void onFailure(Throwable caught) {
>                                 ;
>          }
>
>         public void onSuccess(String[] result) {
>                 // how can return the (String[] result) ...??
>
>         }
>
>      });
>
>       // how can return the (String[] result) ...??
>
> }
--~--~-~--~~~---~--~~
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: Gilead GWT not getting configured

2009-05-11 Thread Jamie

Do your pojos / schemas contain any relations?
As in, does class A reference class B?

I had to put a 'join fetch' clause into my queries to get that working
properly.

As in, something like
  "select object from MyClassA object join fetch object.myClassB"
which tells hibernate to fetch it immediately I guess.

Jamie.

--~--~-~--~~~---~--~~
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 use the new WAR file to deploy a simple web application.

2009-05-01 Thread Jamie

I definitely understand wanting to know what is under the covers.  I
have given up on JBoss SEAM because there is far too much stuff going
on that is hidden away somewhere.

But anyway, I suggest that:

1. You change MyProject.html to index.html in your source tree
2. Alter your project's web.xml before jarring it up

that way you can skip steps 9 and 10.


I would also recommend learning Apache Ant.
http://ant.apache.org/

Eclipse has a built-in ant window, to run ant scripts.
Ant has commands to do almost everything you could want, including a
WAR task.
http://ant.apache.org/manual/CoreTasks/war.html

Jamie.



--~--~-~--~~~---~--~~
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 (Multiple Pages Implementation)

2009-05-01 Thread Jamie

Well, if you have a single GWT project, then every page will download
the complete javascript file, which still contains the code for every
page.

However, in my experience, it is safe to make separate GWT projects
(definitely using my own  'library' module of common components), and
merge the output into (eg.,) the same deployment folder.

The generated source files (with big long random? filenames) *should*
not clash.  I have never seen them clash, anyway.

BTW,
It is entirely possible that I am mistaken here;  I seem to recall
that 1.6 has some new lazy loading features.

Jamie.

On Apr 30, 1:22 pm, Vince  wrote:
> Jamie and X...
>
> Thank you for the feedback!
>
> Based on your suggestions, the best approach is to improvise on the
> current technology.
>
> 1) Jamie, The "lazy-load" approach looks promising and it solidified
> our earlier researches. One question lingers however : Is it necessary
> to structure the entire app into several GWT projects or is it
> possible to setup multiple entry points... e.g.
>
> HTML-Entry Point class associations --
> Module1.html - Module1:EntryPoint.class,
> Module2.html - Module2:EntryPoint.class
>
> and envoke these from the host HTML's lazy loading? Does this sound
> off on a GWT technical point-of-view?
>
> 2) X, that JAXB support component sounds interesting... I've used
> JaxMe before and it's a fantastic mechanism for mapping markups to
> objects straight-away. Your input is treasured!
>
> This is Great Stuff! Appreciate it much...
>
> - Vince
--~--~-~--~~~---~--~~
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: with gwt-maps , How to manually set Marker draging state

2009-04-30 Thread Jamie

Do you really need to set the marker into floating mode?

You could just set the marker's *image* to one that looks like it is
floating, with a crosshair on it...
and then change the image back to normal when you are ready.



On Apr 29, 10:04 pm, Tail  wrote:
> Thanks Eric,
>
> that can be let marker drag on the map.
> mybe I did not clearly describes the point,my mean is marke the Marker
> float and show DragCrossImage manually (like use mouse dragging it )
> when I create the marker ,
>
> On Apr 29, 6:52 pm, Eric Ayers  wrote:
>
> > Hi,
> > When you create the marker, you can set the dragging  behavior by passing a
> > MarkerOptions object in the constructor.  Then, if you want to turn dragging
> > on/off use marker.setDraggingEnabled();
>
> > See the javadoc 
> > athttp://code.google.com/docreader/#p=gwt-google-apis&s=gwt-google-apis...
>
> > As an aside, there are a few changes in the next release that add support
> > for GDraggableObject, which allows you to create custom objects (not just
> > Markers) and make them draggable on the map.
>
> > Hope that helps,
> > -Eric.
>
> > On Wed, Apr 29, 2009 at 6:26 AM, Tail  wrote:
>
> > > In my project, A Custom control button on the map canvas, it named
> > > "Add New Position".
> > > When I click the "Add New Position" button, I add a Marker  on the
> > > map, Marker's LatLng onchaned by mousemove on map. How to make Marker
> > > draging state,let it float and show DragCrossImage.
>
> > --
> > Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://code.google.com/webtoolkit/
--~--~-~--~~~---~--~~
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 (Multiple Pages Implementation)

2009-04-30 Thread Jamie

The first question I have is,
Do the pages need to talk to each other at all?

I have found that a single GWT project with many (eg.,) tabs can
definitely be a performance problem.  As well, this does not lend
itself to 'plugin' support where you want to add or remove pages based
on (for example ) what modules are present on the server, and having
the web interface packaged in the module itself.

For one project, I was using a 'controller' GWT page that used lazy-
loading iframes displayed in tabs, to display the various pages.  The
various pages were all separate GWT projects.  The iframes would not
load until the tab was activated.
These subprojects ended up being quite lightweight, and there were no
performance problems.
Adding or removing pages based on plugin configuration was quite easy
then.
Additionally, it was easy enough to support other frameworks (showing
non-GWT pages).

Some of my pages did need to communicate.  For that I wrote some GWT
native javascript wrappers that could interact with the outer
controller page.

Jamie.

On Apr 29, 4:25 pm, Vince  wrote:
> Hello,
>
> I just started out with GWT and currently building a prototype that is
> intended as an enterprise "skeleton" application. The intent is to use
> GWT with Struts 2.0 (via a plugin). I now have the basic structure of
> the application and I have 3 simple pages that are facilitated by
> DeckPanels. Then it suddenly occurred to me... Having several panels
> (DeckPanels) to simulate pages in an enterprise web system could be
> trouble in performance and possibly maintenance (?).
>
> So I turned to the internet for some information and came upon
> suggestions ranging from embedded GWTs in JSPs using markups (Reminds
> me of YUI but that's another story) to multiple launching point HTMLs
> and matching EntryPoint classes.
>
> That said, and based on several informative readings, I come to the
> point of asking these questions to anybody who could provide me with
> an objective opinion and strong recommendation if possible. Simply put
> - Help!
>
> 1. What is Google's recommended paging approach (The way I understand
> it is via DeckPanels)?
> 2. How efficient is using a DeckPanel to accommodate several pages
> (Any number of pages in mind it could "safely" support)?
> 3. With an enterprise web app comprising of numerous screens (and when
> I say numerous please imagine our trusty old Eclipse editor's
> interface), would DeckPanels be recommendable?
> 4. What's a suitable alternative to DeckPanels (I would appreciate any
> recommendations)?
>
> I would appreciate any feedback, assistance and most importantly added
> knowledge on my part.
>
> Thanks,
> Vince
--~--~-~--~~~---~--~~
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 use the new WAR file to deploy a simple web application.

2009-04-30 Thread Jamie

Currently I have my GWT-1.6 project additionally configured as a
Dynamic Web Project in Eclipse EE.
(to find out how, see here:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/39e0ff6325e4d504/55bfd342d77ec910#55bfd342d77ec910)

When you have your project configured this way, you can select the
project, and then select File/Export/Web/War file.

Save it to {path}/ROOT.war

and that's about it.


Saving it or renaming it to 'ROOT.war' should do what you want; your
project will deploy at http://server/
instead of
http://server/project

(BTW, this is a web container feature, not a GWT specific feature.)



Jamie.
--~--~-~--~~~---~--~~
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 Compile Project problem in Eclipse

2009-04-30 Thread Jamie

> Btw, after I have compiled, can I just link to a particular html file
> using IE to see the project run? StockWatcher.html didn't work -
> perhaps I need apache running or something when not using GWT host?
>
> Cheers

Yep... you need to run some sort of web server/container, such as
Apache Tomcat or JBoss.

Fortunately, it's pretty easy to do.

Go here:
http://tomcat.apache.org/download-60.cgi

Download Tomcat6
Unpack it to your harddrive somewhere.

Using Eclipse JavaEE, switch to JavaEE perspective.
Right-click in the 'servers' view, and select 'New/server'.
Follow the wizard to configure a tomcat6 server within eclipse.

Next you need to make Eclipse aware that your project is a web
project.
See my post here, which explains how to do that:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/39e0ff6325e4d504/55bfd342d77ec910#55bfd342d77ec910

Remember that after you recompile the GWT code, you need to refresh
the 'war' folder.
This also requires that you use the EE version of Eclipse, which you
probably want anyway if you are doing web server projects.

Once you have started the server within eclipse, you should be able to
point your browser to
http://localhost:8080/
and see the tomcat page, and then if your project is named 'blap', you
can browse to
http://localhost:8080/blap
and see your project.


Jamie.


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



Eclipse EE Servers

2009-04-17 Thread Jamie

Got the new GWT 1.6, and the Eclipse plugin.  Awesome.  I like the new
deployment layout.

One thing that I think is missing, however, is integration with the
WST tools.

So, here is a short instruction list on how to enable it:

1. Create your new GWT project using the Eclipse plugin
2. Open up the '.project' file
3. insert the following natures into your .project file (inside the
natures node):

org.eclipse.wst.common.modulecore.ModuleCoreNature

org.eclipse.wst.common.project.facet.core.nature
org.eclipse.wst.jsdt.core.jsNature
4. Save the .project file
5. close the project and reopen the project (or restart eclipse)
6. right-click the project and select Project Facets
7. Check  'Java' and 'Dynamic Web Project'
8. Click 'further configuration available' and change the Content
Directory to 'war', to align with GWT's output

That's it.
What does that give you?

- Now, you can go to the Java EE "Servers" view, configure a server,
and deploy your project to that server from within eclipse.  Tomcat,
JBoss, WebSphere, etc

- You can right-click on the project, and select 'Project Facets', and
add new facets like "Java Persistence", and configure persistence
using the Eclipse GUI stuff.

- Changes to server code are deployed immediately (well, okay, after a
short delay)

- You can, of course, debug the server code within eclipse.  Not quite
as good as hosted mode, but almost.

I still have a small problem where I have to refresh the 'war' folder
after clicking the GWT Compile button, but I've gotten used to it!

Thanks to the GWT developers!!!

Jamie.
--~--~-~--~~~---~--~~
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: SVG in GWT

2008-10-29 Thread Jamie

If all you want to do is display an SVG file, then you can create a
frame and set its URL to the SVG file.

If you are talking about programatically working with SVG, then you
are better off using the GWT Canvas project:
http://code.google.com/p/gwt-canvas/

This is because when GWT moved to 1.4, it broke SVG support.  If you
search this forum, you can find out more on that subject.   GWT Canvas
has better cross-browser support anyway.

Jamie.

On Oct 29, 9:36 am, Danish <[EMAIL PROTECTED]> wrote:
> Hi,
> I am new to GWT and want to use SVG in GWT. Is there any sample
> example, where I may learn it step by step.
> /Danish
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: RPC problem

2008-10-15 Thread Jamie

> Please teach me your solution.

My solution is to open up www.google.com and type in
IncompatibleRemoteServiceException.

The first hit lists a pretty good list of possible causes.
This could be caused by the client and server not running the same
codebase, as in, one or the other has not been compiled after a change
to the code.


On Oct 14, 6:43 am, Ryan <[EMAIL PROTECTED]> wrote:
> Hi group,
>
> I'm writing a gwt-rpc application, it does simple String message
> passing from server to client.
> But I got a runtime error
> "com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException"
> and nothing can be received from the server.
> I have no idea what is the reason of this error.
> Does anyone has same experience?
> Please teach me your solution.
> Many Thanks!
>
> Ryan
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: IE8

2008-09-30 Thread Jamie

My condolences on getting blocker bugs against a beta product...
A brief use of IE8 seems to show that it has problems on virtually any
website, until you swtich it to compatibility mode.


On Sep 30, 1:00 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I've searched around this group, the buglist, googling keywords like
> 'gwt ie8' and 'gwt ie8 compatability', etc and I find little all
> together on GWT and IE8.  I know IE8 is in beta, but still It makes me
> nervous when QA gives us blocker bugs like "Does not work in IE8
> Beta".  Obviously I need to (somehow) install IE8  and replicate the
> bug my QA team encountered and report it to the bugilist, but I was
> just curious if there was some official line on IE8 compatibility?
> You don't even have to go as far as "Google is fully supported to
> supporting IE8 when it emerges from beta", but maybe just a something
> like http://extjs.com/forum/showthread.php?t=45610";>this
> just to let us know you have your eye on the ball?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: RPC Across Modules

2008-09-30 Thread Jamie

In your module.gwt.xml, you need to add the rpc folder as a source.
client is automatically added for you.

< module >
  < source path="client" />
  < source path="rpc" />
< /module >

When building your war, or jar, or installing, you will need to
compile the RPC stuff and included the classes.



On Sep 30, 12:25 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi, I have a fairly large gwt that is using a large number of
> libraries.
>
> To ensure there are no unwanted dependencies i am trying to split my
> project into 3 modules client (everything ui related), server (server
> processing related) and rpc (All my bussiness objects). both client
> and server inherit from rpc.
>
> The problem i have encountered is declaring the servlet in the gwt.xml
> config files (of which there are 3, one for each module). I am getting
> ClassNotFound exceptions. I dont want to inherit the server module in
> the client and according to the GWT diagrams i shouldnt need to.
>
> Is splitting the RPC section of my project possible and if so any help
> would be greatly appreciated.
>
> Regards,
> Steve
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Help

2008-09-30 Thread Jamie

I would recommend you start by reading the GWT developer's guides.

http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideServerCalls

In particular, you will need to understand how to make calls from your
web page client to a backend server.
The backend server will access your database.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---