Re: History does not work in IE

2009-06-20 Thread Braheem Sikiru

Hi

Ensure the history iframe is on your GWT host page as in:

iframe src=javascript:'' id=__gwt_historyFrame 
style=width:0px;height:0px;border:0px/iframe

It appears the IE implementation still depends on it while other 
browsers can work without it. Maybe the GWT Team can say something about 
that!
Had similar problem earlier this month and that worked for me.

Cheers.

derjan1982 wrote:
 I try to use the GWT history with a value change handler, what is
 recommended since GWT 1.6.4. The result is a TypeError in IE. My code
 in the onModuleLoad method looks like this:

 HorizontalPanel basePanel = new HorizontalPanel();
 RootPanel.get().add( basePanel );

 History.addValueChangeHandler( new ValueChangeHandlerString() {

 public void onValueChange(ValueChangeEventString event) {
 // Do something.
 }

 });

 if(History.getToken().equals(  )) {
History.newItem( myUrl );
 }

 History.fireCurrentHistoryState();

 My code works in all browsers except IE, there it stops at the line

 History.addValueChangeHandler(...)

 After compiling with DETAILED style, I got:

 (TypeError): 'com_google_gwt_user_client_impl_HistoryImpl_handlers' is
 null or not an object ...

 How can I solve 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
-~--~~~~--~~--~--~---



Container managed security and time-out of the webapp.

2009-06-20 Thread willemsl...@gmail.com

In my GWT application MyApp I'm using container managed security
(logon through html form with
action=j_security_check and input elements j_username and j_password).
Works fine except
when the application times out: the container doesn't allow the RPC
service to be executed anymore on the server, so it throws back the
html of the logon-form. But the client side RPC code has no 'solid'
way of detecting this.

Currently I've implemented it as follows: in the onFailure method,
check if it's an InvocationException, then check if it contains a bit
of html that's in the logon-page.
If yes, then redirect to the start page of my app.

AsyncCallbackVoid callback = new AsyncCallbackVoid()
{
  public void onFailure(Throwable caught)
  {
if (  (caught instanceof InvocationException)
(caught.getMessage().contains(htmlheadtitleMyApp
Logon/title/head) ))
{
Window.Location.assign(MyApp.html);
}
else
{
..

Is there a more proper way of doing this?

Regards,

Willem


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



Blocked request without GWT permutation header

2009-06-20 Thread Kriván Bálint

Hi!

I've just built the trunk version of GWT and I've tried OOPHM reading
this HOWTO: http://code.google.com/p/google-web-toolkit/wiki/UsingOOPHM

The project is the unmodified sample project which is created with
Google Plugin for Eclipse. When I run it in the browser using OOPHM
and I click Send button in the Web Application Starter Project, it
opens the popup with Remote Procedure Call - Failure.

The console says:
2009.06.20. 9:37:31
com.google.appengine.tools.development.ApiProxyLocalImpl log
SEVERE: [1245483451037000] javax.servlet.ServletContext log: Exception
while dispatching incoming RPC call
java.lang.SecurityException: Blocked request without GWT permutation
header(XSRF attack?)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
(RemoteServiceServlet.java:181)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:102)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
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 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:306)
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:211)
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)

How can I resolve the problem? Thanks for your help!

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



Re: How to get tab Widget in a TabPanel?

2009-06-20 Thread Bonor

pf, only REAL programmers please answer.

On 20 jun, 02:04, Booth Martin bo...@hiapes.com wrote:
 tabPanel.getWidget(1)

 might work?



 Bonor wrote:
  tabPanel.add( panelA, panelB);

  How do I get de widget panelB?

  tabPanel.getWidget(0) returns panelA, so how about panelB?
--~--~-~--~~~---~--~~
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 compile modules into specific directory?

2009-06-20 Thread Hydrian

I'm using GWT in my little project. and there're some modules for it.

There are, however, many directories in war directory, and it makes
hard to control them.

Therefore I want to set modules into some specific directory as war/
modules

Is it possible?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



trying up gwt incubator scrollTable problem

2009-06-20 Thread asianCoolz

i trying out the incubator
http://code.google.com/docreader/#p=google-web-toolkit-incubators=google-web-toolkit-incubatort=PagingScrollTable
scroll table but when i try to run the example, i get error below

[ERROR] Line 150: No source code is available for type
com.google.gwt.gen2.table.client.FixedWidthFlexTable; did you forget
to inherit a required module?
[ERROR] Line 152: No source code is available for type
com.google.gwt.gen2.table.client.FixedWidthGrid; did you forget to
inherit a required module?


do i need to include source codes for incubator ?
--~--~-~--~~~---~--~~
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 jdbc

2009-06-20 Thread Enea

hm... I had similar problem with jdbc...

if you are using eclipse,
try to go under Project-properties-google-App Engine
and disable Use Google App Engine checkbox .



regards :)

