Re: Dealing with session timeout and container managed security

2009-03-07 Thread marcelstoer

What do you mean by "server push"? Could you maybe elaborate on your
approach a little, thanks.

On Mar 6, 5:11 pm, Rakesh  wrote:
> we use server push for session time out and it works really great!
>
> On Feb 28, 1:26 am, marcelstoer  wrote:
>
> > Is there some consensus or best practice in the GWT community as for
> > how to deal with session timeout and container managed security? There
> > are some pointers if you search for this subject, but some of the
> > ideas are wild...
>
> > In my case I use the Servlet container's built in security features
> > for authentication as described in the Servlet specification. Hence,
> > in my web.xm I protect access to the GWT application like so:
>
> >   
> >     
> >       my app
> >       /app/*
> >       GET
> >       POST
> >       PUT
> >       DELETE
> >     
> >     
> >       *
> >     
> >   
>
> >   
> >     FORM
> >     
> >       /public/login.jsp
> >       /public/login.jsp?retry=true
> >     
> >   
>
> >   
> >     *
> >   
>
> > So, the application (host/bootstrap page, RPC Servlet, etc.) is in the
> > "app" folder and the login form (login.jsp) is in the "public" folder.
> > This works flawlessly except for the session timeout use case.
> > The application sends an RPC request to /app/AppServlet, the Servlet
> > container requires authentication because the session had timed out
> > and dutifully *forwards* to the login page. Hence, the result of the
> > request is not some RPC/JSON/XML object as expected by the client but
> > the login page HTML structure. The client simply isn't prepared for
> > that and freezes i.e. doesn't do anything.
>
> > I believe that on the server side everything is set up correctly. If
> > the session timed out the requests don't even reach the RPC Servlet
> > because it's intercepted by the container, fine.
>
> > But how do you deal with this in the client?
> > Should one write some custom AsyncCallback class that handles the
> > reponse sent by the container?
>
> > Thanks for your feedback.
> > Marcel
--~--~-~--~~~---~--~~
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: Dealing with session timeout and container managed security

2009-03-05 Thread marcelstoer

Thanks for your feedback. I can see where your approach comes from
given the mentioned scenario.

However, I neither do want to check for proper i.e. still valid
authentication in all of my RemoteServiceServlet methods nor would I
want my GWT application tie to an authentication mechanism at all. I'd
like one and the same GWT app to work in a secure environment and in a
"regular" environment - without changing the code. Those were my
reasons to go with the container-managed-security-approach.

On Mar 5, 12:47 am, Jason Essington  wrote:
> The problem with jumping ahead of the RemoteServiceServlet for your  
> authentication is that you don't have a good way to communicate to GWT  
> that there was an authentication exception.
>
> I tend to do my JAAS login inside the RemoteServiceServlet where I can  
> throw a checked AuthenticationException which I can in turn handle  
> gracefully on the client side.
>
> consider this scenario:
>
> User loads a rather large cash worksheet that he needs to fill, the  
> user begins filling the worksheet, then takes a break, and returns to  
> complete the worksheet. This user then submits the completed worksheet.
>
> Now, with the previously mentioned technique, the session is checked  
> before the request is deserialized and the server notices that the  
> session has expired, and throws an authentication exception. The  
> client recieves that exception in the onFailure() method of the  
> callback and takes appropriate action to have the user reauthenticate.  
> once that process is successful, the client application can resubmit  
> the original request, and the user has not lost any of his work.
>
> If you use the default form based the world just stops, the user is  
> forced to reauthenticate outside the scope of the application, and his  
> progress is lost. This really aggravates customers by the way.
>
> -jason
>
> On Mar 4, 2009, at 7:30 AM, marcelstoer wrote:
>
>
>
> > Hhhmm, the community being quiet can mean a lot of things...none are
> > really positive.
>
> > Was I talking about some dark GWT corners where no stable/proper
> > solutions exist?
> > Or is there simply "no right way" to solve my problem, but rather many
> > potential solutions that all have their flaws?
>
> > On Feb 28, 8:26 am, marcelstoer  wrote:
> >> Is there some consensus or best practice in the GWT community as for
> >> how to deal with session timeout and container managed security?  
> >> There
> >> are some pointers if you search for this subject, but some of the
> >> ideas are wild...
>
> >> In my case I use the Servlet container's built in security features
> >> for authentication as described in the Servlet specification. Hence,
> >> in my web.xm I protect access to the GWT application like so:
>
> >>   
> >>     
> >>       my app
> >>       /app/*
> >>       GET
> >>       POST
> >>       PUT
> >>       DELETE
> >>     
> >>     
> >>       *
> >>     
> >>   
>
> >>   
> >>     FORM
> >>     
> >>       /public/login.jsp
> >>       /public/login.jsp?retry=true
> >>     
> >>   
>
> >>   
> >>     *
> >>   
>
> >> So, the application (host/bootstrap page, RPC Servlet, etc.) is in  
> >> the
> >> "app" folder and the login form (login.jsp) is in the "public"  
> >> folder.
> >> This works flawlessly except for the session timeout use case.
> >> The application sends an RPC request to /app/AppServlet, the Servlet
> >> container requires authentication because the session had timed out
> >> and dutifully *forwards* to the login page. Hence, the result of the
> >> request is not some RPC/JSON/XML object as expected by the client but
> >> the login page HTML structure. The client simply isn't prepared for
> >> that and freezes i.e. doesn't do anything.
>
> >> I believe that on the server side everything is set up correctly. If
> >> the session timed out the requests don't even reach the RPC Servlet
> >> because it's intercepted by the container, fine.
>
> >> But how do you deal with this in the client?
> >> Should one write some custom AsyncCallback class that handles the
> >> reponse sent by the container?
>
> >> Thanks for your feedback.
> >>Marcel
--~--~-~--~~~---~--~~
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: Password Encryption

2009-03-05 Thread marcelstoer

com.project.client.User implements java.io..Serializable

plus the default constructor

public User() {}

Done.

On Mar 6, 12:14 am, "fatjack1...@googlemail.com"
 wrote:
> I am using GWT 1.5.3. How do I use Serializable? Eclipse produces an
> error when I try to implement Serializable. It says I need to either:
>
> 1. import java.io.Serializable
> 2. import sunw.io.Serializable;
> 3. Create a public interface Serializable
>
> Which is the right one to use?
>
> On Mar 5, 10:59 pm, Daniel Jue  wrote:
>
> > What version of GWT are you using?  Have you tried
>
> >  public class User implements Serializable{...}
>
> > instead?
>
> > On Thu, Mar 5, 2009 at 5:01 PM, fatjack1...@googlemail.com
>
> >  wrote:
>
> > > Hi Everyone,
>
> > > Im having some issues encrypting a password. So heres my problem:
>
> > > Basically I have a simple user name and password dialog box. I need to
> > > encrypt the password. It would be easy to implement if I just wanted
> > > to send the password over to the Server, but I need to send both the
> > > user name and password. So, to try and overcome this problem I have
> > > created a User Class as follows:
>
> > > package com.project.client;
>
> > > import com.google.gwt.user.client.rpc.IsSerializable;
>
> > > public class User implements IsSerializable{
>
> > >        private String username;
> > >        private String password;
>
> > >        public User(String username, String password){
> > >                this.username = username;
> > >                this.password = password;
> > >        }
>
> > >        public String getUserName(){
> > >                return username;
> > >        }
>
> > >        public String getPassword(){
> > >                return password;
> > >        }
> > > }
>
> > > Here is my code on the client side when the user clicks 'Login'
>
> > > public void onClick(Widget sender)
> > >                        {
> > >                                User attemptedLogin = new 
> > > User(userNameTextBox.getText(),
> > > passwordTextBox.getText());
>
> > >                                ServerService rpc = new ServerService();
> > >                                rpc.checkLogin(attemptedLogin, callback);
> > >                        }
>
> > > So, it should send over the userName and Password to the server via an
> > > RPC call.
>
> > > Here is my code on the server (Incomplete at moment):
>
> > > public ServerSQLData checkLogin(User message)
> > >        {
> > >                try {
> > >                        dc.openConnection();
>
> > >                        String password = message.getPassword();
> > >                    System.out.println("password: " + password);
>
> > >                    String hash = BCrypt.hashpw(password, 
> > > BCrypt.gensalt());
> > >                   }
> > >          return result;
> > >     }
>
> > > However, when I run GWT it produces the following error messages:
> > > Analyzing 'com.project.client.ServerStatusSQLService' for serializable
> > > types
> > >   Analyzing methods:
> > >      public abstract com.project.client.ServerSQLData checkLogin
> > > (com.project.client.User message)
> > >         Parameter: com.project.client.User message
> > >            com.project.client.User
> > >               Type 'com.project.client.User' was not serializable and
> > > has no concrete serializable subtypes
>
> > > I'm guessing from the error messages I havent implemented the
> > > Serializable type correctly for the User class. Can someone see where
> > > I am going wrong?
>
> > > Cheers for your help in advance.
> > > Jack
--~--~-~--~~~---~--~~
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: Dealing with session timeout and container managed security

2009-03-04 Thread marcelstoer

Hhhmm, the community being quiet can mean a lot of things...none are
really positive.

Was I talking about some dark GWT corners where no stable/proper
solutions exist?
Or is there simply "no right way" to solve my problem, but rather many
potential solutions that all have their flaws?

On Feb 28, 8:26 am, marcelstoer  wrote:
> Is there some consensus or best practice in the GWT community as for
> how to deal with session timeout and container managed security? There
> are some pointers if you search for this subject, but some of the
> ideas are wild...
>
> In my case I use the Servlet container's built in security features
> for authentication as described in the Servlet specification. Hence,
> in my web.xm I protect access to the GWT application like so:
>
>   
>     
>       my app
>       /app/*
>       GET
>       POST
>       PUT
>       DELETE
>     
>     
>       *
>     
>   
>
>   
>     FORM
>     
>       /public/login.jsp
>       /public/login.jsp?retry=true
>     
>   
>
>   
>     *
>   
>
> So, the application (host/bootstrap page, RPC Servlet, etc.) is in the
> "app" folder and the login form (login.jsp) is in the "public" folder.
> This works flawlessly except for the session timeout use case.
> The application sends an RPC request to /app/AppServlet, the Servlet
> container requires authentication because the session had timed out
> and dutifully *forwards* to the login page. Hence, the result of the
> request is not some RPC/JSON/XML object as expected by the client but
> the login page HTML structure. The client simply isn't prepared for
> that and freezes i.e. doesn't do anything.
>
> I believe that on the server side everything is set up correctly. If
> the session timed out the requests don't even reach the RPC Servlet
> because it's intercepted by the container, fine.
>
> But how do you deal with this in the client?
> Should one write some custom AsyncCallback class that handles the
> reponse sent by the container?
>
> Thanks for your feedback.
> Marcel
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Dealing with session timeout and container managed security

2009-02-27 Thread marcelstoer

Is there some consensus or best practice in the GWT community as for
how to deal with session timeout and container managed security? There
are some pointers if you search for this subject, but some of the
ideas are wild...

In my case I use the Servlet container's built in security features
for authentication as described in the Servlet specification. Hence,
in my web.xm I protect access to the GWT application like so:

  

  my app
  /app/*
  GET
  POST
  PUT
  DELETE


  *

  

  
FORM

  /public/login.jsp
  /public/login.jsp?retry=true

  

  
*
  

So, the application (host/bootstrap page, RPC Servlet, etc.) is in the
"app" folder and the login form (login.jsp) is in the "public" folder.
This works flawlessly except for the session timeout use case.
The application sends an RPC request to /app/AppServlet, the Servlet
container requires authentication because the session had timed out
and dutifully *forwards* to the login page. Hence, the result of the
request is not some RPC/JSON/XML object as expected by the client but
the login page HTML structure. The client simply isn't prepared for
that and freezes i.e. doesn't do anything.

I believe that on the server side everything is set up correctly. If
the session timed out the requests don't even reach the RPC Servlet
because it's intercepted by the container, fine.

But how do you deal with this in the client?
Should one write some custom AsyncCallback class that handles the
reponse sent by the container?

Thanks for your feedback.
Marcel
--~--~-~--~~~---~--~~
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: Does the GWT compiler have problems with Generics?

2009-02-08 Thread marcelstoer

Thanks for your quick reply.

On Feb 8, 5:37 pm, Damien Picard  wrote:
> Hi,
>
> Your class has to implement the interface
> com.google.gwt.user.client.rpc.IsSerializable and you have to add a

As of GWT 1.5  this is no longer required, implementing
java.io.Serializable is enough.

> free-parameters constructor as is :
>
> public class MyClass implements IsSerializable{
>
>     public MyClass(){
>          ...
>     }
>
> }
>
> Maybe this default constructor misses ?

Yes, indeed. I totally forgot about the default constructor. Thanks
for pointing that out. java.lang.Class does have a no-args
constructor, but it's private.

I just whish the GWT compiler were a little more verbose or precise
about the problem.

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



Does the GWT compiler have problems with Generics?

2009-02-08 Thread marcelstoer

My *Async interface contains the following method signature:

void reportsAvailableFor(Class rowClass,
AsyncCallback callback);

The method signature in the application i.e. Servlet interface
likewise looks like:

Boolean reportsAvailableFor(Class rowClass);

The GWT shell complains at startup that:

[ERROR] Type 'java.lang.Class' was not
serializable and has no concrete serializable subtypes

At that point I thought that GWT had an issue with the Generics
parameter. Hence, I removed the restrictive ""
suffix from the Class type, but GWT still complains about:

"'java.lang.Class' was not serializable and has no concrete
serializable subtypes"

Now this is definitely bogus IMO as java.lang.Class clearly states
"implements java.io.Serializable" - and yes, I'm using GWT 1.5.3.

Marcel





--~--~-~--~~~---~--~~
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: JDBC realm for form-based authentication in hosted mode

2009-02-08 Thread marcelstoer



On Feb 5, 2:22 am, Sumit Chandel  wrote:
> Hello everyone,
> I'm not very familiar with JDBC realm, but for starters, are you using
> hosted mode with the -noserver option (i.e., running hosted mode with your
> own custom Tomcat server that has JDBC realm configured?).

No, I'm running an out-of-the-box GWT embedded Tomcat.
As described in my previous posting, the ROOT.xml gets picked up
correctly and Tomcat considers the realm configuration i.e. it
authenticates me against the database referred to in the realm config.
However, the parent  element in ROOT.xml asks me to define a
docBase parameter. No matter what path I enter there, in subsequent
requests Tomcat/GWT shell has problems locating some of the artifacts
in my project.
Through Tomcat debugging I tried to find out what its internal docBase
value is (maybe set through GWT shell?) if I don't add ROOT.xml but
didn't succeed.

Marcel
--~--~-~--~~~---~--~~
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: JDBC realm for form-based authentication in hosted mode

2009-02-02 Thread marcelstoer

On Jan 30, 6:39 pm, marcelstoer  wrote:
> How do you use a JDBC realm for form-based authentication in hosted
> mode? Hosted mode and form-based authentication work just fine, but
> our JDBC realm isn't picked up by Tomcat?

I have the realm configured in //tomcat/conf/gwt/
localhost/ROOT.xml like so:


  


I can confirm that the config is being picked up at startup. The
problem is, that no matter what path I try for the docBase attribute
there are always some artifacts that cannot be found. Any ideas?

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



JDBC realm for form-based authentication in hosted mode

2009-01-30 Thread marcelstoer

How do you use a JDBC realm for form-based authentication in hosted
mode? Hosted mode and form-based authentication work just fine, but
our JDBC realm isn't picked up by Tomcat?

-Marcel
--~--~-~--~~~---~--~~
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: log4j in hosted mode swallows Spring and Hibernate statements

2008-12-03 Thread marcelstoer

On Dec 3, 4:54 pm, marcelstoer <[EMAIL PROTECTED]> wrote:
> Inhttp://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
> an issue was raised (but not solved apparently) that we're seeing here
> too.
>
> In hosted mode we're only seeing the log statements from our own GWT
> application, but we're missing the ones from Spring and Hibernate
> albeit the log4j config seems to be correct. It doesn't make a
> difference if I set the root logger to a debug level.
> Any ideas?

Ok, the solution is to add the file commons-logging.properties to the
classpath redirecting the commons logger to Log4j. This will do it:

org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger


Also one might need to declare the log4j config file location in the
web.xml:


org.springframework.web.util.Log4jConfigListener



log4jConfigLocation
classpath:log4j.properties


HTH,
Marcel
--~--~-~--~~~---~--~~
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: Client did not send nnn bytes as expected

2008-12-03 Thread marcelstoer

On Dec 2, 10:13 am, Amit Kasher <[EMAIL PROTECTED]> wrote:
> Hi,
> Does anyone has any new insights about this issue? We've been
> investigating for over a year(!), and we seem to not be the only
> ones...
>
> http://tinyurl.com/5rqfp5

I was recently confronted with the very same exception but in a
slightly different context.
I implemented a Servlet listener that parsed the request before it was
being forwarded through the filter chain to the GWT RPC Servlet. At
the beginning I wasn't careful enough and tinkered with the request a
bit too much, GWT doesn't like that. I now use the GWT RPC and
RPCServletUtils classes to parse the request instead of doing it
myself.

HTH,
Marcel
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



log4j in hosted mode swallows Spring and Hibernate statements

2008-12-03 Thread marcelstoer

In
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/1870ed6575c95f7b/dd6dc12a67feeb02?lnk=gst&q=log4j+hosted+spring#dd6dc12a67feeb02
an issue was raised (but not solved apparently) that we're seeing here
too.

In hosted mode we're only seeing the log statements from our own GWT
application, but we're missing the ones from Spring and Hibernate
albeit the log4j config seems to be correct. It doesn't make a
difference if I set the root logger to a debug level.
Any ideas?

Kind regards,
Marcel
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Caching RPC calls with Servlet Filters

2008-11-18 Thread marcelstoer

In thread
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/7824fc19faeecc32/37e0c085d3c0ccfb?lnk=gst&q=rpc+caching#37e0c085d3c0ccfb
some of you already discussed certain aspects of RPC caching.

I intend to implement caching using a Servlet Filter. However,  before
even getting to the difficult part I stumbled across an issue that
troubles me: a sensible cache id.

Usually in web app contexts you use the request path plus all the
parameters to build a (unique) cache id. Hence, I tried to use the
fully qualified name of the remote method being invoked. With GWT RPC
calls the relevant information is "hidden" in the request content
instead of parameters or attributes.

The request content can only be read once from the respective input
stream.

The plan was to call
final String payload = RPCServletUtils.readContentAsUtf8
(httpServletRequest, true);
final RPCRequest rpcRequest = RPC.decodeRequest(payload, null, null);
and to get the method from the request.

This fails because the GWT RemoteServiceServlet also calls
RPCServletUtils.readContentAsUtf8(httpServletRequest, true); which
then fails because the call from my filter already loaded the request
content.

Any ideas around that?
Marcel
--~--~-~--~~~---~--~~
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: Form submitted twice?

2008-09-29 Thread marcelstoer

On Sep 29, 11:54 am, Thomas Broyer <[EMAIL PROTECTED]> wrote:
> On 28 sep, 21:26, marcelstoer <[EMAIL PROTECTED]> wrote:
>
> > I used the code provided as an example 
> > inhttp://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g...
> > to build a form panel.
>
> > However, the form seems to get submitted twice as the
> > Window.alert("The text box must not be empty"); is executed twice. Any
> > ideas as for why this happens?
>
> Might be issue 
> 1585:http://code.google.com/p/google-web-toolkit/issues/detail?id=1585

It's issue 1585, indeed. And comment 10 most certainly helped:
http://code.google.com/p/google-web-toolkit/issues/detail?id=1585#c10.

Thanks a bunch.

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



Form submitted twice?

2008-09-28 Thread marcelstoer

I used the code provided as an example in
http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/FormPanel.html
to build a form panel.

However, the form seems to get submitted twice as the
Window.alert("The text box must not be empty"); is executed twice. Any
ideas as for why this happens?

Regards,
Marcel
--~--~-~--~~~---~--~~
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: Multi project setup i.e. dependent projects

2008-09-10 Thread marcelstoer

On Sep 10, 11:54 pm, "Ian Bambury" <[EMAIL PROTECTED]> wrote:
> I'm not absolutely sure what you're after. Most applications will be one
> project and one module. If you have some common code you'd probably develop
> it as a standalone project in its own right (a framework or a set of
> utilities, say).
>
> I'm a bit vague as to what you are trying to achieve, and why you feel the
> need to split your application into modules. Or even how you have managed to
> split one project into two modules. A GWT 'module' is pretty much the same
> as a 'project' since the module file (*.gwt.xml) defines what the other
> modules (JSON, HTTP, roll-your-own, maybe css etc) are required to compile
> it. It's possible to set one project up to use different *.gwt.xml module
> files, but I suspect that (because of the questions tou are asking) that you
> are not trying (or wanting) to do this - it would have to be a fairly
> uncommon case, I would think.
>
> Since GWT (at present) compiles to one solid chunk of JavaScript, you tend
> to have one project/module unless you factor out reusable code to be
> included in projects as a jar.

I think I'm starting to understand why my posting i.e. the idea behind
it sounded silly to you. I took over an existing project from a guy
who's now on vacation (I can't ask him why certain things are the way
they are). So, I guess my initial ideas were mostly nonsense.

As you guessed I need to factor out reusable code thus creating two
projects - call them framework and product - out of one. Currently
there are two modules in one and the same project, but looking from a
new angle this should rather be one module with two entry points. In
the end I'll several product projects all referencing the framework
project.

Assumptions/questions about how to do it right:
1. The project with reusable code (framework) doesn't have any public
code (CSS, images, etc.)?
2. The product project will have one module and n entry points.
3. How about RPC servlets that the framework provides? Does each
product module have the define them separately through copy/paste?
4. How as product project in Eclipse need to be configured (project
and launch config) to satisfy the GWT shell in terms of compile/run
classpath that everything from the framework project is properly
referenced?

Marcel
--~--~-~--~~~---~--~~
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: Multi project setup i.e. dependent projects

2008-09-10 Thread marcelstoer

On Sep 10, 12:12 am, marcelstoer <[EMAIL PROTECTED]> wrote:
> What's the most sensible way to create a multi project setup? I'd have
> a parent project with two modules and a number of child projects
> dependent on the parent project. Each of those child projects also
> provides two modules which inherit from the respective parent module
> and extend/overwrite parts of it (at least different CSS and images).
> I'm developing in Eclipse.

So far I've been unable to find any articles that deal with such
setups. Is it really that uncommon? I would assume that in most cases
you'll have more than one Eclipse (or some other IDE of course)
project?
I'm having serious trouble creating launch/project configurations that
satisfy the GWT shell when running in host mode. Either I'm completely
off track or this is is indeed a bit shaky. Since I'm new to this I'm
humble enough to assume the first.

Any help is appreciated.
Marcel
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Multi project setup i.e. dependent projects

2008-09-10 Thread marcelstoer

What's the most sensible way to create a multi project setup? I'd have
a parent project with two modules and a number of child projects
dependent on the parent project. Each of those child projects also
provides two modules which inherit from the respective parent module
and extend/overwrite parts of it (at least different CSS and images).
I'm developing in Eclipse. The fact that we're building our
deliverables with Maven2 has only had a slight impact on the current
project structure (only one project) and is irrelevant in this context
I guess.

I noticed that GWT has a problem in hosted mode if the child module
has got CSS files with the same name as the CSS files in the
respective parent module. The shell picks them up from the wrong
public/style/css/folder.

Any hints or pointers to articles on this issue? Thanks a bunch.

Marcel

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