Re: GWT best Practices - JS Library Wrappers Overlay Types

2009-08-14 Thread Bobby

There are some quirks which are making it difficult to narrow down the
reason why AuthSub fails in IE. So far i know it only happens when
google.load is used with a callback, even when google.load is called
while the page is being loaded.

So something like the following:
body
script
google.load(gdata, 1.10, myCallback);
/script
input type=button value=login onclick=google.accounts.user.login
('scope-here') /
/body

Will always see the following behavior:
1. User clicks to login.
2. User is redirect to authorization page and clicks to authorize.
3. User is redirected back to the original page, with a token appended
in the URL.
4. Page doesn't consume the token in the URL (the correct behavior is
for the page to place the token in a cookie and remove the token from
the url).
5. User clicks to login again.
6. User gets redirected to authorization page again, and steps 3-6 are
repeated an arbitrary number of times.
7. If, after reaching the authorization page a second time, the user
clicks the browser's back button, causing the browser to go back to
the page that contains the token in the url, the token is successfully
consumed and the user is successfully logged in. Go figure.

Why backing into the page causes GData to successfully consume the
token i have no idea - especially since refreshing the page at step 4
has no effect.

My guess is that when backing into the page IE will use a cached
version of the GData script, which is processed immediately and may
make the difference.

Bobby

On Aug 14, 1:37 am, Bobby bobbysoa...@gmail.com wrote:
 This was outside GWT. I'm trying to find the cause of the IE AuthSub
 issue outside of GWT first. Basically, when google.load() is called
 after the page has finished loading - such as from a button click,
 AuthSub doesn't succeed.

 Bobby

 On Aug 14, 12:17 am, Eric Ayers zun...@google.com wrote:

  If you are calling JavaScript inside of a GWT JSNI function, you
  should be using $wnd.google.load(...)

  On Thu, Aug 13, 2009 at 11:55 PM, Bobbybobbysoa...@gmail.com wrote:

   This IE AuthSub issue is not because of the IFrame, the transferToken
   approach didn't make a difference.

   I tried placing the google.load('gdata', '1.10'); call in a button
   click event. Here's the code:
   html
   body
      img src=logo-small.png /
      script type=text/javascript src=http://www.google.com/jsapi;/
   script
      script type=text/javascript
          function loadGData() {
                  google.load('gdata', '1.10');
          }
      /script
      input type=button value=Load GData onclick=loadGData(); /
   /body
   /html

   If you try this, when you click Load GData, the page is cleared and
   nothing really happens. If you look at the page source after clicking
   the button you see the following:
   script src=http://www.google.com/uds/?file=gdatav=1.10; type=text/
   javascript/script

   This is what would happen if document.write was being used and would
   explain a few things.

   Eric, does your AjaxLoader module use google.load() from the jsapi?

   Bobby

   On Aug 13, 10:20 pm, Bobby bobbysoa...@gmail.com wrote:
   By the way, i've finished porting the samples (70 of them) i'm
   currently polishing and commenting the samples code.

   I've added specialized Callbacks into the API, for example
   BlogEntryCallback (extending AsyncCallbackBlogEntry) - this meant
   adding specialized methods for insert/update/delete, but makes for a
   better API. There have been other changes and design choices as well.

   In the Maps samples, the create/update features are not working
   because of a KML-related defect which i might try to get around with
   GWT:http://code.google.com/p/gmaps-api-issues/issues/detail?id=1585

   Other than that i have a small list of items to wrap up (including
   this IE issue) and some documentation to write, but nothing major and
   i'm counting on having a download by the end of this week or next week
   at the latest.

   Bobby

   On Aug 13, 9:46 pm, Bobby bobbysoa...@gmail.com wrote:

The onModuleLoad is within an iframe, that's probably the cause. I
think i can find a way around this. For example, i can add the
following method to the GData module:
GData.transferTokenOrSomething();

This function would check the top frame for a token and append it to
the IFrame's location. I'll play around with this.

Bobby

On Aug 13, 9:29 pm, Bobby bobbysoa...@gmail.com wrote:

 Another possible cause could be for example if, in the compiled GWT
 app, the google.load call happens inside an IFrame.

 Currently, with google.load being called from onModuleLoad,
 google.accounts.user.login() causes the redirect to the Google
 Accounts authorization page, but when it redirects back, with the
 token in the URL (for example /HelloGData.html#tokenhere), the token
 doesn't get consumed (in IE), and the authentication doesn't succeed.

 If GWT is placing the onModuleLoad code inside 

Re: GXT widgets vs GWT widgets

2009-08-14 Thread mars1412

I also think the GWT widgets are more lightweight
but usually I try to use GXT widgets only, because then I have a
consistent lookfeel.

of course there are some exceptions to the rule :)

On Aug 13, 8:02 pm, Mike michaeljr...@gmail.com wrote:
 I agree with your thinking.  I see the GWT widgets as being lighter.
 If there is a comparable GWT widget that fulfills all of my needs I
 normally lean towards that.

 On Aug 13, 10:17 am, brian.xi...@thomsonreuters.com wrote:

  Hi All,

  We all know GXT offers a lots of advanced widgets. Some of the widgets
  overlap with GWT widgets. I am looking for some advice on choosing GXT
  widget or GWT widgets in the situation of they both offer the same type
  of widgets, maybe GXT widget is a bit more good looking.

  My concern is that GXT widgets might not offer the same quality as GWT
  widgets on cross-browser compatiblity, styling and extending etc. I
  initial thought is I would only use GXT grid widget, which is the one we
  are sure we need to use. Everything else, as long as GWT provide the
  function widget, I would choose GWT widget first. Such as for layout, I
  would use GWT panel widgets, and would not use GXT layout widgets etc.

  I would appreciate if you can share your experience, advice on using GXT
  widgets vs GWT widgets.

  Thank you in advance!
  Brian
--~--~-~--~~~---~--~~
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: GXT widgets vs GWT widgets

2009-08-14 Thread Daniel Jue
From the few widget libs I have tried, they all feel heavy compared to the
base gwt ones.  You also have to think about the events and
handlers/listeners--often the widget lib will have it's own classes for this
(with the same names), and they are not compatible AFAIK.

For SmartGWT I noticed there are even two types of events, handlers and
buttons--one for components in a special form widget, and one for more
regular widgets.

So you have to weigh the added learning curve versus trying to style
something yourself or create the nice looking widgets you want..

On Fri, Aug 14, 2009 at 3:37 AM, mars1412 martin.trum...@24act.at wrote:


 I also think the GWT widgets are more lightweight
 but usually I try to use GXT widgets only, because then I have a
 consistent lookfeel.

 of course there are some exceptions to the rule :)

 On Aug 13, 8:02 pm, Mike michaeljr...@gmail.com wrote:
  I agree with your thinking.  I see the GWT widgets as being lighter.
  If there is a comparable GWT widget that fulfills all of my needs I
  normally lean towards that.
 
  On Aug 13, 10:17 am, brian.xi...@thomsonreuters.com wrote:
 
   Hi All,
 
   We all know GXT offers a lots of advanced widgets. Some of the widgets
   overlap with GWT widgets. I am looking for some advice on choosing GXT
   widget or GWT widgets in the situation of they both offer the same type
   of widgets, maybe GXT widget is a bit more good looking.
 
   My concern is that GXT widgets might not offer the same quality as GWT
   widgets on cross-browser compatiblity, styling and extending etc. I
   initial thought is I would only use GXT grid widget, which is the one
 we
   are sure we need to use. Everything else, as long as GWT provide the
   function widget, I would choose GWT widget first. Such as for layout, I
   would use GWT panel widgets, and would not use GXT layout widgets etc.
 
   I would appreciate if you can share your experience, advice on using
 GXT
   widgets vs GWT widgets.
 
   Thank you in advance!
   Brian
 


--~--~-~--~~~---~--~~
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: Looking for a hand to solve my trouble

2009-08-14 Thread Paul Robinson

By the looks of the exception, there may be more information in the
stack trace that you've not posted. Does it say further down that the
exception was caused by another exception? Presumably it failed when
trying to build a hibernate SessionFactory, which may mean hibernate
couldn't find its config files or there was a fault in them (or in
annotations). More of the stack trace would help work this out.

It might also help if you posted some of the relevant code directly here
to make it easier for people to help you...some might be more willing to
look at a short code snippet posted here than to download a zip file.

Paul

tolga ozdemir wrote:
 guys, is there anybody had the same problem before??





 On Aug 13, 4:00 pm, tolga ozdemir tka...@gmail.com wrote:
   
 Hi guys, I started playing with those technology just for two weeks
 ago. So, I can ask some dummy questions... forgive me pls..

 Here is my questions.. I am trying to connect GWT with a database I am
 familiar.. Namely, MySQL.. I have a sample project with some errors
 that I have no idea to fix it.. I would be appritiate if someone look
 at it and tells me my faults..

 I have a just a simple DB - gwtDemo and a table tblEntry [ id,
 entry ]

 Below, is the error I recieved

 WARNING: Nested in javax.servlet.ServletException: init:
 java.lang.ExceptionInInitializerError
 at net.tolgaozdemir.gwt.server.HibernateContext.getSessionFactory
 (HibernateContext.java:25)
 at net.tolgaozdemir.gwt.server.EntryRemoteService.init
 (EntryRemoteService.java:27)
 at javax.servlet.GenericServlet.init(GenericServlet.java:215)
 at org.mortbay.jetty.servlet.ServletHolder.initServlet
 (ServletHolder.java:433)
 ...

 This is my project zip.http://www.sendspace.com/file/6gpbtjabout 4MB

 Regards,

 Tolga
 
 

   

--~--~-~--~~~---~--~~
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: Looking for a hand to solve my trouble

2009-08-14 Thread tolga ozdemir

This is my HibernateContext.java.. Something wrong in it?




import org.apache.commons.logging.*;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;


public class HibernateContext {

private final static String CONFIGURATION_FILE = hibernate.cfg.xml;

private static Log log = LogFactory.getLog(HibernateContext.class);

private static SessionFactory sessionFactory;

public static SessionFactory getSessionFactory(){

if(sessionFactory == null){

try{
sessionFactory = new Configuration()

.addResource(CONFIGURATION_FILE)

.configure()

.buildSessionFactory();

}catch (Throwable th) {
log.error(Initial SessionFactory creation 
failed., th);
throw new ExceptionInInitializerError(th);
}

}

return sessionFactory;
}

}


ERROR:

WARNING: Nested in javax.servlet.ServletException: init:
java.lang.ExceptionInInitializerError
at net.tolgaozdemir.gwt.server.HibernateContext.getSessionFactory
(HibernateContext.java:29)
at net.tolgaozdemir.gwt.server.EntryRemoteService.init
(EntryRemoteService.java:27)
at javax.servlet.GenericServlet.init(GenericServlet.java:215)
at org.mortbay.jetty.servlet.ServletHolder.initServlet
(ServletHolder.java:433)
at org.mortbay.jetty.servlet.ServletHolder.getServlet
(ServletHolder.java:342)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
463)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1093)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at com.google.appengine.tools.development.StaticFileFilter.doFilter
(StaticFileFilter.java:124)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
(DevAppEngineWebAppContext.java:54)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:313)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
506)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
(HttpConnection.java:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run
(BoundedThreadPool.java:442)
--~--~-~--~~~---~--~~
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: Looking for a hand to solve my trouble

2009-08-14 Thread tolga ozdemir

This is a screenshot for my folder structure

http://www.tolgaozdemir.net/wp-content/uploads/2009/08/tolgaozdemirnet.gif



HİBERNATE.CFG
!DOCTYPE hibernate-configuration PUBLIC -//Hibernate/Hibernate
Configuration DTD 3.0//EN http://hibernate.sourceforge.net/hibernate-
configuration-3.0.dtd
hibernate-configuration
  session-factory
property
name=hibernate.dialectorg.hibernate.dialect.MySQLDialect/property
property
name=hibernate.connection.driver_classcom.mysql.jdbc.Driver/
property
property name=hibernate.connection.urljdbc:mysql://localhost:
3306/gwtDemo/property
property name=hibernate.connection.usernameroot/property
property name=hibernate.connection.password1557/property
mapping resource=Entry.hbm.xml/
  /session-factory
/hibernate-configuration


ENTRY.HBM.XML
?xml version=1.0?
!DOCTYPE hibernate-mapping PUBLIC -//Hibernate/Hibernate Mapping DTD
3.0//EN http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd;
hibernate-mapping
  class name=net.tolgaozdemir.gwt.client.domain.Entry
table=tblentry/
/hibernate-mapping
--~--~-~--~~~---~--~~
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: Looking for a hand to solve my trouble

2009-08-14 Thread Paul Robinson

It looks fine. I would expect a hibernate error message as
well...something to say that it's not happy with your hibernate.cfg.xml
for some reason.

The exception you've shown seems to be the one you created in your catch
clause. We're not seeing the exception you caught. I would expect that
you've already got that, but if not, maybe you can add something to show
its contents?

Also, is your src directory (where your hibernate files are) in your
classpath?

tolga ozdemir wrote:
 This is my HibernateContext.java.. Something wrong in it?




 import org.apache.commons.logging.*;
 import org.hibernate.SessionFactory;
 import org.hibernate.cfg.Configuration;


 public class HibernateContext {

   private final static String CONFIGURATION_FILE = hibernate.cfg.xml;

   private static Log log = LogFactory.getLog(HibernateContext.class);

   private static SessionFactory sessionFactory;

   public static SessionFactory getSessionFactory(){

   if(sessionFactory == null){

   try{
   sessionFactory = new Configuration()
   
 .addResource(CONFIGURATION_FILE)
   
 .configure()
   
 .buildSessionFactory();

   }catch (Throwable th) {
   log.error(Initial SessionFactory creation 
 failed., th);
   throw new ExceptionInInitializerError(th);
   }

   }

   return sessionFactory;
   }

 }


 ERROR:

 WARNING: Nested in javax.servlet.ServletException: init:
 java.lang.ExceptionInInitializerError
   at net.tolgaozdemir.gwt.server.HibernateContext.getSessionFactory
 (HibernateContext.java:29)
   at net.tolgaozdemir.gwt.server.EntryRemoteService.init
 (EntryRemoteService.java:27)
   at javax.servlet.GenericServlet.init(GenericServlet.java:215)
   at org.mortbay.jetty.servlet.ServletHolder.initServlet
 (ServletHolder.java:433)
   at org.mortbay.jetty.servlet.ServletHolder.getServlet
 (ServletHolder.java:342)
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
 463)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1093)
   at
 com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
 (TransactionCleanupFilter.java:43)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
   at com.google.appengine.tools.development.StaticFileFilter.doFilter
 (StaticFileFilter.java:124)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
   at org.mortbay.jetty.servlet.ServletHandler.handle
 (ServletHandler.java:360)
   at org.mortbay.jetty.security.SecurityHandler.handle
 (SecurityHandler.java:216)
   at org.mortbay.jetty.servlet.SessionHandler.handle
 (SessionHandler.java:181)
   at org.mortbay.jetty.handler.ContextHandler.handle
 (ContextHandler.java:712)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
 405)
   at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
 (DevAppEngineWebAppContext.java:54)
   at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
   at com.google.appengine.tools.development.JettyContainerService
 $ApiProxyHandler.handle(JettyContainerService.java:313)
   at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
   at org.mortbay.jetty.Server.handle(Server.java:313)
   at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
 506)
   at org.mortbay.jetty.HttpConnection$RequestHandler.content
 (HttpConnection.java:844)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
   at org.mortbay.io.nio.SelectChannelEndPoint.run
 (SelectChannelEndPoint.java:396)
   at org.mortbay.thread.BoundedThreadPool$PoolThread.run
 (BoundedThreadPool.java:442)
 

   

--~--~-~--~~~---~--~~
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 best Practices - JS Library Wrappers Overlay Types

2009-08-14 Thread Bobby

I may not be able to correct this IE bug, and it may not be desirable
either since it isn't a good idea to have the GWT version introduce
hacks onto the JS library in order to fix a bug - stuff like this is
better off being corrected in the JS version directly. I'll add this
as a defect and deal with it later, the workaround being to use a
script reference to load the API.

I'm starting to think about how to detach the GWT library from the JS
api in the future. Here's what i'm seeing, in the JS API all GData
operations (POST, PUT, DELETE) are sent as POST commands. A POST
variable called HTTP-Method-Override can be used to specify the actual
operation. Cross-domain POSTS aren't a problem, we can just create and
submit a hidden form using some JavaScript.

Since GData supports retrieving data in JSON format, we can use a
JSONP approach to do cross domain reads - this is what the current JS
API does.

This means that in order to detach the GWT version from the JS
libraries we have to:
1. identify the Atom schema for each data type, there are a few
hundred classes.
2. provide a base implementation that can perform cross-domain POSTS
and JSONP reads.

I think #1 can be automated and #2 is sensitive but small.

The end result will be a more GWT-optimizable API which can then grow
at its own pace. The samples and unit tests wouldn't change
significantly, if at all. We can still use overlay types to wrap
around the JSON objects returned from GData. I've taken a closer look
at the GData Java library and i don't think that the GWT and Java APIs
will ever match because the GWT version will need to be callback-based
whereas Java doesn't have this limitation.

Anyway, just some thoughts.

Bobby

On Aug 14, 2:53 am, Bobby bobbysoa...@gmail.com wrote:
 There are some quirks which are making it difficult to narrow down the
 reason why AuthSub fails in IE. So far i know it only happens when
 google.load is used with a callback, even when google.load is called
 while the page is being loaded.

 So something like the following:
 body
 script
     google.load(gdata, 1.10, myCallback);
 /script
 input type=button value=login onclick=google.accounts.user.login
 ('scope-here') /
 /body

 Will always see the following behavior:
 1. User clicks to login.
 2. User is redirect to authorization page and clicks to authorize.
 3. User is redirected back to the original page, with a token appended
 in the URL.
 4. Page doesn't consume the token in the URL (the correct behavior is
 for the page to place the token in a cookie and remove the token from
 the url).
 5. User clicks to login again.
 6. User gets redirected to authorization page again, and steps 3-6 are
 repeated an arbitrary number of times.
 7. If, after reaching the authorization page a second time, the user
 clicks the browser's back button, causing the browser to go back to
 the page that contains the token in the url, the token is successfully
 consumed and the user is successfully logged in. Go figure.

 Why backing into the page causes GData to successfully consume the
 token i have no idea - especially since refreshing the page at step 4
 has no effect.

 My guess is that when backing into the page IE will use a cached
 version of the GData script, which is processed immediately and may
 make the difference.

 Bobby

 On Aug 14, 1:37 am, Bobby bobbysoa...@gmail.com wrote:

  This was outside GWT. I'm trying to find the cause of the IE AuthSub
  issue outside of GWT first. Basically, when google.load() is called
  after the page has finished loading - such as from a button click,
  AuthSub doesn't succeed.

  Bobby

  On Aug 14, 12:17 am, Eric Ayers zun...@google.com wrote:

   If you are calling JavaScript inside of a GWT JSNI function, you
   should be using $wnd.google.load(...)

   On Thu, Aug 13, 2009 at 11:55 PM, Bobbybobbysoa...@gmail.com wrote:

This IE AuthSub issue is not because of the IFrame, the transferToken
approach didn't make a difference.

I tried placing the google.load('gdata', '1.10'); call in a button
click event. Here's the code:
html
body
   img src=logo-small.png /
   script type=text/javascript src=http://www.google.com/jsapi;/
script
   script type=text/javascript
       function loadGData() {
               google.load('gdata', '1.10');
       }
   /script
   input type=button value=Load GData onclick=loadGData(); /
/body
/html

If you try this, when you click Load GData, the page is cleared and
nothing really happens. If you look at the page source after clicking
the button you see the following:
script src=http://www.google.com/uds/?file=gdatav=1.10; type=text/
javascript/script

This is what would happen if document.write was being used and would
explain a few things.

Eric, does your AjaxLoader module use google.load() from the jsapi?

Bobby

On Aug 13, 10:20 pm, Bobby bobbysoa...@gmail.com wrote:
By the way, i've finished 

Re: Change the webapp URI in Jetty

2009-08-14 Thread Thomas Broyer



On 14 août, 01:43, Dobes dob...@gmail.com wrote:
 We're trying to get our app to run in Jetty instead of using -noserver
 all the time and we've managed to eliminate most of the dependencies
 on glassfish (our production environment) when running in Jetty.
 However, one requirement of the application currently is that the WAR
 file be deployed at the path /app - whereas GWT seems to be deploying
 the application at the root.  Is there any way to tell GWT to expose
 the WAR file at the path localhost:/app/  ?

Can't you use GWT.getHostPageBaseURL() (client-side) /
ServletContext#getContextPath() (server-side) instead of hard-coding /
app?

--~--~-~--~~~---~--~~
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: Struts 1.2 and gwt

2009-08-14 Thread Shajee Lawrence

Struts tags in jsp - along with GWT - i don't think there exists a
straight forward implementation for that. Might be, you can bring in a
struts page (jsp) from within a GWT application because you have
requestbuilders and other stuff. But GWT within struts - its not
straight forward.