On 20 Giu, 02:00, Petein majestyel...@gmail.com wrote:
 package faceRecognition.server;

 import faceRecognition.client.AuthService;
 import com.google.gwt.user.server.rpc.RemoteServiceServlet;

 import java.sql.*;
 import java.util.*;
 import java.text.SimpleDateFormat;

 /**
  * The server side implementation of the RPC service.
  */
 @SuppressWarnings(serial)
 public class AuthServiceImpl extends RemoteServiceServlet implements
                 AuthService {

         public String doAuthenticate(String name, String surname,
                         String username, String password,
                         String email, String info){

                 String serverInfo = getServletContext().getServerInfo();
                 String userAgent = 
 getThreadLocalRequest().getHeader(User-Agent);

                 //jdbc part

                 /*
                 Connection con = null;
         try {

           Class.forName(com.mysql.jdbc.Driver).newInstance();

             //out.println(brdriver is ok);

             String url = jdbc:mysql:// + localhost + / +
 USERSDB + ?;
             String usernamedb = root;
             String passworddb = ;
             con = (Connection) DriverManager.getConnection(url,
 usernamedb, passworddb);

             Statement st = con.createStatement();
             ResultSet rs;

            rs = st.executeQuery(SELECT username, password FROM
 users);

             boolean found = false;

             while (rs.next()) {
                 usernamedb = rs.getString(1);
                 passworddb = rs.getString(2);

                 if (usernamedb.equals(username)) {
                     found = true;
                     break;
                 }
             }

             if (!found){

                         password =  a;
                 //create user

                 String sql = INSERT INTO testusers(name, username,
 password, info) VALUES(?, ?, ?, ?);

                 PreparedStatement pstmt = con.prepareStatement(sql);

                 // Set the values
                 pstmt.setString(1, name);
                 pstmt.setString(2, username);
                 pstmt.setString(3, password);
                 pstmt.setString(4, info);

                 //Calendar calendar = new GregorianCalendar(); String
 time = calendar.getTime().toString();  //Thu Jun 11 02:30:10 EEST 2009

                 //String time = new GregorianCalendar().getTime
 ().toString();

                 //pstmt.setString(5, time);

                 pstmt.execute();

             }

         }catch(ClassNotFoundException cnfe){
                 return(cnfe.toString());
         } catch(SQLException sqle){
                 return(sqle.toString());
         } catch(InstantiationException ie){
                 return(ie.toString());
         }catch (IllegalAccessException iae) {
                         return(iae.toString());
                 }

             */

                 return Hello,  + name +    + surname + !brbrServer 
 info: 
 + serverInfo
                                 + .brbrUsing:br + userAgent +  Your 
 request was sent!;
         }

 }

 when this part of code is executed without the jdbc part it executes
 fine and the RPC method works ok.
 When i execute the code as it is above i get these errors:
 The server is running athttp://localhost:1598/
 19 #921;#959;#965;#957; 2009 11:33:32 #956;#956;
 com.google.appengine.tools.development.ApiProxyLocalImpl log
 SEVERE: [1245454412421000] javax.servlet.ServletContext log: Exception
 while dispatching incoming RPC call
 com.google.gwt.user.server.rpc.UnexpectedException: Service method
 'public abstract java.lang.String
 faceRecognition.client.AuthService.doAuthenticate
 (java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)'
 threw an unexpected exception: java.lang.ExceptionInInitializerError
         at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure
 (RPC.java:360)
         at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
 (RPC.java:546)
         at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
 (RemoteServiceServlet.java:166)
         at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
 (RemoteServiceServlet.java:86)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
 487)
         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
 

Re: Container managed security and time-out of the webapp.

2009-06-20 Thread Braheem Sikiru





Hello

There have been many approaches to securing GWT applications, I think
it all depends on your application workflow. But an approach similar to
yours that i'm used to follows:

- Create a servlet filter to filter requests for the GWT module
servlets. Then in the doFilter() method do something like ...

  HttSession session = request.getSession(false); // get the
session attached to request
 if(session == null) { // the case if client is not logged in
 ression.sendError(HttpServletResponse.SC_UNAUTHORIZED);
 } else {
 chain.doFilter(request, response); // pass request on to
the GWT servlets
 }

- Next create a custom AsyncCallback handler for the client side
wherein the onFailure() method does something like this ..

 void doFailure(Throwable t) {
 try {
 throw t;
 } catch (IncompatibleRemoteServiceException e) {
 // this client code is not compatible with the server
refresh the browser to download new one
 Window.Location.reload();
 } catch (StatusCodeException e) {
 // the call didn't complete cleanly
 switch (e.getStatusCode()) {
 case 401: // Authentication required; reload the whole
page so server can enforce login
 Window.Location.reload();
 break;
 default:
 // do other tests or pass on to an abstract method
so you can do more localized processing
 }
 } catch (Throwable e) {
 // shouldn't get here though ...
 }
 }
then you can use the custom AsyncCallback handler in other RPC requests
of the application

However, this approach appears to require some application design issues
- the URL (especially the history tokens) you choose SHOULD be mapped
to known application states, so that the application can appear to
return to where it was before the Window.Location.reload() call.
- the host page of the GWT module SHOULD be placed behind a security
constraint

This way i've been able to use container managed security and standard
servlet security annotations in my application

Just another way of achieving the same result  :-) 

Cheers
Sikiru

willemsl...@gmail.com wrote:
In my GWT
application MyApp I'm using container managed security
(logon through html form with
action="" and input elements j_username and j_password).
Works fine except
when the application times out: the container doesn't allow the RPC
service to be executed anymore on the server, so it throws back the
html of the logon-form. But the client side RPC code has no 'solid'
way of detecting this.
  
Currently I've implemented it as follows: in the onFailure method,
check if it's an InvocationException, then check if it contains a bit
of html that's in the logon-page.
If yes, then redirect to the start page of my app.
  
AsyncCallbackVoid callback = new AsyncCallbackVoid()
{
public void onFailure(Throwable caught)
{
if ( (caught instanceof InvocationException)

(caught.getMessage().contains("htmlheadtitleMyApp
Logon/title/head") ))
{
Window.Location.assign("MyApp.html");
}
else
{
..
  
Is there a more proper way of doing this?
  
Regards,
  
Willem
  
  
  
  
  



--~--~-~--~~~---~--~~
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 2.0 release date

2009-06-20 Thread asianCoolz

may  i know when will the RC, or milestone version will be available
for preview in svn ?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Borders not showing on FF when the cell is empty

2009-06-20 Thread Yousef.Ghandour

Using FlexTable, which will be translated into table on the browser
later on on production will not show the border if the cell is empty i
guess, applying this:

.borderTop {
background:#FF;
border-style:solid;
border-width: 1px 0px 0px 0px;
border-color: #00;
}

will show a top border in Safari for example, but will not show it on
both FF and Opera (I didn't check with IE) if applied to an empty cell
on FlexTable. Is there a solution to 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: docs discrepancy ???

2009-06-20 Thread Ian Bambury
Transitional means 'transitional'. It differs depending on the html version.
'4.01 Transitional' means 'contains all HTML elements and attributes,
including presentational and deprecated elements (like font). Framesets are
not allowed.'

But...

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional// EN

...will trigger quirks mode in newer browsers and older browsers just have
quirks anyway. Although not the same quirks as each other, of course.

Personally, I use

!DOCTYPE Common PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' '
http://www.w3.org/TR/html4/loose.dtd'

which will give you the 4.01 Transitional behaviour mentioned above in
almost all browsers - all the important ones, anyway.

HTH

Ian

http://examples.roughian.com


2009/6/20 Robert Lehr robert.l...@gmail.com


 FYI, there appears to be a discrepancy in the docs w/rt to the doc
 type specifying
 Transitional denotes Standards mode or Quirks mode.

 Which does it denote ?  Note the following from GWT docs.

 From http://code.google.com/webtoolkit/tutorials/1.6/create.html -

To provide better cross-browser compatibility, GWT sets the
 doctype declaration to HTML 4.01 Transitional. This sets the rendering
 engine to Standards Mode. If you remove this line, the page will be
 rendered in Quirks Mode, ...

 So - TRANSITIONAL denotes STANDARDS mode.

 From the comments in the host page auto-gen'ed by webAppCreator -

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//
 EN
!-- The HTML 4.01 Transitional DOCTYPE declaration--
!-- above set at the top of the file will set --
!-- the browser's rendering engine into   --
!-- Quirks Mode. Replacing this declaration --
!-- with a Standards Mode doctype is supported, --
!-- but may lead to some differences in layout.   --

 Or - does TRANSITIONAL denote QUIRKS mode ?

 -robert


 


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



Re: How to retrieve EntryPoint object?

2009-06-20 Thread ClusterCougar

Not really. The EntryPoint class is not really a class, but a script
that is run to bootstrap your application. Any other use of the
EntryPoint is a little bit of an abuse of the concept. It is possible
to provide a global point of access to the EntryPoint using the
Singleton pattern, but global visibility is almost always a bad idea.

HTH
Nathan

On Jun 19, 10:56 am, hezjing hezj...@gmail.com wrote:
 Hi
 A quick question, is there a convenient method to retrieve EntryPoint
 object?

 --

 Hez
--~--~-~--~~~---~--~~
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: Borders not showing on FF when the cell is empty

2009-06-20 Thread Yousef.Ghandour

Adding this to my CSS class set solved the problem
table {
border-collapse:collapse;
}
For more information, check http://www.w3.org/TR/CSS2/tables.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-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: Container managed security and time-out of the webapp.

2009-06-20 Thread willemsl...@gmail.com

Thanks for your quick response and elaborate answer, Braheem!

I've tried a servlet-filter, but that didn't work for me since my
security constraint protects EVERY possible url within my app, see
following URL-pattern:
  security-constraint
web-resource-collection
..
url-pattern/*/url-pattern

I guess I'll have to make this more fine grained, and put the servlet
filter servlet in an unprotected area.

Ciao,

Willem


On Jun 20, 12:01 pm, Braheem Sikiru sbrah...@gmail.com wrote:
 Hello
 There have been many approaches to securing GWT applications, I think it all 
 depends on your application workflow. But an approach similar to yours that 
 i'm used to follows:
 - Create a servlet filter to filter requests for the GWT module servlets. 
 Then in the doFilter() method do something like ...
        HttSession session = request.getSession(false);   // get the session 
 attached to request
     if(session == null) {   // the case if client is not logged in
     ression.sendError(HttpServletResponse.SC_UNAUTHORIZED);
     } else {
     chain.doFilter(request, response);   // pass request on to the 
 GWT servlets
     }
 - Next create a custom AsyncCallback handler for the client side wherein the 
 onFailure() method does something like this ..
     void doFailure(Throwable t) {
     try {
     throw t;
     } catch (IncompatibleRemoteServiceException e) {
     // this client code is not compatible with the server refresh the 
 browser to download new one
     Window.Location.reload();
     } catch (StatusCodeException e) {
     // the call didn't complete cleanly
     switch (e.getStatusCode()) {
     case 401:  // Authentication required; reload the whole page 
 so server can enforce login
     Window.Location.reload();
     break;
     default:
     // do other tests or pass on to an abstract method so you 
 can do more localized processing
     }
     } catch (Throwable e) {
     // shouldn't get here though ...
     }
     }
 then you can use the custom AsyncCallback handler in other RPC requests of 
 the application
 However, this approach appears to require some application design issues
 - the URL (especially the history tokens) you choose SHOULD be mapped to 
 known application states, so that the application can appear to return to 
 where it was before the Window.Location.reload() call.
 - the host page of the GWT module SHOULD be placed behind a security 
 constraint
 This way i've been able to use container managed security and standard 
 servlet security annotations in my application
 Just another way of achieving the same result:-)
 Cheers
 sikiruwillemsl...@gmail.comwrote:In my GWT application MyApp I'm using 
 container managed security
 (logon through html form with
 action=j_security_check and input elements j_username and j_password).
 Works fine except
 when the application times out: the container doesn't allow the RPC
 service to be executed anymore on the server, so it throws back the
 html of the logon-form. But the client side RPC code has no 'solid'
 way of detecting this.
 Currently I've implemented it as follows: in the onFailure method,
 check if it's an InvocationException, then check if it contains a bit
 of html that's in the logon-page.
 If yes, then redirect to the start page of my app.
 AsyncCallbackVoid callback = new AsyncCallbackVoid()
 {
 public void onFailure(Throwable caught)
 {
 if ( (caught instanceof InvocationException)
  (caught.getMessage().contains(htmlheadtitleMyApp
 Logon/title/head) ))
 {
 Window.Location.assign(MyApp.html);
 }
 else
 {
 ..
 Is there a more proper way of doing this?
 Regards,
 Willem
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Including my own GWT project

2009-06-20 Thread ping2ravi

Hi All,
I created one GWT(GWTCommon) project to include in another GWT project
(MyViewer)

my package struture of GWTCommon  is as follow

com/next/common/GWTCommon.gwt.xml
com/next/common/client/GWTCommon.java
com/next/common/client/callback/DefaultAsyncCallback.java
...and ome more files.packages in  com/next/common/client/

Package structure of MyViewer project is as follows
com/next/viewer/MyViewer.gwt.xml
com/next/viewer/client/MyViewer.java
com/next/viewer/client/Somemorefiles.java

content of  com/next/viewer/MyViewer.gwt.xml is

?xml version=1.0 encoding=UTF-8?
!DOCTYPE module PUBLIC -//Google Inc.//DTD Google Web Toolkit 1.6.4//
EN http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro-
source/core/src/gwt-module.dtd
module rename-to='nextdataviewer'
  inherits name='com.google.gwt.user.User'/
  inherits name='com.next.common.GWTCommon'/

  inherits name='com.google.gwt.user.theme.standard.Standard'/
  entry-point class='com.next.viewer.client.MyViewer'/
/module

Everything looks ok, but when i run it, i get following exception

[ERROR] Line 45: No source code is available for type
com.next.common.client.callback.DefaultAsyncCallbackT; did you
forget to inherit a required module?

I am inheriting this module as well as the jar file of GWTCommon
project is in classpath.

Can you see, what i am doing wrong here.
please help.

I am using Latest Google Eclipse plugin for GWT/GAE and GWT 1.6

Ravi



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



ValueChangeHandler should be parameterized in the Javadoc of Hyperlink

2009-06-20 Thread hezjing
Hi
ValueChangeHandler is a parameterized interface.

Hence, I think the example given in the Javadoc of Hyperlink should be
changed from:


http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/user/client/ui/Hyperlink.htmlpublic
class HistoryExample implements EntryPoint, ValueChangeHandler {
...
public void onValueChange(ValueChangeEvent event) {
...
}
}


to the following:


public class HistoryExample implements EntryPoint,
ValueChangeHandlerString {
...
public void onValueChange(ValueChangeEvent event) {
...
}
}


-- 

Hez

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



Hyperlink is not working after 1st try

2009-06-20 Thread hezjing
Hi

I have the following code which suppose to do the following:

1) when the login button is clicked, it will clear the RootPanel and show a
logout hyperlink,

2) when the logout hyperlink is selected, it will clear the RootPanel and
show the login button again.


public class Dummy implements EntryPoint, ValueChangeHandlerString {

public void onModuleLoad() {
History.addValueChangeHandler(this);
displayLogin();
}

private void displayLogin() {
Button ok = new Button(Login);
ok.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
displayContent();
}
});
RootPanel root = RootPanel.get();
root.clear();
root.add(ok);
}

private void displayContent() {
Hyperlink logout = new Hyperlink(Logout, logout);
RootPanel root = RootPanel.get();
root.clear();
root.add(logout);
}

public void onValueChange(ValueChangeEventString event) {
if (event.getValue().equals(logout)) {
displayLogin();
}
}
}


The problem is when tested in hosted mode, the hyperlink stops responding
after the 1st time:

1) Login button is clicked, show logout hyperlink

2) Logout hyperlink is selected, show login button

3) Login button is clicked, show logout hyperlink

4) Logout hyperlink is selected, and NOTHING happen here!


Do you have any idea of what could be the problem?


-- 

Hez

--~--~-~--~~~---~--~~
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: Hyperlink is not working after 1st try

2009-06-20 Thread Ian Bambury
2009/6/20 hezjing hezj...@gmail.com


 Do you have any idea of what could be the problem?


Yep. You have a valuechange listener. i.e. it gets called if the value
changes.

The first time you click it, the value changes from nothing to 'logout'

The second time you click it, it is already showing 'logout'. No change.

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: Hyperlink is not working after 1st try

2009-06-20 Thread Paul Robinson

The first time you press the hyperlink to logout, there's a new
history item added of that name. The second time you press it, the
current history token is still logout, so it does nothing.


hezjing wrote:
 Hi

 I have the following code which suppose to do the following:

 1) when the login button is clicked, it will clear the RootPanel and
 show a logout hyperlink,

 2) when the logout hyperlink is selected, it will clear the RootPanel
 and show the login button again.


 public class Dummy implements EntryPoint, ValueChangeHandlerString {

 public void onModuleLoad() {
 History.addValueChangeHandler(this);
 displayLogin();
 }

 private void displayLogin() {
 Button ok = new Button(Login);
 ok.addClickHandler(new ClickHandler() {
 public void onClick(ClickEvent event) {
 displayContent();
 }
 });
 RootPanel root = RootPanel.get();
 root.clear();
 root.add(ok);
 }

 private void displayContent() {
 Hyperlink logout = new Hyperlink(Logout, logout);
 RootPanel root = RootPanel.get();
 root.clear();
 root.add(logout);
 }

 public void onValueChange(ValueChangeEventString event) {
 if (event.getValue().equals(logout)) {
 displayLogin();
 }
 }
 }


 The problem is when tested in hosted mode, the hyperlink stops
 responding after the 1st time:

 1) Login button is clicked, show logout hyperlink

 2) Logout hyperlink is selected, show login button

 3) Login button is clicked, show logout hyperlink

 4) Logout hyperlink is selected, and NOTHING happen here!


 Do you have any idea of what could be the problem?


 -- 

 Hez

 

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



Quick fix for broken hosted mode with Snow Leopard 10A380 on x86_64

2009-06-20 Thread kugutsumen

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



Gmail-like keyboard shortcuts possible?

2009-06-20 Thread Manuel

What's the best way to implement Gmail-like keyboard shortcuts?

I'd like to get all keypresses, except those in text boxes.

I've searched the archives, and I can't find a good way to do this.

Thanks,
Manuel

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



ToggleButton cannot be clicked again

2009-06-20 Thread devask

Hi!

In my project I have a ToggleButton. When I have clicked on it I have
to move the mouse out of the button to click it again (toggle it),
otherwise it simply ignores the next clicks.
Btw: After the click a RPC call is started and depending on its result
some actions in the GUI are performed.

I use GWT 1.6.4.

Does somebody have an idea how to solve this problem? 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-06-20 Thread mabogie

As I myself didn't understand it completely either, I build a little
testapp for it.
And it was at the same time, my first blog post :)

check it out:
http://www.webspin.be/2009/06/learning-gwt-managing-events-with-eventbus/

On 20 jun, 00:21, Ian Bambury ianbamb...@gmail.com wrote:
 The PhoneEditor doesn't need the event bus since it doesn't respond to any
 events.
 The ContactWidget needs the event bus in case the details change in real
 time, then it can update itself.

 If you (the user) want to change the phone number while you are looking at
 the contact details (the ContactWidget is the view) then you use the
 PhoneEditor (which shows the PhoneEditWidget).

 Basically, you're looking at a phone number display which will update if the
 phone number changes. If you want to change it, you get a popup editor that
 lets you do that.

 The phone number display subscribes to updates so it will be up-to-date. The
 popup editor gets populated and then you edit it. You don't want the popup
 to update while you are putting the new number in so it doesn't do the
 update thing.

 So you are displaying the actual phone number, you decide to update it and
 get the popup. You put the new number in the popup and submit it
 (the PhoneEditor knows how to update, it was passed the rpcService).

 The data (i.e. the model) gets updated and feeds the change back. This
 feedback is to the event bus which fires an event to tell every interested
 widget that the phone number for contact nnn has changed. Including the
 display you were just looking at.

 The way they have done it in the presentation is 'optimistic'. I.e. they
 update the screen immediately, without waiting for the data to do the round
 trip. If the update fails and the resulting error doesn't get back, then
 your screen is showing different data to the model. Ideally, you should
 change the phone number label to 'updating' and let the feedback put the new
 number in there. That way the screen has more of a chance of showing the
 right information (there's still a chance that the update works and the data
 doesn't get fed back, but at least then the label shows 'updating' rather
 than out-of-sync information.

 I rather suspect that hasn't clarified anything :-)

 Ian

 http://examples.roughian.com

 2009/6/19 Ben benzhe...@gmail.com



  Finally found a thread talking about this presentation. It is very
  interesting for me as well.

  Thomas, you mentioned slide #73, actually I have some question about
  this. In this slide, from my point of view, both PhoneEditWidget and
  ContactWidget are just Views in MVP. Phone Editor is Presenter in MVP.
  So is ContactViewer a presenter as well? If so, I understand that it
  passes Event Bus into Contact Viewer, why it doesn't pass the same
  Event Bus into PhoneEditor?

  For me, I am still not very clear about how this event bus works.

  Thanks,

  On Jun 12, 9:39 am, Thomas Broyer t.bro...@gmail.com wrote:
   On 11 juin, 21:34, Benju b...@fastcastmedia.com wrote:

I did not attend Google I/O but as soon as the video Google I/O 2009
- Best Practices for Architecting GWT App (http://www.youtube.com/
watch?v=PDuhR18-EdM) was posted I reviewed it and was a bit confused
by the idea of an EventBus.

   For my part, I was pleased to see it as a best practice, as that's
   what I'm thinking about for nearly a year (would require a huuge
   refactoring of our app, so it's still just an idea floating in the
   air)
   (I didn't watch the video, just looked at the slides)

From what I can tell the idea is that UI widgets requiring data from
the server are able to fire off requests for some form of data like
void getTransactionsForAccount(Account acct) then at some unknown
later time (ms to seconds ussually) when a response comes in from the
RPC call the eventbus is what actually directly recives the data and
then it is dispatched

   Well, not necessarily, though yes, that's what they said at Google I/
   O. One of the reasons is that there are probably more than a single
   place where you use that same data in your app (in GMail it could be
   the list of mails, the unread count for the box and/or label(s), and
   the conversation view of course). That way, all places are informed,
   wherever the initial request came from.

Client UI: Hey call some RPC method with these parameters, my
AsyncCallback is this EventBus thing

...some unknown time passes while the server does magic...

Client Event Bus: A response came in of type X/Y/Z I should fire an
event to all interested parties

Client UI: According to this event I just recieved some of my UI code
needs to change

A few things are still very hazy for me...

1- What is missing here is when would the Client UI typically
subscribe/unsubscribe from the event bus.  If this were a desktop
application I would simply use weak reference so I would not have to
unsubscribe my UI manually 

Re: How to get tab Widget in a TabPanel?

2009-06-20 Thread Booth Martin
Sorry.  I won't bother you anymore.


Bonor wrote:
 pf, only REAL programmers please answer.

 On 20 jun, 02:04, Booth Martin bo...@hiapes.com wrote:
   
 tabPanel.getWidget(1)

 might work?



 Bonor wrote:
 
 tabPanel.add( panelA, panelB);
   
 How do I get de widget panelB?
   
 tabPanel.getWidget(0) returns panelA, so how about panelB?
   

 


 No virus found in this incoming message.
 Checked by AVG - www.avg.com 
 Version: 8.5.339 / Virus Database: 270.12.81/2189 - Release Date: 06/20/09 
 06:15:00

   

-- 
===

Booth Martin,  580-775-4367

==


--~--~-~--~~~---~--~~
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: ToggleButton cannot be clicked again

2009-06-20 Thread mabogie

put your code here, it's hard to see the problem this way.

On 20 jun, 17:17, devask dev...@gmail.com wrote:
 Hi!

 In my project I have a ToggleButton. When I have clicked on it I have
 to move the mouse out of the button to click it again (toggle it),
 otherwise it simply ignores the next clicks.
 Btw: After the click a RPC call is started and depending on its result
 some actions in the GUI are performed.

 I use GWT 1.6.4.

 Does somebody have an idea how to solve this problem? 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 and jdbc

2009-06-20 Thread Petein

problem solved! Thanks!

On Jun 20, 1:00 pm, Enea eneager...@gmail.com wrote:
 hm... I had similar problem with jdbc...

 if you are using eclipse,
 try to go under Project-properties-google-App Engine
 and disable Use Google App Engine checkbox .

 regards :)

 On 20 Giu, 02:00, Petein majestyel...@gmail.com wrote:



  package faceRecognition.server;

  import faceRecognition.client.AuthService;
  import com.google.gwt.user.server.rpc.RemoteServiceServlet;

  import java.sql.*;
  import java.util.*;
  import java.text.SimpleDateFormat;

  /**
   * The server side implementation of the RPC service.
   */
  @SuppressWarnings(serial)
  public class AuthServiceImpl extends RemoteServiceServlet implements
                  AuthService {

          public String doAuthenticate(String name, String surname,
                          String username, String password,
                          String email, String info){

                  String serverInfo = getServletContext().getServerInfo();
                  String userAgent = 
  getThreadLocalRequest().getHeader(User-Agent);

                  //jdbc part

                  /*
                  Connection con = null;
          try {

            Class.forName(com.mysql.jdbc.Driver).newInstance();

              //out.println(brdriver is ok);

              String url = jdbc:mysql:// + localhost + / +
  USERSDB + ?;
              String usernamedb = root;
              String passworddb = ;
              con = (Connection) DriverManager.getConnection(url,
  usernamedb, passworddb);

              Statement st = con.createStatement();
              ResultSet rs;

             rs = st.executeQuery(SELECT username, password FROM
  users);

              boolean found = false;

              while (rs.next()) {
                  usernamedb = rs.getString(1);
                  passworddb = rs.getString(2);

                  if (usernamedb.equals(username)) {
                      found = true;
                      break;
                  }
              }

              if (!found){

                          password =  a;
                  //create user

                  String sql = INSERT INTO testusers(name, username,
  password, info) VALUES(?, ?, ?, ?);

                  PreparedStatement pstmt = con.prepareStatement(sql);

                  // Set the values
                  pstmt.setString(1, name);
                  pstmt.setString(2, username);
                  pstmt.setString(3, password);
                  pstmt.setString(4, info);

                  //Calendar calendar = new GregorianCalendar(); String
  time = calendar.getTime().toString();  //Thu Jun 11 02:30:10 EEST 2009

                  //String time = new GregorianCalendar().getTime
  ().toString();

                  //pstmt.setString(5, time);

                  pstmt.execute();

              }

          }catch(ClassNotFoundException cnfe){
                  return(cnfe.toString());
          } catch(SQLException sqle){
                  return(sqle.toString());
          } catch(InstantiationException ie){
                  return(ie.toString());
          }catch (IllegalAccessException iae) {
                          return(iae.toString());
                  }

              */

                  return Hello,  + name +    + surname + !brbrServer 
  info: 
  + serverInfo
                                  + .brbrUsing:br + userAgent +  
  Your request was sent!;
          }

  }

  when this part of code is executed without the jdbc part it executes
  fine and the RPC method works ok.
  When i execute the code as it is above i get these errors:
  The server is running athttp://localhost:1598/
  19 #921;#959;#965;#957; 2009 11:33:32 #956;#956;
  com.google.appengine.tools.development.ApiProxyLocalImpl log
  SEVERE: [1245454412421000] javax.servlet.ServletContext log: Exception
  while dispatching incoming RPC call
  com.google.gwt.user.server.rpc.UnexpectedException: Service method
  'public abstract java.lang.String
  faceRecognition.client.AuthService.doAuthenticate
  (java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.l 
  ang.String,java.lang.String)'
  threw an unexpected exception: java.lang.ExceptionInInitializerError
          at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure
  (RPC.java:360)
          at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
  (RPC.java:546)
          at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
  (RemoteServiceServlet.java:166)
          at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
  (RemoteServiceServlet.java:86)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
          at 
  org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
  487)
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
  (ServletHandler.java:1093)
          

Re: gwt 2.0 release date

2009-06-20 Thread Ben

According to the talk by Ray, I think release date could be Q3. But I
think the code is already in the trunk, you can build it by yourself
if you wanna have a look at it.

On Jun 20, 6:08 am, asianCoolz second.co...@gmail.com wrote:
 may  i know when will the RC, or milestone version will be available
 for preview in svn ?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



VerticalPanel error

2009-06-20 Thread Pavel Byles
I am getting an error when using VerticalPanel.
Here's the error as reported by Firebug:
c.a is undefined--

I am calling a Java method from Javascript

Here's the GWT code:
public class Caribbeanvisit implements EntryPoint {
  /**
   * This is the entry point method.
   */

  final VerticalPanel siteFriendsPanel = new VerticalPanel();

  public void onModuleLoad() {
exportAddSiteFriends();

mainPanel.add(siteFriendsPanel);
  }

  public native void exportAddSiteFriends() /*-{
$wnd.addSiteFriends =

th...@com.pavco.caribbeanvisit.client.caribbeanvisit::addSiteFriends([Lcom/pavco/caribbeanvisit/client/JsniPerson;);

  }-*/;

  public void addSiteFriends(JsniPerson[] jso) {
// fyi: JsniPerson extends JavascriptObject
for (JsniPerson person : jso) {
  final HorizontalPanel hp = new HorizontalPanel();
  final Image thumbnail = new Image(person.getThumbnailUrl());
  final HTML txt = new HTML(person.getDisplayName());
  hp.add(thumbnail);
  hp.add(txt);
  this.siteFriendsPanel.add(hp);  // --- error happens here
  this.siteFriendsPanel.add(new HTML(TEST));  // --- error happens
here also
}
  }
}

Any ideas?
-Pav

--~--~-~--~~~---~--~~
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: Hyperlink is not working after 1st try

2009-06-20 Thread hezjing
To close this thread, the solution is to rest the history token by adding
the following line:

private void displayLogin() {
...
// reset the current token
History.newItem(login, false);
}


Thanks Ian and Paul!


On Sun, Jun 21, 2009 at 2:56 AM, Paul Robinson ukcue...@gmail.com wrote:


 The first time you press the hyperlink to logout, there's a new
 history item added of that name. The second time you press it, the
 current history token is still logout, so it does nothing.


 hezjing wrote:
  Hi
 
  I have the following code which suppose to do the following:
 
  1) when the login button is clicked, it will clear the RootPanel and
  show a logout hyperlink,
 
  2) when the logout hyperlink is selected, it will clear the RootPanel
  and show the login button again.
 
 
  public class Dummy implements EntryPoint, ValueChangeHandlerString {
 
  public void onModuleLoad() {
  History.addValueChangeHandler(this);
  displayLogin();
  }
 
  private void displayLogin() {
  Button ok = new Button(Login);
  ok.addClickHandler(new ClickHandler() {
  public void onClick(ClickEvent event) {
  displayContent();
  }
  });
  RootPanel root = RootPanel.get();
  root.clear();
  root.add(ok);
  }
 
  private void displayContent() {
  Hyperlink logout = new Hyperlink(Logout, logout);
  RootPanel root = RootPanel.get();
  root.clear();
  root.add(logout);
  }
 
  public void onValueChange(ValueChangeEventString event) {
  if (event.getValue().equals(logout)) {
  displayLogin();
  }
  }
  }
 
 
  The problem is when tested in hosted mode, the hyperlink stops
  responding after the 1st time:
 
  1) Login button is clicked, show logout hyperlink
 
  2) Logout hyperlink is selected, show login button
 
  3) Login button is clicked, show logout hyperlink
 
  4) Logout hyperlink is selected, and NOTHING happen here!
 
 
  Do you have any idea of what could be the problem?
 
 
  --
 
  Hez
 
  

 