On Aug 13, 11:20 pm, suzy suzy...@gmail.com wrote:
 Hi,

     My web application is using struts1.2 and i would like to
 integrate GWT for displaying data coming from db in a table in my
 jsp.

 -- can i still you struts tags in jsp along with GWT (i.e need to
 refresh table with new data)

 -- i need to just include the url(i.e action) in struts-config.xml
 corrrect ?

 if there are any tutorials on struts with GWT would help me.

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



RequestBuilder response content-type

2009-08-14 Thread grue

Hi,

I try to make an HTTP request via RequestBuilder. The problem is that
no valid response is returned by Response.getText() and
Response.getStatusCode() returns 0. I found out that the problem might
be that
the response content-type is text/plain while RequestBuilder only
supports application/xml and application/json.
Is that true? If yes, what's the reason for this? How can I get around
this issue?

Cheers,
Michael

--~--~-~--~~~---~--~~
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: Looking for a hand to solve my trouble

2009-08-14 Thread tolga ozdemir

Yea I caught where the error is.. exactly in buildSessionFactory()
method.. How can I add something to show the contents?? I am new at
GWT and Hibernate :)))

Src in my classpath yes..





On Aug 14, 11:16 am, Paul Robinson ukcue...@gmail.com wrote:
 It looks fine. I would expect a hibernate error message as
 well...something to say that it's not happy with your hibernate.cfg.xml
 for some reason.

 The exception you've shown seems to be the one you created in your catch
 clause. We're not seeing the exception you caught. I would expect that
 you've already got that, but if not, maybe you can add something to show
 its contents?

 Also, is your src directory (where your hibernate files are) in your
 classpath?



 tolga ozdemir wrote:
  This is my HibernateContext.java.. Something wrong in it?

  import org.apache.commons.logging.*;
  import org.hibernate.SessionFactory;
  import org.hibernate.cfg.Configuration;

  public class HibernateContext {

     private final static String CONFIGURATION_FILE = hibernate.cfg.xml;

     private static Log log = LogFactory.getLog(HibernateContext.class);

     private static SessionFactory sessionFactory;

     public static SessionFactory getSessionFactory(){

             if(sessionFactory == null){

                     try{
                             sessionFactory = new Configuration()
                                                                              
                 .addResource(CONFIGURATION_FILE)
                                                                              
                 .configure()
                                                                              
                 .buildSessionFactory();

                     }catch (Throwable th) {
                             log.error(Initial SessionFactory creation 
  failed., th);
                             throw new ExceptionInInitializerError(th);
                     }

             }

             return sessionFactory;
     }

  }

  ERROR:

  WARNING: Nested in javax.servlet.ServletException: init:
  java.lang.ExceptionInInitializerError
     at net.tolgaozdemir.gwt.server.HibernateContext.getSessionFactory
  (HibernateContext.java:29)
     at net.tolgaozdemir.gwt.server.EntryRemoteService.init
  (EntryRemoteService.java:27)
     at javax.servlet.GenericServlet.init(GenericServlet.java:215)
     at org.mortbay.jetty.servlet.ServletHolder.initServlet
  (ServletHolder.java:433)
     at org.mortbay.jetty.servlet.ServletHolder.getServlet
  (ServletHolder.java:342)
     at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
  463)
     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
  (ServletHandler.java:1093)
     at
  com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
  (TransactionCleanupFilter.java:43)
     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
  (ServletHandler.java:1084)
     at com.google.appengine.tools.development.StaticFileFilter.doFilter
  (StaticFileFilter.java:124)
     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
  (ServletHandler.java:1084)
     at org.mortbay.jetty.servlet.ServletHandler.handle
  (ServletHandler.java:360)
     at org.mortbay.jetty.security.SecurityHandler.handle
  (SecurityHandler.java:216)
     at org.mortbay.jetty.servlet.SessionHandler.handle
  (SessionHandler.java:181)
     at org.mortbay.jetty.handler.ContextHandler.handle
  (ContextHandler.java:712)
     at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
  405)
     at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
  (DevAppEngineWebAppContext.java:54)
     at org.mortbay.jetty.handler.HandlerWrapper.handle
  (HandlerWrapper.java:139)
     at com.google.appengine.tools.development.JettyContainerService
  $ApiProxyHandler.handle(JettyContainerService.java:313)
     at org.mortbay.jetty.handler.HandlerWrapper.handle
  (HandlerWrapper.java:139)
     at org.mortbay.jetty.Server.handle(Server.java:313)
     at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
  506)
     at org.mortbay.jetty.HttpConnection$RequestHandler.content
  (HttpConnection.java:844)
     at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
     at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
     at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
     at org.mortbay.io.nio.SelectChannelEndPoint.run
  (SelectChannelEndPoint.java:396)
     at org.mortbay.thread.BoundedThreadPool$PoolThread.run
  (BoundedThreadPool.java:442)
--~--~-~--~~~---~--~~
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 

Re: Looking for a hand to solve my trouble

2009-08-14 Thread Paul Robinson

I see you've got apache commons logging used in there...have you got it
working? Does the error message you log in your catch statement generate
any output you can see? If so, then it ought to have shown the details
of the error.

If not, try to work around this by putting in a th.printStackTrace();

tolga ozdemir wrote:
 Yea I caught where the error is.. exactly in buildSessionFactory()
 method.. How can I add something to show the contents?? I am new at
 GWT and Hibernate :)))

 Src in my classpath yes..





 On Aug 14, 11:16 am, Paul Robinson ukcue...@gmail.com wrote:
   
 It looks fine. I would expect a hibernate error message as
 well...something to say that it's not happy with your hibernate.cfg.xml
 for some reason.

 The exception you've shown seems to be the one you created in your catch
 clause. We're not seeing the exception you caught. I would expect that
 you've already got that, but if not, maybe you can add something to show
 its contents?

 Also, is your src directory (where your hibernate files are) in your
 classpath?



 tolga ozdemir wrote:
 
 This is my HibernateContext.java.. Something wrong in it?
   
 import org.apache.commons.logging.*;
 import org.hibernate.SessionFactory;
 import org.hibernate.cfg.Configuration;
   
 public class HibernateContext {
   
private final static String CONFIGURATION_FILE = hibernate.cfg.xml;
   
private static Log log = LogFactory.getLog(HibernateContext.class);
   
private static SessionFactory sessionFactory;
   
public static SessionFactory getSessionFactory(){
   
if(sessionFactory == null){
   
try{
sessionFactory = new Configuration()
 
.addResource(CONFIGURATION_FILE)
 
.configure()
 
.buildSessionFactory();
   
}catch (Throwable th) {
log.error(Initial SessionFactory creation 
 failed., th);
throw new ExceptionInInitializerError(th);
}
   
}
   
return sessionFactory;
}
   
 }
   
 ERROR:
   
 WARNING: Nested in javax.servlet.ServletException: init:
 java.lang.ExceptionInInitializerError
at net.tolgaozdemir.gwt.server.HibernateContext.getSessionFactory
 (HibernateContext.java:29)
at net.tolgaozdemir.gwt.server.EntryRemoteService.init
 (EntryRemoteService.java:27)
at javax.servlet.GenericServlet.init(GenericServlet.java:215)
at org.mortbay.jetty.servlet.ServletHolder.initServlet
 (ServletHolder.java:433)
at org.mortbay.jetty.servlet.ServletHolder.getServlet
 (ServletHolder.java:342)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
 463)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1093)