-- 

Hez

--~--~-~--~~~---~--~~
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: maps-api Directions color

2009-06-20 Thread Eric Ayers
Ok.  It is more work to set it up and add the items to the map, but if you
look at the DirectionsResult object and the corresponding classes to create
a directions query, you'll see that there is an option to return the
polyline object.  You can set the style on that object to change its color
and then manually add it to the map.

On Fri, Jun 19, 2009 at 1:55 PM, Enea eneager...@gmail.com wrote:


 Hi Eric,
 thank you for your answare.

 I 've tried what you tell me, but setting a style to a
 DirectionsPanel ,only affects the Panel where the textual directions
 are listed.

 My purpose was another:
 change the color of the tour on the map.
 The default color is purple:

 for example:


 http://maps.google.com/maps?f=qsource=s_qhl=itgeocode=q=da+giubiasco+a+locarnosll=37.509726,-95.712891sspn=42.145189,79.101563ie=UTF8ll=46.186961,8.926048spn=0.145225,0.30899t=hz=12

 if you open this map, you see that the color of the street to do, is
 purple...
 It's possible to change this color?


 On 19 Giu, 13:33, Eric Ayers zun...@google.com wrote:
  I think you could do this with CSS.  Put a style on your DirectionsPanel
 with
 
  directionsPanel1.setStyleName(directions1);
  directionsPanel2.setStyleName(directions2);
 
  .css file:
 
  .directions1 {
background-color: #eee;}
 
  .directions2 {
background-color: #fee;
 
  }
 
  Or, if you wanted to affect some elements specifically in a different
  way, you could use CSS descendent selectors:
 
  .directions1 td {
color: red;
 
  }
 
  .directions2 td {
color: green;
 
  }
 
  Look at the DOM using firebug or another tool to see which elements
  and classnames are are defined inside the Directions Panel.
 
  -Eric
 
 
 
  On Thu, Jun 18, 2009 at 7:03 PM, Eneaeneager...@gmail.com wrote:
 
   hi,
   This is my first post here... :)
   My question is if there is a way to change the color of Directions
   shown on a Map with the gwt-maps api.
   I have searched in the api but not found...
   my problem is that i have to display more than one tour, and it
   would be nice to show these tours in different colors.
 
   Thanks in advance :)
 
   ---gwt|rocks---
 
  --
  Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://
 code.google.com/webtoolkit/
 



-- 
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

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



Re: VerticalPanel error

2009-06-20 Thread Pavel Byles
Just to be clear,
I'm using GWT1.6, error occurs in FF and Chrome (didn't check any other
browser yet), and I call addSiteFriends(myJsObj) from javascript in the
html.
EntryPoint does contain other stuff... so mainPanel is added to RootPanel...

On Sat, Jun 20, 2009 at 9:36 PM, Pavel Byles pavelby...@gmail.com wrote:

 I am getting an error when using VerticalPanel.
 Here's the error as reported by Firebug:
 c.a is undefined--

 I am calling a Java method from Javascript

 Here's the GWT code:
 public class Caribbeanvisit implements EntryPoint {
   /**
* This is the entry point method.
*/

   final VerticalPanel siteFriendsPanel = new VerticalPanel();

   public void onModuleLoad() {
 exportAddSiteFriends();

 mainPanel.add(siteFriendsPanel);
   }

   public native void exportAddSiteFriends() /*-{
 $wnd.addSiteFriends =
 
 th...@com.pavco.caribbeanvisit.client.caribbeanvisit::addSiteFriends([Lcom/pavco/caribbeanvisit/client/JsniPerson;);

   }-*/;

   public void addSiteFriends(JsniPerson[] jso) {
 // fyi: JsniPerson extends JavascriptObject
 for (JsniPerson person : jso) {
   final HorizontalPanel hp = new HorizontalPanel();
   final Image thumbnail = new Image(person.getThumbnailUrl());
   final HTML txt = new HTML(person.getDisplayName());
   hp.add(thumbnail);
   hp.add(txt);
   this.siteFriendsPanel.add(hp);  // --- error happens here
   this.siteFriendsPanel.add(new HTML(TEST));  // --- error happens
 here also
 }
   }
 }

 Any ideas?
 -Pav