at
 com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
 (TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
at com.google.appengine.tools.development.StaticFileFilter.doFilter
 (StaticFileFilter.java:124)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle
 (ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle
 (SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
 (SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
 (ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
 405)
at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
 (DevAppEngineWebAppContext.java:54)
at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
at com.google.appengine.tools.development.JettyContainerService
 $ApiProxyHandler.handle(JettyContainerService.java:313)
at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
 506)
at org.mortbay.jetty.HttpConnection$RequestHandler.content
 (HttpConnection.java:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at org.mortbay.io.nio.SelectChannelEndPoint.run
 (SelectChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run
 (BoundedThreadPool.java:442)
   
 

   


Re: GWT and PHP

2009-08-14 Thread Ian Bambury
I don't think so. I think it has to be localhost, but you can change the
port with the -port switch
Ian

http://examples.roughian.com


2009/8/14 Tiago Z.C tiag...@gmail.com

 Hi,
 Just more one question...

 Is possible change the default url of the hosted mode to an address of a
 virtual host? I searched on web and didn't find anything related to that.

 I would like to click to run the application and hosted mode starts on
 virtualhostexample.com/Application.html

 Thank you


 On Wed, Aug 12, 2009 at 10:40 PM, Tiago Z.C tiag...@gmail.com wrote:

 Ian
 I was not understand you because i have understand that the gwt code on
 time of running was execute like java bytecode on a servlet container like
 jetty, and just after the compile process the java code was transformed to
 javascript code.

 But know, i was looking for about -noserver option that you talk and find
 what i wanted. Now i can develop the way that i would like.

 Thank you, thank you very much!!!

 On Tue, Aug 11, 2009 at 8:34 PM, Ian Bambury ianbamb...@gmail.comwrote:

 2009/8/12 Tiago Z.C tiag...@gmail.com


 Ian

 If i do that, every time that i want to see the chances that i made on
 my app i will have to compile right? I have some doubts because with a 
 small
 project the compile process take around 30 seconds.


 Hi Tiago,

 No, you don't have to compile every time for the GWT code, it's the same
 as hosted mode, just refresh.

 For PHP code, you might have to refresh the hosted mode browser (not
 recompile, just F5), but you might not even have to do that. If your app has
 a search button which does a typical search, then provided just the PHP code
 has changed (and not the GWT code which displays the results), you can just
 click 'Search' again.

 Ian

 http://examples.roughian.com





 --
 Tiago Zortéa de Conto
 Mac User - MAC OS X Leopard
 MSN: tiag...@pop.com.br




 --
 Tiago Zortéa de Conto
 Mac User - MAC OS X Leopard
 MSN: tiag...@pop.com.br

 


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



XmlHttpRequest inside native method

2009-08-14 Thread grue

Hi,

I try to perform a request from insida a native method. The JS code
works pretty fine when I run it in a standalone html page but inside
the gwt native method the response is empty.
Does anyone have a clue what coud be wrong?

Cheers,
Michael

Here's the code:

private native String fetchStatus(String url) /*-{

var xmlHttp = null;
// Mozilla, Opera, Safari and Internet Explorer ( v7)
if (typeof XMLHttpRequest != 'undefined') {
xmlHttp = new XMLHttpRequest();
}
if (!xmlHttp) {
// Internet Explorer 6 or older
try {
xmlHttp  = new ActiveXObject(Msxml2.XMLHTTP);
} catch(e) {
try {
xmlHttp  = new 
ActiveXObject(Microsoft.XMLHTTP);
} catch(e) {
xmlHttp  = null;
}
}
}
if (xmlHttp) {
xmlHttp.open('GET', url, true);
xmlHttp.onreadystatechange = function () {
if (xmlHttp.readyState == 4) {
alert(xmlHttp.responseText);
return xmlHttp.responseText
}

else {
return null;
}
};
xmlHttp.send(null);
}
}-*/;
--~--~-~--~~~---~--~~
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 do you load one image before drawing it

2009-08-14 Thread Sean

Awesome, glad you got your stuff working. I was banging my head
against the wall to figure out what to do with image sizes and such
till I realized that all the pics I have are from my camera and are
the same size. So i def. cheat with image sizes. I have a bunch of
ways in my head to deal with them, but since I didn't have to, I kinda
said GOOD ENOUGH and ran away quickly to another GWT project. :)

The control overlays are pretty simple. All you need to do is create
an absolute panel the size of your image, add the controls to the
absolute panel where you want them using your image size as well as
the control's image sizes. Add clickHandlers to all of them. Set all
the control images to be NOT visible. Then use a mouse listener that
if you're over a specific % of the image, show the control. I think
it's a really neat and useful effect with a little bit of work.

Enjoy!



On Aug 14, 12:11 am, lucasz lmert...@gmail.com wrote:
 Thanks, that was exactly what I needed. I spent a while banging my
 head on that one and the answer was so simple. I was actually creating
 new image objects every time and then removing and re-adding them to
 the popup panel. I switched over to the seturl and precached the image
 before and after and now it works perfectly except for the initial
 load, which I'll deal with later.

 I checked out your gallery and all your images are the same size and
 orientation, so you wouldn't have ever encountered the jumping around
 popup problem. I really like your overlays for next/previous/close. I
 want to do something like that in the long term but opted for the easy
 way for now. How did you do those overlays, if I might be so bold as
 to ask?

 I guess it's only IE 8 that doesn't display the split panel correctly.

 Thanks again, I appreciate it a lot.

 On Aug 13, 6:19 am, Sean slough...@gmail.com wrote:

  I did a very similar thing, but my pop up doesn't redraw. I just do a
  newImage.setUrl() and I don't get that shrink/grow movement. I
  believe (I don't have source code with me) I extended a dialog panel
  (so I could add my own arrow and close controls) with anImagein it
  and just always call setUrl().

  How are you applying the newimage? Cause even when I goto cached
  images I get that flash of it shrinking and growing really quickly.
  You may want to set the pixel size of your pop-up to theimagesize of
  your firstimage(plus border, and controls, etc.). Then when you hit
  next,loadthe nextimage, use a timer to check when theimagesizes
  are loaded (This won't be instantaneous) when, those aren't zero, set
  your popup size from the old pics values to the new values and then
  kill the timer. That's one way. Another way would be to pre-fetch the
  images to the left and right of your currentimage, and keep their
  sizes on hand and resize it when youloadtheimage(taking away the
  timer, but adding a pre-fetch).

  You can see how mine functions atwww.celticlock.com(Undergallery).

  And your vertical Split Panel works fine for me in IE 6.0 here at
  work.

  Good luck!

  On Aug 13, 3:11 am, lucasz lmert...@gmail.com wrote:

   Hello GWT people,

   I am trying to write animagegallery slide show feature inside of a
   PopupPanel, butimageloading is really messing up my presentation.
   The problem is that when Iloadthe nextimage, my popup shrinks until
   theimageis loaded. And even worse, if I change between a portrait
   and a landscapeimage, theimageis off-centered when it loads
   initially. I added a popup.center() to theimageloadhandler, and
   that re-centers the popup after theimageloads, and it looks really
   cheap.

   I would really like to be able to not redraw the popup until theimage
   is already loaded, but I can't figure out how to do it. I tried using
  Image.prefetch(), but it doesn't help at all.

   I've also looked atimagebundles, but I'm dealing with 10 to 30
   moderate sized images that would take too long toloadall at once.

   You can see the problem at my website. Only the first two galleries,
   Europe and Yosemite, have the popup feature enabled. If you click on
   the largeimageon the right, it will popup into the slide show panel:

  http://www.lukemertens.com/LukeMertens.html

   Bonus points for anyone who can tell me why my vertical split panel
   splitter is messed up in IE but works fine in Firefox, Safari, Chrome,
   and Opera.
--~--~-~--~~~---~--~~
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: XmlHttpRequest inside native method

2009-08-14 Thread Thomas Broyer



On 14 août, 13:11, grue michael.gruetz...@googlemail.com wrote:
 Hi,

 I try to perform a request from insida a native method. The JS code
 works pretty fine when I run it in a standalone html page but inside
 the gwt native method the response is empty.
 Does anyone have a clue what coud be wrong?

Any compelling reason you do not use RequestBuilder instead? (or even
com.google.gwt.xhr.client.XMLHttpRequest if you're using GWT trunk)

 Here's the code:

 private native String fetchStatus(String url) /*-{

[...]
                             xmlHttp.open('GET', url, true);

How is it that you're expecting a String to be returned while doing an
*async* request !?

                             xmlHttp.onreadystatechange = function () {
                                 if (xmlHttp.readyState == 4) {
                                         alert(xmlHttp.responseText);
                                     return xmlHttp.responseText
                                 }

                                 else {
                                         return null;

Just in case: these return statements exit the closure (function()
{ ...), not your fetchStatus method.

I'm surprised you say it works in pure JS, you must be doing
something slightly different there.

But it seems you're trying to do a synchronous request (which almost
everyone out there would advise you to avoid, for quite evident user
experience reasons) the asynchronous way; that's not how synchronous
XMLHttpRequest works.
--~--~-~--~~~---~--~~
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: Who is using smartgwt?

2009-08-14 Thread Nathan Wells

I would like to add a dissenting voice... As always, it's a matter of
trade-offs

Benefits:
1) Pretty, usable, full-featured widgets, with very small up-front dev
time.
2) Very responsive dev team (you're awesome Sanjiv)

Problems:
1) Incompatible or redundant APIs. Specifically, I'm thinking of
a. Redundant event system
b. Datasource
c. TreeGrid has approximately 160 methods.
2) Lack of GWT Compiler optimization
3) no use of ImageBundle
4) b/c of 2  3, very request intensive.
5) No intuitive way to customize styling

Right now, our team is using TreeGrid, because no comparable widget
exists, but I've been thinking we should take a look at customizing
the gwt-incubator tree grid.

On Aug 13, 11:54 pm, Daniel Jue teamp...@gmail.com wrote:
 Now, how about an MVP/Eventbus version of SmartGWT showcase?
 =)



 On Fri, Aug 14, 2009 at 1:31 AM, shay matas...@gmail.com wrote:

  I Highly recommend SmartGWT, been using it for months now.

  Sanjiv and the smart client team have done a great job. Kudos!

  The architecture is clever and robust , way better then Ext.

  Shay

  On Aug 13, 9:03 pm, Sanjiv Jivan sanjiv.ji...@gmail.com wrote:
   Hi Daniel,Please try upgrading to SmartGWT 1.2. Hosted mode should
  perform
   better.  You're right that most of the resources from a compile output
  are
   not used and so if you're benchmarking, best to actually see what's
   transferred over the wire rather than the size of the output directory on
   the server. The default com.smartgwt.SmartGwt module bundles all the
   readable source versions that have a lot of documentation, the obfuscated
  /
   minified ones, various tools like the Developer Console and a lot of
  other
   resources that are pretty much never used in deployment. I'll look into
   creating a module that outputs the minimal resources which will save some
  MB
   of disk space on the server.

   As for runtime performance, you can have a look at the SmartGWT showcase
   which is comparable is size to a real world application having ~260
  samples
   and includes most widget types. If you're not using Calendar, or TileGrid
   etc you can exclude these resources.

   Sanjiv

   On Thu, Aug 13, 2009 at 8:18 PM, Daniel Jue teamp...@gmail.com wrote:
It is slow in hosted, although I'm on SmartGWT 1.1/GWT 1.7 at the
  moment.
Deployed it is better, but its' still chunky.  However it's full of
  features
that I don't have the time or desire to recreate, so it works for me.
   It's
definitely not a lightweight, but it's not bad.  There's just a lot
  going on
behind the scenes.  The full sc directory that gets put in the war is
  like
18.7 MB (19,630,389 bytes) worth of Js files.  I'm guessing 98% of
  those
won't be touched/loaded.  I like SmartGWT so far and have recommended
  it to
some people.

On Thu, Aug 13, 2009 at 8:03 PM, Chris chdi...@gmail.com wrote:

It is slow in hosted? But how is it deployed in
a regular browser?

On Aug 13, 4:00 pm, Daniel Jue teamp...@gmail.com wrote:
 I am using it.  Once I got the extra layers of code implemented for
  the
RPC
 Datasource (mostly from off thier forum), It's been pretty painless.
   I
came
 from GXT 2 because I was having some rendering problems and wanted
  to
try
 something else.  SmartGWT _is_ painfully slow in hosted mode, but
  the
 widgets are very nice and full featured.
--~--~-~--~~~---~--~~
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: RequestBuilder response content-type

2009-08-14 Thread Thomas Broyer



On 14 août, 11:07, grue michael.gruetz...@googlemail.com wrote:
 Hi,

 I try to make an HTTP request via RequestBuilder. The problem is that
 no valid response is returned by Response.getText() and
 Response.getStatusCode() returns 0. I found out that the problem might
 be that
 the response content-type is text/plain while RequestBuilder only
 supports application/xml and application/json.
 Is that true?

No, that's plain wrong.

 If yes, what's the reason for this? How can I get around
 this issue?

This most likely means there's been an error (most likely a network
error). I know for sure that Firefox also calls your callback and sets
status==0 when you navigate away from the page (or refresh it, which
is equivalent).
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Regex issue with IE

2009-08-14 Thread davis

Hi, I have the following Java code to validate a password box.
Basically it checks that the password can't be null, is between 8-15
characters, and must contain both numbers and letters.

public static boolean validatePassword(PasswordTextBox box, Label
errorLabel) {
String text = box.getText();
if(text.isEmpty()) {
ValidatorUtil.onFailure(box, 
custom.passwordMayNotBeNull(),
errorLabel);
return false;
} if(text.length()  8 || text.length()  15) {
ValidatorUtil.onFailure(box, 
custom.passwordHasInvalidLength(8, 15,
text.length()), errorLabel);
return false;
} if(!text.matches(CustomMessages.REGEX_PASSWORD)) {
ValidatorUtil.onFailure(box, 
custom.passwordHasInvalidFormat(),
errorLabel);
return false;
}
return true;
}

This works fine in Firefox, but it does not work in IE.  The
JavaScript compiles down to this for IE8:

function validatePassword(box, errorLabel){
  var text, matchObj;
  text = $getPropertyString(box.element, 'value');
  if (!text.length) {
setStyleName(box.element, 'validationFailedBorder', true);
($clinit_114() , errorLabel.element).innerText = 'You must provide
a password.';
return false;
  }
  if (text.length  8 || text.length  15) {
onFailure_1(box, 'Sorry, your password must be between 8 and 15
characters long (you have ' + text.length + ' characters).',
errorLabel);
return false;
  }
  if (!(matchObj = (new RegExp('^(?=.*\\d)(?=.*[a-z]).{8,15}$')).exec
(text) , matchObj == null?false:text == matchObj[0])) {
setStyleName(box.element, 'validationFailedBorder', true);
($clinit_114() , errorLabel.element).innerText = 'Sorry, your
password must contain both letters [a-z] and numbers [0-9].';
return false;
  }
  return true;
}

The behavior is a bit odd.  It passes the text.length checks, but then
fails the regex expression (which also has length checks with {8,15}.
It always prints: 'Sorry, your password must contain both letters [a-
z] and numbers [0-9].' in IE, but in Firefox, it works fine...for
inputs like this:

abcd1234 - valid password, 8 characters with letters and numbers

Even more strange is the fact that if I enter a password with 12
characters with both letters and numbers, IE passes, like this:

abcd1234abcd

But if I enter only 11 characters, it fails:

abcd1234abc

Any clues on what is wrong here?

Regards,
Davis




--~--~-~--~~~---~--~~
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: Missing quick fix in the eclipse plugin for RemoteService with super interfaces

2009-08-14 Thread Miguel Méndez
I went ahead and added issue
3950http://code.google.com/p/google-web-toolkit/issues/detail?id=3950to
track this problem.  Thanks for pointing this out.

On Thu, Aug 13, 2009 at 5:56 PM, Sumit Chandel sumitchan...@google.comwrote:

 Hi luisfpg,
 Could you file an issue for this on the Issue Tracker? I'll make sure it
 gets the attention of the plugin team from there.

 Issue Tracker:
 http://code.google.com/p/google-web-toolkit/issues/list

 Cheers,
 -Sumit Chandel


 On Tue, Aug 11, 2009 at 7:36 AM, luisfpg lfpg@gmail.com wrote:


 Using plugin version 1.7.0 and Eclipse Galileo.
 When a RemoteService interface defines a method, the corresponding
 Async interface is marked as error and there is a quick fix which
 generates the method in the Async. Good.
 However, when the method is defined in a super interface of the
 RemoteService, the Async is marked as error, but the quick fix is
 missing.
 Here is how to reproduce:

 public interface Super {
void x();
 }

 public interface GreetingService extends RemoteService, Super {
 }

 public interface GreetingServiceAsync {
   // The error is reported that x() must be declared, but there's no
 quick fix
 }



 



-- 
Miguel

--~--~-~--~~~---~--~~
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: Regex issue with IE

2009-08-14 Thread davis

I think I figured out the problem, using an online regex tester for
JavaScript: http://www.pagecolumn.com/tool/regtest.htm

Note that the regex translation in JavaScript has a double backslash
to escape the \d special character.  This fails standard regex test
for JavaScript for inputs like abcd1234.

^(?=.*\\d)(?=.*[a-z]).{8,15}$

If you replace the regex text with:

^(?=.*\d)(?=.*[a-z]).{8,15}$

Then it works for JavaScript.  However, Java requires the character to
be escaped.  I'm guessing Firefox simply interprets \\d as \d, which
is why it passes, but IE is not as forgiving.  This seems like a bug
in the GWT compiler.  It seems to me it should take the \\d and
translate it to \d when compiling from Java to JavaScript.

Can someone confirm?

Regards,
Davis

On Aug 14, 9:44 am, davis davisf...@zenoconsulting.biz wrote:
 Hi, I have the following Java code to validate a password box.
 Basically it checks that the password can't be null, is between 8-15
 characters, and must contain both numbers and letters.

 public static boolean validatePassword(PasswordTextBox box, Label
 errorLabel) {
                 String text = box.getText();
                 if(text.isEmpty()) {
                         ValidatorUtil.onFailure(box, 
 custom.passwordMayNotBeNull(),
 errorLabel);
                         return false;
                 } if(text.length()  8 || text.length()  15) {
                         ValidatorUtil.onFailure(box, 
 custom.passwordHasInvalidLength(8, 15,
 text.length()), errorLabel);
                         return false;
                 } if(!text.matches(CustomMessages.REGEX_PASSWORD)) {
                         ValidatorUtil.onFailure(box, 
 custom.passwordHasInvalidFormat(),
 errorLabel);
                         return false;
                 }
                 return true;
         }

 This works fine in Firefox, but it does not work in IE.  The
 JavaScript compiles down to this for IE8:

 function validatePassword(box, errorLabel){
   var text, matchObj;
   text = $getPropertyString(box.element, 'value');
   if (!text.length) {
     setStyleName(box.element, 'validationFailedBorder', true);
     ($clinit_114() , errorLabel.element).innerText = 'You must provide
 a password.';
     return false;
   }
   if (text.length  8 || text.length  15) {
     onFailure_1(box, 'Sorry, your password must be between 8 and 15
 characters long (you have ' + text.length + ' characters).',
 errorLabel);
     return false;
   }
   if (!(matchObj = (new RegExp('^(?=.*\\d)(?=.*[a-z]).{8,15}$')).exec
 (text) , matchObj == null?false:text == matchObj[0])) {
     setStyleName(box.element, 'validationFailedBorder', true);
     ($clinit_114() , errorLabel.element).innerText = 'Sorry, your
 password must contain both letters [a-z] and numbers [0-9].';
     return false;
   }
   return true;

 }

 The behavior is a bit odd.  It passes the text.length checks, but then
 fails the regex expression (which also has length checks with {8,15}.
 It always prints: 'Sorry, your password must contain both letters [a-
 z] and numbers [0-9].' in IE, but in Firefox, it works fine...for
 inputs like this:

 abcd1234 - valid password, 8 characters with letters and numbers

 Even more strange is the fact that if I enter a password with 12
 characters with both letters and numbers, IE passes, like this:

 abcd1234abcd

 But if I enter only 11 characters, it fails:

 abcd1234abc

 Any clues on what is wrong here?

 Regards,
 Davis
--~--~-~--~~~---~--~~
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: Who is using smartgwt?

2009-08-14 Thread Sanjiv Jivan
Hi Nathan,Thanks for mentioning me under the Benefits section :)

As always, constructive criticism is welcome and helps improve the product.
For example it was primarily due to user feedback the the new Enterprise
skin was quickly delivered by SmartClient.

I'd like to respond to some of your concerns

1) Incompatible or redundant APIs. Specifically, I'm thinking of
a. Redundant event system
b. Datasource
c. TreeGrid has approximately 160 methods.

Can you clarify b) ? DataSources are a very powerful concept and most
SmartGWT components support being bound to a DataSource.  As you probably
know, this means that any changes made to the data in the widget - whether
it be cell edits, or tree node reordering, or drag and drop across separate
databound components are automatically reflected in the underlying local
data, or propagated to the server for you to act upon the change operation.
Thanks to datasources and their inbuilt capabilities, this can save the
application developer from writing a whole lot of code to manage these
operations per-widget per-screen.

The TreeGrid does have a lot of methods. An advanced tree is a sophisticated
component and the philosophy of SmartGWT is that pretty much any feature or
customization that the user may require is supported out of the box and can
be settable via a simple property. As you noted, the SmartGWT Tree component
is very powerful. Here's a link to the TreeGrid javadocs for the benefit of
the users :

http://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/widgets/tree/TreeGrid.html

If you have a closer look, you'll see that there are listeners for numerous
events and properties like canAcceptDroppedRecords that turn on local or
DataBound drag  drop. It would be interesting to see what the API for the
incubator Tree looks like when it supports all these features - and I say
this in a positive way with the best of intentions.

2) Lack of GWT Compiler optimization

The SmartGWT API's are optimized by the GWT compiler such that only those
methods used are part of the compiled output. You're right that the
underlying SmartClient JS files are not going to be aggressive pruned by the
GWT compiler however there are other benefits to this. For example the core
SmartClient JS files can be have an expires header set to the future to
enable caching and even deployed on a CDN. So when the users application
code changes, and a new set of GWT md5 based files are generated, the only
file that gets refreshed when a user accesses the site is the smaller GWT
compiled files, and not the core kernel SmartClient JS files as they are
cached.

As you say its about trade-offs but what is important to keep in mind is not
dismissing SmartGWT due to this, but rather focus on the end result once
your real world application is build. The SmartGWT showcase is a good
example of this which comparable, if not larger than many real world
applications. A good apples to apples comparison would be to compare a GWT
based application with as many screens and similar featureset. With this in
place it would be a good basis for total file size comparison. The GWT
version will no doubt be smaller. If every single KB is important to you,
that might be a factor but you have to ask the question about how much more
application code did you have write to build your enterprise application?

I can state with confidence that if you are building a data intensive
enterprise application, SmartGWT can cut down application code by 50% or
more compared to home grown solutions and this is due to the combination of
a lot of configuration properties being supported out of the box, and the
strong data-binding capabilities. In my blog I have a complete example of an
end to end CRUD sample that supports filtering, sorting, inline edits and
more with as little as 20 lines of client side SmartGWT code and a 20 odd
line server descriptor file. Moreover no code generation is involved. No
other AJAX based technology that I know of can deliver so much with so
little coding. On the other hand if you're looking to simply include a
couple of widgets in your page that interact with client side data only,
SmartGWT is probably overkill.

3) no use of ImageBundle

100% agree with this. This is on the roadmap and hopefully will make it for
the next major release without code changes for the end user.

5) No intuitive way to customize styling

SmartGWT, by virtue of SmartClient does have a very powerful skinning
system. A key advantage is that users can customize styling using a Java API
in cases that make sense, while using CSS in others. If you look at
SmartClient's different skins you'll notice that essentially everything can
change, including the use of completely different widgets in different
places (eg switching ListGrid headers between pure CSS, 1 image, or triple
image representations). As another example, have a look at the tabs in the
TreeFrog skin. Perhaps users can take the initiative and create a
lightweight theme 

Issue With Debugging with JDK 1.6.0_14 Has Been Resolved in JDK 1.6.0_16

2009-08-14 Thread Rajeev Dayal
Hi,
As some of you may recall, there as an issue with debugging if you're using
JDK 1.6.0_14. You'll find that your breakpoints are not hit. More details on
the issue can be found here:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6862295

This issue has been recently fixed in JDK 1.6.0_16. See
http://java.sun.com/javase/6/webnotes/6u16.html for details.



Thanks,
Rajeev

--~--~-~--~~~---~--~~
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: GXT widgets vs GWT widgets

2009-08-14 Thread Juraj Vitko

GXT offers consistent look, Accessibility, and localization.
And if I'm not mistaken, GXT uses layouts incompatible to GWT's
layouts - I think you have to encapsulate a GWT widget into a
BoxComponent to be able to use it in a GXT layout.

For quick and stable development, I'd go with GXT 100%, no mixing,
only when building my own components.
If time permitted it, then for a visually appealing, snappy website or
app I'd go with GWT + my own custom widgets (or 3rd party libs) built
on top of GWT, and no mixing with GXT.
I may be wrong, because I haven't developed without GXT yet.


On Aug 14, 9:44 am, Daniel Jue teamp...@gmail.com wrote:
 From the few widget libs I have tried, they all feel heavy compared to the
 base gwt ones.  You also have to think about the events and
 handlers/listeners--often the widget lib will have it's own classes for this
 (with the same names), and they are not compatible AFAIK.

 For SmartGWT I noticed there are even two types of events, handlers and
 buttons--one for components in a special form widget, and one for more
 regular widgets.

 So you have to weigh the added learning curve versus trying to style
 something yourself or create the nice looking widgets you want..

 On Fri, Aug 14, 2009 at 3:37 AM, mars1412 martin.trum...@24act.at wrote:

  I also think the GWT widgets are more lightweight
  but usually I try to use GXT widgets only, because then I have a
  consistent lookfeel.

  of course there are some exceptions to the rule :)

  On Aug 13, 8:02 pm, Mike michaeljr...@gmail.com wrote:
   I agree with your thinking.  I see the GWT widgets as being lighter.
   If there is a comparable GWT widget that fulfills all of my needs I
   normally lean towards that.

   On Aug 13, 10:17 am, brian.xi...@thomsonreuters.com wrote:

Hi All,

We all know GXT offers a lots of advanced widgets. Some of the widgets
overlap with GWT widgets. I am looking for some advice on choosing GXT
widget or GWT widgets in the situation of they both offer the same type
of widgets, maybe GXT widget is a bit more good looking.

My concern is that GXT widgets might not offer the same quality as GWT
widgets on cross-browser compatiblity, styling and extending etc. I
initial thought is I would only use GXT grid widget, which is the one
  we
are sure we need to use. Everything else, as long as GWT provide the
function widget, I would choose GWT widget first. Such as for layout, I
would use GWT panel widgets, and would not use GXT layout widgets etc.

I would appreciate if you can share your experience, advice on using
  GXT
widgets vs GWT widgets.

Thank you in advance!
Brian


--~--~-~--~~~---~--~~
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: Issue With Debugging with JDK 1.6.0_14 Has Been Resolved in JDK 1.6.0_16

2009-08-14 Thread Jeff Chimene

Thanks, Rajaeev. I'll keep an eye out for this update to land in Debian.

On Fri, Aug 14, 2009 at 7:11 AM, Rajeev Dayalrda...@google.com wrote:
 Hi,
 As some of you may recall, there as an issue with debugging if you're using
 JDK 1.6.0_14. You'll find that your breakpoints are not hit. More details on
 the issue can be found here:
 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6862295
 This issue has been recently fixed in JDK 1.6.0_16.
 See http://java.sun.com/javase/6/webnotes/6u16.html for details.


 Thanks,
 Rajeev
 


--~--~-~--~~~---~--~~
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: problem with rpc calls

2009-08-14 Thread gerry

Thanks for your response. Could you please tell me how exactly to do
this?There is no class option under the main tab in the launch
configuration options as in a usual java project...

On 4 Αύγ, 01:47, Sumit Chandel sumitchan...@google.com wrote:
 Hi gerry,
 The most likely cause for this problem is that your hosted mode launch
 configuration is referring to the old GWTShell instead of the new HostedMode
 class to start hosted mode. You should double-check that the launch config
 includes the GWT 1.7.0 JARs on the classpath and uses
 com.google.gwt.dev.HostedMode as the main class instead of
 com.google.gwt.dev.GWTShell.

 Let us know if that solves the issue.

 Hope that helps,
 -Sumit Chandel

 On Fri, Jul 31, 2009 at 8:51 AM, gerry geras...@hotmail.com wrote:

  Hello all,
  I can't workaround this problem for days, and I have read the
  documentation and the getting started example and searched this forum
  but I still can't find a solution.

  When I try to run my application in hosted mode i get this:
  Cannot find resource 'something' in the public path of module
  'queryinterface'

  And on the development shell:
  [TRACE] The development shell servlet received a request for
  'something' in module 'queryinterface.gwt.xml'
  [WARN] Resource not found: something; (could a file be missing from
  the public path or a servlet tag misconfigured in module
  queryinterface.gwt.xml ?)

  My web.xml file looks like this:
  web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org
  .
   !-- Servlets --
   servlet
     servlet-nameMyServiceImpl/servlet-name
     servlet-classcom.diplomatiki.mypackage.server.MyServiceImpl/
  servlet-class
   /servlet

   servlet-mapping
     servlet-nameMyServiceImpl/servlet-name
     url-pattern/queryinterface/something/url-pattern
   /servlet-mapping

  /web-app

  on the server side, the service is:
  package com.diplomatiki.mypackage.client;

  import .;

  @RemoteServiceRelativePath(something)
  public interface MyService extends RemoteService {

         public String myMethod(String s);
         public String myMethod2 (String Prefixes, String query) ;
  }

  and my module .gwt.xml file is:
  ?xml version=1.0 encoding=UTF-8 standalone=no?module rename-
  to=queryinterface

         !-- Inherit the core Web Toolkit stuff.                  --
         inherits name=com.google.gwt.user.User/

         !-- Inherit the GWTExt Toolkit library configuration.    --
         inherits name=com.gwtext.GwtExt/

         !-- Specify the app entry point class.                   --
         entry-point
  class=com.diplomatiki.mypackage.client.SparqlInterface/

         !--servlet path=/something
  class=com.diplomatiki.mypackage.server.MyServiceImpl/ --

         stylesheet src=js/ext/resources/css/ext-all.css/
         script src=js/ext/adapter/ext/ext-base.js/
         script src=js/ext/ext-all.js/

  /module

  But when I add the line
  servlet path=/something
  class=com.diplomatiki.mypackage.server.MyServiceImpl/ on the
  module, everything works fine
  But why do I have to do this, since I have istalled gwt 1.7.0? I
  created the project on eclipse as a dynamic web project and I also
  used the gwt-ext library.

  Please help, I can't think of anything.
--~--~-~--~~~---~--~~
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: Regex issue with IE

2009-08-14 Thread Dominik Steiner

Hi davis,

I'm using the following regex to match addresses in the format of 123
west road

public static final String ADDRESS_REGEX = 
[0-9]+\\s*\\D+;

and it works fine on IE too. Note the double slash before s and D

So I don't think that the double slash is the problem.

HTH

Dominik

davis schrieb:
 I think I figured out the problem, using an online regex tester for
 JavaScript: http://www.pagecolumn.com/tool/regtest.htm

 Note that the regex translation in JavaScript has a double backslash
 to escape the \d special character.  This fails standard regex test
 for JavaScript for inputs like abcd1234.

 ^(?=.*\\d)(?=.*[a-z]).{8,15}$

 If you replace the regex text with:

 ^(?=.*\d)(?=.*[a-z]).{8,15}$

 Then it works for JavaScript.  However, Java requires the character to
 be escaped.  I'm guessing Firefox simply interprets \\d as \d, which
 is why it passes, but IE is not as forgiving.  This seems like a bug
 in the GWT compiler.  It seems to me it should take the \\d and
 translate it to \d when compiling from Java to JavaScript.

 Can someone confirm?

 Regards,
 Davis

 On Aug 14, 9:44 am, davis davisf...@zenoconsulting.biz wrote:
  Hi, I have the following Java code to validate a password box.
  Basically it checks that the password can't be null, is between 8-15
  characters, and must contain both numbers and letters.
 
  public static boolean validatePassword(PasswordTextBox box, Label
  errorLabel) {
                  String text = box.getText();
                  if(text.isEmpty()) {
                          ValidatorUtil.onFailure(box, 
  custom.passwordMayNotBeNull(),
  errorLabel);
                          return false;
                  } if(text.length()  8 || text.length()  15) {
                          ValidatorUtil.onFailure(box, 
  custom.passwordHasInvalidLength(8, 15,
  text.length()), errorLabel);
                          return false;
                  } if(!text.matches(CustomMessages.REGEX_PASSWORD)) {
                          ValidatorUtil.onFailure(box, 
  custom.passwordHasInvalidFormat(),
  errorLabel);
                          return false;
                  }
                  return true;
          }
 
  This works fine in Firefox, but it does not work in IE.  The
  JavaScript compiles down to this for IE8:
 
  function validatePassword(box, errorLabel){
    var text, matchObj;
    text = $getPropertyString(box.element, 'value');
    if (!text.length) {
      setStyleName(box.element, 'validationFailedBorder', true);
      ($clinit_114() , errorLabel.element).innerText = 'You must provide
  a password.';
      return false;
    }
    if (text.length  8 || text.length  15) {
      onFailure_1(box, 'Sorry, your password must be between 8 and 15
  characters long (you have ' + text.length + ' characters).',
  errorLabel);
      return false;
    }
    if (!(matchObj = (new RegExp('^(?=.*\\d)(?=.*[a-z]).{8,15}$')).exec
  (text) , matchObj == null?false:text == matchObj[0])) {
      setStyleName(box.element, 'validationFailedBorder', true);
      ($clinit_114() , errorLabel.element).innerText = 'Sorry, your
  password must contain both letters [a-z] and numbers [0-9].';
      return false;
    }
    return true;
 
  }
 
  The behavior is a bit odd.  It passes the text.length checks, but then
  fails the regex expression (which also has length checks with {8,15}.
  It always prints: 'Sorry, your password must contain both letters [a-
  z] and numbers [0-9].' in IE, but in Firefox, it works fine...for
  inputs like this:
 
  abcd1234 - valid password, 8 characters with letters and numbers
 
  Even more strange is the fact that if I enter a password with 12
  characters with both letters and numbers, IE passes, like this:
 
  abcd1234abcd
 
  But if I enter only 11 characters, it fails:
 
  abcd1234abc
 
  Any clues on what is wrong here?
 
  Regards,
  Davis
--~--~-~--~~~---~--~~
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: *.cache.html blocked by firewall - GWT team opinions please?

2009-08-14 Thread Jason Essington

It sounds like the firewall doesn't like the html file that is  
composed entirely of javascript. If you have access to the IT  
departments that run those firewalls, perhaps you could request that  
they disregard that rule for your particular sites.

If that isn't possible you could maybe try using the XS linker to  
generate cache.js files (usually used for cross site loading) and  
perhaps the firewall would allow those to pass unmolested.

-jason


On Aug 12, 2009, at 8:24 PM, Joe Cole wrote:


 I know it's a firewall because if we type the *.cache.html url into
 the browser it comes back with a document with a message from their
 firewall claiming it's been blocked. The file scored very highly on
 some metrics which their firewall uses. I am guessing it's because of
 the large js because it was the same in pretty mode.

 We have seen this at two separate sites (different countries too), but
 with different builds of the software (we have different servers
 depending on the country).

 Regardless, if there is a problem I'd love to be able to check (e.g.
 if the html downloaded by the nocache.js doesnt contain our script). I
 think this is something gwt should do out of the box really - because
 there are no errors thrown. Unfortunately the sites are private so I
 can't share the links.

 On Aug 13, 4:42 am, Jeff Chimene jchim...@gmail.com wrote:
 On 08/12/2009 08:14 AM, Joe Cole wrote:



 We have encountered this on another network now.
 Does no one else have this problem?

 How do you know it's a firewall?

 Are you saying there are two different firewalls (with potentially
 different settings) blocking the same document?

 Is this a private site? Perhaps posting a link might help debug this
 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
-~--~~~~--~~--~--~---



Re: Regex issue with IE

2009-08-14 Thread davis

Hi Dominik, I also use other regex for other text boxes and they have
double-slashes and they work.

For example I have another textbox which validates against this regex:

public static final String REGEX_PINCODE = [\\w]{12};

That one has no problem in IE or Firefox.

I tried changing the original problematic regex to this (to avoid
double slash altogether):

^(?=.*[0-9])(?=.*[a-z]).{8,15}$

But the problem still remains for IE.  I don't have a lot of insight
into this issue.  I just installed the DebugToolbar, and now I will re-
compile it all with readable JavaScript to see if I can spot anything,
but I'm drawing a blank on this one.  I'm not much of a javascript
maven.  If anyone has any insight, I'd be thrilled to hear it.

Regards,
Davis



On Aug 14, 10:57 am, Dominik Steiner
dominik.j.stei...@googlemail.com wrote:
 Hi davis,

 I'm using the following regex to match addresses in the format of 123
 west road

                         public static final String ADDRESS_REGEX = 
 [0-9]+\\s*\\D+;

 and it works fine on IE too. Note the double slash before s and D

 So I don't think that the double slash is the problem.

 HTH

 Dominik

 davis schrieb:

  I think I figured out the problem, using an online regex tester for
  JavaScript:http://www.pagecolumn.com/tool/regtest.htm

  Note that the regex translation in JavaScript has a double backslash
  to escape the \d special character.  This fails standard regex test
  for JavaScript for inputs like abcd1234.

  ^(?=.*\\d)(?=.*[a-z]).{8,15}$

  If you replace the regex text with:

  ^(?=.*\d)(?=.*[a-z]).{8,15}$

  Then it works for JavaScript.  However, Java requires the character to
  be escaped.  I'm guessing Firefox simply interprets \\d as \d, which
  is why it passes, but IE is not as forgiving.  This seems like a bug
  in the GWT compiler.  It seems to me it should take the \\d and
  translate it to \d when compiling from Java to JavaScript.

  Can someone confirm?

  Regards,
  Davis

  On Aug 14, 9:44 am, davis davisf...@zenoconsulting.biz wrote:
   Hi, I have the following Java code to validate a password box.
   Basically it checks that the password can't be null, is between 8-15
   characters, and must contain both numbers and letters.

   public static boolean validatePassword(PasswordTextBox box, Label
   errorLabel) {
                   String text = box.getText();
                   if(text.isEmpty()) {
                           ValidatorUtil.onFailure(box, 
   custom.passwordMayNotBeNull(),
   errorLabel);
                           return false;
                   } if(text.length()  8 || text.length()  15) {
                           ValidatorUtil.onFailure(box, 
   custom.passwordHasInvalidLength(8, 15,
   text.length()), errorLabel);
                           return false;
                   } if(!text.matches(CustomMessages.REGEX_PASSWORD)) {
                           ValidatorUtil.onFailure(box, 
   custom.passwordHasInvalidFormat(),
   errorLabel);
                           return false;
                   }
                   return true;
           }

   This works fine in Firefox, but it does not work in IE.  The
   JavaScript compiles down to this for IE8:

   function validatePassword(box, errorLabel){
     var text, matchObj;
     text = $getPropertyString(box.element, 'value');
     if (!text.length) {
       setStyleName(box.element, 'validationFailedBorder', true);
       ($clinit_114() , errorLabel.element).innerText = 'You must provide
   a password.';
       return false;
     }
     if (text.length  8 || text.length  15) {
       onFailure_1(box, 'Sorry, your password must be between 8 and 15
   characters long (you have ' + text.length + ' characters).',
   errorLabel);
       return false;
     }
     if (!(matchObj = (new RegExp('^(?=.*\\d)(?=.*[a-z]).{8,15}$')).exec
   (text) , matchObj == null?false:text == matchObj[0])) {
       setStyleName(box.element, 'validationFailedBorder', true);
       ($clinit_114() , errorLabel.element).innerText = 'Sorry, your
   password must contain both letters [a-z] and numbers [0-9].';
       return false;
     }
     return true;

   }

   The behavior is a bit odd.  It passes the text.length checks, but then
   fails the regex expression (which also has length checks with {8,15}.
   It always prints: 'Sorry, your password must contain both letters [a-
   z] and numbers [0-9].' in IE, but in Firefox, it works fine...for
   inputs like this:

   abcd1234 - valid password, 8 characters with letters and numbers

   Even more strange is the fact that if I enter a password with 12
   characters with both letters and numbers, IE passes, like this:

   abcd1234abcd

   But if I enter only 11 characters, it fails:

   abcd1234abc

   Any clues on what is wrong here?

   Regards,
   Davis
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to 

Serializing interfaces in GWT Rpc

2009-08-14 Thread bconoly

Hey All,
Just to set the background I'm currently using JAXB to parse xml
when it's returned from the server and when I need to serialize the
objects it obviously doesn't work because GWT doesn't have access to
the jaxb source.

In order to get the RPC objects serializing correctly I had to
create a mirror of the object without any jaxb annotations or
marshaling included.  Now, when I receive the response objects I have
to manually loop through all of them and create mirrors of each
object.  This is definitely not preferred.

As an attempted solution I was trying to trick the GWT compiler
by creating an interface (without the jaxb dependencies) for the RPC
object to inherit.  Once completed I declared all my references as
this interface rather than the actual jaxb object.

My hope through all of this was that when GWT went to compile
these objects the compiler would grab the values off of the
implementation and pass them over to the client where the client would
not know of the implementation but would still be able to interact
with the interface methods.

My first question is, can the compiler compile the interface
without the source of the implementation?

Secondly, if I can, I'm currently getting a No source code is
available message for my interface even though the source is included
in the dependency jar along with the gwt.xml that's needed.  Does
anyone know why this is?

Thanks in advance
--~--~-~--~~~---~--~~
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: GXT widgets vs GWT widgets

2009-08-14 Thread brian.xiang

Hi Juraj,

Thanks for sharing your experience/advices!

How satisified are you in using pure GXT widgets to build your project? Did you 
use
GXT's 
MVC(http://extjs.com/deploy/gxtdocs/com/extjs/gxt/ui/client/mvc/package-summary.html)?
 Did you experience this problem: http://blog.gerardin.info/archives/40

Thanks again,
Brian

-Original Message-
From: Google-Web-Toolkit@googlegroups.com 
[mailto:google-web-tool...@googlegroups.com] On Behalf Of Juraj Vitko
Sent: Friday, August 14, 2009 10:19 AM
To: Google Web Toolkit
Subject: Re: GXT widgets vs GWT widgets


GXT offers consistent look, Accessibility, and localization.
And if I'm not mistaken, GXT uses layouts incompatible to GWT's layouts - I 
think you have to encapsulate a GWT widget into a BoxComponent to be able to 
use it in a GXT layout.

For quick and stable development, I'd go with GXT 100%, no mixing, only when 
building my own components.
If time permitted it, then for a visually appealing, snappy website or app I'd 
go with GWT + my own custom widgets (or 3rd party libs) built on top of GWT, 
and no mixing with GXT.
I may be wrong, because I haven't developed without GXT yet.


On Aug 14, 9:44 am, Daniel Jue teamp...@gmail.com wrote:
 From the few widget libs I have tried, they all feel heavy compared 
 to the base gwt ones.  You also have to think about the events and 
 handlers/listeners--often the widget lib will have it's own classes 
 for this (with the same names), and they are not compatible AFAIK.

 For SmartGWT I noticed there are even two types of events, handlers 
 and buttons--one for components in a special form widget, and one for 
 more regular widgets.

 So you have to weigh the added learning curve versus trying to style 
 something yourself or create the nice looking widgets you want..

 On Fri, Aug 14, 2009 at 3:37 AM, mars1412 martin.trum...@24act.at wrote:

  I also think the GWT widgets are more lightweight but usually I try 
  to use GXT widgets only, because then I have a consistent lookfeel.

  of course there are some exceptions to the rule :)

  On Aug 13, 8:02 pm, Mike michaeljr...@gmail.com wrote:
   I agree with your thinking.  I see the GWT widgets as being lighter.
   If there is a comparable GWT widget that fulfills all of my needs 
   I normally lean towards that.

   On Aug 13, 10:17 am, brian.xi...@thomsonreuters.com wrote:

Hi All,

We all know GXT offers a lots of advanced widgets. Some of the 
widgets overlap with GWT widgets. I am looking for some advice 
on choosing GXT widget or GWT widgets in the situation of they 
both offer the same type of widgets, maybe GXT widget is a bit more 
good looking.

My concern is that GXT widgets might not offer the same quality 
as GWT widgets on cross-browser compatiblity, styling and 
extending etc. I initial thought is I would only use GXT grid 
widget, which is the one
  we
are sure we need to use. Everything else, as long as GWT provide 
the function widget, I would choose GWT widget first. Such as 
for layout, I would use GWT panel widgets, and would not use GXT layout 
widgets etc.

I would appreciate if you can share your experience, advice on 
using
  GXT
widgets vs GWT widgets.

Thank you in advance!
Brian





--~--~-~--~~~---~--~~
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: At new item to a list at each position

2009-08-14 Thread Tobe

I think my current version is (nearly) like your FlexTable version.
The first layer is working, because it's just one FlexTable. In layer
2 there is one FlexTable for each different layer 1 FlexTable element.
The problems are just the NullPointerExceptions in layer 2 when I want
to access another FlexTable, than the last one, that is out of the
scope. How can I access this old FlexTables? Do I have to save them
in a vector or do I just have to define them in another scope? How
does it works?


On Aug 12, 8:38 pm, Ian Bambury ianbamb...@gmail.com wrote:
 OK, I understand the kind of problem now.
 You have an awful lot of possibilities to consider - you could have a
 tree-explorer setup for example.

 If you want the kind of look you have suggested, then I would probably (if
 it were me) consider the FlexTable approach you have suggested:

     - first line spans the whole width and contains details of the exam
 itself

     - after that, pairs of FlexTable lines - the first has cells with the
 various fields you want to display for the exam section header, the second
 spans the whole width and contains another widget with details of the
 exercises. This could be a flextable, or maybe a VP with each section
 displaying a class for the exercise.

 I would suggest (whatever my suggestion is worth) that you concentrate on
 the first level first. Basically you have the same design problem at each
 level - a list which requires the insertion of elements.

 You need to consider the abilities of your users - can they cope with
 left-click menus? Do they need blindingly obvious 'Insert A Line Here'
 buttons?

 The simplest answer all-round is to have 'Insert Here' buttons everywhere
 and insert two lines above- one is the new line, and one is a new 'Insert
 Here' button.

 A big concern is if you need to save this to a database (which you will
 unless this is just an academic exercise) and at what point do you do this.

 But the simple answer is a flextable

 InsertAbove Button
 Detail Line 
 InsertAbove  Button
 Detail Line InsertAbove  Button
 Detail Line InsertAbove  Button
 Detail Line InsertAbove  Button

 Once you have that working, create a similar class that does the exercise
 details and insert that into the detail line

 Does that make sense? If not, feel free to say so :-)

 Ian

 http://examples.roughian.com

 2009/8/12 Tobe tobias.jungnic...@googlemail.com





  What I forget to say is that the problems are the
  NullPointerExceptions when you add inner elements not at the last
  position.

  The project is about creating exams. The outer container are parts of
  the exams with a description what the part is about. The inner
  container are the exercise with a description what the students have
  to do.

  On Aug 12, 6:01 pm, Ian Bambury ianbamb...@gmail.com wrote:
   Hi Tobe,
   Sorry - what I meant was: can you give a use case example for what you
  are
   trying to do.

   I need more of an idea of how it will be used before I can get my head
   around this.

   For example, you might want to create a set of instructions (say a
  recipe)
   where everything is done in order so you need to be able to insert/append
   steps and move them up and down.

   I had a look at your example code and some of it works, but I'm getting
   NullPointerExceptions for addInner.

   I don't understand why you need addinner and addouter. A real-world
  example
   would help.

   Cheers,

   Ian

  http://examples.roughian.com

   2009/8/12 Tobe tobias.jungnic...@googlemail.com

@Ian:
ok, I have an example what I created so far.I used FlexTables, because
I think it's the right one for this problem.
All starts with a FlexTable and a button inside for new outer
elements. If the user clicks the button, there will be added one new
row with a TextBox and a button inside a new inner FlexTable to add a
new inner element and one row to add a new outer element at the end.
The user can add new outer elements after the first outer button and
at the end (after the second outer button) - so he can always add
outer elements at any position. If the user adds the inner button
there will be added, like the outer one, one new row to the inner
FlexTable with a new TextBox and one new row with a button to add new
inner elements. So shall be just this two layers and no third one, so
there will be added just TextBoxes in the inner FlexTable and no new
buttons to add inner-inner elements.
Here is my code:

package de.testgwt.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.FlexTable;
 

Re: Regex issue with IE

2009-08-14 Thread Thomas Broyer



On 14 août, 15:59, davis davisf...@zenoconsulting.biz wrote:
 I think I figured out the problem, using an online regex tester for
 JavaScript:http://www.pagecolumn.com/tool/regtest.htm

 Note that the regex translation in JavaScript has a double backslash
 to escape the \d special character.  This fails standard regex test
 for JavaScript for inputs like abcd1234.

 ^(?=.*\\d)(?=.*[a-z]).{8,15}$

 If you replace the regex text with:

 ^(?=.*\d)(?=.*[a-z]).{8,15}$

 Then it works for JavaScript.  However, Java requires the character to
 be escaped.  I'm guessing Firefox simply interprets \\d as \d, which
 is why it passes, but IE is not as forgiving.  This seems like a bug
 in the GWT compiler.  It seems to me it should take the \\d and
 translate it to \d when compiling from Java to JavaScript.

 Can someone confirm?

The problem I see is with your regex potentially (I mean, how it'll be
interpreted by the browser's JS engine). Why don't you simply write it
as either of the following?

   ^[a-z0-9]{8,15}$
   ^([a-z]|\d){8,15}$
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Centering my application

2009-08-14 Thread Charlie

Hey

I was wondering how to center my web application I tried some stuff I
found googling but nothing seems to work.

--~--~-~--~~~---~--~~
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: Centering my application

2009-08-14 Thread Charlie

Forgot to mention, when I wrote center I ment horizontally

On Aug 14, 7:29 pm, Charlie codeboo...@gmail.com wrote:
 Hey

 I was wondering how to center my web application I tried some stuff I
 found googling but nothing seems to work.
--~--~-~--~~~---~--~~
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: Regex issue with IE

2009-08-14 Thread Davis Ford

Thanks Thomas -- I don't have a good excuse other than I'm sick as a
dog today, and running at only 60% ;)

Honestly did not expect IE js regex implementation to not handle
lookaheads, but whatever...this simple solution will work great.  I'm
just leery of what other hidden issues lie out there.

On Fri, Aug 14, 2009 at 12:14 PM, Thomas Broyert.bro...@gmail.com wrote:

 The problem I see is with your regex potentially (I mean, how it'll be
 interpreted by the browser's JS engine). Why don't you simply write it
 as either of the following?

   ^[a-z0-9]{8,15}$
   ^([a-z]|\d){8,15}$
 --~--~-~--~~~---~--~~

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



Multiple Module XML Files?

2009-08-14 Thread Erik Uzureau

I am curious if it is possible to have multiple Module XML files for a
project.

I feel like someone mentioned this at some point in their talk at I/0,
but I just did a cursory search of the videos and slides and couldn't
find it.

Basically what I would like is a special MyApplication.gwt.xml file
which would be the main module file, and then a separate one,
MyApplication-debug.gwt.xml with all the i18n and some browser
permutations disabled.

Is this possible?

Any help greatly appreciated.

--Erik
--~--~-~--~~~---~--~~
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 and PHP

2009-08-14 Thread Isaac Truett

If you mean that you want to be able to type
http://virtualhostexample.com/Application.html; in the hosted mode
address bar and see the application running locally in the hosted
mode's embedded server, then couldn't you put virtualhostexample.com
in your hosts file and point it at 127.0.0.1? Or do you want the
hosted mode browser to view the application running on the actual
remote machine at virtualhostexample.com, in which case perhaps you
need the -noserver option? Or perhaps I'm not understanding your
request properly.


On Thu, Aug 13, 2009 at 11:47 PM, Tiago Z.Ctiag...@gmail.com wrote:
 Hi,
 Just more one question...
 Is possible change the default url of the hosted mode to an address of a
 virtual host? I searched on web and didn't find anything related to that.
 I would like to click to run the application and hosted mode starts on
 virtualhostexample.com/Application.html
 Thank you

 On Wed, Aug 12, 2009 at 10:40 PM, Tiago Z.C tiag...@gmail.com wrote:

 Ian
 I was not understand you because i have understand that the gwt code on
 time of running was execute like java bytecode on a servlet container like
 jetty, and just after the compile process the java code was transformed to
 javascript code.
 But know, i was looking for about -noserver option that you talk and find
 what i wanted. Now i can develop the way that i would like.
 Thank you, thank you very much!!!

 On Tue, Aug 11, 2009 at 8:34 PM, Ian Bambury ianbamb...@gmail.com wrote:

 2009/8/12 Tiago Z.C tiag...@gmail.com

 Ian
 If i do that, every time that i want to see the chances that i made on
 my app i will have to compile right? I have some doubts because with a 
 small
 project the compile process take around 30 seconds.

 Hi Tiago,
 No, you don't have to compile every time for the GWT code, it's the same
 as hosted mode, just refresh.
 For PHP code, you might have to refresh the hosted mode browser (not
 recompile, just F5), but you might not even have to do that. If your app has
 a search button which does a typical search, then provided just the PHP code
 has changed (and not the GWT code which displays the results), you can just
 click 'Search' again.
 Ian
 http://examples.roughian.com




 --
 Tiago Zortéa de Conto
 Mac User - MAC OS X Leopard
 MSN: tiag...@pop.com.br



 --
 Tiago Zortéa de Conto
 Mac User - MAC OS X Leopard
 MSN: tiag...@pop.com.br

 


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

2009-08-14 Thread Alex

Hi,

I'm using Eclipse 3.5 with the GWT for Eclipse plugin. When I try to
run the application generated by the New Project Wizard, I get the
following error message on the console:

** Unable to load Mozilla for hosted mode **
java.lang.UnsatisfiedLinkError: /home/alex/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.linux_1.7.0.v200907291526/gwt-
linux-1.7.0/mozilla-1.7.12/libxpcom.so: libstdc++.so.5: cannot open
shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1005)
at com.google.gwt.dev.shell.moz.MozillaInstall.load
(MozillaInstall.java:190)
at com.google.gwt.dev.BootStrapPlatform.initHostedMode
(BootStrapPlatform.java:53)
at com.google.gwt.dev.HostedModeBase.init(HostedModeBase.java:362)
at com.google.gwt.dev.SwtHostedModeBase.init(SwtHostedModeBase.java:
98)
at com.google.gwt.dev.HostedMode.init(HostedMode.java:271)
at com.google.gwt.dev.HostedMode.main(HostedMode.java:230)

Any hints on how I can fix this problem myself? Workarounds are also
welcome.

Alex

PS: I'm using Easy Peasy 1.1 on a 901 EEEpc

--~--~-~--~~~---~--~~
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: Creating and Importing GWT Independent Modules

2009-08-14 Thread Claudemir Todo Bom


Is there a way to develop a reusable library side-by-side with another
project? without using any jars?

for example, i have a GWT in package com.example.application.client
everything worked on it... then I added a new package to my eclipse
project, calling it com.example.utils (side question: do I need to put
client here too?), it didtn't worked... looks like the gwt.xml is all
fine, but both gwt compiler and host mode refuses to run this way,
telling that I may forgot to inherit some required module (I did
placed the inherit tag for utils on aplication.gwt.xml)

I want this to avoid the pain to have to package a jar and import it
on my application everytime I change my utils library. This way I
should be able to debug and edit both packages together, then, when
the library is ready, I can export it to a jar. For now, my library is
a subpackage of application.

Best Regards,
Claudemir


On Aug 3, 8:28 pm, Sumit Chandel sumitchan...@google.com wrote:
 Hi Lucas,
 You can follow the steps below to package an existing module, say module A
 defined in project A, that you want to reuse in another project, say project
 B that defines module B which itself defines an entrypoint class.

 1) Create / move all the GWT code that you want to reuse in project A.

 2) Create / update the module XML file for module A in the normal way,
 except you no longer need to define an entry point class.

 3) Create a JAR for project A (project-a.jar), which should include 1) GWT
 source code that you want to reuse from the project, 2) The module XML file,
 3) Any other public resources referenced by the module XML file,  4) The
 binary .class files for any server-side code that you want to reuse

 4) Add the project-a.jar file to the project B classpath, as well as any
 other launch configurations related to project B (typically hosted mode and
 compile configurations).

 5) Reference the module A xml file from the module B xml file (e.g.
 inherits name=com.google.projectA.ModuleA /). Note that since the module
 A xml file should already include the inherits
 name=com.google.gwt.user.User / inherits tag, you shouldn't need to add
 that reference again to the module B xml file.

 You should be ready to go. Give those instructions a try and let us know if
 you managed to package and reuse your module.

 Hope that helps,
 -Sumit Chandel

 On Fri, Jul 31, 2009 at 10:37 AM, Lucas Neves Martins 
 snown...@gmail.comwrote:



  Nope,

  Can anybody give a step-by-step ?

  On 29 jul, 10:49, Nuno brun...@gmail.com wrote:
   you dont need to do much thing for this...
   just create your gwt library project, you dont need to define any
   entrypoints.

   after, just click with your right button on your project, then export,
  then
   select java package

   after you only need to import
   this jar on the other project you want to use it, and on the module
   xml make reference to the xml of the library.

   you can find an example on my blog.http://tcninja.blogspot.com

   On Wed, Jul 29, 2009 at 10:10 AM, Lucas Neves Martins 
  snown...@gmail.comwrote:

I looked it up all over the internet, but I only found this link :

   http://developerlife.com/tutorials/?p=229

I need to create a .jar with gwt views (those .java in the client
package) and then import it to other gwt project, much like they do
with the SmartGwt api.

How they did the SmartGwt api? Where is the Docs/Tutorial/Whitepapers
on how to create and export GWT modules?

I follow the instructions on this link above, but it just doesn't
work, when I try to compile it, I get an error telling me that the
compiler couldn't find the class I am using, even the class is on the /
lib dir, and in my buildpath, and in the .xml with a declared inherit.

Does anybody know how do I do that?

   --
   Quer aprender a programar? acompanhe:
   Wants to learn GWT? Follow this blog -

  http://tcninja.blogspot.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
-~--~~~~--~~--~--~---



Easier fix for broken hosted mode on Snow Leopard

2009-08-14 Thread johnw188

I've seen some discussion about patching out Java 1.5 checks and
hacking at the Snow Leopard Java installs, which seemed like an
incredibly complex way of solving the problem. My solution was simply
to copy a leopard Java 1.5 install over to my Snow Leopard /System/
Library/Frameworks/JavaVM.framework/Versions, and then point Eclipse
at that library for my GWT projects.

As people on SL may not have a leopard box handy, I zipped my leopard
Java 1.5 and uploaded it to

files.me.com/johnwelsh/pn6hua

If you delete all the 1.5 folders in Snow leopard (they all just point
to 1.6), expand that zip in /System/Library/Frameworks/
JavaVM.framework/Versions, and then create a symlink from 1.5.0/ to
1.5/ everything should work great.

--John

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



Retrival of data from excel

2009-08-14 Thread hunter

Hi ,
I am new to gwt,I am building a dashboard and for that i need to
get the data from excel sheet.Can anyone suggest me the possibel ways
to retirve the data??

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



Dockpanel Layout Issues with Internet Explorer

2009-08-14 Thread DogenX

Hi!

I have built up a website/web-application with GWT and have used the
Dockpanel. I have no problems with the layout and the whole
appearance, when I load it with any browser..except the MS
Internet Explorer!!!

I have uploaded a dummy, so you can take a look at it

http://www.slimf.de/r2/vahid/Saied/Website/war/GWTDummy.html


If you use IE the layout is stretched, when you do the following:
Click on Menu2 and then on Main. Now if you go on Menu1 you get
the original layout back, because the Submenues are opened.

The whole problem does not occurr when you use e.g. Firefox.

Does Anyone know where the problem is? If you need any additional
information, then just tell me.


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-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: RequestBuilder response content-type

2009-08-14 Thread Rosfran Borges


Hi,
Are you trying to access a service on another domain? For instance, if
the domain of your application differs from the URL you want to send a
HTTP GET, the sandbox where your GWT application runs will not allow
you to complete the request, and will send back the statusCode equals
to 0.
I am facing the same problem; there are a lot of solutions, please see
this: 
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/48413bdb6e5b292#msg_71f28d8b382e7f04
and this
http://code.google.com/p/google-web-toolkit/issues/detail?id=3131

[]'s
Rosfran Borges

On 14 ago, 09:50, Thomas Broyer t.bro...@gmail.com wrote:
 On 14 août, 11:07, grue michael.gruetz...@googlemail.com wrote:

  Hi,

  I try to make an HTTP request via RequestBuilder. The problem is that
  no valid response is returned by Response.getText() and
  Response.getStatusCode() returns 0. I found out that the problem might
  be that
  the response content-type is text/plain while RequestBuilder only
  supports application/xml and application/json.
  Is that true?

 No, that's plain wrong.

  If yes, what's the reason for this? How can I get around
  this issue?

 This most likely means there's been an error (most likely a network
 error). I know for sure that Firefox also calls your callback and sets
 status==0 when you navigate away from the page (or refresh it, which
 is equivalent).

--~--~-~--~~~---~--~~
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: Quick fix for broken hosted mode with Snow Leopard 10A380 on x86_64

2009-08-14 Thread johnw188

I had an easier solution, as I'm dual booting Leopard and Snow
Leopard. I simply copied over my Leopard Java 1.5 install to snow
leopard's /System/Library/Frameworks/JavaVM.framework/Versions/, added
the new library to Eclipse, and selected it in my GWT project.
Everything works great, as far as I can tell.

I know a bunch of people on snow leopard might not have a leopard
install handy, so I zipped my 1.5 directory. Just expand it to /System/
Library/Frameworks/JavaVM.framework/Versions/

http://files.me.com/johnwelsh/pn6hua

--John

On Jun 20, 10:50 am, kugutsumen kugutsu...@gmail.com wrote:
 This is going to become a real issue in September when Mac OS X 10.6
 starts shipping.

 Cross-compiling works but hosted mode is broken.

 Darwin wolf 10.0.0b1 Darwin Kernel Version 10.0.0b1: Fri May 29
 00:02:02 PDT 2009; root:xnu-1456~1/RELEASE_I386 i386

 /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java
 -version
 java version 1.6.0_13
 Java(TM) SE Runtime Environment (build 1.6.0_13-b03-208)
 Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02-81, mixed mode)

 GWT 0.0.0 At revision 5593.

 /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java
 You must use a Java 1.5 runtime to use GWT Hosted Mode on Mac OS X.

 If I skip the Java 1.5 test...  UnsatisfiedLinkError is thrown.

 On Mac OS X, ensure that you have Safari 3 installed.
 Exception in thread main java.lang.UnsatisfiedLinkError: Unable to
 load required native library 'gwt-ll'.  Detailed error:
 /Users/Shared/tank/pub/devel/gwt/gwt-mac-0.0.0/libgwt-ll.jnilib:  no
 suitable image found.  Did find:  /Users/Shared/tank/pub/devel/gwt/gwt-
 mac-0.0.0/libgwt-ll.jnilib: no matching architecture in universal
 wrapper)

 $ file /Users/Shared/tank/pub/devel/gwt/gwt-mac-0.0.0/libgwt-ll.jnilib
 /Users/Shared/tank/pub/devel/gwt/gwt-mac-0.0.0/libgwt-ll.jnilib: Mach-
 O universal binary with 2 architectures
 /Users/Shared/tank/pub/devel/gwt/gwt-mac-0.0.0/libgwt-ll.jnilib (for
 architecture i386):     Mach-O bundle i386
 /Users/Shared/tank/pub/devel/gwt/gwt-mac-0.0.0/libgwt-ll.jnilib (for
 architecture ppc):      Mach-O bundle ppc

 libgwt-ll.jnilib is prebuilt so adding -arch x86_64 to jni/mac/
 Makefile has no effect.

 I managed to get gwt hosted mode to work by patching  isJava5 to
 always return true:

 --- ./dev/mac/src/com/google/gwt/dev/BootStrapPlatform.java.orig
 2009-06-21 00:42:40.0 +0700
 +++ ./dev/mac/src/com/google/gwt/dev/BootStrapPlatform.java     2009-06-20
 22:44:17.0 +0700
 @@ -115,7 +115,7 @@
     * 64-bit.
     */
    private static boolean isJava5() {
 -    return System.getProperty(java.version).startsWith(1.5);
 +    return true; /* System.getProperty(java.version).startsWith
 (1.5); */
    }

    /**

 Then I hacked a 32bit only version of the 1.6 JRE by stripping the
 x86_64 architecture:

 cd /System/Library/Frameworks/JavaVM.framework/Versions
 cp -pPR 1.6.0 1.6.0_32bit
 cd !$
 for bin in `find . -type f -exec file {} \; | grep 'Mach-O universal
 binary with 2 architectures' | sed -e 's/:.*//' ` ; do ditto --rsrc --
 arch i386 $bin $bin.tmp.app ; mv $bin.tmp.app $bin ; done

 Added /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0_32bit/
 Home in  Eclipse - Preferences - Java - Installed JRE  and selected
 it.

 Really ugly fix but at least hosted mode works.

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



small bug in google code documentation for GWT RPC

2009-08-14 Thread gerste

I'm sorry, I don't know where to provide this feedback. Maybe you can
point me to the right place.

I think I found a small mistake in the docs for GWT. It's really minor
but maybe confusing people completely new to the topic.

It's in:
http://code.google.com/webtoolkit/tutorials/1.6/RPC.html

so look under  in Getting Started - Tutorials - Client Server
Communication - GWT RPC
under Handling Exceptions in the part Update the stock price
service implementation: StockPriceServiceImpl

This is the part where you add the DelistedException to the
StockPriceServiceImpl class. The places to change are highlighted, but
if people CopyPaste the complete source code from the example they
copy the greater than operator of the for loop, which should be a
lower than. It's correct in the upper example without the exception
handling.

...
StockPrice[] prices = new StockPrice[symbols.length];
for (int i=0; isymbols.length; i++) {
  if (symbols[i].equals(ERR)) {
...

should be:
for (int i=0; isymbols.length; i++) {

as it is in the Write the server-side implementation part.

Thx,
gerste

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



swing developer converting desktop app to web app -stumped

2009-08-14 Thread fluidnotion

I've been teaching myself gwt for about a month. My current project is
to convert a swing based desktop app into a web app. I promised my
employer I could figure this out, so I've been skim reading  taking
leaps of logic trying to save time. Ironic.
I've successfully reorganised the business logic, that's no problem.
My main problem that has currently got me stumped though is that I
can't get my GUI to display correctly in the browser. I used the gxt
examples mainly adapting them  weaving them together. But when I run
in hosted mode there is no theme, the widgets are not displaying the
way they are packed. I even replaced all the gwt widgets left with gxt
ones eg: swopping VerticalPanel for LayoutContainers with VBoxLayouts
set- there was no change.
The TabPanel doesn't display at all  only the first TabItem added
shows.
I've been looking for a solution for the last few days insuring the
html inherts gxt-all.css seems to be a dead end.
I suspect it's something simple I'm overlooking. I just need an
experienced developer to take a look. I also can't get any of the
samples from gxt-2.0.1 to work in eclipse. If I could get hold of a
single working gxt sample as an eclipse project I could work it out.
(I used netbeans before but switched to eclipse for the gxt plugin
support.)
Once I have the GUI displaying correctly, I do a bit of binding hook
up some handlers  I'll be done, I'm way my deadline. My boss is
giving me looks.
Please 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-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
-~--~~~~--~~--~--~---



GWT Stackpanel, load panel content dynamically via RPC?

2009-08-14 Thread Trevis

So with TabPanel there is an addBeforeSelectionHandler() method which
allows me to show the tab header and delay loading the content until
the tab is selected, how can i do this same thing with StackPanel? I
don't see where i could hook that in.

What i'm considering is creating a set of nested stack panels that
generate themselves dynamically.  When you click a panel header, it
makes an RPC call to see if there is a need to show a sub-stackpanel,
or content.  I guess i could do something similar with a tree (using
the addOpenHandler() method) but stack panel i think would work better
for how i'd like to interact with it.

I guess worst case scenario could perhaps create a custom component
which detects if it is being shown, and then have it populate itself
via an rpc call... But it sure would be nice to have an event fire
when the panels in the stack change.

I haven't found much info on onBrowserEvent, i wonder if that would
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-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: Eclipse Run Problem

2009-08-14 Thread Jan Weitz
Hi Alex,

check if you have installed libstdc++.so.5

You will also find some tutorials around especially for this case.

Greets,

Jan

2009/8/14 Alex alex.jong...@gmail.com


 Hi,

 I'm using Eclipse 3.5 with the GWT for Eclipse plugin. When I try to
 run the application generated by the New Project Wizard, I get the
 following error message on the console:

 ** Unable to load Mozilla for hosted mode **
 java.lang.UnsatisfiedLinkError: /home/alex/eclipse/plugins/
 com.google.gwt.eclipse.sdkbundle.linux_1.7.0.v200907291526/gwt-
 linux-1.7.0/mozilla-1.7.12/libxpcom.so: libstdc++.so.5: cannot open
 shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1005)
at com.google.gwt.dev.shell.moz.MozillaInstall.load
 (MozillaInstall.java:190)
at com.google.gwt.dev.BootStrapPlatform.initHostedMode
 (BootStrapPlatform.java:53)
at com.google.gwt.dev.HostedModeBase.init(HostedModeBase.java:362)
at
 com.google.gwt.dev.SwtHostedModeBase.init(SwtHostedModeBase.java:
 98)
at com.google.gwt.dev.HostedMode.init(HostedMode.java:271)
at com.google.gwt.dev.HostedMode.main(HostedMode.java:230)

 Any hints on how I can fix this problem myself? Workarounds are also
 welcome.

 Alex

 PS: I'm using Easy Peasy 1.1 on a 901 EEEpc

 


--~--~-~--~~~---~--~~
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: Dockpanel Layout Issues with Internet Explorer

2009-08-14 Thread Ian Bambury
2009/8/14 DogenX manmachi...@gmx.de


 If you need any additional information, then just tell me.


Some code would help. Actually, the whole project would be ideal - I'd be
happy to take a quick look if you want to send it direct.

What doctype are you using? Usually if you have the right doctype and you
level the browsers' css (e.g. get rid of all the default padding and so on)
and then build it up again as you want it, most of these problems are
avoided, but there are some very strange cases where tables and divs keep
their height when they should shrink and the only solution I have found is
to set a border on one side of 2px or greater (1px doesn't work for some
reason) and make it the same colour as the background. It's usually Firefox
which plays me up, though.

Ian

http://examples.roughian.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: Centering my application

2009-08-14 Thread Ian Bambury
.app
{
margin  :   0 auto;
}

Ian

http://examples.roughian.com


2009/8/14 Charlie codeboo...@gmail.com


 Forgot to mention, when I wrote center I ment horizontally

 On Aug 14, 7:29 pm, Charlie codeboo...@gmail.com wrote:
  Hey
 
  I was wondering how to center my web application I tried some stuff I
  found googling but nothing seems to work.
 


--~--~-~--~~~---~--~~
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: Who is using smartgwt?

2009-08-14 Thread Chris


Ok, I have started with smartgwt, like the look and feel.  I am
looking into using gwt-rpc as a datasource.

There is this sticky thread on the smartclient forum:
http://forums.smartclient.com/showthread.php?t=4814

Is this the info you used to figure out how to make a gwt rpc
datasource?

Maybe I should take this ove to the smartclient forum.  I am posting
this here
in case someone else is looking for the same info.

-chris


On Aug 13, 4:00 pm, Daniel Jue teamp...@gmail.com wrote:
 I am using it.  Once I got the extra layers of code implemented for the RPC
 Datasource (mostly from off thier forum), It's been pretty painless.  I came
 from GXT 2 because I was having some rendering problems and wanted to try
 something else.  SmartGWT _is_ painfully slow in hosted mode, but the
 widgets are very nice and full featured.  My favorite so far is the combo
 box where the elements have sortable columns, etc like a grid.

 On Thu, Aug 13, 2009 at 6:36 PM, Chris chdi...@gmail.com wrote:

  So there is a new version:
 http://www.jroller.com/sjivan/entry/smartgwt_1_2_released

  So far I have just been using standard gwt and gwt Incubator.
  Smartgwt looks like it has some great widgets and layouts.

  I would be curious to here from anyone who is using it.  Either way
  I am going to give it a try.  I like the fact that it is lgpl.

  -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: Who is using smartgwt?

2009-08-14 Thread Malte

Hi all,

For a few month a had the same problems: GXT or SmartGWT and I choose
GXT. Ok now why?
The main reason was the speed. Cause the extjs team recreated the
whole library in pure GWT code, what make it amazing fast. But that
was for a few month. Currently SmartGWT has nearly the same
performance, but I think the main reason is that the browsers are now
much faster (I am using Firefox 3.5). Currently I am thinking again,
but I am not a fan of wrapper libraries. I know there is a lot of work
in creating SmartGWT, but there are some disadvantages:
1. When the GWT compiler gets better and can optimize more and more,
the SmartGWT library will not get any of these advantages.
2. Loading time! Sure after the first load the load time will be equal
to pure GWT application. But the first time is the time where the user
decides to stay on this page or not... in most cases there is no
second chance.
3. Upcoming features like runAsync bring no advantages.

Greetz
Malte

--~--~-~--~~~---~--~~
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: At new item to a list at each position

2009-08-14 Thread Tobe

What do you mean by getting it as a widget from the cell in the main
flextable. Sorry, I think I have a mental block.

On Aug 14, 6:19 pm, Ian Bambury ianbamb...@gmail.com wrote:
 If I understand you correctly, you should be able to get the nested
 flextable by getting it as a widget from the cell in the main flextable and
 casting it.
 Ian

 http://examples.roughian.com

 2009/8/14 Tobe tobias.jungnic...@googlemail.com





  I think my current version is (nearly) like your FlexTable version.
  The first layer is working, because it's just one FlexTable. In layer
  2 there is one FlexTable for each different layer 1 FlexTable element.
  The problems are just the NullPointerExceptions in layer 2 when I want
  to access another FlexTable, than the last one, that is out of the
  scope. How can I access this old FlexTables? Do I have to save them
  in a vector or do I just have to define them in another scope? How
  does it works?

  On Aug 12, 8:38 pm, Ian Bambury ianbamb...@gmail.com wrote:
   OK, I understand the kind of problem now.
   You have an awful lot of possibilities to consider - you could have a
   tree-explorer setup for example.

   If you want the kind of look you have suggested, then I would probably
  (if
   it were me) consider the FlexTable approach you have suggested:

       - first line spans the whole width and contains details of the exam
   itself

       - after that, pairs of FlexTable lines - the first has cells with the
   various fields you want to display for the exam section header, the
  second
   spans the whole width and contains another widget with details of the
   exercises. This could be a flextable, or maybe a VP with each section
   displaying a class for the exercise.

   I would suggest (whatever my suggestion is worth) that you concentrate on
   the first level first. Basically you have the same design problem at each
   level - a list which requires the insertion of elements.

   You need to consider the abilities of your users - can they cope with
   left-click menus? Do they need blindingly obvious 'Insert A Line Here'
   buttons?

   The simplest answer all-round is to have 'Insert Here' buttons everywhere
   and insert two lines above- one is the new line, and one is a new 'Insert
   Here' button.

   A big concern is if you need to save this to a database (which you will
   unless this is just an academic exercise) and at what point do you do
  this.

   But the simple answer is a flextable

   InsertAbove Button
   Detail Line 
   InsertAbove  Button
   Detail Line InsertAbove  Button
   Detail Line InsertAbove  Button
   Detail Line InsertAbove  Button

   Once you have that working, create a similar class that does the exercise
   details and insert that into the detail line

   Does that make sense? If not, feel free to say so :-)

   Ian

  http://examples.roughian.com

   2009/8/12 Tobe tobias.jungnic...@googlemail.com

What I forget to say is that the problems are the
NullPointerExceptions when you add inner elements not at the last
position.

The project is about creating exams. The outer container are parts of
the exams with a description what the part is about. The inner
container are the exercise with a description what the students have
to do.

On Aug 12, 6:01 pm, Ian Bambury ianbamb...@gmail.com wrote:
 Hi Tobe,
 Sorry - what I meant was: can you give a use case example for what
  you
are
 trying to do.

 I need more of an idea of how it will be used before I can get my
  head
 around this.

 For example, you might want to create a set of instructions (say a
recipe)
 where everything is done in order so you need to be able to
  insert/append
 steps and move them up and down.

 I had a look at your example code and some of it works, but I'm
  getting
 NullPointerExceptions for addInner.

 I don't understand why you need addinner and addouter. A real-world
example
 would help.

 Cheers,

 Ian

http://examples.roughian.com

 2009/8/12 Tobe tobias.jungnic...@googlemail.com

  @Ian:
  ok, I have an example what I created so far.I used FlexTables,
  because
  I think it's the right one for this problem.
  All starts with a FlexTable and a button inside for new outer
  elements. If the user clicks the button, there will be added one
  new
  row with a TextBox and a button inside a new inner FlexTable to add
  a
  new inner element and one row to add a new outer element at the
  end.
  The user can add new outer elements after the first outer button
  and
  at the end (after the second outer button) - so he can always add
  outer elements at any position. If the user adds the inner button
  there will be added, like the outer one, one new row to the inner
  FlexTable with a 

Re: ImageBundle using AlphaImageLoader don't allow events to fire properly

2009-08-14 Thread Damon Lundin

I went ahead and filed 
http://code.google.com/p/google-web-toolkit/issues/detail?id=3951
in case anyone else comes across this.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



commons-logging for server side code not showing in Eclipse

2009-08-14 Thread Marley

I have been having this issue for a while and it has finally reached
the point where it is painful.  I am using commons-logging for server
side service code and i can not get my log statements to display in
the Eclipse console.  Can anyone help me?
--~--~-~--~~~---~--~~
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: At new item to a list at each position

2009-08-14 Thread Ian Bambury
Presumably you know where they are, so you can do something like:

FlexTable levelTwoFlexTable = (FlexTable) levelOneFlexTable.getWidget(row,
column);

BTW, though I'm not sure why you are getting your exceptions, here''s a way
to add rows anywhere - you'd need two versions - one for adding a level-2
flextable to a level-1 flextable, and another to deal with adding rows to
your level-2 flextable. And you'd probably be better off with labels styled
as links rather than buttons...

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.Label;

public class AddRowButton extends Button implements ClickHandler
{
private static int c = 0;

public AddRowButton()
{
super(Add Row Here);
addClickHandler(this);
}

@Override
public void onClick(ClickEvent event)
{
Button b = (Button) event.getSource();
FlexTable f = (FlexTable) b.getParent();
int r = f.getCellForEvent(event).getRowIndex();
f.insertRow(r);
f.setWidget(r, 0, new AddRowButton());
f.insertRow(r + 1);
// Change the next line so it adds a level-2 flextable
f.setWidget(r + 1, 0, new Label(Level 2 Flextable  + ++c + 
here));
}
}


If you want to try it, then all you need is the following in your
onModuleLoad()


FlexTable f = new FlexTable();
f.setWidget(0, 0, new AddRowButton());
RootPanel.get().add(f);

Ian

http://examples.roughian.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: Who is using smartgwt?

2009-08-14 Thread Daniel Jue
Yep, that is the link I used.  I like generics, so I went with the version
on page 7 I believe.  Modified it, posted mods on page 14.
http://forums.smartclient.com/showthread.php?t=4814page=14

It's non trivial to do with with generics, but I have lots of objects to
make datasources for.  Perhaps I'll turn it into more of a bean model in the
future.  However it doesn't have to be hard.  The code you want to take
advantage of is in the SmartGWT-Extentions lib, which I link
to.


The GWT RPC Datasource seem so be the key to making a real app in Smartgwt.

As far as the bridges, at some point I had to write similar code when I was
using GXT.  I believe my dtos in GXT were just a wrapper around a
mapstring,serializable etc, to work as a bean model in their widgets, etc.

On Fri, Aug 14, 2009 at 1:51 PM, Chris chdi...@gmail.com wrote:



 Ok, I have started with smartgwt, like the look and feel.  I am
 looking into using gwt-rpc as a datasource.

 There is this sticky thread on the smartclient forum:
 http://forums.smartclient.com/showthread.php?t=4814

 Is this the info you used to figure out how to make a gwt rpc
 datasource?

 Maybe I should take this ove to the smartclient forum.  I am posting
 this here
 in case someone else is looking for the same info.

 -chris


 On Aug 13, 4:00 pm, Daniel Jue teamp...@gmail.com wrote:
  I am using it.  Once I got the extra layers of code implemented for the
 RPC
  Datasource (mostly from off thier forum), It's been pretty painless.  I
 came
  from GXT 2 because I was having some rendering problems and wanted to try
  something else.  SmartGWT _is_ painfully slow in hosted mode, but the
  widgets are very nice and full featured.  My favorite so far is the combo
  box where the elements have sortable columns, etc like a grid.
 
  On Thu, Aug 13, 2009 at 6:36 PM, Chris chdi...@gmail.com wrote:
 
   So there is a new version:
  http://www.jroller.com/sjivan/entry/smartgwt_1_2_released
 
   So far I have just been using standard gwt and gwt Incubator.
   Smartgwt looks like it has some great widgets and layouts.
 
   I would be curious to here from anyone who is using it.  Either way
   I am going to give it a try.  I like the fact that it is lgpl.
 
   -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: Obtain business categories by Local Search

2009-08-14 Thread Arthur Kalmenson

I think you're on the wrong mailing list...

--
Arthur Kalmenson



On Mon, Aug 10, 2009 at 7:58 PM, Elinawuyun...@gmail.com wrote:

 Anybody can follow up this question?

 On Aug 4, 3:14 pm, Elina wuyun...@gmail.com wrote:
 Hi all,

 It is known that Google categorizes local businesses for ads (http://
 code.google.com/apis/adwords/docs/developer/
 adwords_api_categories.html). I wonder whether it is possible to get
 the category information of Local Search results and how? Any idea?

 


--~--~-~--~~~---~--~~
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: Who is using smartgwt?

2009-08-14 Thread ckendrick

Hi Malte,

As far as once-ever load time, if you're building an enterprise
application with several screens and lots of productivity features,
you're going to be using substantially all of SmartClient - if it was
written in Java, the impact of the GWT compiler's static analysis
would be negligible.  If you're building something more trivial, just
a few components and basic interactions, it doesn't really matter what
you use, anything will do.

On performance, SmartGWT is already more than fast enough in terms of
UI interactions.  It doesn't matter whether a menu appears in 40
milliseconds or 60, humans literally cannot perceive that difference.
So, while I would argue that future changes to the GWT compiler are
not going to beat SmartClient's hand-coded JavaScript, it doesn't
matter anyway, it makes no perceptible difference.

What does matter for real world performance is a feature like Adaptive
Filtering, which radically cuts down on trips to the server, improving
responsiveness and scalability:

   
http://www.smartclient.com/smartgwt/showcase/#grid_adaptive_filter_featured_category

SmartGWT has half a dozen other features that make similar, real world
impacts on performance.  This is what actually matters in a deployed
application.


On Aug 14, 10:59 am, Malte mlegenhau...@gmail.com wrote:
 Hi all,

 For a few month a had the same problems: GXT or SmartGWT and I choose
 GXT. Ok now why?
 The main reason was the speed. Cause the extjs team recreated the
 whole library in pure GWT code, what make it amazing fast. But that
 was for a few month. Currently SmartGWT has nearly the same
 performance, but I think the main reason is that the browsers are now
 much faster (I am using Firefox 3.5). Currently I am thinking again,
 but I am not a fan of wrapper libraries. I know there is a lot of work
 in creating SmartGWT, but there are some disadvantages:
 1. When the GWT compiler gets better and can optimize more and more,
 the SmartGWT library will not get any of these advantages.
 2. Loading time! Sure after the first load the load time will be equal
 to pure GWT application. But the first time is the time where the user
 decides to stay on this page or not... in most cases there is no
 second chance.
 3. Upcoming features like runAsync bring no advantages.

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



CodeSplitting

2009-08-14 Thread Saeed Zarinfam

Hi all
I have problem that will solve with CodeSplitting feature. I want to
know which GWT version included this feature and if does not release
yet when release.

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



Textbox event key code not case sensitive?

2009-08-14 Thread rakesh wagh

Today While extending the TextBox, I encountered very strange
behaviour.
All alphabets returned by event.getNativeKeyCode() are upper case.
Here is sample program:

public class TextBox extends com.google.gwt.user.client.ui.TextBox{
public TextBox() {
super();
addKeyDownHandler(new KeyDownHandler(){
public void onKeyDown(KeyDownEvent event) {
int key = event.getNativeKeyCode();
System.out.println(key:  + (char)key);
}
}
}
}

Enter characters in lower case, it will print upper case to the
console. I thought of checking with the group before raising it as an
issue. Any idea on what's going on here?

Thanks,
Rakesh Wagh
--~--~-~--~~~---~--~~
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: Eclipse Run Problem

2009-08-14 Thread Alex

Thanx,

problem solved.

Alex

On Aug 14, 7:21 pm, Jan Weitz weitz@googlemail.com wrote:
 Hi Alex,

 check if you have installed libstdc++.so.5

 You will also find some tutorials around especially for this case.

 Greets,

 Jan

 2009/8/14 Alex alex.jong...@gmail.com



  Hi,

  I'm using Eclipse 3.5 with the GWT for Eclipse plugin. When I try to
  run the application generated by the New Project Wizard, I get the
  following error message on the console:

  ** Unable to load Mozilla for hosted mode **
  java.lang.UnsatisfiedLinkError: /home/alex/eclipse/plugins/
  com.google.gwt.eclipse.sdkbundle.linux_1.7.0.v200907291526/gwt-
  linux-1.7.0/mozilla-1.7.12/libxpcom.so: libstdc++.so.5: cannot open
  shared object file: No such file or directory
         at java.lang.ClassLoader$NativeLibrary.load(Native Method)
         at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778)
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674)
         at java.lang.Runtime.load0(Runtime.java:770)
         at java.lang.System.load(System.java:1005)
         at com.google.gwt.dev.shell.moz.MozillaInstall.load
  (MozillaInstall.java:190)
         at com.google.gwt.dev.BootStrapPlatform.initHostedMode
  (BootStrapPlatform.java:53)
         at com.google.gwt.dev.HostedModeBase.init(HostedModeBase.java:362)
         at
  com.google.gwt.dev.SwtHostedModeBase.init(SwtHostedModeBase.java:
  98)
         at com.google.gwt.dev.HostedMode.init(HostedMode.java:271)
         at com.google.gwt.dev.HostedMode.main(HostedMode.java:230)

  Any hints on how I can fix this problem myself? Workarounds are also
  welcome.

  Alex

  PS: I'm using Easy Peasy 1.1 on a 901 EEEpc
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Is there a way so I can use ProjectRun AsRun on Server functionality while using the new GWT eclipse plugin?

2009-08-14 Thread jmpeace

I've been using Cypal Studio so far, as it provides this
functionality.  Is there a way to do that with the new plug in?  How
could I launch the project in web mode without compiling every time?

I have this situation since the client side of my app is almost
finished and I don't really need to transcode it very often.

Any suggestion would be greatly appreciated.
--~--~-~--~~~---~--~~
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: CodeSplitting

2009-08-14 Thread Paul Robinson

It's in GWT 2.0, which isn't released yet. But you can still use it now
if you compile GWT yourself from trunk.

See http://code.google.com/p/google-web-toolkit/wiki/CodeSplitting

Paul

Saeed Zarinfam wrote:
 Hi all
 I have problem that will solve with CodeSplitting feature. I want to
 know which GWT version included this feature and if does not release
 yet when release.

 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: GWT architecture MVP/EventBus (mentioned at Google I/O)

2009-08-14 Thread plcoirier

 One question though:

 The first line creates a Java class thanks to the configuration file
 and a Generator.
 For example, with the following configuration file:

 How is that class generated from the configuration file? (Sorry to ask
 if it's obvious.)
 Will the argument of the generated Command always be named form? Can
 it be changed?
I answered these questions here (http://groups.google.com/group/mvp4g/
browse_thread/thread/d8ee207598bf02fa)


 event type=displayMessage calledMethod=onDisplayMessage
 handlers=rootPresenter eventObjectClass=java.lang.String /

 Isn't displayMessage and onDisplayMessage redundant? I, for one,
 wouldn't mind simply:

 event type=displayMessage handlers=rootPresenter
 eventObjectClass=java.lang.String /

 and expect onDisplayMessage to be called automatically (ie. event
 click fires onClick())
Good idea, I created an issue to make the calledMethod optional.


 Other than that, +1! It sure got my attention.
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
-~--~~~~--~~--~--~---



Serializing types that have only been included as a map generic in remote interface fails

2009-08-14 Thread pgraham

Hi all,

I believe I have encountered a bug with gwt serialization and Maps.

I have created a service with a single method that has an AbstractMap
as its only parameter.

public interface DataService extends RemoteService {

public ChartData getChartData(AbstractMapFilterTypeDto,
ListBaseDto filters);
}

When I invoke this method from the client side I get this error:

org.sitebrand.report.gwt.dto.FilterTypeDto
at
org.sitebrand.report.gwt.service.DataService_TypeSerializer.raiseSerializationException
(transient source for
org.sitebrand.report.gwt.service.DataService_TypeSerializer:2403)
at
org.sitebrand.report.gwt.service.DataService_TypeSerializer.serialize
(Native Method)
at
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize
(ClientSerializationStreamWriter.java:216)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject
(AbstractSerializationStreamWriter.java:129)
at
com.google.gwt.user.client.rpc.core.java.util.Map_CustomFieldSerializerBase.serialize
(Map_CustomFieldSerializerBase.java:49)
at
com.google.gwt.user.client.rpc.core.java.util.HashMap_CustomFieldSerializer.serialize
(HashMap_CustomFieldSerializer.java:36)
at
org.sitebrand.report.gwt.service.DataService_TypeSerializer.serialize
(Native Method)
at
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize
(ClientSerializationStreamWriter.java:216)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject
(AbstractSerializationStreamWriter.java:129)
at org.sitebrand.report.gwt.service.DataService_Proxy.getChartData
(transient source for
org.sitebrand.report.gwt.service.DataService_Proxy:31)

If I add a dummy method to the service that defines the type that is
failing to serialize as a parameter (see example) then calls to the
getChartData() method work.

public interface DataService extends RemoteService {

public void bleh(FilterTypeDto dto);

public void getChartData(AbstractMapFilterTypeDto, ListBaseDto
filters);
}

Has anyone else encountered this and found a solution that doesn't
involve cluttering your service interface?

Cheers,
Philip
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Changing a Frame's contents when HTML widgets are clicked.

2009-08-14 Thread Paul

I am running Eclipse with GWT and I have a Frame that I want to update
(refresh) it's contents when a selection is clicked from the
StackPanel.  When I run it right now it does not load the new web page
unless I click refresh several times.  Here is some of the code I'm
using.

StackPanel classes = new StackPanel();
DockPanel mainPanel = new DockPanel();
VerticalPanel cs211s1 = new VerticalPanel();
Frame syllabi = new Frame(http://www.google.com/;);
mainPanel.add(syllabi,DockPanel.CENTER);
syllabi.setSize(440px, 440px);

if(History.getToken().length() == 1)
{
//mainPanel.remove(syllabi);
syllabi.setUrl(http://www.gmail.com/;);
}
else
{
syllabi.setUrl(http://docs.google.com/;);
}

Hyperlink cs211syl1 = new Hyperlink(Syllabus, s);
cs211s1.add(cs211syl1);
classes.add(cs211s1, CS 211 Sec. 1);
mainPanel.add(classes, DockPanel.WEST);

RootPanel.get().add(mainPanel);

Any help would be greatly appreciated.

--~--~-~--~~~---~--~~
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: Changing a Frame's contents when HTML widgets are clicked.

2009-08-14 Thread Ian Bambury
It really shouldn't ever show you anything except Google Docs.
You set the frame to Google, then immediately check the history token length
(which will be zero) and change it to Google Docs.

End of.

Unless you set some kind of history listener then clicking on the hyperlink
will change the bookmark, but there's nothing there to react to it, so
nothing is going to happen.

Try something like this (make sure you have the history frame in your html)


import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.user.client.History;
import com.google.gwt.user.client.ui.DockPanel;
import com.google.gwt.user.client.ui.Frame;
import com.google.gwt.user.client.ui.Hyperlink;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.StackPanel;
import com.google.gwt.user.client.ui.VerticalPanel;

public class MainController implements EntryPoint,
ValueChangeHandlerString
{

Frame syllabi = new Frame(http://www.google.com/;);

@Override
public void onModuleLoad()
{
StackPanel classes = new StackPanel();
DockPanel mainPanel = new DockPanel();
VerticalPanel cs211s1 = new VerticalPanel();
mainPanel.add(syllabi, DockPanel.CENTER);
syllabi.setSize(440px, 440px);
Hyperlink cs211syl1 = new Hyperlink(Syllabus, s);
cs211s1.add(cs211syl1);
classes.add(cs211s1, CS 211 Sec. 1);
mainPanel.add(classes, DockPanel.WEST);
RootPanel.get().add(mainPanel);
History.addValueChangeHandler(this);
}
@Override
public void onValueChange(ValueChangeEventString event)
{
if(History.getToken().length() == 1)
{
syllabi.setUrl(http://www.gmail.com/;);
}
else
{
syllabi.setUrl(http://docs.google.com/;);
}
}
}

And unless you have a good reason for it, I'd swap the DockPanel and VP for
divs

Ian

http://examples.roughian.com


2009/8/14 Paul paul.stonek...@gmail.com


 I am running Eclipse with GWT and I have a Frame that I want to update
 (refresh) it's contents when a selection is clicked from the
 StackPanel.  When I run it right now it does not load the new web page
 unless I click refresh several times.  Here is some of the code I'm
 using.

StackPanel classes = new StackPanel();
DockPanel mainPanel = new DockPanel();
VerticalPanel cs211s1 = new VerticalPanel();
Frame syllabi = new Frame(http://www.google.com/;);
mainPanel.add(syllabi,DockPanel.CENTER);
syllabi.setSize(440px, 440px);

if(History.getToken().length() == 1)
{
//mainPanel.remove(syllabi);
syllabi.setUrl(http://www.gmail.com/;);
}
else
{
syllabi.setUrl(http://docs.google.com/;);
}

Hyperlink cs211syl1 = new Hyperlink(Syllabus, s);
cs211s1.add(cs211syl1);
classes.add(cs211s1, CS 211 Sec. 1);
mainPanel.add(classes, DockPanel.WEST);

RootPanel.get().add(mainPanel);

 Any help would be greatly appreciated.

 


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



Browser refresh button

2009-08-14 Thread javier

Hi there:

there's plenty of documentation regarding the handling of the
browser's back button with GWT's History tracking.  I understand the
concept of mapping a String token to a specific application state.

Does GWT provide a mechanism to notify the application whenever the
user clicks the browser's refresh button? (ie the equivalent to
History.addValueChangeHandler() for the back button).

Is there a recommended strategy for handling the browser's refresh
button in the context of a GWT app?  I'm curious to learn how are your
applications currently dealing with this.

Thanks in advance for any comments and suggestions.

Javier.


--~--~-~--~~~---~--~~
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: Browser refresh button

2009-08-14 Thread Ian Bambury
All you get to work with is the state held in the history token, stuff in
cookies ... you can log the user back in to the application and use anything
you have on the server, but basically it's a refresh and if the user wanted
it in the state it was in before they hit F5, they wouldn't have hit F5.
You have to ask yourself what the user is trying to achieve by refreshing -
do they really want all the form fields filled with what was there before,
or are they trying to start again in the same condition but with a blank
form?

My strategy is to get the user back to the state they were in when they
first came to the page being shown if possible. (I use the word 'page' in a
GWT sense)

Ian

http://examples.roughian.com


2009/8/14 javier jasand...@gmail.com


 Hi there:

 there's plenty of documentation regarding the handling of the
 browser's back button with GWT's History tracking.  I understand the
 concept of mapping a String token to a specific application state.

 Does GWT provide a mechanism to notify the application whenever the
 user clicks the browser's refresh button? (ie the equivalent to
 History.addValueChangeHandler() for the back button).

 Is there a recommended strategy for handling the browser's refresh
 button in the context of a GWT app?  I'm curious to learn how are your
 applications currently dealing with this.

 Thanks in advance for any comments and suggestions.

 Javier.


 


--~--~-~--~~~---~--~~
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: Inheritance and String Serialization issues

2009-08-14 Thread shay

i found 2 issues 2552 , and 2557, which were identified at version
1.5  , i believe they found their way back .

Shay

On Aug 14, 1:18 am, shay matas...@gmail.com wrote:
 Hi ,

 I am experiencing some issues with serialization of simple strings.

 I created classes A, B and C . where B inherits A , and C inherits B.

 A and B are abstract.

 myRPCcall is simple it takes and returns a class of type A.

 fields in all 3 classes are strings.

 all 3 classes are defined as public , and all their fields are
 public.

 B and C implement IsSerializable .

 the first issue that i see is that only fields  that are defined in
 class C get serialized to the server, and the same happens on the
 return trip.all the fields from A and B have null values.

 the second issue is that when i add the interface IsSerializable to
 class A , i get an
 com.google.gwt.user.client.rpc.SerializationException

 Any advice?

 Thanks,Shay
--~--~-~--~~~---~--~~
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: Textbox event key code not case sensitive?

2009-08-14 Thread Thomas Broyer



On 14 août, 21:37, rakesh wagh rake...@gmail.com wrote:
 Today While extending the TextBox, I encountered very strange
 behaviour.
 All alphabets returned by event.getNativeKeyCode() are upper case.
 Here is sample program:

 public class TextBox extends com.google.gwt.user.client.ui.TextBox{
         public TextBox() {
                         super();
                         addKeyDownHandler(new KeyDownHandler(){
                                 public void onKeyDown(KeyDownEvent event) {
                                         int key = event.getNativeKeyCode();
                                         System.out.println(key:  + 
 (char)key);
                                 }
                         }
         }

 }

 Enter characters in lower case, it will print upper case to the
 console. I thought of checking with the group before raising it as an
 issue. Any idea on what's going on here?

You're confusing key codes with characters. Key codes (as well as
keydown and keyup events) are really about keyboard *keys* that you
depress (or at least should be, as it differs a bit amongst browsers).

This was really confusing in GWT 1.5 and previous versions, since GWT
1.6 and the new events, it's a bit clearer, but still somewhat buggy
(see issue 3753: 
http://code.google.com/p/google-web-toolkit/issues/detail?id=3753
)

See also issues 72 (among others): 
http://code.google.com/p/google-web-toolkit/issues/detail?id=72

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



Ancho Links + Hosted Browser

2009-08-14 Thread Stream

When I add a link like this:
 a href=#LoginLogin/a
in my static html... and then try to click that link in the hosted
browser, the url in the hosted browser is not updated. If i compile/
browse in safari, the url is updated and the link works as expected.

Am I missing understanding how this should work or is this a bug in
the hosted browser?

My environment is:
 -Mac OS X 10.5.7
 -eclipse 3.4

--~--~-~--~~~---~--~~
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: Regex issue with IE

2009-08-14 Thread Thomas Broyer



On 14 août, 18:31, Davis Ford davisf...@zenoconsulting.biz wrote:
 Thanks Thomas -- I don't have a good excuse other than I'm sick as a
 dog today, and running at only 60% ;)

 Honestly did not expect IE js regex implementation to not handle
 lookaheads, but whatever...this simple solution will work great.  I'm
 just leery of what other hidden issues lie out there.

Well actually, the regexps I proposed aren't equivalent to yours:
yours will match passwords containing non-alphanumeric chars (provided
they contain at least a number and a letter), while mine will only
match passwords containing *only* numbers and letters.

But given that you already checked the input length, why not just
search for those chars that your expecting? Something like:

   if (!text.matches(.*\\d.*) || !text.matches(.*[a-z].*)) { ... }

If I were you, I'd try using JSNI too:
  private native boolean matchesPasswordFormat(String text) /*-{
return /^(?=.*\d)(?=.*[a-z]).{8,15}$/.test(text);
  }-*/;
or
  private native boolean matchesPasswordFormat(String text) /*-{
return text.search(/\d/) = 0  text.search(/[a-z]/) = 0;
  }-*/;
--~--~-~--~~~---~--~~
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: Changing a Frame's contents when HTML widgets are clicked.

2009-08-14 Thread Paul

That does exactly what I want it to do in the Hosted Mode browser,
when I compile and run it in Firefox it redirects the entire site to
whichever link was supposed to be only inside the Frame.

Once launched in Firefox it shows Google.com in the Frame as it
should.  Once I click Syllabus and it changes to google docs it
redirects the page completely and shows google docs just like you
would see google docs regularly.  Good-bye app.  I'll tinker with it
some.

I'm not sure if I need to publish it to the server to resolve this
issue or if this will cause quirks later.
Thanks Ian for the tip, that solved one problem. :)

On Aug 14, 5:27 pm, Ian Bambury ianbamb...@gmail.com wrote:
 It really shouldn't ever show you anything except Google Docs.
 You set the frame to Google, then immediately check the history token length
 (which will be zero) and change it to Google Docs.

 End of.

 Unless you set some kind of history listener then clicking on the hyperlink
 will change the bookmark, but there's nothing there to react to it, so
 nothing is going to happen.

 Try something like this (make sure you have the history frame in your html)

 import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.event.logical.shared.ValueChangeEvent;
 import com.google.gwt.event.logical.shared.ValueChangeHandler;
 import com.google.gwt.user.client.History;
 import com.google.gwt.user.client.ui.DockPanel;
 import com.google.gwt.user.client.ui.Frame;
 import com.google.gwt.user.client.ui.Hyperlink;
 import com.google.gwt.user.client.ui.RootPanel;
 import com.google.gwt.user.client.ui.StackPanel;
 import com.google.gwt.user.client.ui.VerticalPanel;

 public class MainController implements EntryPoint,
 ValueChangeHandlerString
 {

     Frame syllabi = new Frame(http://www.google.com/;);

     @Override
     public void onModuleLoad()
     {
         StackPanel classes = new StackPanel();
         DockPanel mainPanel = new DockPanel();
         VerticalPanel cs211s1 = new VerticalPanel();
         mainPanel.add(syllabi, DockPanel.CENTER);
         syllabi.setSize(440px, 440px);
         Hyperlink cs211syl1 = new Hyperlink(Syllabus, s);
         cs211s1.add(cs211syl1);
         classes.add(cs211s1, CS 211 Sec. 1);
         mainPanel.add(classes, DockPanel.WEST);
         RootPanel.get().add(mainPanel);
         History.addValueChangeHandler(this);
     }
     @Override
     public void onValueChange(ValueChangeEventString event)
     {
         if(History.getToken().length() == 1)
         {
             syllabi.setUrl(http://www.gmail.com/;);
         }
         else
         {
             syllabi.setUrl(http://docs.google.com/;);
         }
     }

 }

 And unless you have a good reason for it, I'd swap the DockPanel and VP for
 divs

 Ian

 http://examples.roughian.com

 2009/8/14 Paul paul.stonek...@gmail.com





  I am running Eclipse with GWT and I have a Frame that I want to update
  (refresh) it's contents when a selection is clicked from the
  StackPanel.  When I run it right now it does not load the new web page
  unless I click refresh several times.  Here is some of the code I'm
  using.

                 StackPanel classes = new StackPanel();
                 DockPanel mainPanel = new DockPanel();
                 VerticalPanel cs211s1 = new VerticalPanel();
                 Frame syllabi = new Frame(http://www.google.com/;);
                 mainPanel.add(syllabi,DockPanel.CENTER);
                 syllabi.setSize(440px, 440px);

                 if(History.getToken().length() == 1)
                 {
                         //mainPanel.remove(syllabi);
                         syllabi.setUrl(http://www.gmail.com/;);
                 }
                 else
                 {
                         syllabi.setUrl(http://docs.google.com/;);
                 }

                 Hyperlink cs211syl1 = new Hyperlink(Syllabus, s);
                 cs211s1.add(cs211syl1);
                 classes.add(cs211s1, CS 211 Sec. 1);
                 mainPanel.add(classes, DockPanel.WEST);

                 RootPanel.get().add(mainPanel);

  Any help would be greatly appreciated.
--~--~-~--~~~---~--~~
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: Changing a Frame's contents when HTML widgets are clicked.

2009-08-14 Thread Ian Bambury
I think docs and gmail probably break out of frames and reload themselves
for security reasons - try something less contentious :-)
Ian

http://examples.roughian.com


2009/8/15 Paul paul.stonek...@gmail.com


 That does exactly what I want it to do in the Hosted Mode browser,
 when I compile and run it in Firefox it redirects the entire site to
 whichever link was supposed to be only inside the Frame.

 Once launched in Firefox it shows Google.com in the Frame as it
 should.  Once I click Syllabus and it changes to google docs it
 redirects the page completely and shows google docs just like you
 would see google docs regularly.  Good-bye app.  I'll tinker with it
 some.

 I'm not sure if I need to publish it to the server to resolve this
 issue or if this will cause quirks later.
 Thanks Ian for the tip, that solved one problem. :)

 On Aug 14, 5:27 pm, Ian Bambury ianbamb...@gmail.com wrote:
  It really shouldn't ever show you anything except Google Docs.
  You set the frame to Google, then immediately check the history token
 length
  (which will be zero) and change it to Google Docs.
 
  End of.
 
  Unless you set some kind of history listener then clicking on the
 hyperlink
  will change the bookmark, but there's nothing there to react to it, so
  nothing is going to happen.
 
  Try something like this (make sure you have the history frame in your
 html)
 
  import com.google.gwt.core.client.EntryPoint;
  import com.google.gwt.event.logical.shared.ValueChangeEvent;
  import com.google.gwt.event.logical.shared.ValueChangeHandler;
  import com.google.gwt.user.client.History;
  import com.google.gwt.user.client.ui.DockPanel;
  import com.google.gwt.user.client.ui.Frame;
  import com.google.gwt.user.client.ui.Hyperlink;
  import com.google.gwt.user.client.ui.RootPanel;
  import com.google.gwt.user.client.ui.StackPanel;
  import com.google.gwt.user.client.ui.VerticalPanel;
 
  public class MainController implements EntryPoint,
  ValueChangeHandlerString
  {
 
  Frame syllabi = new Frame(http://www.google.com/;);
 
  @Override
  public void onModuleLoad()
  {
  StackPanel classes = new StackPanel();
  DockPanel mainPanel = new DockPanel();
  VerticalPanel cs211s1 = new VerticalPanel();
  mainPanel.add(syllabi, DockPanel.CENTER);
  syllabi.setSize(440px, 440px);
  Hyperlink cs211syl1 = new Hyperlink(Syllabus, s);
  cs211s1.add(cs211syl1);
  classes.add(cs211s1, CS 211 Sec. 1);
  mainPanel.add(classes, DockPanel.WEST);
  RootPanel.get().add(mainPanel);
  History.addValueChangeHandler(this);
  }
  @Override
  public void onValueChange(ValueChangeEventString event)
  {
  if(History.getToken().length() == 1)
  {
  syllabi.setUrl(http://www.gmail.com/;);
  }
  else
  {
  syllabi.setUrl(http://docs.google.com/;);
  }
  }
 
  }
 
  And unless you have a good reason for it, I'd swap the DockPanel and VP
 for
  divs
 
  Ian
 
  http://examples.roughian.com
 
  2009/8/14 Paul paul.stonek...@gmail.com
 
 
 
 
 
   I am running Eclipse with GWT and I have a Frame that I want to update
   (refresh) it's contents when a selection is clicked from the
   StackPanel.  When I run it right now it does not load the new web page
   unless I click refresh several times.  Here is some of the code I'm
   using.
 
  StackPanel classes = new StackPanel();
  DockPanel mainPanel = new DockPanel();
  VerticalPanel cs211s1 = new VerticalPanel();
  Frame syllabi = new Frame(http://www.google.com/;);
  mainPanel.add(syllabi,DockPanel.CENTER);
  syllabi.setSize(440px, 440px);
 
  if(History.getToken().length() == 1)
  {
  //mainPanel.remove(syllabi);
  syllabi.setUrl(http://www.gmail.com/;);
  }
  else
  {
  syllabi.setUrl(http://docs.google.com/;);
  }
 
  Hyperlink cs211syl1 = new Hyperlink(Syllabus, s);
  cs211s1.add(cs211syl1);
  classes.add(cs211s1, CS 211 Sec. 1);
  mainPanel.add(classes, DockPanel.WEST);
 
  RootPanel.get().add(mainPanel);
 
   Any help would be greatly appreciated.
 


--~--~-~--~~~---~--~~
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 1.7 Now Available

2009-08-14 Thread Steve Nies

Please forgive this newbie post but I am under extreme schedule
pressure and cant find an answer anywhere on the web.  Can anyone tell
me if JSPs using Java 1.5 features can now run under hosted mode
within Eclipse 3.4?  If so would someone please post a how-to?  Any
help would be greatly appreciated - thanks in advance.

Steve

On Jul 23, 5:04 am, Sumit Chandel sumitchan...@google.com wrote:
 Thanks for the correction, Gert.
 The correct download link to get GWT 1.7.0 is either (as Gert mentioned) is
 either:

 1) From the official download site:http://code.google.com/download.html

 2) From the list of proper search results on the GWT project 
 page:http://code.google.com/p/google-web-toolkit/downloads/list?can=3

 Cheers,
 -Sumit Chandel

 On Thu, Jul 23, 2009 at 12:29 AM, Gert Scholten gsch...@gmail.com wrote:

  On Jul 23, 12:54 am, Bruce Johnson br...@google.com wrote:
   Download here:
 http://code.google.com/p/google-web-toolkit/downloads/list?can=1q=GW...

  This link only lists the linux version (the search doesn't seem to
  work properly, or at least I can't figure out what it is searching
  in).

  Official download site:
 http://code.google.com/webtoolkit/download.html

  Featured download, currently lists GWT 1.7.0, for all platforms:
 http://code.google.com/p/google-web-toolkit/downloads/list?can=3

  Regards,
    Gert

--~--~-~--~~~---~--~~
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: Inheritance and String Serialization issues

2009-08-14 Thread shay

sorry its 2551

Shay

On Aug 14, 7:11 pm, shay matas...@gmail.com wrote:
 i found 2 issues 2552 , and 2557, which were identified at version
 1.5  , i believe they found their way back .

 Shay

 On Aug 14, 1:18 am,shaymatas...@gmail.com wrote:

  Hi ,

  I am experiencing some issues with serialization of simple strings.

  I created classes A, B and C . where B inherits A , and C inherits B.

  A and B are abstract.

  myRPCcall is simple it takes and returns a class of type A.

  fields in all 3 classes are strings.

  all 3 classes are defined as public , and all their fields are
  public.

  B and C implement IsSerializable .

  the first issue that i see is that only fields  that are defined in
  class C get serialized to the server, and the same happens on the
  return trip.all the fields from A and B have null values.

  the second issue is that when i add the interface IsSerializable to
  class A , i get an
  com.google.gwt.user.client.rpc.SerializationException

  Any advice?

  Thanks,Shay
--~--~-~--~~~---~--~~
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: Changing a Frame's contents when HTML widgets are clicked.

2009-08-14 Thread Paul

That was a little too easy of a fix.  Thanks.

On Aug 14, 7:17 pm, Ian Bambury ianbamb...@gmail.com wrote:
 I think docs and gmail probably break out of frames and reload themselves
 for security reasons - try something less contentious :-)
 Ian

 http://examples.roughian.com

 2009/8/15 Paul paul.stonek...@gmail.com





  That does exactly what I want it to do in the Hosted Mode browser,
  when I compile and run it in Firefox it redirects the entire site to
  whichever link was supposed to be only inside the Frame.

  Once launched in Firefox it shows Google.com in the Frame as it
  should.  Once I click Syllabus and it changes to google docs it
  redirects the page completely and shows google docs just like you
  would see google docs regularly.  Good-bye app.  I'll tinker with it
  some.

  I'm not sure if I need to publish it to the server to resolve this
  issue or if this will cause quirks later.
  Thanks Ian for the tip, that solved one problem. :)

  On Aug 14, 5:27 pm, Ian Bambury ianbamb...@gmail.com wrote:
   It really shouldn't ever show you anything except Google Docs.
   You set the frame to Google, then immediately check the history token
  length
   (which will be zero) and change it to Google Docs.

   End of.

   Unless you set some kind of history listener then clicking on the
  hyperlink
   will change the bookmark, but there's nothing there to react to it, so
   nothing is going to happen.

   Try something like this (make sure you have the history frame in your
  html)

   import com.google.gwt.core.client.EntryPoint;
   import com.google.gwt.event.logical.shared.ValueChangeEvent;
   import com.google.gwt.event.logical.shared.ValueChangeHandler;
   import com.google.gwt.user.client.History;
   import com.google.gwt.user.client.ui.DockPanel;
   import com.google.gwt.user.client.ui.Frame;
   import com.google.gwt.user.client.ui.Hyperlink;
   import com.google.gwt.user.client.ui.RootPanel;
   import com.google.gwt.user.client.ui.StackPanel;
   import com.google.gwt.user.client.ui.VerticalPanel;

   public class MainController implements EntryPoint,
   ValueChangeHandlerString
   {

       Frame syllabi = new Frame(http://www.google.com/;);

       @Override
       public void onModuleLoad()
       {
           StackPanel classes = new StackPanel();
           DockPanel mainPanel = new DockPanel();
           VerticalPanel cs211s1 = new VerticalPanel();
           mainPanel.add(syllabi, DockPanel.CENTER);
           syllabi.setSize(440px, 440px);
           Hyperlink cs211syl1 = new Hyperlink(Syllabus, s);
           cs211s1.add(cs211syl1);
           classes.add(cs211s1, CS 211 Sec. 1);
           mainPanel.add(classes, DockPanel.WEST);
           RootPanel.get().add(mainPanel);
           History.addValueChangeHandler(this);
       }
       @Override
       public void onValueChange(ValueChangeEventString event)
       {
           if(History.getToken().length() == 1)
           {
               syllabi.setUrl(http://www.gmail.com/;);
           }
           else
           {
               syllabi.setUrl(http://docs.google.com/;);
           }
       }

   }

   And unless you have a good reason for it, I'd swap the DockPanel and VP
  for
   divs

   Ian

  http://examples.roughian.com

   2009/8/14 Paul paul.stonek...@gmail.com

I am running Eclipse with GWT and I have a Frame that I want to update
(refresh) it's contents when a selection is clicked from the
StackPanel.  When I run it right now it does not load the new web page
unless I click refresh several times.  Here is some of the code I'm
using.

               StackPanel classes = new StackPanel();
               DockPanel mainPanel = new DockPanel();
               VerticalPanel cs211s1 = new VerticalPanel();
               Frame syllabi = new Frame(http://www.google.com/;);
               mainPanel.add(syllabi,DockPanel.CENTER);
               syllabi.setSize(440px, 440px);

               if(History.getToken().length() == 1)
               {
                       //mainPanel.remove(syllabi);
                       syllabi.setUrl(http://www.gmail.com/;);
               }
               else
               {
                       syllabi.setUrl(http://docs.google.com/;);
               }

               Hyperlink cs211syl1 = new Hyperlink(Syllabus, s);
               cs211s1.add(cs211syl1);
               classes.add(cs211s1, CS 211 Sec. 1);
               mainPanel.add(classes, DockPanel.WEST);

               RootPanel.get().add(mainPanel);

Any help would be greatly appreciated.
--~--~-~--~~~---~--~~
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, 

[gwt-contrib] Re: Clean up GWTCompiler output

2009-08-14 Thread Brad L

I like the Linking message because it means the compiler is almost
done. :)

brad

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: UiBinder and Model View Presenter

2009-08-14 Thread Andrés Testi

Amir:

Your answer is very interesting and detailed. Thank you very much for
taking your time to answer my question. I will take a look in PureMVC.
One of my big concerns is the translation of JSR 303 validations to
client side.
Regards.

- Andrés

On 13 ago, 18:36, Amir Kashani amirkash...@gmail.com wrote:
 For my last work project, we used Kiyaa!, a GWT library that offers its own
 declarative UI system (and data-binding). In addition, we used PureMVC as a
 very lightweight MVC-framework. If you're familiar with PureMVC, you'll know
 that it's much closer to MVP, as described by Ray Ryan, than it is a
 traditional MVC framework. They worked beautifully together. Here's our
 basic setup:

    - *Views *- these are the plain UI components represented with Kyiaa!
    templates. They're smart enough to display Model data and handle any UI
    interactions, but delegate all business logic to their Mediators. They have
    a Listener interface that is implemented by the Mediator, which has
    high-level callback methods, such as onRegister, onNewCustomer, etc 
 rather
    than onClick.
    - *Mediator *- responsible for managing the views by facilitating
    communication between the View and the rest of the system. They send and
    receive Notifications that are handled by other Mediators or by Commands.
    More specifically, they provide model data to the View as it's available 
 and
    handle user-triggered events from the view, etc. The mediators have NO
    references to any Widgets or other UI components. Their only interaction
    with the View is from callbacks through the defined interface and through
    the View's public API, which is generally fairly-high level as well. 
 Because
    of this, it's easy to re-use UI components by having a different Mediator
    controlling the UI.

    - *Model* - these are your basic domain objects. They should be POJOs and
    have no concept of the rest of the system. Period.
    - *Proxy* - a Proxy's basic role is to provide a high-level API for
    managing the Model. Depending on the complexity of your domain object, it
    could be as simple as having methods such as addUser, deleteUser, etc. Or,
    for complex Models, such as a Word Document object, can have methods such 
 as
    setTitle(), etc.

 In our setup, Proxys take the former role, basically encapsulating all RPC
 logic, implementing client-side caching, etc. You call methods on a Proxy,
 such as saveUser, and it sends Notifications to the rest of the system when
 something interesting happens. Proxy's NEVER receive notifications, however.
 They are not interested in the rest of the system, including the UI (or even
 that there is a UI), and theoretically, along with the models, should
 function completely on their own, making them highly reusable.

    - *Command* - a Command is a place where you encode complex interactions.
    For example, if your application has a search function, you may have a
    SearchCommand that
       1. Receives the search query
       2. Calls the appropriate Proxy to do the RPC hit
       3. Loads the Mediator that will be interested in the Proxy's response,
       if not already loaded

 The SearchCommand would be triggered by a notification sent from some
 Mediator. The idea is to stick the logic into a re-usable Command rather
 than encoding it into a Mediator directly, as it may be needed from multiple
 places.

 The great part about this design and MVP is, that if we want to switch to
 UIBinder, all we have to do is modify the View classes. No other part of the
 system would have to change one-bit.

 Another quick note on PureMVC: it's kind of a disservice to it to call it an
 MVC framework, as there's very little code involved in the framework.
 Rather, it's a set of concepts and principles that have been very well
 defined, that if followed correctly, lead to highly-reusable and easily
 testable components. Even if you don't use the framework, I highly recommend
 reading their best 
 practices:http://puremvc.org/component/option,com_wrapper/Itemid,174/

 - Amir

 On Thu, Aug 13, 2009 at 2:27 AM, Andrés Testi andres.a.te...@gmail.comwrote:



  How the UiBinder fits in the MVP architecture proposed at the google I/
  O talks? (http://code.google.com/intl/es-AR/events/io/sessions/
  GoogleWebToolkitBestPractices.html)
  Regards.

  - Andrés
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: DTO compiler optimization

2009-08-14 Thread Nathan Wells

yeah, that looks nice...

On Aug 13, 9:35 pm, Gary Miller miller.ga...@gmail.com wrote:
 You might find this interesting, kind of related.

 Generalized RPC for server-enhanced 
 objectshttp://groups.google.com/group/Google-Web-Toolkit-Contributors/browse...
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Issue With Debugging with JDK 1.6.0_14 Has Been Resolved in JDK 1.6.0_16

2009-08-14 Thread Rajeev Dayal
Hi,
As some of you may recall, there as an issue with debugging if you're using
JDK 1.6.0_14. You'll find that your breakpoints are not hit. More details on
the issue can be found here:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6862295

This issue has been recently fixed in JDK 1.6.0_16. See
http://java.sun.com/javase/6/webnotes/6u16.html for details.



Thanks,
Rajeev

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] GWT Mosaic XUL Showcase

2009-08-14 Thread ggeorg

Hi,

this is the first showcase of the http://code.google.com/p/gwt-mosaic-xul/
project.

It tries to mimic mozilla XUL and http://thinlet.sourceforge.net/
project.

So far the XML parser runs server side. A generator is also planned.

Let me know what you think about it?

Kind Regards,
George.
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] UIBinder and the new Layout system

2009-08-14 Thread brett.wooldridge

I have been tracking the process of the UIBinder and the new pure CSS-
based layout system being driven by Joel at google.  I assume these
two will play nicely together in 2.0?  Or will custom parsers be
needed to use UIBinder with the new layout system?  Sounds like the
UIBinder parsers API won't be ready for public consumption in the
first release.

Lastly, will the new layout system be the *defacto* layout system in
2.0?  Please say yes.


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: UIBinder and the new Layout system

2009-08-14 Thread Joel Webber
Brett,
I am going to be writing adding custom parsers for the new layout panels
sometime soon. And the new layout system will be de facto in the sense
that I'm updating all the samples to use it (and possibly adding another
sample). We obviously won't be removing the old widgets (e.g., StackPanel)
that won't play nice in standards mode until a later release, so we don't
break anyone's existing projects.

Cheers,
joel.

On Fri, Aug 14, 2009 at 11:17 AM, brett.wooldridge 
brett.wooldri...@gmail.com wrote:


 I have been tracking the process of the UIBinder and the new pure CSS-
 based layout system being driven by Joel at google.  I assume these
 two will play nicely together in 2.0?  Or will custom parsers be
 needed to use UIBinder with the new layout system?  Sounds like the
 UIBinder parsers API won't be ready for public consumption in the
 first release.

 Lastly, will the new layout system be the *defacto* layout system in
 2.0?  Please say yes.


 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Clean up GWTCompiler output

2009-08-14 Thread Katharina Probst
I've got this.

kathrin


On Thu, Aug 13, 2009 at 11:48 PM, Bruce Johnson br...@google.com wrote:

 End this email below is what it looks like when I run the compiler on a
 modified Hello sample using the default compiler log level. How is the
 signal-to-noise ratio? I think it's not great.


 A few areas for improvement:

 - Lower the log level for Creating Split Point Map file for SOYC; seems
 like this should be TRACE, since they don't actually have info that is
 really context-relevant; it's more telling you what code path the compiler
 itself is following; it might seem more useful if it listed the file name.

 - Maybe get rid of Done; the presence of subsequent outdented logs
 should make it clear enough that the preceding step has finished

 - Lower the log level of permutation timings to INFO

 - Decide how to make the permutation counting look like it makes sense; in
 particular, specifying I of N, you expect the indices to range 1..N
 rather than 0..(N-1). Every time I see that last mesage 8 of 9 I keep
 feeling disappointed that I never see 9 of 9 :-)

 - Lower the log level of the Linking subtree, and specify what war
 directory is being linked into, such as Linking into war at
 /usr/local/myproject/war


 Also, on another note, when you run the compiler with -treeLogger, we still
 get some console noise that looks like this:

 Permutation took 516 ms

 Permutation took 284 ms

 Permutation took 187 ms

 Permutation took 147 ms

 Permutation took 196 ms

 Permutation took 131 ms

 Permutation took 177 ms

 Permutation took 140 ms

 Permutation took 134 ms


 I think we have a stray System.out?


 In the end, it seems like the default log level ought to produce treelogger
 output that looks like this:


 Compiling module com.google.gwt.sample.hello.Hello

 Compilation succeeded -- 6.889s

 Arguably, it should even be silent unless there's a problem.

 Thoughts? Anyone eager to write a patch for changes along these lines?

 -- Bruce

 === Actual log below ===


 Compiling module com.google.gwt.sample.hello.Hello

Compiling 9 permutations

Worker permutation 0 of 9

   Creating Split Point Map file for SOYC

  Done

 Permutation took 294 ms

Worker permutation 1 of 9

   Creating Split Point Map file for SOYC

  Done

 Permutation took 291 ms

Worker permutation 2 of 9

   Creating Split Point Map file for SOYC

  Done

 Permutation took 197 ms

Worker permutation 3 of 9

   Creating Split Point Map file for SOYC

  Done

 Permutation took 154 ms

Worker permutation 4 of 9

   Creating Split Point Map file for SOYC

  Done

 Permutation took 198 ms

Worker permutation 5 of 9

   Creating Split Point Map file for SOYC

  Done

 Permutation took 194 ms

Worker permutation 6 of 9

   Creating Split Point Map file for SOYC

  Done

 Permutation took 184 ms

Worker permutation 7 of 9

   Creating Split Point Map file for SOYC

  Done

 Permutation took 145 ms

Worker permutation 8 of 9

   Creating Split Point Map file for SOYC

  Done

 Permutation took 131 ms

   Permutation compile succeeded

 Linking into war

Link succeeded

Compilation succeeded -- 6.889s


 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Issue 3903 (cont'd) Add noscript tag to existing HTML pages

2009-08-14 Thread rjrjr

In the spirit of no good deed goes unpunished, can I talk you into a)
eradicating the tab characters in all of these samples; b) replacing
your message markup with the following and; c) revisiting your old patch
and do the same?

  div style=width:22em; position:absolute; left: 50%;
margin-left:-11em; color: red; border: 1px solid red; padding:
4px;font-family:Sans-serif
  Your web browser must have JavaScript enabled in order for this
  application to display correctly.
  /div



http://gwt-code-reviews.appspot.com/57812/diff/1/2
File eclipse/reference/code-museum/war/DefaultMuseum.html (right):

http://gwt-code-reviews.appspot.com/57812/diff/1/2#newcode1
Line 1: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
Can you get rid of all these horrible tabs while you're in here?

http://gwt-code-reviews.appspot.com/57812/diff/1/3
File eclipse/reference/code-museum/war/SingleIssue.html (right):

http://gwt-code-reviews.appspot.com/57812/diff/1/3#newcode1
Line 1: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
Ditto on tabs

http://gwt-code-reviews.appspot.com/57812/diff/1/8
File samples/json/war/JSON.html (right):

http://gwt-code-reviews.appspot.com/57812/diff/1/8#newcode1
Line 1: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
tabs

http://gwt-code-reviews.appspot.com/57812/diff/1/11
File samples/simplerpc/war/SimpleRPC.html (right):

http://gwt-code-reviews.appspot.com/57812/diff/1/11#newcode1
Line 1: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
tabs

http://gwt-code-reviews.appspot.com/57812/diff/1/9
File samples/simplexml/war/SimpleXML.html (right):

http://gwt-code-reviews.appspot.com/57812/diff/1/9#newcode1
Line 1: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
tabs

http://gwt-code-reviews.appspot.com/57812

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Stop trying to launch firefox, terminology changes

2009-08-14 Thread bruce

LGTM, but would be nice to tweak the instructional message.


http://gwt-code-reviews.appspot.com/56817/diff/1/2
File dev/oophm/src/com/google/gwt/dev/OophmHostedModeBase.java (right):

http://gwt-code-reviews.appspot.com/56817/diff/1/2#newcode321
Line 321: Please connect a browser with the GWT Plugin to the URL);
The phrasing sounds a bit like you are telling them to connect a browser
*to* the GWT plugin.  I'd suggest, Using a browser with the GWT
Development Plugin, please browse to the following URL:

http://gwt-code-reviews.appspot.com/56817

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] [google-web-toolkit] r5966 committed - Stop trying to launch Firefox from OOPHM (it doesn't work without extr...

2009-08-14 Thread codesite-noreply

Revision: 5966
Author: j...@google.com
Date: Fri Aug 14 13:07:55 2009
Log: Stop trying to launch Firefox from OOPHM (it doesn't work without extra
effort on Mac/Win, and doesn't let you choose the browser you want to
launch or which profile in Firefox), and change hosted mode to development
mode.

Patch by: jat
Review by: bruce

http://code.google.com/p/google-web-toolkit/source/detail?r=5966

Modified:
  /trunk/dev/oophm/src/com/google/gwt/dev/OophmHostedModeBase.java

===
--- /trunk/dev/oophm/src/com/google/gwt/dev/OophmHostedModeBase.javaMon  
Aug 10 16:15:14 2009
+++ /trunk/dev/oophm/src/com/google/gwt/dev/OophmHostedModeBase.javaFri  
Aug 14 13:07:55 2009
@@ -34,7 +34,6 @@
  import java.awt.Cursor;
  import java.awt.event.WindowAdapter;
  import java.awt.event.WindowEvent;
-import java.io.IOException;
  import java.io.PrintWriter;
  import java.net.MalformedURLException;
  import java.net.URL;
@@ -318,19 +317,12 @@
getTopLogger().log(TreeLogger.ERROR, Invalid URL  + url, e);
throw new UnableToCompleteException();
  }
-TreeLogger branch = getTopLogger().branch(TreeLogger.INFO,
-Launching firefox with  + url, null);
-try {
-  Process browser = Runtime.getRuntime().exec(firefox  + url + );
-  int exitCode = browser.waitFor();
-  if (exitCode != 0) {
-branch.log(TreeLogger.ERROR, Exit code  + exitCode, null);
-  }
-} catch (IOException e) {
-  branch.log(TreeLogger.ERROR, Error starting browser, e);
-} catch (InterruptedException e) {
-  branch.log(TreeLogger.ERROR, Error starting browser, e);
-}
+System.err.println(
+Using a browser with the GWT Development Plugin, please browse  
to);
+System.err.println(the following URL:);
+System.err.println(   + url);
+getTopLogger().log(TreeLogger.INFO,
+Waiting for browser connection to  + url, null);
}

public BrowserWidget openNewBrowserWindow() throws  
UnableToCompleteException {
@@ -407,10 +399,10 @@
@Override
protected void openAppWindow() {
  ImageIcon gwtIcon = loadImageIcon(icon24.png);
-frame = new JFrame(GWT Hosted Mode);
+frame = new JFrame(GWT Development Mode);
  tabs = new JTabbedPane();
  mainWnd = new ShellMainWindow(options.getLogLevel());
-tabs.addTab(Hosted Mode, gwtIcon, mainWnd, GWT Hosted-mode);
+tabs.addTab(Development Mode, gwtIcon, mainWnd, GWT Development  
mode);
  if (!options.isNoServer()) {
webServerLog = new WebServerPanel(getPort(), options.getLogLevel(),
new RestartAction() {

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Issue 3936: work around JDT by not computing CUD from scope chain

2009-08-14 Thread scottb

Reviewers: Lex,

Description:
It appears JDT has a bug where it will pass you a null scope while
visiting the expression of an empty switch statement. See:

http://code.google.com/p/google-web-toolkit/issues/detail?id=3936

It turns out, however, that TypeRefVisitor was only using the scope
chain to compute the containing CUD on the fly.  Since this visitor
always traverses entire CUDs, we can work around the JDT scope issue by
just requiring the CUD to be set up front.


Please review this at http://gwt-code-reviews.appspot.com/58801

Affected files:

dev/core/src/com/google/gwt/dev/javac/BinaryTypeReferenceRestrictionsChecker.java
   dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java
   dev/core/src/com/google/gwt/dev/jdt/TypeRefVisitor.java



--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Issue 3936: work around JDT by not computing CUD from scope chain

2009-08-14 Thread spoon

LGTM.

http://gwt-code-reviews.appspot.com/58801

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Implement conditional set-property and extend-property declarations

2009-08-14 Thread bruce

LGTM if you implement all the suggestions.


http://gwt-code-reviews.appspot.com/57802/diff/1001/54
File dev/core/src/com/google/gwt/dev/cfg/BindingProperty.java (right):

http://gwt-code-reviews.appspot.com/57802/diff/1001/54#newcode73
Line 73: return conditionalValues;
Better to make it unmodifiable to prevent future errors from creeping in

http://gwt-code-reviews.appspot.com/57802/diff/1001/65
File dev/core/src/com/google/gwt/dev/cfg/ModuleDefSchema.java (right):

http://gwt-code-reviews.appspot.com/57802/diff/1001/65#newcode323
Line 323: protected Schema __extend_property_begin(BindingProperty
property,
Let's remove the ability to use conditionals on extend-property for
now, as we discussed on the phone.

http://gwt-code-reviews.appspot.com/57802/diff/1001/68
File dev/core/src/com/google/gwt/dev/cfg/PropertyPermutations.java
(right):

http://gwt-code-reviews.appspot.com/57802/diff/1001/68#newcode88
Line 88: + bindingProps.toString());
BindingProperty.toString() isn't implement; need to make it pretty for
this error message to make sense

http://gwt-code-reviews.appspot.com/57802/diff/1001/70
File
dev/core/src/com/google/gwt/dev/shell/ModuleSpacePropertyOracle.java
(right):

http://gwt-code-reviews.appspot.com/57802/diff/1001/70#newcode196
Line 196: values = prop.getAllowedValues(winner);
can you assign at declaration in 195

http://gwt-code-reviews.appspot.com/57802

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Issue 3936: work around JDT by not computing CUD from scope chain

2009-08-14 Thread scottb

Thanks!  Reported bug to JDT.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=286682

http://gwt-code-reviews.appspot.com/58801

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] [google-web-toolkit] r5967 committed - Issue 3936: work around JDT by not computing CUD from scope chain....

2009-08-14 Thread codesite-noreply

Revision: 5967
Author: sco...@google.com
Date: Fri Aug 14 14:43:27 2009
Log: Issue 3936: work around JDT by not computing CUD from scope chain.

It appears JDT has a bug where it will pass you a null scope while visiting  
the expression of an empty switch statement. See:

http://code.google.com/p/google-web-toolkit/issues/detail?id=3936

It turns out, however, that TypeRefVisitor was only using the scope chain  
to compute the containing CUD on the fly.  Since this visitor always  
traverses entire CUDs, we can work around the JDT scope issue by just  
requiring the CUD to be set up front.

Review by: spoon
http://code.google.com/p/google-web-toolkit/source/detail?r=5967

Modified:
   
/trunk/dev/core/src/com/google/gwt/dev/javac/BinaryTypeReferenceRestrictionsChecker.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java
  /trunk/dev/core/src/com/google/gwt/dev/jdt/TypeRefVisitor.java

===
---  
/trunk/dev/core/src/com/google/gwt/dev/javac/BinaryTypeReferenceRestrictionsChecker.java
 
Fri May  9 14:33:56 2008
+++  
/trunk/dev/core/src/com/google/gwt/dev/javac/BinaryTypeReferenceRestrictionsChecker.java
 
Fri Aug 14 14:43:27 2009
@@ -66,8 +66,9 @@
static class BinaryTypeReferenceVisitor extends TypeRefVisitor {
  private final ListBinaryTypeReferenceSite binaryTypeReferenceSites;

-public BinaryTypeReferenceVisitor(
+public BinaryTypeReferenceVisitor(CompilationUnitDeclaration cud,
  ListBinaryTypeReferenceSite binaryTypeReferenceSites) {
+  super(cud);
this.binaryTypeReferenceSites = binaryTypeReferenceSites;
  }

@@ -140,7 +141,7 @@
CompilationUnitDeclaration cud) {
  ListBinaryTypeReferenceSite binaryTypeReferenceSites = new  
ArrayListBinaryTypeReferenceSite();
  BinaryTypeReferenceVisitor binaryTypeReferenceVisitor = new  
BinaryTypeReferenceVisitor(
-binaryTypeReferenceSites);
+cud, binaryTypeReferenceSites);
  cud.traverse(binaryTypeReferenceVisitor, cud.scope);
  return binaryTypeReferenceSites;
}
===
--- /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java   Tue  
Jul 28 21:10:32 2009
+++ /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java   Fri  
Aug 14 14:43:27 2009
@@ -289,7 +289,7 @@
CompilationUnitDeclaration cud,
final MapString, String binaryTypeToSourceFileMap) {
  final SetString result = new HashSetString();
-cud.traverse(new TypeRefVisitor() {
+cud.traverse(new TypeRefVisitor(cud) {
@Override
protected void onBinaryTypeRef(BinaryTypeBinding referencedType,
CompilationUnitDeclaration unitOfReferrer, Expression  
expression) {
===
--- /trunk/dev/core/src/com/google/gwt/dev/jdt/TypeRefVisitor.java  Tue Jul 
  
8 12:08:40 2008
+++ /trunk/dev/core/src/com/google/gwt/dev/jdt/TypeRefVisitor.java  Fri Aug 
 
14 14:43:27 2009
@@ -35,7 +35,6 @@
  import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
  import org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding;
  import org.eclipse.jdt.internal.compiler.lookup.RawTypeBinding;
-import org.eclipse.jdt.internal.compiler.lookup.Scope;
  import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
  import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;

@@ -43,25 +42,32 @@
   * Walks the AST to determine every location from which a type is  
referenced.
   */
  public abstract class TypeRefVisitor extends ASTVisitor {
+
+  private final CompilationUnitDeclaration cud;
+
+  public TypeRefVisitor(CompilationUnitDeclaration cud) {
+assert (cud != null);
+this.cud = cud;
+  }

@Override
public void endVisit(ArrayQualifiedTypeReference x, BlockScope scope) {
-maybeDispatch(scope, x, x.resolvedType);
+maybeDispatch(x, x.resolvedType);
}

@Override
public void endVisit(ArrayQualifiedTypeReference x, ClassScope scope) {
-maybeDispatch(scope, x, x.resolvedType);
+maybeDispatch(x, x.resolvedType);
}

@Override
public void endVisit(ArrayTypeReference x, BlockScope scope) {
-maybeDispatch(scope, x, x.resolvedType);
+maybeDispatch(x, x.resolvedType);
}

@Override
public void endVisit(ArrayTypeReference x, ClassScope scope) {
-maybeDispatch(scope, x, x.resolvedType);
+maybeDispatch(x, x.resolvedType);
}

@Override
@@ -77,65 +83,75 @@
   * scope in some cases, which would cause compiler errors.
   */
  if (messageSend.binding != null  messageSend.binding.isStatic()) {
-  maybeDispatch(scope, messageSend, messageSend.actualReceiverType);
+  maybeDispatch(messageSend, messageSend.actualReceiverType);
  }
}

@Override
public void endVisit(ParameterizedQualifiedTypeReference x, BlockScope  
scope) {
-maybeDispatch(scope, x, x.resolvedType);
+maybeDispatch(x, x.resolvedType);
}