-- 
-Pavel

--~--~-~--~~~---~--~~
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: VerticalPanel error

2009-06-20 Thread Pavel Byles
Found fix.
Making the verticalpanel's static solves it.

On Sun, Jun 21, 2009 at 12:57 AM, Pavel Byles pavelby...@gmail.com wrote:

 Just to be clear,
 I'm using GWT1.6, error occurs in FF and Chrome (didn't check any other
 browser yet), and I call addSiteFriends(myJsObj) from javascript in the
 html.
 EntryPoint does contain other stuff... so mainPanel is added to
 RootPanel...


 On Sat, Jun 20, 2009 at 9:36 PM, Pavel Byles pavelby...@gmail.com wrote:

 I am getting an error when using VerticalPanel.
 Here's the error as reported by Firebug:
 c.a is undefined--

 I am calling a Java method from Javascript

 Here's the GWT code:
 public class Caribbeanvisit implements EntryPoint {
   /**
* This is the entry point method.
*/

   final VerticalPanel siteFriendsPanel = new VerticalPanel();

   public void onModuleLoad() {
 exportAddSiteFriends();

 mainPanel.add(siteFriendsPanel);
   }

   public native void exportAddSiteFriends() /*-{
 $wnd.addSiteFriends =
 
 th...@com.pavco.caribbeanvisit.client.caribbeanvisit::addSiteFriends([Lcom/pavco/caribbeanvisit/client/JsniPerson;);

   }-*/;

   public void addSiteFriends(JsniPerson[] jso) {
 // fyi: JsniPerson extends JavascriptObject
 for (JsniPerson person : jso) {
   final HorizontalPanel hp = new HorizontalPanel();
   final Image thumbnail = new Image(person.getThumbnailUrl());
   final HTML txt = new HTML(person.getDisplayName());
   hp.add(thumbnail);
   hp.add(txt);
   this.siteFriendsPanel.add(hp);  // --- error happens here
   this.siteFriendsPanel.add(new HTML(TEST));  // --- error happens
 here also
 }
   }
 }

 Any ideas?
 -Pav




 --
 -Pavel




-- 
-Pav

--~--~-~--~~~---~--~~
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-contrib] Running unit tests in eclipse fails with trunk and oophm

2009-06-20 Thread tfreitas

Hi, i use trunk and oophm, gwt eclipse pluging 1.0.1

The error when i run test is

java.lang.NoSuchMethodError:
com.google.gwt.junit.JUnitShell.getCompilerOptions()Lcom/google/gwt/
dev/LegacyCompilerOptions;
at com.google.gwt.junit.JUnitShell.initializeLogger(JUnitShell.java:
548)
at com.google.gwt.dev.HostedModeBase.doStartup(HostedModeBase.java:
482)
at com.google.gwt.dev.OophmHostedModeBase.doStartup
(OophmHostedModeBase.java:333)
at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:592)
at com.google.gwt.junit.JUnitShell.getUnitTestShell(JUnitShell.java:
437)
at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:373)
at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:
223)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:132)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run
(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run
(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
(RemoteTestRunner.java:196)


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