Re: Why does HorizontalPanel cells defaults to vertical-align: top?

2009-06-29 Thread alex.d

panel.setCellVerticalAlignment(textbox,
HasVerticalAlignment.ALIGN_BOTTOM);

On 27 Jun., 21:59, max3000 maxime.lar...@gmail.com wrote:
 Hi,

 I'm trying to align an image and a textbox in a HorizontalPanel using
 only CSS. I want the textbox to be aligned at the bottom.

 Doing the following works:
 panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);

 However, no amount of CSS at the panel level works. It figures because
 GWT inserts an automatic vertical-align: top, like this:

 td align=left style=vertical-align: top;
 img class=search_logo src=/resources/logo.jpg/
 /td

 Why is that so? Am I missing something or is there no way to align
 cell content at the bottom using CSS?

 Thanks,
 Max
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Graph Visualization

2009-06-29 Thread Alexander Kosenkov

Hello,

I'm going to create GWT wrapper for JavaScript InfoVis Toolkit (http://
thejit.org/demos/).
It looks really promissing and nice.

Please, if someone is willing to participate, you are welcome:
http://code.google.com/p/gwt-graph/

--~--~-~--~~~---~--~~
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 HTTP authentication working in hosted mode using GWT 1.6

2009-06-29 Thread cschoett

Hi Roman,

I had the same issue after upgrading to GWT 1.6 and after a lot of
trial and error I found a solution.
You must add a jetty-web.xml to your configuration. Put it in the
beside your web.xml file.

My confifiguration looks like the following:

?xml version=1.0?
!DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//EN
http://jetty.mortbay.org/configure.dtd;
Configure class=org.mortbay.jetty.webapp.WebAppContext

Get name=SecurityHandler
Call name=setUserRealm
Arg
New 
class=org.mortbay.jetty.security.JDBCUserRealm
Set name=nameyour realm 
name/Set
Set 
name=configjdbcRealm.properties/Set
/New
/Arg
/Call
/Get
/Configure

In the referenced jdbcRealm.properties the realm is configured (db
access, user and role tables). You should find out how to configure
this in the jetty documentation.

This is the cleanest solution I found and it works for me without
problems.

Regards,
Christoph
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



How to prevent hosted mode web server from sending charset in the HTTP-Header?

2009-06-29 Thread alex.d

How to prevent hosted mode web server from sending charset in the HTTP-
Header?
Setting charset in the HTML META Header should actually be enough.
--~--~-~--~~~---~--~~
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-29 Thread Sowjanya Yerramneni
Hi,

I am using spring and hibernate in my gwt application.
I configured my datasource in the application-context.xml.

bean id=*dataSource
*

class=*org.springframework.jdbc.datasource.DriverManagerDataSource*

property name=*driverClassName*

valuejdbc.odbc.driver.OracleDriver/value

/property

property name=*url*

valuejdbc:oracle:thin:@10.10.10.21:1521:*wpstdev*/value

/property

property name=*username*

value*dohsy*/value

/property

property name=*password*

valuepassword/value

/property

/bean
When I run the application (in hosted mode ) I get the 'couldnot connect
jdbc connection error' though I had classes12.jar in my classpath.
Please help.



On Sat, Jun 27, 2009 at 8:17 PM, @vi aviral.ban...@gmail.com wrote:


 Why is this restriction there?

 Is there some kind of custom Security implemented for Google Apps?

 On Jun 21, 2:40 am, Petein majestyel...@gmail.com wrote:
  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 

Re: Eclipse plugin invalid errors in JSNI methods

2009-06-29 Thread Clive Cox


 public static void setTags(String tags)



On Jun 26, 6:23 pm, Miguel Méndez mmen...@google.com wrote:
 What does the java declaration for the setTags method look like?



 On Fri, Jun 26, 2009 at 12:36 PM, Clive Cox clive@rummble.com wrote:

  In Eclipse 3.4.1 with latest Google plugin I get errors showing for
  String arguments in JSNI methods.
  Eclipse shows an error that the method does not exist even when it
  does.

  For example:

public native void setupDelegatorSetTags() /*-{
  $wnd.setRexTags = function(tags) {
@example.client.App::setTags(Ljava/lang/String;)(tags);
  }
}-*/;

  Any ideas anybody?

 --
 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: gwt and jdbc

2009-06-29 Thread Keerthan MUTHURASA
Hi Sowjanya,

2009/6/29 Sowjanya Yerramneni y.sowja...@gmail.com

 Hi,

 I am using spring and hibernate in my gwt application.
 I configured my datasource in the application-context.xml.

 
 bean id=*dataSource*

 class=*org.springframework.jdbc.datasource.DriverManagerDataSource*

 property name=*driverClassName*

 valuejdbc.odbc.driver.OracleDriver/value

 /property

 property name=*url*

 valuejdbc:oracle:thin:@10.10.10.21:1521:*wpstdev*/value

 /property

 property name=*username*

 value*dohsy*/value

 /property

 property name=*password*

 valuepassword/value

 /property

 /bean
 When I run the application (in hosted mode ) I get the 'couldnot connect
 jdbc connection error' though I had classes12.jar in my classpath.
 Please help.


Do you also have your jar in your application server classpath as well
(WEB-INF/lib) ?





 On Sat, Jun 27, 2009 at 8:17 PM, @vi aviral.ban...@gmail.com wrote:


 Why is this restriction there?

 Is there some kind of custom Security implemented for Google Apps?

 On Jun 21, 2:40 am, Petein majestyel...@gmail.com wrote:
  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; 

Re: gwt and jdbc

2009-06-29 Thread Sowjanya Yerramneni
i have it in my web-inf/lib.

Where else should i place it? please be lil clear.


Thanks for your quick response.

On Mon, Jun 29, 2009 at 2:24 PM, Keerthan MUTHURASA 
muthurasa.keert...@gmail.com wrote:

 Hi Sowjanya,

 2009/6/29 Sowjanya Yerramneni y.sowja...@gmail.com

 Hi,

 I am using spring and hibernate in my gwt application.
 I configured my datasource in the application-context.xml.

 
 bean id=*dataSource*

 class=*org.springframework.jdbc.datasource.DriverManagerDataSource*

 property name=*driverClassName*

 valuejdbc.odbc.driver.OracleDriver/value

 /property

 property name=*url*

 valuejdbc:oracle:thin:@10.10.10.21:1521:*wpstdev*/value

 /property

 property name=*username*

 value*dohsy*/value

 /property

 property name=*password*

 valuepassword/value

 /property

 /bean
 When I run the application (in hosted mode ) I get the 'couldnot connect
 jdbc connection error' though I had classes12.jar in my classpath.
 Please help.


 Do you also have your jar in your application server classpath as well
 (WEB-INF/lib) ?





   On Sat, Jun 27, 2009 at 8:17 PM, @vi aviral.ban...@gmail.com wrote:


 Why is this restriction there?

 Is there some kind of custom Security implemented for Google Apps?

 On Jun 21, 2:40 am, Petein majestyel...@gmail.com wrote:
  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 

Re: gwt and jdbc

2009-06-29 Thread Sowjanya Yerramneni
I tried to run the same on tomcat. I have it on the tomcat's common/lib
folder... Still it did not work on tomcat too.

On Mon, Jun 29, 2009 at 2:53 PM, Sowjanya Yerramneni
y.sowja...@gmail.comwrote:

 i have it in my web-inf/lib.

 Where else should i place it? please be lil clear.


 Thanks for your quick response.

   On Mon, Jun 29, 2009 at 2:24 PM, Keerthan MUTHURASA 
 muthurasa.keert...@gmail.com wrote:

 Hi Sowjanya,

 2009/6/29 Sowjanya Yerramneni y.sowja...@gmail.com

 Hi,

 I am using spring and hibernate in my gwt application.
 I configured my datasource in the application-context.xml.

 
 bean id=*dataSource*

 class=*org.springframework.jdbc.datasource.DriverManagerDataSource*

 property name=*driverClassName*

 valuejdbc.odbc.driver.OracleDriver/value

 /property

 property name=*url*

 valuejdbc:oracle:thin:@10.10.10.21:1521:*wpstdev*/value

 /property

 property name=*username*

 value*dohsy*/value

 /property

 property name=*password*

 valuepassword/value

 /property

 /bean
 When I run the application (in hosted mode ) I get the 'couldnot connect
 jdbc connection error' though I had classes12.jar in my classpath.
 Please help.


 Do you also have your jar in your application server classpath as well
 (WEB-INF/lib) ?





   On Sat, Jun 27, 2009 at 8:17 PM, @vi aviral.ban...@gmail.com wrote:


 Why is this restriction there?

 Is there some kind of custom Security implemented for Google Apps?

 On Jun 21, 2:40 am, Petein majestyel...@gmail.com wrote:
  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 

Re: gwt and jdbc

2009-06-29 Thread Keerthan MUTHURASA
Here the steps I followed to solve the previous mysql connection related
error:

1- Add MySQL Connector to Eclipse and Tomcat Classpath
2- Created the class that connect to mysql (AuthServiceImpl  in the previous
case)
3- Configure Interfaces on the client side (AuthService and
AuthServiceAsync)
4- Configure the gwt.xml file  by adding the following

servlet class=com.myproject.server.AuthServiceImpl 
path=/AuthServiceI /

Could you print your error stack, that could help people to understand your
problem.

2009/6/29 Sowjanya Yerramneni y.sowja...@gmail.com

 I tried to run the same on tomcat. I have it on the tomcat's common/lib
 folder... Still it did not work on tomcat too.


 On Mon, Jun 29, 2009 at 2:53 PM, Sowjanya Yerramneni y.sowja...@gmail.com
  wrote:

 i have it in my web-inf/lib.

 Where else should i place it? please be lil clear.


 Thanks for your quick response.

   On Mon, Jun 29, 2009 at 2:24 PM, Keerthan MUTHURASA 
 muthurasa.keert...@gmail.com wrote:

 Hi Sowjanya,

 2009/6/29 Sowjanya Yerramneni y.sowja...@gmail.com

 Hi,

 I am using spring and hibernate in my gwt application.
 I configured my datasource in the application-context.xml.

 
 bean id=*dataSource*

 class=*org.springframework.jdbc.datasource.DriverManagerDataSource*

 property name=*driverClassName*

 valuejdbc.odbc.driver.OracleDriver/value

 /property

 property name=*url*

 valuejdbc:oracle:thin:@10.10.10.21:1521:*wpstdev*/value

 /property

 property name=*username*

 value*dohsy*/value

 /property

 property name=*password*

 valuepassword/value

 /property

 /bean
 When I run the application (in hosted mode ) I get the 'couldnot connect
 jdbc connection error' though I had classes12.jar in my classpath.
 Please help.


 Do you also have your jar in your application server classpath as well
 (WEB-INF/lib) ?





   On Sat, Jun 27, 2009 at 8:17 PM, @vi aviral.ban...@gmail.com wrote:


 Why is this restriction there?

 Is there some kind of custom Security implemented for Google Apps?

 On Jun 21, 2:40 am, Petein majestyel...@gmail.com wrote:
  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

Re: same-origin security restriction

2009-06-29 Thread Thomas Broyer



On 28 juin, 11:58, sai surya kiran master...@gmail.com wrote:
 Hi,
 What port of service do you suggest to use ? I am a complete newbie and
 please suggest on how to make a proxy.

 currently authentication server runs on 6828. and GWT runs on , so
 please suggest the change here.

You can either:
 - use your webapp within the hosted mode (-Dcatalina.base=... if
you're using GWTShell, -war ... if you're using HostedMode) instead of
a separate Tomat instance
 - use the -noserver mode of hosted mode (GWTShell or HostedMode);
search the docs and the group for how to use it (I'm a bit tired of
repeating it over and over again)
 - use a proxy servlet in the hosted mode to relay requests to your
separate tomcat instance; search the issue tracker for contribution
proxying servlet to find one (code + how to use it)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-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: (re-posting) GWT 1.6 and -whitelist

2009-06-29 Thread Thomas Broyer



On 27 juin, 15:46, babakm bmo...@gmail.com wrote:
 I have a GWT 1.6 app that uses Ajax requests to talk to a server. I
 need to whitelist the URL for my ajax call so it would work in hosted
 mode. I have tried to pass -whitelist .* (anything) and also many
 other combinations in Eclipse and also in command line (see below). It
 simply ignores the whitelist parameters and prevents me from accessing
 it.

 Has this feature been changed in 1.6.4? I checked the command line
 arguments and followed them to the letter. I've set my classpath to
 the proper one (includes what needs to be there) and this is the
 command line:

 code
 java -XstartOnFirstThread -Xmx512M -Xdebug
 com.google.gwt.dev.HostedMode -whitelist .* -logLevel DEBUG -
 startupUrl Imagedex.html com.intillium.imagedex.Imagedex
 /code

This has changed in 1.5.3 actually. See
http://code.google.com/p/google-web-toolkit/issues/detail?id=3131
which contains workaround (-noserver or proxying servlet)

--~--~-~--~~~---~--~~
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 allow only numbers (gwt 1.6.4)

2009-06-29 Thread Dominik Erbsland

thanks for the help so far.
I am aware that there is a new handler system - I just can't figure
out a way how to make a TextBox field numbers only.
I tried with a KeyUpHandler and a ValueChangeHandler but could not
find suitable methods to check the input for its validity.
any hints?


On Jun 26, 8:21 pm, Miroslav Genov mgenov.j...@gmail.com wrote:
 In GWT 1.6 old listener api has been deprecated and were introduced new
 event system which is using handlers. More information about your case
 can be taken from:

  http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/g...

  textBox.addKeyPressHandler and so on.

  Wish you good luck.

 Regards,
   Miroslav

 Dominik Erbsland wrote:
  I just saw that addKeyListener() is deprecated in gwt 1.6.4.
  Actually I just wanted to make a listener which checks the user input
  in a text box and allows only numbers.

  with gwt 1.6.4 I could not figure out how to do that since I should
  not use the keyboard listener anymore.
  any hints how I can check the input with the KeyUpHandler of gwt
  1.6.4?

  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: Problem specifying Grid's cell size

2009-06-29 Thread Ian Bambury
You can apply border-spacing to a table (e.g. your grid) which adjusts the
spacing between cells. To get rid of it completely, you need to set
border-collapse:collapse to the *table* (not the cells - i.e.not the td
elements)
I think you can get away with setting font-size on the table/grid and to
make the css easier, you might like to set style something like below. It
makes the code easier to read (e.g. every cell has ne. n, nw to indicate
where it is in the grid) and the css is so much simpler - you set all the
widths/heights in one place and therefore don't miss any if you change from
5px to 3px, say.

Grid grid = new Grid(3, 3);
grid.setStylePrimaryName(my-Grid);
CellFormatter f = grid.getCellFormatter();
f.setStyleName(0, 0, my-Grid-ne my-Grid-border-row
my-Grid-border-col);
f.setStyleName(0, 1, my-Grid-n  my-Grid-border-row);
f.setStyleName(0, 1, my-Grid-nw my-Grid-border-row
my-Grid-border-col);
f.setStyleName(1, 0, my-Grid-e  my-Grid-border-col);
.
.
.
and then the css is simpler

.my-Grid
{
font-size   :  1px;
border-collapse :   collapse;
}
.my-Grid-border-row
{
height  :5px;
}
.my-Grid-border-col
{
width   :5px;
}
.my-Grid-ne
{
/* put the north-east corner image here */
}
etc

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: Why does HorizontalPanel cells defaults to vertical-align: top?

2009-06-29 Thread Ian Bambury
vertical-align: bottom !important;
?

Ian

http://examples.roughian.com


2009/6/29 alex.d alex.dukhov...@googlemail.com


 panel.setCellVerticalAlignment(textbox,
 HasVerticalAlignment.ALIGN_BOTTOM);

 On 27 Jun., 21:59, max3000 maxime.lar...@gmail.com wrote:
  Hi,
 
  I'm trying to align an image and a textbox in a HorizontalPanel using
  only CSS. I want the textbox to be aligned at the bottom.
 
  Doing the following works:
  panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
 
  However, no amount of CSS at the panel level works. It figures because
  GWT inserts an automatic vertical-align: top, like this:
 
  td align=left style=vertical-align: top;
  img class=search_logo src=/resources/logo.jpg/
  /td
 
  Why is that so? Am I missing something or is there no way to align
  cell content at the bottom using CSS?
 
  Thanks,
  Max
 


--~--~-~--~~~---~--~~
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 know when a Widget is fully loaded....

2009-06-29 Thread Sean

Hi Adam,

Thanks for all the great ideas. I also think it has to do with images
not being fully loaded. This has been my biggest hurdle with GWT. I
tend to use a lot of images, and rely a lot on image sizes, but they
aren't very reliable because of the fact that the image could be
initialized, without being downloaded yet. I didn't know Load Handlers
existed. That stinks it doesn't work well with IE. I think I do need
to look into using the CSS more with %'s.

Thanks again for all the ideas!

Sean

On Jun 28, 5:02 am, Adam T adam.t...@gmail.com wrote:
 You can generally hook into when a widget is ready in the DOM by
 overriding it's onLoad() method.

 However, if you have Images you need to do more work as whilst the DOM
 aspect of the Image widget may be ready in DOM it may not have size as
 the actual image is not downloaded yet - your resizing is most likely
 working a second time around as images are also already cached and
 available immediately.

 I can think of two options of the top of my head, there are probably
 more

 a) use LoadHandlers on your Image(s) these will tell you when the
 Image has loaded and then you can trigger your resize (however, it's
 not 100% perfect with IE and the current version of GWT 
 -http://code.google.com/p/google-web-toolkit/issues/detail?id=863q=ie...)
 b) enforce Image size using CSS either directly on the Image, or put
 the Image widget in another container (SimplePanel, for example) and
 set Image to 100% and size of SimplePanel to what you require through
 CSS
 c) do what you're doing with a timer until approach in (a) is fixed in
 gwt

 I wonder though if you can't achieve what you want just by using
 percentages in Style Sheet

 Hope that helps

 //Adam

 On 27 Juni, 16:42, Sean slough...@gmail.com wrote:

  I'm having trouble with pictures loading fully to know a widgets full
  size. I have my main website component as a Composite. It's got quite
  a few pictures, including one large one. I place this main component
  on an Absolute Panel. I have a Resize Listener to figure out how big
  the Client Window is, and if it's larger then the main component, make
  the Absolute Panel as big as the Client window and put the main
  component in the middle of the ABS.

  It works perfectly when the page is cached, however, if it's not, the
  size of the main component can be anywhere from 0-300-to1044(it's full
  size) depending on what's loaded the first time I try to arrange them
  all together.

  How can I, besides using a timer with an arbitrary time, know when all
  of the main component's sub-components are loaded to know when to call
  the resize function?

  Thank you!
--~--~-~--~~~---~--~~
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 plugin invalid errors in JSNI methods

2009-06-29 Thread Miguel Méndez
Unfortunately, I cannot reproduce the problem.  However, could you create an
issue in the GWT issue
trackerhttp://code.google.com/p/google-web-toolkit/issues/listand
attach sample code that reproduces the problem?

On Mon, Jun 29, 2009 at 4:41 AM, Clive Cox clive@rummble.com wrote:



  public static void setTags(String tags)



 On Jun 26, 6:23 pm, Miguel Méndez mmen...@google.com wrote:
  What does the java declaration for the setTags method look like?
 
 
 
  On Fri, Jun 26, 2009 at 12:36 PM, Clive Cox clive@rummble.com
 wrote:
 
   In Eclipse 3.4.1 with latest Google plugin I get errors showing for
   String arguments in JSNI methods.
   Eclipse shows an error that the method does not exist even when it
   does.
 
   For example:
 
 public native void setupDelegatorSetTags() /*-{
   $wnd.setRexTags = function(tags) {
 @example.client.App::setTags(Ljava/lang/String;)(tags);
   }
 }-*/;
 
   Any ideas anybody?
 
  --
  Miguel
 



-- 
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: WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

2009-06-29 Thread Miguel Méndez
What was going on when the error was reported?  How was it reported?  Was
there a stack trace?

On Sat, Jun 27, 2009 at 3:03 PM, Farinha fari...@gmail.com wrote:


 The subject has it all.

 Eclipse 3.4.2
 GWT Eclipse Plugin
 Windows 7

 Thanks in advance for the help.

 



-- 
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: How to know when a Widget is fully loaded....

2009-06-29 Thread Sean

I'm also thinking about adding the size of the image to the DB. So I
can at least set up my panel sizes correctly, and just let the
pictures fill it in as they download.

On Jun 29, 8:14 am, Sean slough...@gmail.com wrote:
 Hi Adam,

 Thanks for all the great ideas. I also think it has to do with images
 not being fully loaded. This has been my biggest hurdle with GWT. I
 tend to use a lot of images, and rely a lot on image sizes, but they
 aren't very reliable because of the fact that the image could be
 initialized, without being downloaded yet. I didn't know Load Handlers
 existed. That stinks it doesn't work well with IE. I think I do need
 to look into using the CSS more with %'s.

 Thanks again for all the ideas!

 Sean

 On Jun 28, 5:02 am, Adam T adam.t...@gmail.com wrote:

  You can generally hook into when a widget is ready in the DOM by
  overriding it's onLoad() method.

  However, if you have Images you need to do more work as whilst the DOM
  aspect of the Image widget may be ready in DOM it may not have size as
  the actual image is not downloaded yet - your resizing is most likely
  working a second time around as images are also already cached and
  available immediately.

  I can think of two options of the top of my head, there are probably
  more

  a) use LoadHandlers on your Image(s) these will tell you when the
  Image has loaded and then you can trigger your resize (however, it's
  not 100% perfect with IE and the current version of GWT 
  -http://code.google.com/p/google-web-toolkit/issues/detail?id=863q=ie...)
  b) enforce Image size using CSS either directly on the Image, or put
  the Image widget in another container (SimplePanel, for example) and
  set Image to 100% and size of SimplePanel to what you require through
  CSS
  c) do what you're doing with a timer until approach in (a) is fixed in
  gwt

  I wonder though if you can't achieve what you want just by using
  percentages in Style Sheet

  Hope that helps

  //Adam

  On 27 Juni, 16:42, Sean slough...@gmail.com wrote:

   I'm having trouble with pictures loading fully to know a widgets full
   size. I have my main website component as a Composite. It's got quite
   a few pictures, including one large one. I place this main component
   on an Absolute Panel. I have a Resize Listener to figure out how big
   the Client Window is, and if it's larger then the main component, make
   the Absolute Panel as big as the Client window and put the main
   component in the middle of the ABS.

   It works perfectly when the page is cached, however, if it's not, the
   size of the main component can be anywhere from 0-300-to1044(it's full
   size) depending on what's loaded the first time I try to arrange them
   all together.

   How can I, besides using a timer with an arbitrary time, know when all
   of the main component's sub-components are loaded to know when to call
   the resize function?

   Thank you!
--~--~-~--~~~---~--~~
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: Default Sample Project (GreetingService) doesn't display widgets in hosted mode

2009-06-29 Thread Miguel Méndez
What OS are you running on?  Also, what exact version of eclipse are you
using?

On Fri, Jun 26, 2009 at 6:35 PM, mcjames01 mcjame...@msn.com wrote:


 I set the log level to ALL and see that I'm getting a couple
 exceptions.
 The first one is:
 org.mortbay.jetty.HttpException: null
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:276)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run
 (SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
 (QueuedThreadPool.java:488)

 In the log it's immediately preceded by these two logs:

 [SPAM] uri=/foobar/hosted.html?foobar

 [SPAM] fields=Accept: image/gif, image/x-xbitmap, image/jpeg, image/
 pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
 application/msword, application/x-ms-application, application/x-ms-
 xbap, application/vnd.ms-xpsdocument, application/xaml+xml,
 application/x-shockwave-flash, */*
 Referer: http://localhost:4959/FooBar.html
 Accept-Language: en-us
 UA-CPU: x86
 Accept-Encoding: gzip, deflate
 User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET
 CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR
 3.5.21022; MS-RTC LM 8)
 Host: localhost:4959
 Connection: Keep-Alive

 Prior to this I was seeing successful RESPONSE (200) for the
 clear.cache.gif

 Then the second one is:

 [SPAM] EXCEPTION
 java.io.IOException: An existing connection was forcibly closed by the
 remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at org.mortbay.io.nio.ChannelEndPoint.fill(ChannelEndPoint.java:122)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:281)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run
 (SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run
 (QueuedThreadPool.java:488)

 Apparently it died.  This occurred immediately after a succesful
 REQEST/RESPONSE for the gwt/standard/standard.css resource.

 Any ideas what to look for in my environment?

 On Jun 26, 3:54 pm, mcjames01 mcjame...@msn.com wrote:
  Here's what I did:
 
  From a fresh eclipse 3.4 installation, GWT 1.6.4, with the 1.0.1 GWT
  plugin I created a new Google Web Application (File-New-Other
  Google-Web Application Project)
 
  I named it FooBar, used com.example.foobar as the package.  Chose
  Create in project workspace, Checked Use Google Web Toolkit, and Use
  default SDK (GWT - 1.6.4).  Unchecked Use Google App Engine.  Clicked
  on Finish.
 
  I right clicked on the project, chose Run As-Google Web Application.
  The shell opened and the hosted browser came up, but only the contents
  of the host HTML file displayed, no text boxes, no buttons.  Nothing.
 
  See my previous post for the contents of the shell:
 http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
 
  Any suggestions?  I'm going to see if I can turn up the log level to
  see if I can get more clues.
 



-- 
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: Newbie question re returning persisted objects via RPC to client

2009-06-29 Thread Will

I took a slightly different approach to option 1.

I created a interfaces that describe the Animal and made both the DTO
and GWT implement the interfaces.  This lets me control the
dependencies and ended up cutting down on the amount data I needed to
send to the browser.  I'm actually referring to a scheduling
application but to keep the Animal analogy I found that the majority
of components only needed to know the animal's species and age, not
every detail that was in the object.

On Jun 29, 12:34 am, Dalla dalla_man...@hotmail.com wrote:
 You would have to do it either like you suggested; create two separate
 classes,
 one persistence class, and then one DTO class.

 Or you could create just a POJO and keep the persistence info in a
 separate mapping file.

 From what I understand, most tend to go with the first option.

 On 28 Juni, 14:09, Ben Daniel bendan...@gmail.com wrote:

  Let's say I want to persist Animal objects using JDO and also want to
  return these Animal objects via a GWT RPC service. From what I
  understand GWT will compile a version of Animal in javascript on the
  client. And I take it that any JDO persistence stuff shouldn't be
  going down to the client.

  So do I have to create two separate classes for my Animal type: one
  used on the server for persistence via JDO and another which the
  client uses over RPC. Is this the normal thing to do?
--~--~-~--~~~---~--~~
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: WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

2009-06-29 Thread Chad

Miguel,

I get the same error. It's generated from Eclipse and shows in the
Console of Eclipse. It appears every time I run or compile an
application. I don't think it's a GWT issue. I searched around when I
first saw and IIRC, it's an issue within Eclipse itself. Trying to
write to the wrong registry root or something like that.

HTH,
Chad

On Jun 29, 7:46 am, Miguel Méndez mmen...@google.com wrote:
 What was going on when the error was reported?  How was it reported?  Was
 there a stack trace?

 On Sat, Jun 27, 2009 at 3:03 PM, Farinha fari...@gmail.com wrote:

  The subject has it all.

  Eclipse 3.4.2
  GWT Eclipse Plugin
  Windows 7

  Thanks in advance for the help.

 --
 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: WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

2009-06-29 Thread Miguel Méndez
Thanks Chad.  I must admit that I have never encountered that one.
However, I did find the following bug in Java's bug tracker:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4479451.

On Mon, Jun 29, 2009 at 9:58 AM, Chad chad...@gmail.com wrote:


 Miguel,

 I get the same error. It's generated from Eclipse and shows in the
 Console of Eclipse. It appears every time I run or compile an
 application. I don't think it's a GWT issue. I searched around when I
 first saw and IIRC, it's an issue within Eclipse itself. Trying to
 write to the wrong registry root or something like that.

 HTH,
 Chad

 On Jun 29, 7:46 am, Miguel Méndez mmen...@google.com wrote:
  What was going on when the error was reported?  How was it reported?  Was
  there a stack trace?
 
  On Sat, Jun 27, 2009 at 3:03 PM, Farinha fari...@gmail.com wrote:
 
   The subject has it all.
 
   Eclipse 3.4.2
   GWT Eclipse Plugin
   Windows 7
 
   Thanks in advance for the help.
 
  --
  Miguel
 



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



Invoke oracle from suggestbox on key

2009-06-29 Thread CMB

I would like to add a key handler to the suggestbox so that on a
keydown it would ask the oracle for suggestion from the server, no
matter if there is text or not in the input box.
Is it possible, as I can't find a way to do this (adding the handler
is easy, it's the requestSuggestions bit that I can't figure out)?
--~--~-~--~~~---~--~~
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: Newbie question re returning persisted objects via RPC to client

2009-06-29 Thread Alejandro D. Garin
Hi,

I wrote an example using gwt with java app engine.

http://puntosoft2k.appspot.com/gwt_gae_example.html

The example shows how to create, update, delete and retrieve objects from
app engine datastore to GWT client using RPC. The example use DTO approach.
Source code is available.

Hope that helps.
Regards,
Ale

On Sun, Jun 28, 2009 at 9:09 AM, Ben Daniel bendan...@gmail.com wrote:


 Let's say I want to persist Animal objects using JDO and also want to
 return these Animal objects via a GWT RPC service. From what I
 understand GWT will compile a version of Animal in javascript on the
 client. And I take it that any JDO persistence stuff shouldn't be
 going down to the client.

 So do I have to create two separate classes for my Animal type: one
 used on the server for persistence via JDO and another which the
 client uses over RPC. Is this the normal thing to do?

 


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



Very large GWT app

2009-06-29 Thread Paul van Hoven

I developped a gwt app over the last 3 months. But i found out that
the compiled js file is too large. In total it has a size of 411KB.
Therefore i thought it would be a good idea of splitting up my
application and create some modules. My goal is to split the whole
application up into parts of about 60K-100K. At least the start page
should load very quickly. I have no experience in using modules in gwt
and the google documentation seems to be very brief on this topic.

What is the best approach for splitting up my application?


--~--~-~--~~~---~--~~
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: Very large GWT app

2009-06-29 Thread Thomas Broyer



On 29 juin, 17:19, Paul van Hoven paul.van.ho...@googlemail.com
wrote:
 I developped a gwt app over the last 3 months. But i found out that
 the compiled js file is too large. In total it has a size of 411KB.
 Therefore i thought it would be a good idea of splitting up my
 application and create some modules. My goal is to split the whole
 application up into parts of about 60K-100K. At least the start page
 should load very quickly. I have no experience in using modules in gwt
 and the google documentation seems to be very brief on this topic.

Er, just to be sure, what do you mean by in total [it has a size
of...]? If a single *.cache.html is 411KB then, well, it's not *that*
big (well, our app is approx. 380KB, we're working on it for a year
and a half, but we're sticking to extremely basic things because our
target is IE6 and we obviously don't want our app to be sluggish).
You might want to refactor your app to limit the number of classes (it
also means potentially avoiding third-party widget libraries, most
being bloated (IMO)) and for example use JSO overlays instead of
com.google.gwt.json.*, etc.

 What is the best approach for splitting up my application?

Splitting your code in modules won't help (or will turn maintenance
into a nightmare, depending on how you compile them).

IMO, you'd better trying the trunk (future GWT 2.0) instead of GWT
1.6 (or 1.5), as it comes with many bonuses re. code size et al.,
including splitting output in multiple, small files (search for
runAsync).
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



ImageBundle createImage does not trigger events as opposed to Image

2009-06-29 Thread abby

Hi,
  I just discovered an interesting issue. In one of my views i have a
bunch of widgets like textbox etc and a Proceed button (which is
basically an image). If i create Proceed using new Image(url) all
events are fired for text boxes etc, but if use
ImageBundle.createImage, and someone modified the textbox content and
directly uses the mouse to click on Proceed, change and blur events
for the textbox are not fired.

Is this a bug or an expected behaviour?

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



How i execute cmd.exe via GWT

2009-06-29 Thread Wasin Raktham

How can i execute cmd.exe using GWT?

It access denied when I try to run a local file.

How i fix it?

java.policy? or another

help me please.

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



i18n: UTF-8 and latin1

2009-06-29 Thread matienzar

Hello,

  It's it possible to use my .properties that are in latin1 with GWT.
I know that GWT only admits UTF-8 charset.

 Lot of thanks,

  Marcial

--~--~-~--~~~---~--~~
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 i execute cmd.exe via GWT

2009-06-29 Thread Damien Picard
Hi,

For security issue, you couldn't launch application from a browser.
If you want to do that, you have to pass through an ActiveX control (IE) or
a chrome app (FF) for example, but there is no portable solution, and it is
probably a bad idea to permit it...

Maybe the best way to dot that is to develop a Java applet which could, with
a correct java.policy, execute local file.

Regards,

2009/6/29 Wasin Raktham gif.sk...@gmail.com


 How can i execute cmd.exe using GWT?

 It access denied when I try to run a local file.

 How i fix it?

 java.policy? or another

 help me please.

 



-- 
Damien Picard
Open Source BPM : http://code.google.com/p/osbpm

--~--~-~--~~~---~--~~
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: generics, events, dependency injection

2009-06-29 Thread Ricardo Rocha

Hi again.

On Jun 24, 3:16 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On 24 juin, 12:01, rocha.po...@gmail.com rocha.po...@gmail.com
 wrote:



  Hi all.

  I've been trying to get a nice setup of the best practices presented
  at google i/o. I have something working, but a few questions.

  The first one is how fine-grained do you go for the events you define?
  Say i have events for updates in entities A and B in my model:
  UpdatedAEvent, UpdatedBEvent. To prevent creating new event classes
  for every entity i might add, i liked the idea of usinggenericsafter
  looking at the source code of GWT.

  Classes like:
  public class ModelUpdatedEventV extends
  GwtEventModelUpdatedHandlerV {
  ...
  private static TypeModelUpdatedHandler? TYPE;
  ...
  public static TypeModelUpdatedHandler? getType() {
    if (TYPE == null) {
      TYPE = new TypeModelUpdatedHandler?();
    }
    return TYPE;}

 I'd rather write:
 @SuppressWarning(unchecked)
 public static V TypeModelUpdatedHandlerV getType() {
    return TYPE;

 }

 (TYPE might have to be of type Type?)

 (Given that you most probably won't use ModelUpdatedEvent without its
 TYPE, you can just initialize it in the declaration, like GWT does,
 and have getType() just return TYPE)

  But then i guess i can't use them with an event bus (the
  HandlerManager)? I lack complete understand ofgenericsand wildcards,
  but assuming the class doesn't know the type, this won't work right?

 Even if the class did use V, it wouldn't work, becausegenericsin
 Java are hardly more than just syntactic sugar (google for 
 javagenericserasure).

  eventBus.addHandler(ModelUpdatedEvent.getType(), ...)

 However you write ModelUpdatedEvent/ModelUpdatedHandler, you'd end up
 having all your handlers receive all ModelUpdatedEvent? events.

 The only way you could make this work is having a getType(Class?
 cls) returning a different TypeModelUpdatedHandler? instance for
 each class given as argument:

 public static V TypeModelUpdatedHandlerV getType(ClassV cls) {
    // do your magic here}

 ...
 eventBus.addHandler(ModelUpdatedEvent.getType(A.class), ...);

 ...or you could instead have a getTypeForA() and getTypeForB()
 methods:
 public static TypeModelUpdatedHandlerA getTypeForA() { return
 TYPE_A; }
 public static TypeModelUpdatedHandlerB getTypeForB() { return
 TYPE_B; }

 ...this wouldn't be that different from having a ModelUpdatedEvent
 subclass per model class.

Thanks for your reply. I've done this (multiple subclasses), but was
looking for a better option.


  The second point is regarding dependency injection. I got it working
  for things implementing interfaces, to which i bind implementations.
  But how do you go for the HandlerManager for example? I've tried
  making it a singleton as in:
      protected void configure() {
          ...
          bind(HandlerManager.class).asEagerSingleton();
          ...

  but i get No @Inject or default constructor found for class
  com.google.gwt.event.shared.HandlerManager.

  Same if i use .in(Singleton.class). I've seen that GWT should fallback
  to GWT.create when there's no injection available, but if i don't
  mention the HandlerManager in my injector it also fails.

 ...and GWT.create() expects a default constructor.

 The solution IMO is to use a provider.

Provider it was (as in provider method), it worked fine.

Thanks again,
Ricardo
--~--~-~--~~~---~--~~
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: Why does HorizontalPanel cells defaults to vertical-align: top?

2009-06-29 Thread Joseph Arceneaux
This placement within a panel is very confusing.  I am trying to stack some
labels contiguously in a vertical panel, starting at the top.  But the panel
places the first label at the very top, and then the second label in the
very middle.  I've tried changing the CSS style, and also various
permutations of the following Java:
panel.setVerticalAlignment (HasVerticalAlignment.ALIGN_TOP);
panel.add (label_1);
panel.setCellVerticalAlignment (label_1,
HasVerticalAlignment.ALIGN_TOP);
panel.add (label_2);
panel.setCellVerticalAlignment (offset,
HasVerticalAlignment.ALIGN_TOP);

but nothing seems to change this behavior.

Any suggestions?

Thanks,
Joe

On Mon, Jun 29, 2009 at 5:09 AM, Ian Bambury ianbamb...@gmail.com wrote:

 vertical-align: bottom !important;
 ?

 Ian

 http://examples.roughian.com


 2009/6/29 alex.d alex.dukhov...@googlemail.com


 panel.setCellVerticalAlignment(textbox,
 HasVerticalAlignment.ALIGN_BOTTOM);

 On 27 Jun., 21:59, max3000 maxime.lar...@gmail.com wrote:
  Hi,
 
  I'm trying to align an image and a textbox in a HorizontalPanel using
  only CSS. I want the textbox to be aligned at the bottom.
 
  Doing the following works:
  panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
 
  However, no amount of CSS at the panel level works. It figures because
  GWT inserts an automatic vertical-align: top, like this:
 
  td align=left style=vertical-align: top;
  img class=search_logo src=/resources/logo.jpg/
  /td
 
  Why is that so? Am I missing something or is there no way to align
  cell content at the bottom using CSS?
 
  Thanks,
  Max



 


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



Accessing to Google Insights Information

2009-06-29 Thread Behrang

Hi,

Does anyone know if it is possible to access Google Insights through
an AP? ( or do you know what is the best mailing list to post this
question?) I look forward to hearing from you.

Cheers,

Behrang

--~--~-~--~~~---~--~~
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: Graph Visualization

2009-06-29 Thread Alexander Kosenkov

I'm pleased to say that one more delevoper has joined this project.
--~--~-~--~~~---~--~~
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: Convert a Java Swing Application

2009-06-29 Thread DaBlick

I would suggest that you consider using the Ext-GWT component library
instead of the native GWT components.   Ext-GWT (also known as GXT)
provide a far more Swing-like approach (MVC, etc.) to GUI's than GWT
components.

I definitely believe it's a shorter leap from Swing to Ext-GWT than
to GWT.

On Jun 26, 2:13 am, romant roman.te...@gmail.com wrote:
  can I use Google Web Toolkit to convert a Java Swing Application?

 It depends on the complexity and functionality of your Swing
 application, but generally I would say yes, you can. Of course you
 must take into account that the set of components which GWT offers is
 different than the set which is available in Swing. So your Swing
 application will have to be adjusted a bit. But if you use some
 component library for GWT this limitation can almost disappear.

  Has already anybody convert an application?

 Yes, I converted a Swing application which provided some accounting
 functionality. Firstly you should consider what functionality your
 Swing application provides and how to move it (if it is even possible)
 to the web environment. Then the user interface will have to be
 probably adjusted a bit so that it can be implemented using the
 available GWT components, but this is not such a big problem.

  Can anybody give me some information?

 You've just got some.
--~--~-~--~~~---~--~~
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: WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

2009-06-29 Thread Farinha

It seems that the problem has disappeared.
Not sure what I did, but it might have something to do with the fact
that I've been messing around trying to downgrade to update 13 in and
attempt to get the Hosted Mode to work on Eclipse.
Or it can be something else completely different...


On Jun 29, 2:58 pm, Chad chad...@gmail.com wrote:
 Miguel,

 I get the same error. It's generated from Eclipse and shows in the
 Console of Eclipse. It appears every time I run or compile an
 application. I don't think it's a GWT issue. I searched around when I
 first saw and IIRC, it's an issue within Eclipse itself. Trying to
 write to the wrong registry root or something like that.

 HTH,
 Chad

 On Jun 29, 7:46 am, Miguel Méndez mmen...@google.com wrote:



  What was going on when the error was reported?  How was it reported?  Was
  there a stack trace?

  On Sat, Jun 27, 2009 at 3:03 PM, Farinha fari...@gmail.com wrote:

   The subject has it all.

   Eclipse 3.4.2
   GWT Eclipse Plugin
   Windows 7

   Thanks in advance for the help.

  --
  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: Default Sample Project (GreetingService) doesn't display widgets in hosted mode

2009-06-29 Thread mcjames01

Thanks for looking at this Miquel, but my boss found this post:
http://www.mail-archive.com/google-web-toolkit@googlegroups.com/msg16364.html

and sure enough, clearing my cookies in IE did the trick.

On Jun 29, 7:52 am, Miguel Méndez mmen...@google.com wrote:
 What OS are you running on?  Also, what exact version of eclipse are you
 using?





 On Fri, Jun 26, 2009 at 6:35 PM, mcjames01 mcjame...@msn.com wrote:

  I set the log level to ALL and see that I'm getting a couple
  exceptions.
  The first one is:
  org.mortbay.jetty.HttpException: null
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:276)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
         at org.mortbay.io.nio.SelectChannelEndPoint.run
  (SelectChannelEndPoint.java:395)
         at org.mortbay.thread.QueuedThreadPool$PoolThread.run
  (QueuedThreadPool.java:488)

  In the log it's immediately preceded by these two logs:

  [SPAM] uri=/foobar/hosted.html?foobar

  [SPAM] fields=Accept: image/gif, image/x-xbitmap, image/jpeg, image/
  pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
  application/msword, application/x-ms-application, application/x-ms-
  xbap, application/vnd.ms-xpsdocument, application/xaml+xml,
  application/x-shockwave-flash, */*
  Referer:http://localhost:4959/FooBar.html
  Accept-Language: en-us
  UA-CPU: x86
  Accept-Encoding: gzip, deflate
  User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET
  CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR
  3.5.21022; MS-RTC LM 8)
  Host: localhost:4959
  Connection: Keep-Alive

  Prior to this I was seeing successful RESPONSE (200) for the
  clear.cache.gif

  Then the second one is:

  [SPAM] EXCEPTION
  java.io.IOException: An existing connection was forcibly closed by the
  remote host
         at sun.nio.ch.SocketDispatcher.read0(Native Method)
         at sun.nio.ch.SocketDispatcher.read(Unknown Source)
         at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
         at sun.nio.ch.IOUtil.read(Unknown Source)
         at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
         at org.mortbay.io.nio.ChannelEndPoint.fill(ChannelEndPoint.java:122)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:281)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
         at org.mortbay.io.nio.SelectChannelEndPoint.run
  (SelectChannelEndPoint.java:395)
         at org.mortbay.thread.QueuedThreadPool$PoolThread.run
  (QueuedThreadPool.java:488)

  Apparently it died.  This occurred immediately after a succesful
  REQEST/RESPONSE for the gwt/standard/standard.css resource.

  Any ideas what to look for in my environment?

  On Jun 26, 3:54 pm, mcjames01 mcjame...@msn.com wrote:
   Here's what I did:

   From a fresh eclipse 3.4 installation, GWT 1.6.4, with the 1.0.1 GWT
   plugin I created a new Google Web Application (File-New-Other
   Google-Web Application Project)

   I named it FooBar, used com.example.foobar as the package.  Chose
   Create in project workspace, Checked Use Google Web Toolkit, and Use
   default SDK (GWT - 1.6.4).  Unchecked Use Google App Engine.  Clicked
   on Finish.

   I right clicked on the project, chose Run As-Google Web Application.
   The shell opened and the hosted browser came up, but only the contents
   of the host HTML file displayed, no text boxes, no buttons.  Nothing.

   See my previous post for the contents of the shell:
 http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...

   Any suggestions?  I'm going to see if I can turn up the log level to
   see if I can get more clues.

 --
 Miguel- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: Very large GWT app

2009-06-29 Thread Paul van Hoven

It is definetly the size of one single XYZ.cache.hml file. If i cannot
split up this cache file even when using separate modules this means
that the user has to download initially 412K? Because then the user
had to wait quite long before he could see anything and in turn had to
download parts of the application which he would probably not going to
use.

And with GWT 2.0 i could split up the app? After googling for runasync
i found that this function seems to do exactly what i want. Is it
already recommendable to use GWT 2.0 in this early stadium of
development?




On 29 Jun., 17:50, Thomas Broyer t.bro...@gmail.com wrote:
 On 29 juin, 17:19, Paul van Hoven paul.van.ho...@googlemail.com
 wrote:

  I developped a gwt app over the last 3 months. But i found out that
  the compiled js file is too large. In total it has a size of 411KB.
  Therefore i thought it would be a good idea of splitting up my
  application and create some modules. My goal is to split the whole
  application up into parts of about 60K-100K. At least the start page
  should load very quickly. I have no experience in using modules in gwt
  and the google documentation seems to be very brief on this topic.

 Er, just to be sure, what do you mean by in total [it has a size
 of...]? If a single *.cache.html is 411KB then, well, it's not *that*
 big (well, our app is approx. 380KB, we're working on it for a year
 and a half, but we're sticking to extremely basic things because our
 target is IE6 and we obviously don't want our app to be sluggish).
 You might want to refactor your app to limit the number of classes (it
 also means potentially avoiding third-party widget libraries, most
 being bloated (IMO)) and for example use JSO overlays instead of
 com.google.gwt.json.*, etc.

  What is the best approach for splitting up my application?

 Splitting your code in modules won't help (or will turn maintenance
 into a nightmare, depending on how you compile them).

 IMO, you'd better trying the trunk (future GWT 2.0) instead of GWT
 1.6 (or 1.5), as it comes with many bonuses re. code size et al.,
 including splitting output in multiple, small files (search for
 runAsync).
--~--~-~--~~~---~--~~
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: GWT1.6 Eclipse Version: 3.4.2 [Debugging Issue]

2009-06-29 Thread Farinha

Well, I just spent a good couple of hours just to completely remove
Java from this machine and installing a clean new version (why does
everything related to Java has to be so hard to do?).
So the directory has been removed, update 13 has been re-installed and
I made sure that inside Eclipse:
- under Windows - Preferences - Java - Installed JREs there's only
one: jdk1.6.0_13
- under the project properties - Java Build Path - Libraries that
same jdk is being used (along with App Engine 1.2.1 and GWT 1.6.4)

And the problem still persists.

Any more ideas?

On Jun 28, 5:30 pm, Paul Robinson ukcue...@gmail.com wrote:
 Are you absolutely sure nothing is using the old jvm? Can you
 remove/rename the executable or directory to be certain?



 Farinha wrote:
  Just installed 1.6.0_13 from

 http://java.sun.com/products/archive/j2se/6u13/index.html

  switched to it in Eclipse and still th Hosted Mode is not working. All
  the static HTML content is displayed but nothing else.
  Everything works fine once it's compiled and accessed from the
  browser.

  Could it be a Windows 7 related issue?

  Any help is appreciated.

  On Jun 27, 8:35 pm, Paul Robinson ukcue...@gmail.com wrote:

  You're probably using jdk 1.6.0_14 which causes this. Downgrade to 1.6.0_13

  Rehan Azher wrote:

  Hi All,

  I am facing a problem while trying to debug my application under
  Hosted Mode on subjected eclipse version with GWT1.6.

  I set break points but when I debug project it just ignores the all
  break points. I find come threads on this issue but have not been able
  to solve the issue.

  Any help in this regard please.

  Thanks and best regards,

  Rehan
--~--~-~--~~~---~--~~
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 allow only numbers (gwt 1.6.4)

2009-06-29 Thread nobody is perfect
Just implement KeyPressHandleron the onKeyPress method check the char code
and cancel the key when appropriate.

See the example at the TextBox api docs
http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/user/client/ui/TextBox.html

Regards,
Pablo


On Mon, Jun 29, 2009 at 7:05 AM, Dominik Erbsland derbsl...@gmail.comwrote:


 thanks for the help so far.
 I am aware that there is a new handler system - I just can't figure
 out a way how to make a TextBox field numbers only.
 I tried with a KeyUpHandler and a ValueChangeHandler but could not
 find suitable methods to check the input for its validity.
 any hints?


 On Jun 26, 8:21 pm, Miroslav Genov mgenov.j...@gmail.com wrote:
  In GWT 1.6 old listener api has been deprecated and were introduced new
  event system which is using handlers. More information about your case
  can be taken from:
 
   http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/g.
 ..
 
   textBox.addKeyPressHandler and so on.
 
   Wish you good luck.
 
  Regards,
Miroslav
 
  Dominik Erbsland wrote:
   I just saw that addKeyListener() is deprecated in gwt 1.6.4.
   Actually I just wanted to make a listener which checks the user input
   in a text box and allows only numbers.
 
   with gwt 1.6.4 I could not figure out how to do that since I should
   not use the keyboard listener anymore.
   any hints how I can check the input with the KeyUpHandler of gwt
   1.6.4?
 
   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: GEP rebuild deletes war/WEB-INF/classes

2009-06-29 Thread Thomas Broyer



On 29 juin, 20:51, Jeremy Cohen jeremy.h.co...@gmail.com wrote:
 I'm using GEP Eclipse 3.4.0 with GEP 1.0.1v200905131143

 I created a GWT project using GEP. The default output folder is
 project/war/WEB-INF/classes. I need to have some properties files in
 my classpath and I usually place them under the WEB-INF/classes
 directory (for example log4j.properties). Since GEP users project/
 war/WEB-INF/classes in the main source directory structure, and not
 a separate build output directory, when I do a rebuild, it cleans out
 the project/war/WEB-INF/classes directory and I lose my source
 properties and config files. Is there any recommendation for such a
 usecase?

Er, put them in the root of your project's source folder; they'll
automatically be copied into WEB-INF/classes.

(note that this has nothing to do with the GEP AFAICT, if you want to
blame something, blame GWT 1.6+)
--~--~-~--~~~---~--~~
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 allow only numbers (gwt 1.6.4)

2009-06-29 Thread Thomas Broyer



On 29 juin, 21:07, nobody is perfect spam4m...@gmail.com wrote:
 Just implement KeyPressHandleron the onKeyPress method check the char code
 and cancel the key when appropriate.

 See the example at the TextBox api 
 docshttp://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/g...

Note that ((TextBox) event.getSource()).cancelKey(); is exactly
equivalent to event.preventDefault();

..and I believe the // TODO(ECC) must be tested. really means that
it *needs* to be tested (i.e. I'm almost sure that it isn't enough;
I'm almost sure you also have to deal with KeyDown and/or KeyUp).

..but I don't really understand the OP: if you (Dominik) are able to
make it work with a KeyboardListener, what is blocking you  (what is
it that you don't understand) in converting the listener into a bunch
of Key*Handlers?
--~--~-~--~~~---~--~~
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: Very large GWT app

2009-06-29 Thread Thomas Broyer



On 29 juin, 20:13, Paul van Hoven paul.van.ho...@googlemail.com
wrote:
 It is definetly the size of one single XYZ.cache.hml file. If i cannot
 split up this cache file even when using separate modules this means
 that the user has to download initially 412K? Because then the user
 had to wait quite long before he could see anything and in turn had to
 download parts of the application which he would probably not going to
 use.

 And with GWT 2.0 i could split up the app? After googling for runasync
 i found that this function seems to do exactly what i want. Is it
 already recommendable to use GWT 2.0 in this early stadium of
 development?

Given that Google uses it for publicly accessible services (Google
Code Documentation Reader, Google Moderator, etc.) and for Google
Wave, I'd say yes (I'd use a snapshot-* branch if I were you); but it
all depends on your release schedule.
For instance, if I were starting an app to be released after the
summer, I'd probably go with the trunk.
--~--~-~--~~~---~--~~
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: Default Sample Project (GreetingService) doesn't display widgets in hosted mode

2009-06-29 Thread Miguel Méndez
Glad to know that you were able to find a work around.

On Mon, Jun 29, 2009 at 2:09 PM, mcjames01 mcjame...@msn.com wrote:


 Thanks for looking at this Miquel, but my boss found this post:

 http://www.mail-archive.com/google-web-toolkit@googlegroups.com/msg16364.html

 and sure enough, clearing my cookies in IE did the trick.

 On Jun 29, 7:52 am, Miguel Méndez mmen...@google.com wrote:
  What OS are you running on?  Also, what exact version of eclipse are you
  using?
 
 
 
 
 
  On Fri, Jun 26, 2009 at 6:35 PM, mcjames01 mcjame...@msn.com wrote:
 
   I set the log level to ALL and see that I'm getting a couple
   exceptions.
   The first one is:
   org.mortbay.jetty.HttpException: null
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:276)
  at
 org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
  at
 org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
  at org.mortbay.io.nio.SelectChannelEndPoint.run
   (SelectChannelEndPoint.java:395)
  at org.mortbay.thread.QueuedThreadPool$PoolThread.run
   (QueuedThreadPool.java:488)
 
   In the log it's immediately preceded by these two logs:
 
   [SPAM] uri=/foobar/hosted.html?foobar
 
   [SPAM] fields=Accept: image/gif, image/x-xbitmap, image/jpeg, image/
   pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
   application/msword, application/x-ms-application, application/x-ms-
   xbap, application/vnd.ms-xpsdocument, application/xaml+xml,
   application/x-shockwave-flash, */*
   Referer:http://localhost:4959/FooBar.html
   Accept-Language: en-us
   UA-CPU: x86
   Accept-Encoding: gzip, deflate
   User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET
   CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR
   3.5.21022; MS-RTC LM 8)
   Host: localhost:4959
   Connection: Keep-Alive
 
   Prior to this I was seeing successful RESPONSE (200) for the
   clear.cache.gif
 
   Then the second one is:
 
   [SPAM] EXCEPTION
   java.io.IOException: An existing connection was forcibly closed by the
   remote host
  at sun.nio.ch.SocketDispatcher.read0(Native Method)
  at sun.nio.ch.SocketDispatcher.read(Unknown Source)
  at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
  at sun.nio.ch.IOUtil.read(Unknown Source)
  at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
  at
 org.mortbay.io.nio.ChannelEndPoint.fill(ChannelEndPoint.java:122)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:281)
  at
 org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
  at
 org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
  at org.mortbay.io.nio.SelectChannelEndPoint.run
   (SelectChannelEndPoint.java:395)
  at org.mortbay.thread.QueuedThreadPool$PoolThread.run
   (QueuedThreadPool.java:488)
 
   Apparently it died.  This occurred immediately after a succesful
   REQEST/RESPONSE for the gwt/standard/standard.css resource.
 
   Any ideas what to look for in my environment?
 
   On Jun 26, 3:54 pm, mcjames01 mcjame...@msn.com wrote:
Here's what I did:
 
From a fresh eclipse 3.4 installation, GWT 1.6.4, with the 1.0.1 GWT
plugin I created a new Google Web Application (File-New-Other
Google-Web Application Project)
 
I named it FooBar, used com.example.foobar as the package.  Chose
Create in project workspace, Checked Use Google Web Toolkit, and Use
default SDK (GWT - 1.6.4).  Unchecked Use Google App Engine.  Clicked
on Finish.
 
I right clicked on the project, chose Run As-Google Web Application.
The shell opened and the hosted browser came up, but only the
 contents
of the host HTML file displayed, no text boxes, no buttons.  Nothing.
 
See my previous post for the contents of the shell:
  http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa.
 ..
 
Any suggestions?  I'm going to see if I can turn up the log level to
see if I can get more clues.
 
  --
  Miguel- Hide quoted text -
 
  - Show quoted text -
 



-- 
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: GEP rebuild deletes war/WEB-INF/classes

2009-06-29 Thread Jeremy Cohen

Thanks for the tip Thomas, I'll check it out.

The downside of this is that I now need to update my ant build file
that was created using webAppCreator to manually copy these resources
prior to running ant hosted or ant war. I agree that while the GWT
1.6 project structure is a huge improvement, the use of the war/WEB-
INF/classes directory in the source directory path doubling up as the
default compile output path is a little unclean.


On Jun 29, 3:15 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On 29 juin, 20:51, Jeremy Cohen jeremy.h.co...@gmail.com wrote:

  I'm using GEP Eclipse 3.4.0 with GEP 1.0.1v200905131143

  I created a GWT project using GEP. The default output folder is
  project/war/WEB-INF/classes. I need to have some properties files in
  my classpath and I usually place them under the WEB-INF/classes
  directory (for example log4j.properties). Since GEP users project/
  war/WEB-INF/classes in the main source directory structure, and not
  a separate build output directory, when I do a rebuild, it cleans out
  the project/war/WEB-INF/classes directory and I lose my source
  properties and config files. Is there any recommendation for such a
  usecase?

 Er, put them in the root of your project's source folder; they'll
 automatically be copied into WEB-INF/classes.

 (note that this has nothing to do with the GEP AFAICT, if you want to
 blame something, blame GWT 1.6+)
--~--~-~--~~~---~--~~
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: Why does HorizontalPanel cells defaults to vertical-align: top?

2009-06-29 Thread Ian Bambury
Maybe also ask yourself if you really need a table (VP) when a div
(FlowPanel) might do.
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: Why does HorizontalPanel cells defaults to vertical-align: top?

2009-06-29 Thread max3000

A flow panel doesn't work insofar as the textbox is not horizontally
aligned with the image.
There might be a way to make it work though, I'm a newbie to GWT and
css.

Thanks,
Max

On Jun 29, 3:31 pm, Ian Bambury ianbamb...@gmail.com wrote:
 Maybe also ask yourself if you really need a table (VP) when a div
 (FlowPanel) might do.
 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: onModuleLoad is sometimes not called (Internet Explorer)

2009-06-29 Thread Joel Friedman

In case this helps others, for us it turned out to be a problem with
compression and IE6.  We turned off compression for IE6 user-agents
and the problem went away.

On May 21, 5:55 pm, Joel Friedman joel.fried...@gmail.com wrote:
 I am also experiencing a very similar problem, though with a few
 differences.  It consistently occurs with users behind a corporate
 firewall using IE6 on the first page load when IE has an empty cache.
 Refreshing the page works and as long as the cache isn't cleared, all
 subsequent page loads work.  I have been unable to duplicate the
 problem in a development environment setting up test proxies and
 firewalls so I amnotsure what it is about the environment, but it
 has occured at multiple companies.   I am unable to try IE7 or any
 other browser at those companies so I amnotsure if this strictly an
 IE6 issue ornot.  I verifed from the server logs that all the right
 files are being fetched and did a similar trick to what Steve
 described to verify that onModuleLoad() isnotbeingcalled.  If I add
 some javascript to reload the page when it detects that onModuleLoad()
 hasnotbeencalled, then it works but that feels too hacky for
 production.  Other than upgrading to 1.6 (I am also on 1.5.3), any
 suggestions?  Thanks.

 - Joel

 On May 15, 3:17 pm, Joel Webber j...@google.com wrote:

  Steve,
  I can't seem to reproduce the problem on my end, but for what it's worth,
  latching with a timeout like that is going to be pretty brittle in practice.
  Here's an alternative formulation that won't be flaky:

  HTML:

    script

    function onGwtAppLoaded() {

      alert(w00t!);

    }

    /script

  Java:

    public void onModuleLoad() {

      setLoaded();

    }

    public native void setLoaded() /*-{

      if ($wnd.onGwtAppLoaded) {

        $wnd.onGwtAppLoaded();

      }

    }-*/;

  This works because the GWT linkers all make the guarantee that
  onModuleLoad() willnotbecalleduntil the DOM is ready (i.e. all the DOM
  elements, including the body, are fully-evaluated, including scripts). So
  there's no chance that onGwtAppLoaded() will *not* be defined when
  onModuleLoad() iscalled.

  Hope this helps,
  joel.

  On Thu, May 14, 2009 at 12:38 PM, Steve M ste...@emnico.com wrote:

   Hi,

   I am seeing a problem in Internet Explorer whereby it appears that
   onModeulLoad() doesnotgetcalled.

   In the HTML ive added the following to highlight the problem...

   script
   var t=setTimeout(testLoaded(),3);

   function testLoaded()
   {
      if (window.Loaded==undefined)
      {
          alert(onloaddidnt run);
      }
   }

   /script

   My GWT code...

      public void onModuleLoad()
      {
          setLoaded();

          ... now initialise the GWT
      }

      public native void setLoaded()
      /*-{
            $wnd.Loaded = loaded;
      }-*/;

   Intermitently using Internet Explorer, it simply fails to call the
   onModuleLoad() method, and you get the onloaddidnt run method.

   Any ideas on this one? Seems quite a serious flaw.

   GWT version: 1.5.3
   IE: 7.0.5730.11IC

   thanks, Steve M
--~--~-~--~~~---~--~~
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 allow only numbers (gwt 1.6.4)

2009-06-29 Thread Eric



On Jun 29, 3:20 pm, Thomas Broyer t.bro...@gmail.com wrote:
 Note that ((TextBox) event.getSource()).cancelKey(); is exactly
 equivalent to event.preventDefault();

 ..and I believe the // TODO(ECC) must be tested. really means that
 it *needs* to be tested (i.e. I'm almost sure that it isn't enough;
 I'm almost sure you also have to deal with KeyDown and/or KeyUp).

How could I write my application to recover nicely when the user
pastes
alphabetic characters into the text box?  If the user selects Ctrl (or
Cmd)-V,
or right-clicks and pastes. the browser will not invoke the keyboard
handler.
I found out that IE has an onpaste event, but that isn't universal.

Eric

--~--~-~--~~~---~--~~
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: Relative Position on a Page

2009-06-29 Thread Steven Day

I figured it out by using Document.get().getScrollTop(). I have a lot
of API to learn.

On Jun 29, 3:59 pm, Steven Day steven@gmail.com wrote:
 Hello all, I am relatively new to the gwt programming and I love it,
 however I am having a small problem in regards to getting the relative
 coordinates inside an absolute panel. I am trying to use Document.get
 ().getBodyOffsetTop() to compensate for a scrolling up and down a
 page. Here is a snippet of sample code inside an class that extends
 AbsolutePanel I am using for testing:

 public class PhalanxWebMapView extends AbsolutePanel {
 .
 .
 .
    public void onBrowserEvent(Event event) {
                    Integer posX = event.getClientX() - this.getAbsoluteLeft() 
 +
 Document.get().getBodyOffsetLeft();
                    Integer posY =  event.getClientY() - this.getAbsoluteTop() 
 +
 Document.get().getBodyOffsetTop();
                    Window.alert( Document.get().getBodyOffsetTop()); // 
 Testing for
 the value
                    super.onBrowserEvent(event);
    }

 }

 When I return the body offset I get a value of 0 no matter how far I
 scroll on the page.  I've tested this on Firefox 3.5 and Epiphany so
 far. Am I using this correctly?

 Thank You,
 Steven Day
--~--~-~--~~~---~--~~
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: Why does HorizontalPanel cells defaults to vertical-align: top?

2009-06-29 Thread max3000

Doesn't work.

On Jun 29, 8:09 am, Ian Bambury ianbamb...@gmail.com wrote:
 vertical-align: bottom !important;
 ?

 Ian

 http://examples.roughian.com

 2009/6/29 alex.d alex.dukhov...@googlemail.com



  panel.setCellVerticalAlignment(textbox,
  HasVerticalAlignment.ALIGN_BOTTOM);

  On 27 Jun., 21:59, max3000 maxime.lar...@gmail.com wrote:
   Hi,

   I'm trying to align an image and a textbox in a HorizontalPanel using
   only CSS. I want the textbox to be aligned at the bottom.

   Doing the following works:
   panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);

   However, no amount of CSS at the panel level works. It figures because
   GWT inserts an automatic vertical-align: top, like this:

   td align=left style=vertical-align: top;
   img class=search_logo src=/resources/logo.jpg/
   /td

   Why is that so? Am I missing something or is there no way to align
   cell content at the bottom using CSS?

   Thanks,
   Max
--~--~-~--~~~---~--~~
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-29 Thread Daniel Jue

Does anyone have a working MVP/Eventbus sample of something simple
like the PhoneEditor?
I don't think I'm doing it right.  The code from the IO presentation
leaves out enough details so that I'm not sure what to do.
For instance, in my Presenter.class,

I have something like this:
public class Presenter {
...
private Display display;
interface Display {
HasClickHandlers getSaveButton();
HasClickHandlers getCancelButton();
HasClickHandlers getNumberField();
HasClickHandlers getLabelPicker();
}
void editPhone(Phone phone) {
this.phone = Phone.from(phone);
display.getNumberField().setValue(phone.getNumber());
display.getLabelPicker().setValue(phone.getLabel());
}
...
}
Obviously, a HasClickHandlers object doesn't have a setValue method.
It doesn't feel like I should be casting to the widget here, since we
went through all the trouble of using the Display interface.


I started looking at Mvp4g, but it seems to go off on a tangent with a
code generation class to wire up presenters and views via xml.
http://code.google.com/p/mvp4g/
It's also intertwined with some mvc4g classes.

I just want something basic that works, so I can seed my project from
there.  A minimalist, working command style RPC example would be nice
too.
Anyone?  If you're in the DC area, I'll buy you a drink!

--~--~-~--~~~---~--~~
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 components too big in IE

2009-06-29 Thread max3000

Hi,

GWT seems to render components too big in IE. This can be seen simply
by navigating to the GWT showcase. Make sure the zoom is reset (100%).

It is obvious this is a GWT thing as evidenced by looking at Google
docs. The components in docs are fine.

Is this a bug? (a feature??)

Thanks,
Max

--~--~-~--~~~---~--~~
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-29 Thread mabogie

check this out:

http://www.webspin.be/

I left out the model (Phone class here) and the command pattern, since
I'm not using it yet.

For your comment on the casting: I'm having trouble with that too.
When I want to attach the widgets to the root panel or whatever other
panel, I can't do anything but cast them. But nobody seems to have a
good solution...

On 29 jun, 23:13, Daniel Jue teamp...@gmail.com wrote:
 Does anyone have a working MVP/Eventbus sample of something simple
 like the PhoneEditor?
 I don't think I'm doing it right.  The code from the IO presentation
 leaves out enough details so that I'm not sure what to do.
 For instance, in my Presenter.class,

 I have something like this:
 public class Presenter {
 ...
 private Display display;
         interface Display {
                 HasClickHandlers getSaveButton();
                 HasClickHandlers getCancelButton();
                 HasClickHandlers getNumberField();
                 HasClickHandlers getLabelPicker();
         }
         void editPhone(Phone phone) {
                 this.phone = Phone.from(phone);
                 display.getNumberField().setValue(phone.getNumber());
                 display.getLabelPicker().setValue(phone.getLabel());
         }
 ...}

 Obviously, a HasClickHandlers object doesn't have a setValue method.
 It doesn't feel like I should be casting to the widget here, since we
 went through all the trouble of using the Display interface.

 I started looking at Mvp4g, but it seems to go off on a tangent with a
 code generation class to wire up presenters and views via 
 xml.http://code.google.com/p/mvp4g/
 It's also intertwined with some mvc4g classes.

 I just want something basic that works, so I can seed my project from
 there.  A minimalist, working command style RPC example would be nice
 too.
 Anyone?  If you're in the DC area, I'll buy you a drink!
--~--~-~--~~~---~--~~
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-29 Thread Thomas Broyer



On 29 juin, 23:13, Daniel Jue teamp...@gmail.com wrote:
 Does anyone have a working MVP/Eventbus sample of something simple
 like the PhoneEditor?
 I don't think I'm doing it right.  The code from the IO presentation
 leaves out enough details so that I'm not sure what to do.
 For instance, in my Presenter.class,

 I have something like this:
 public class Presenter {
 ...
 private Display display;
         interface Display {
                 HasClickHandlers getSaveButton();
                 HasClickHandlers getCancelButton();
                 HasClickHandlers getNumberField();
                 HasClickHandlers getLabelPicker();
         }

Slide 59 shows getNumberField and getLabelPicker as HasValueString,
not HasClickHandler (and Ray says that ListBox doesn't actually
implement HasValueString but it's quite easy to make a
HasValueString for a ListBox).

         void editPhone(Phone phone) {
                 this.phone = Phone.from(phone);
                 display.getNumberField().setValue(phone.getNumber());
                 display.getLabelPicker().setValue(phone.getLabel());
         }
 ...}

 Obviously, a HasClickHandlers object doesn't have a setValue method.
 It doesn't feel like I should be casting to the widget here, since we
 went through all the trouble of using the Display interface.

http://code.google.com/intl/fr-FR/events/io/sessions/GoogleWebToolkitBestPractices.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: GEP rebuild deletes war/WEB-INF/classes

2009-06-29 Thread Thomas Broyer



On 29 juin, 21:28, Jeremy Cohen jeremy.h.co...@gmail.com wrote:
 Thanks for the tip Thomas, I'll check it out.

 The downside of this is that I now need to update my ant build file
 that was created using webAppCreator to manually copy these resources
 prior to running ant hosted or ant war.

The ANT build file should already do that for you (in the javac
target).

--~--~-~--~~~---~--~~
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: GWT1.6 Eclipse Version: 3.4.2 [Debugging Issue]

2009-06-29 Thread Farinha

An update:

Unistalled everything that I could identify as being Java. Deleted any
leftover files. Deleted Eclipse.

Reinstalled first Java (update 13), added the bin\ folder to the PATH
and installed a clean copy of Eclipse Ganymede.

The result: it's all the same as before.

I'm clueless as to what to do next...


On Jun 29, 7:29 pm, Farinha fari...@gmail.com wrote:
 Well, I just spent a good couple of hours just to completely remove
 Java from this machine and installing a clean new version (why does
 everything related to Java has to be so hard to do?).
 So the directory has been removed, update 13 has been re-installed and
 I made sure that inside Eclipse:
 - under Windows - Preferences - Java - Installed JREs there's only
 one: jdk1.6.0_13
 - under the project properties - Java Build Path - Libraries that
 same jdk is being used (along with App Engine 1.2.1 and GWT 1.6.4)

 And the problem still persists.

 Any more ideas?

 On Jun 28, 5:30 pm, Paul Robinson ukcue...@gmail.com wrote:



  Are you absolutely sure nothing is using the old jvm? Can you
  remove/rename the executable or directory to be certain?

  Farinha wrote:
   Just installed 1.6.0_13 from

  http://java.sun.com/products/archive/j2se/6u13/index.html

   switched to it in Eclipse and still th Hosted Mode is not working. All
   the static HTML content is displayed but nothing else.
   Everything works fine once it's compiled and accessed from the
   browser.

   Could it be a Windows 7 related issue?

   Any help is appreciated.

   On Jun 27, 8:35 pm, Paul Robinson ukcue...@gmail.com wrote:

   You're probably using jdk 1.6.0_14 which causes this. Downgrade to 
   1.6.0_13

   Rehan Azher wrote:

   Hi All,

   I am facing a problem while trying to debug my application under
   Hosted Mode on subjected eclipse version with GWT1.6.

   I set break points but when I debug project it just ignores the all
   break points. I find come threads on this issue but have not been able
   to solve the issue.

   Any help in this regard please.

   Thanks and best regards,

   Rehan
--~--~-~--~~~---~--~~
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: Why does HorizontalPanel cells defaults to vertical-align: top?

2009-06-29 Thread Ian Bambury
It does if you apply it to the right element. Or at least, I can get it to
work in my test app, though I haven't tried it in browsers generally.
But, more important, what is the effect you are trying to get?

Is the image smaller than the text box or the other way around? Do you want
the bottom of the image and the bottom of the textbox to be in line (this is
what I am understanding from what you have said).

Ian

http://examples.roughian.com


2009/6/29 max3000 maxime.lar...@gmail.com


 Doesn't work.

 On Jun 29, 8:09 am, Ian Bambury ianbamb...@gmail.com wrote:
  vertical-align: bottom !important;
  ?
 
  Ian
 
  http://examples.roughian.com
 
  2009/6/29 alex.d alex.dukhov...@googlemail.com
 
 
 
   panel.setCellVerticalAlignment(textbox,
   HasVerticalAlignment.ALIGN_BOTTOM);
 
   On 27 Jun., 21:59, max3000 maxime.lar...@gmail.com wrote:
Hi,
 
I'm trying to align an image and a textbox in a HorizontalPanel using
only CSS. I want the textbox to be aligned at the bottom.
 
Doing the following works:
panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
 
However, no amount of CSS at the panel level works. It figures
 because
GWT inserts an automatic vertical-align: top, like this:
 
td align=left style=vertical-align: top;
img class=search_logo src=/resources/logo.jpg/
/td
 
Why is that so? Am I missing something or is there no way to align
cell content at the bottom using CSS?
 
Thanks,
Max
 


--~--~-~--~~~---~--~~
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: Why does HorizontalPanel cells defaults to vertical-align: top?

2009-06-29 Thread max3000

On Jun 29, 7:37 pm, Ian Bambury ianbamb...@gmail.com wrote:
 Do you want
 the bottom of the image and the bottom of the textbox to be in line (this is
 what I am understanding from what you have said).

Something like that. In effect, what I want is a lot like the search
line in google docs:
logo + textbox + button

I have tried various combinations, including putting the textbox 
button in their own horizontal panel. The reason I did this is because
the button is taller than the textbox on IE. (In fact, on IE every
component seems too big). I have this latter horizontal panel bottom-
aligned, and the widget themselves middle-aligned. The overall effect
is like this:

|image|
|image|  |textbox(slightly above baseline)|  |button (bottom on
baseline and top slightly above textbox's top)|

(Hoping I'm being clear...)

Anyway, I lost a good 10 hours on this problem so far. True I'm new to
all this, but it's a lot. I feel at this point it's more than enough
time spent on a single (simple?) problem. Sure, I wanted to be a good
boy and keep the code and presentation separated. However, I think
I'll keep the setHorizontalAlignments in the code because it's the
only thing that works.

Unless you have a better idea... to which I'm very open, I want to
learn.

Thanks!
Max
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Horizontal tabs in a TabPanel

2009-06-29 Thread Bruce Choi

Instead of having the tabs in a tab panel alight to the top left
corner, is there anyway to align them to the right?

(not right hand corner but to the right-hand side)

Kinda like what they're doing right now with this discussion group...?
--~--~-~--~~~---~--~~
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 to track GWT timers

2009-06-29 Thread davidroe

I have a situation where I need to ensure that _every_ timer launched
is closed upon exit, meaning I track each timer I create and ensure
that I cancel it when the application is about to close.

is anyone aware of any timers that GWT launches that are, perhaps,
allowed to self disintegrate, rather than actually being cancelled?

thanks,
/dave

--~--~-~--~~~---~--~~
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] Re: Allow detached JDO objects to be transferred via RPC

2009-06-29 Thread bruno

Hi all,

I did similar development with Gilead adapter for GAE (available on
Gilead site : http://gilead.sourceforge.net), so I guess it would be a
good idea to share our knwoledge about it.
I modified nearly the same files, but I more generic concepts
(ISerializationFilter and ISerializationTransformer) to allow third
parties serialization tuning (as for Hibernate for example).

I detailed it on the following post :
http://groups.google.com/group/Google-Web-Toolkit-Contributors/browse_thread/thread/f6bc9f5558684c1

Regards
Bruno

On 27 juin, 05:57, Daniel Rice (דניאל רייס) r...@google.com wrote:
 1) According to Bob, the extra field shouldn't cost anything unless it's
 used.
 2) The code sets the 'modified' bits when the data is deserialized on the
 server, i.e., it marks all the fields as dirty so the object will be fully
 updated when the user calls makePersistent on it.
 I think this is sufficent, because:

 a) It's not practical to track changes on the client (for example, JSNI
 methods could easily bypass any mechanism we put in place), and
 b) AppEngine doesn't do partial updates
 anyway, so there's no performance advantage in that environment for trying
 to do more.

 By the way, the design is largely based on one of the emails you sent to the
 gwt mailing list, so thanks for helping me get some clarity on what needs to
 happen,

 Dan

 On Fri, Jun 26, 2009 at 4:53 PM, cromwell...@gmail.com wrote:
  On 2009/06/26 19:57:28, Dan Rice wrote:

  Two general comments:
  1) What are the implications of stashing an extra field on
  java.lang.Object, is there any impact on output size?

  2) I've noticed that the JDO enhanced classes seem to track field
  mutations and update the jdoDetachedState. This patch just seems to
  preserve the original jdoDetachedState on the client by tunneling it on
  an expando. What happens if an object sent from the server to the
  client, has modifications performed (mutations), and then is sent back
  to the server for a PersistenceManager.makePersistent() or
  EntityManager.merge()? Will the PMF/EMF just decide that nothing has
  changed and treat it as a no-op?

 http://gwt-code-reviews.appspot.com/47807
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: RPC extension points

2009-06-29 Thread bruno

Hi Lex,

The main problem comes from enhancement added fields, so user can add
@GwtTransient annotation on it.
Yes, enhancement is evil, but we have to do with them...

Regards
Bruno

On 19 juin, 17:09, Lex Spoon sp...@google.com wrote:
 On Mon, Jun 15, 2009 at 11:59 AM, noonbruno.marches...@gmail.com wrote:

  Hello,

  This thread follows this one (http://groups.google.com/group/Google-
  Web-Toolkit-Contributors/msg/582cfe33f17deab3), so please read it
  before this one.

  To make Google App Engine and GWT work together (in adapter4appengine
  project), I had to modify theRPCserialization code.
  My first goal was to add *clean extension points*, to allow any third
  library developer to tuneRPCserialization according to his needs. Of
  course, I used it to develop a DataNucleus adapter, and plan to port
  Hibernate one as well.

  The idea is to allow 2 kinds of extension points :
      - ISerializationFilter, that indicates if a specific field of a
  class should be serialized or not. It is called for serialization
  signature computation and for each object serialization
          * Typical use : used to remove new fields from enhancement
      - ISerializationTransformer, that can change a object instance
  from one type to another one
          * Typical use : used to turn persistent collection back to
  regular one

 Are you familiar with the transient keyword and the @GwtTransient
 annotation?  These let you respectively eliminate a field from
 serialization, and eliminate a field from GWT serialization.

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



[gwt-contrib] Re: DockLayoutPanel

2009-06-29 Thread Joel Webber
That's fairly closely related to the approach I'm taking. It is worth
noting, however, that this totally fails on IE6, because it won't handle the
kinds of implicit constraints created by, e.g., { left:0; right:0; }. Just
to make matters more difficult, it also can't handle { right:0; }
properly (often off-by-one pixel). Part of the work I'm doing involves a lot
of script hackery to account for this, without hamstringing the
implementation on other browsers.
On Sat, Jun 27, 2009 at 6:56 AM, Cristiano
cristiano.costant...@gmail.comwrote:


 I think it is reallay interesting:
 I've been able to realize flexible and fluid layout before passing to
 use GWT, by using CSS and a combination of properties position:
 absolute; top:xxx, bottom;xxx, width:xxx etc.
 and I liked this approach because it does not use tables!

 In gwt, I've tried to do the same by using AbsolutePanel but it was
 not posible mainly because AbsolutePanel ony let you to set top and
 left value, (and, if I remember correctly, only as integer value).

 I don't know if it could be of any help, but here I want to give you a
 sample (in html) which I wrote while studing how to apply this kind of
 CSS layouts in GWT (for sure it works on IE7, I don't know if it works
 on IE6 but it was not important for me):
 {{{
 div id=Main   class=panel
  div id=Left class=panel
 style=position:absolute;top:0;bottom:0;left:0;right:50%;
div id=LeftLeft   class=panel
 style=position:absolute;top:0;bottom:0;left:0;width:200px;
  div id=LeftLeftTop  class=widget
 style=position:absolute;top:0;height:300px;left:0;right:0;h2Left
 Left Top/h2/div
  div id=LeftLeftBottom   class=widget
 style=position:absolute;top:300px;bottom:0;left:0;right:0;h2Left
 Left Bottom/h2/div
/div
div id=LeftRight  class=panel
 style=position:absolute;top:0;bottom:0;left:200px;right:0;
  div id=LeftRightTop class=widget
 style=position:absolute;top:0;height:200px;left:0;right:0;h2Left
 Right Top/h2/div

  div id=LeftRightBottom  class=panel
 style=position:absolute;top:200px;bottom:0;left:0;right:0;
div id=LeftRightBottomTop class=panel
 style=position:absolute;top:0;height:200px;left:0;right:0;
  div id=LeftRightBottomTopLeft   class=widget
 style=position:absolute;top:0;bottom:0;left:0;right:50%;h2Left
 Right Bottom Top Left/h2/div
  div id=LeftRightBottomTopRight  class=widget
 style=position:absolute;top:0;bottom:0;left:50%;right:0;h2Left
 Right Bottom Top Right/h2/div
/div
div id=LeftRightBottomSplit   class=panel
 style=position:absolute;top:200px;height:5px;left:0;right:0; cursor:s-
 resize;hr//div
div id=LeftRightBottomBottom  class=widget
 style=position:absolute;top:205px;bottom:0;left:0;right:0;h2Left
 Right Bottom Bottom/h2/div

  /div
/div
  /div
  div id=Rightclass=panel
 style=position:absolute;top:0;bottom:0;left:50%;right:0;
div id=RightLeft  class=widget
 style=position:absolute;top:0;bottom:0;width:300px;right:
 0;h2Right Left/h2/div
div id=RightRight class=widget
 style=position:absolute;top:0;bottom:0;left:0;right:300px;h2Right
 Right/h2/div
  /div
 /div
 }}}

 I would like to be able to reproduce such a layout in GWT.

 NB. Any news on UiBinder?
 


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



[gwt-contrib] Re: SoyLite

2009-06-29 Thread Katharina Probst
I think this is a great idea, especially because it can be offered side by
side with the existing SOYC (that includes partial blame assignment).  I
agree with you, Lex, that explaining partial blame assignment has been a
challenge.  What I am still trying to understand is exactly how blame is
assigned under SOYLite.  I'm not familiar enough with the symbol maps, but
what does happen when something gets inlined?

kathrin

On Fri, Jun 26, 2009 at 3:20 PM, Lex Spoon sp...@google.com wrote:

 I've been trying to think of ways to speed up the -soyc option, and
 here is the result of one attempt.  What do people think?

 The idea is to mimick some aspects of the speedy symbolMaps files.
 Instead of using the enhanced SourceInfo's to track links between
 before-optimization and after-optimization code, bill size information
 only to the program as it stands at the end of Java optimization.
 Additionally, be careful to avoid needing any massaging of the data
 in StoryRecorder; instead, make a single pass through all
 the size information.

 This means that the size breakdown will no longer have fractional
 sizes, and individual output bytes will no longer be fractionally
 billed to different chunks of source code.  The main question is, can
 we live with that level of output?

 I have found in practice that people don't understand the fractional
 billing. They ask why their methods have fractional sizes, and I
 end up giving them a monolog about inlining until their eyes glaze
 over.  It seems that you need to understand the inlining effects
 before you can understand what the current report gives you;
 however, if you understand the inlining effects, it seems to me that
 you can make good use of a report that doesn't use fractional billing.

 Additionally, it adds more pending work if SOYC continues to show both
 before-optimization breakdowns and after-optimization dependency
 information.  To make a long story short, there are at least two
 substantial work items related to this discrepency, and it would
 remove that work if SOYC switched over to only reporting on the
 program as it exists after Java optimization.

 Of course, we have to be happy with the new size breakdown.  What do
 people think--is the fractional billing important enough to pay the
 extra compile time?  Here are two example SOYC reports using each
 method.  The lite version drops fractional billing, so you'll see that
 the sizes all end in .0.

 http://www.lexspoon.org/soyc1821/trunk/SoycDashboard-index.html
 http://www.lexspoon.org/soyc1821/lite/SoycDashboard-index.html

 In the lite version, please ignore all parts of a breakdown except the
 package breakdown in the top-left pane.  I wanted to share the idea
 around before I finished implementing a lite version of the other
 three panes.

 If the lite version looks fine, we will get some great timing
 improvements.  To show this, I tried compiling one-permutation
 Showcase in four ways: both with and without -soyc, and both with and
 without the patch.  For each way of compiling, I compiled it four
 times, but I discarded all the first results to try and reduce caching
 effects.

 With the patch, the timings are as follows.  The main number is the
 average, with the individual timings in parentheses.

  regular compile:  36.5 (36.1, 35.9, 32.1)
  with -soyc: 34.0 (33.9, 32.7, 35.5)

 By these numbers, using -soyc is faster than a regular build!  I don't
 know whether I introduce some overhead in a regular build, or if it's
 just noise in the measurements.  Either way, it looks good for the
 speed of -soyc with the patch in.

 To compare, here are the numbers without the patch:

  regular compile: 34.0 (35.8, 34.0, 32.1)
  with -soyc: 39.6 (40.2, 39.6, 39.0)


 The regular compile time is exactly the same as the -soyc time after
 the patch.  As is already known, however, using -soyc without the
 patch adds a lot of time, 16% by these measurements.  Based on
 PerfLogger, the StoryRecorder alone takes about 2.5-3 seconds, whereas
 with the patch it takes less than half a second.

 Thoughts?  A rough patch is attached, if anyone wants to play with it
 themselves, but there's more to do if we want to go this way.

 Lex


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



[gwt-contrib] Re: Allow detached JDO objects to be transferred via RPC

2009-06-29 Thread bobv

Please extract the expando work to the gwt.core.client package and add
test cases for it, as it's a generally-useful facility to offer.

Needs tests of the JDO testcases.

@Cromwellian,
   The expando field just reserves a bit of the Object-field namespace
since it's lazily initialized.


http://gwt-code-reviews.appspot.com/47807/diff/1/9
File user/src/com/google/gwt/user/client/rpc/WeakMapping.java (right):

http://gwt-code-reviews.appspot.com/47807/diff/1/9#newcode16
Line 16: package com.google.gwt.user.client.rpc;
Move this to the core.client package, since it's not specific to the rpc
system.

http://gwt-code-reviews.appspot.com/47807/diff/1/9#newcode22
Line 22: * A class associating a (key - value) map with arbitrary
sourceobjects.  A WeakHashMap
source objects

http://gwt-code-reviews.appspot.com/47807/diff/1/9#newcode24
Line 24: * garbage collected, the map associated with it will be
collected as well.
This javadoc should accurately describe both hosted and web-mode code.

The specifics of the implementation are usually documented as a regular
block comment just below the class declaration.

http://gwt-code-reviews.appspot.com/47807/diff/1/9#newcode31
Line 31: public static Object get(Object instance, String key) {
Needs documentation, especially on the namespace of the key.

http://gwt-code-reviews.appspot.com/47807/diff/1/8
File user/src/com/google/gwt/user/rebind/rpc/FieldSerializerCreator.java
(right):

http://gwt-code-reviews.appspot.com/47807/diff/1/8#newcode159
Line 159: Class annotationClass =
Class.forName(javax.jdo.annotations.PersistenceCapable);
Raw type

http://gwt-code-reviews.appspot.com/47807/diff/1/5
File user/src/com/google/gwt/user/server/rpc/impl/Base64Utils.java
(right):

http://gwt-code-reviews.appspot.com/47807/diff/1/5#newcode2
Line 2: * Copyright 2008 Google Inc.
Copyright date should be current for new files.

http://gwt-code-reviews.appspot.com/47807/diff/1/5#newcode19
Line 19: * A utility to decode and encode byte arrays as Strings, using
only safe characters.
Formatting looks off.

http://gwt-code-reviews.appspot.com/47807/diff/1/7
File
user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java
(right):

http://gwt-code-reviews.appspot.com/47807/diff/1/7#newcode315
Line 315: * Returns true if the given field is named 'jdoDetachedState'
and the enclosing
Formatting

http://gwt-code-reviews.appspot.com/47807/diff/1/7#newcode322
Line 322: Class[] interfaces =
field.getDeclaringClass().getInterfaces();
If

A extends B;
B implements I;

does A.class.getInterfaces() include I?

Would it be easier to have a static field that's initialized with a
Class.forName and Class.isInstance() used instead?

http://gwt-code-reviews.appspot.com/47807/diff/1/4
File
user/src/com/google/gwt/user/server/rpc/impl/ServerSerializationStreamReader.java
(right):

http://gwt-code-reviews.appspot.com/47807/diff/1/4#newcode611
Line 611: // Check for the presence of the javax.jdo.spi.Detachable
interface.  If it is present,
Use a block comment so the formatter will format this correctly.

http://gwt-code-reviews.appspot.com/47807/diff/1/4#newcode614
Line 614: Class[] interfaces = instanceClass.getInterfaces();
Would a speculatively-initialized Class literal field and
Class.isInstance() work more correctly?

http://gwt-code-reviews.appspot.com/47807/diff/1/4#newcode676
Line 676: assert version == 1;
This should throw a runtime exception, since end-users likely won't have
assertions turned on.

http://gwt-code-reviews.appspot.com/47807/diff/1/4#newcode682
Line 682: case 'N':
What do these values mean?

http://gwt-code-reviews.appspot.com/47807/diff/1/4#newcode689
Line 689: Class c = Class.forName(className);
Use of raw types should be flagged by eclipse.

Class? extends Externalizable c =
Class.forName(className).asSubclass(Externalizable.class)

Add a ClassCastException to the catch block below.

http://gwt-code-reviews.appspot.com/47807/diff/1/6
File
user/src/com/google/gwt/user/server/rpc/impl/ServerSerializationStreamWriter.java
(right):

http://gwt-code-reviews.appspot.com/47807/diff/1/6#newcode666
Line 666: // Check for the presence of the javax.jdo.spi.Detachable
interface.  If it is present,
Block comment and formatting.

http://gwt-code-reviews.appspot.com/47807/diff/1/6#newcode669
Line 669: Class[] interfaces = instanceClass.getInterfaces();
Class.isInstance

http://gwt-code-reviews.appspot.com/47807/diff/1/6#newcode713
Line 713: * null is indicated by 'N', an externalizable field is
indicated by an 'E'
Use static final fields for these values, and reference them with the
@value javadoc tag.

http://gwt-code-reviews.appspot.com/47807/diff/1/6#newcode734
Line 734: out.writeInt(1);
Extract the number 1 to a constant.

http://gwt-code-reviews.appspot.com/47807/diff/1/10
File user/super/com/google/gwt/emul/java/lang/Object.java (right):

http://gwt-code-reviews.appspot.com/47807/diff/1/10#newcode45
Line 45: * an expando containing a String - Object mapping on arbitrry
Objects.
arbitrary

[gwt-contrib] Re: Add Impl.getNameOf() to expose JNameOf nodes to Java code

2009-06-29 Thread bobv

Ping

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

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



[gwt-contrib] Re: Add ArtificialRescue annotation to compiler

2009-06-29 Thread bobv

Ping

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

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



[gwt-contrib] Comment on UsingOOPHM in google-web-toolkit

2009-06-29 Thread codesite-noreply

Comment by kojot...@gmail.com:

@dan.kozlowski I've followed your steps and it worked like a charm :)  
thanks a lot.
My system: openSUSE 11.1 64bit + FF 3.5rc3 64bit + Sun JVM 1.6 64bit +  
eclipse 3.4 + GWT trunk (with oophm enabled)


For more information:
http://code.google.com/p/google-web-toolkit/wiki/UsingOOPHM

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



[gwt-contrib] Issue 2749: RichTextArea timing issue using BasicFormatter and ExtendedFormatter methods

2009-06-29 Thread jlabanca

Reviewers: jgw,

Description:
Description:
===
Using almost any method in the Basic or Extended formatter when the
RichTextArea is detached results in a JS exception on all browsers.
Even after it is attached, a JS exception occurs in some browsers if the
area is not initialized or if it is *hidden*.  The formatters were
originally designed to work based on user interaction.

Fix:

We now assert that the RichTextArea is ready (attached and initialized)
before performing any actions.  We also wrap commands in a try/catch
block to catch errors associated with a *hidden* RichTextArea.

Since errors vary across browsers, I added some JavaDoc explaining that
the formatters should only be used if the RichTextArea is attached,
visible, and has been focused at least once.  Essentially, this means
that the user is or was interacting with it.


Testing:
===
I manually tested the change on all browsers and added some unit tests
to catch some of the error states.

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

Affected files:
   user/src/com/google/gwt/user/client/ui/RichTextArea.java
   user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java
   user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplStandard.java
   user/test/com/google/gwt/user/client/ui/RichTextAreaTest.java



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



[gwt-contrib] Re: RPC extension points

2009-06-29 Thread Freeland Abbott
FWIW, Dan Rice has also been working on this, if you hadn't seen his review
thread from Friday.


On Mon, Jun 29, 2009 at 6:14 AM, bruno bruno.marches...@gmail.com wrote:


 Hi Lex,

 The main problem comes from enhancement added fields, so user can add
 @GwtTransient annotation on it.
 Yes, enhancement is evil, but we have to do with them...

 Regards
 Bruno

 On 19 juin, 17:09, Lex Spoon sp...@google.com wrote:
  On Mon, Jun 15, 2009 at 11:59 AM, noonbruno.marches...@gmail.com
 wrote:
 
   Hello,
 
   This thread follows this one (http://groups.google.com/group/Google-
   Web-Toolkit-Contributors/msg/582cfe33f17deab3), so please read it
   before this one.
 
   To make Google App Engine and GWT work together (in adapter4appengine
   project), I had to modify theRPCserialization code.
   My first goal was to add *clean extension points*, to allow any third
   library developer to tuneRPCserialization according to his needs. Of
   course, I used it to develop a DataNucleus adapter, and plan to port
   Hibernate one as well.
 
   The idea is to allow 2 kinds of extension points :
   - ISerializationFilter, that indicates if a specific field of a
   class should be serialized or not. It is called for serialization
   signature computation and for each object serialization
   * Typical use : used to remove new fields from enhancement
   - ISerializationTransformer, that can change a object instance
   from one type to another one
   * Typical use : used to turn persistent collection back to
   regular one
 
  Are you familiar with the transient keyword and the @GwtTransient
  annotation?  These let you respectively eliminate a field from
  serialization, and eliminate a field from GWT serialization.
 
  -Lex
 


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



[gwt-contrib] Manifest for SOYC permutations

2009-06-29 Thread kprobst

Reviewers: Lex,

Description:
This patch creates a manifest file for each compilation permutation if
the compilation is SOYC enabled.  The manifest files are stored
alongside other SOYC manifests (in the soycReport directory).

Each manifest file contains all non-gwt properties for the
permutation, i.e., user agent, locale, etc.

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

Affected files:
   dev/core/src/com/google/gwt/core/ext/linker/CompilationAnalysis.java

dev/core/src/com/google/gwt/core/ext/linker/impl/StandardCompilationAnalysis.java
   dev/core/src/com/google/gwt/core/ext/soyc/impl/ManifestRecorder.java
   dev/core/src/com/google/gwt/core/linker/SoycReportLinker.java
   dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java



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



[gwt-contrib] Re: Allow detached JDO objects to be transferred via RPC

2009-06-29 Thread rice


http://gwt-code-reviews.appspot.com/47807/diff/1/9
File user/src/com/google/gwt/user/client/rpc/WeakMapping.java (right):

http://gwt-code-reviews.appspot.com/47807/diff/1/9#newcode31
Line 31: public static Object get(Object instance, String key) {
I'm not sure what can be said about the namespace.  What do you have in
mind?

On 2009/06/29 13:02:16, bobv wrote:
 Needs documentation, especially on the namespace of the key.

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

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



[gwt-contrib] Issue 1441: RichTextArea no cursor until you type in Firefox

2009-06-29 Thread jlabanca

Reviewers: jgw,

Description:
Description:
===
In Firefox, the text caret always appears at the begining of the
RichTextArea when the user clicks the first time, regardless of where in
the RichTextArea the user clicked.

The problem is that we set design mode on focus in Mozilla, which occurs
after the caret is moved.  As a result, the caret isn't set because the
RichTextArea isn't editable yet.


Fix:
===
We now switch to design mode onfocus or onmouseover.  By switching
onmouseover, we can ensure that we are in design mode before the user
selects a caret position.  We still need the onfocus because the user
might tab into the RichTextArea, in which case its perfectly acceptable
to default to the 0th position in the text.


Testing:

Manually verified this fix on FF1.5, FF2.0, and FF3.0.

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

Affected files:
   user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplMozilla.java


Index:  
user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplMozilla.java
===
---  
user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplMozilla.java
 
(revision 5635)
+++  
user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplMozilla.java
 
(working copy)
@@ -36,16 +36,28 @@
// Send notification that the iframe has finished loading.
 
_th...@com.google.gwt.user.client.ui.impl.richtextareaimplstandard::onElementInitialized()();

-  // Don't set designMode until the RTA actually gets focused. This is
+  // Don't set designMode until the RTA is targeted by an event. This  
is
// necessary because editing won't work on Mozilla if the iframe is
-  // *hidden, but attached*. Waiting for focus gets around this issue.
+  // *hidden, but attached*. Waiting for an event gets around this  
issue.
//
-  // Note: This onfocus will not conflict with the  
addEventListener('focus',
-  // ...) // in RichTextAreaImplStandard.
+  // Note: These events will not conflict with the
+  // addEventListener('oneventtype', ...) in RichTextAreaImplStandard.
iframe.contentWindow.onfocus = function() {
  iframe.contentWindow.onfocus = null;
+iframe.contentWindow.onmouseover = null;
  iframe.contentWindow.document.designMode = 'On';
};
+
+  // Issue 1441: we also need to catch the onmouseover event because  
focus
+  // occurs after mouse down, so the cursor will not appear until the  
user
+  // clicks twice, making the RichTextArea look uneditable. Catching  
the
+  // mouseover event allows us to set design mode earlier. The focus  
event
+  // is still needed to handle tab selection.
+  iframe.contentWindow.onmouseover = function() {
+iframe.contentWindow.onfocus = null;
+iframe.contentWindow.onmouseover = null;
+iframe.contentWindow.document.designMode = 'On';
+  };
  };
}-*/;




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



[gwt-contrib] Re: SoyLite

2009-06-29 Thread Lex Spoon

On Sun, Jun 28, 2009 at 12:19 AM, John Tamplinj...@google.com wrote:
 On Fri, Jun 26, 2009 at 3:20 PM, Lex Spoon sp...@google.com wrote:

 I've been trying to think of ways to speed up the -soyc option, and
 here is the result of one attempt.  What do people think?

 The idea is to mimick some aspects of the speedy symbolMaps files.
 Instead of using the enhanced SourceInfo's to track links between
 before-optimization and after-optimization code, bill size information
 only to the program as it stands at the end of Java optimization.
 Additionally, be careful to avoid needing any massaging of the data
 in StoryRecorder; instead, make a single pass through all
 the size information.

 How much would it be skewed by JS-level optimizations?  What about JSNI
 code?

The basic framework is the same in both cases.  Output bytes get
billed back to Java code.  That's final output bytes, after all
optimization is complete.  Both would bill JSNI code to the associated
Java native method.  The difference is whether to map each byte to
multiple methods, or to pick just one.

Let me give some examples.  Suppose Point is a class with a method
getX() that is always inlined.  Thus, Point.getX() is inlined away
during Java optimization.  Then suppose some method TextArea.getArea()
calls Point.getX().

In trunk, Point.getX() is billed for every place it gets inlined, so
it will show up in the size breakdown.  TextArea.getArea(), meanwhile,
will not be billed for all of its output bytes; the ones that it got
by inlining Point.getX() will be partially billed back to
Point.getX().  To contrast, with SoyLite, Point.getX() would not show
up in the size output, and TextArea.getArea() would be billed slightly
more.

As another example, suppose Java method Integer.toString ends up
compiling to JavaScript function toString_3.  Also, suppose the
compiler creates a static version Integer.toString$, which then
compiles to function toString_4.  In trunk, Integer.toString is given
full blame for toString_3 and half blame for toString_4;
Integer.toString$ is given half blame for toString_4.  With SoyLite,
Integer.toString is given full blame for toString_3, and
Integer.toString$ is given full blame for toString_4.

Does that clear things up better?  If not, perhaps we should examine
Showaces in more detail to find real examples of differences to look
at.

Lex

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



[gwt-contrib] gen2 PagingScrollTable: programmatic cell editing

2009-06-29 Thread jay

Another piece of feedback on the incubator paging scroll table...

I've got a case where I need to programmatically change the value in
some cells (based on other input from the user).

However, since the method used as the cell editor's callback is an
anonymous, inline inner class, I have to replicate that code. (I'm
referring to the inner class which starts on line 882 of SVN rev 1640
of PagingScrollTable.)

Perhaps the contents of the callback's onComplete() implementation
could be pulled out to a protected method, available for subclasses to
use?


Thanks!!!

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



[gwt-contrib] Re: Allow detached JDO objects to be transferred via RPC

2009-06-29 Thread bobv


http://gwt-code-reviews.appspot.com/47807/diff/1/9
File user/src/com/google/gwt/user/client/rpc/WeakMapping.java (right):

http://gwt-code-reviews.appspot.com/47807/diff/1/9#newcode31
Line 31: public static Object get(Object instance, String key) {
On 2009/06/29 15:34:02, Dan Rice wrote:
 I'm not sure what can be said about the namespace.  What do you have
in mind?

Note that the key space is module-wide, so some care should be taken to
choose sufficiently unique identifiers.

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

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



[gwt-contrib] Re: Issue 2749: RichTextArea timing i ssue using BasicFormatter and ExtendedFormatter methods

2009-06-29 Thread jgw

On 2009/06/29 15:08:27, jlabanca wrote:


LGTM.

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

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



[gwt-contrib] [google-web-toolkit commit] r5636 - Fixes an issue with a missing text caret in the RichTextArea in FF.

2009-06-29 Thread codesite-noreply

Author: jlaba...@google.com
Date: Mon Jun 29 10:31:37 2009
New Revision: 5636

Modified:
 
trunk/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplMozilla.java

Log:
Fixes an issue with a missing text caret in the RichTextArea in FF.

Patch by: jlabanca
Review by: jgw
Issue: 1441



Modified:  
trunk/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplMozilla.java
==
---  
trunk/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplMozilla.java  
 
(original)
+++  
trunk/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplMozilla.java  
 
Mon Jun 29 10:31:37 2009
@@ -36,14 +36,26 @@
// Send notification that the iframe has finished loading.
 
_th...@com.google.gwt.user.client.ui.impl.richtextareaimplstandard::onElementInitialized()();

-  // Don't set designMode until the RTA actually gets focused. This is
+  // Don't set designMode until the RTA is targeted by an event. This  
is
// necessary because editing won't work on Mozilla if the iframe is
-  // *hidden, but attached*. Waiting for focus gets around this issue.
+  // *hidden, but attached*. Waiting for an event gets around this  
issue.
//
-  // Note: This onfocus will not conflict with the  
addEventListener('focus',
-  // ...) // in RichTextAreaImplStandard.
+  // Note: These events will not conflict with the
+  // addEventListener('oneventtype', ...) in RichTextAreaImplStandard.
iframe.contentWindow.onfocus = function() {
  iframe.contentWindow.onfocus = null;
+iframe.contentWindow.onmouseover = null;
+iframe.contentWindow.document.designMode = 'On';
+  };
+
+  // Issue 1441: we also need to catch the onmouseover event because  
focus
+  // occurs after mouse down, so the cursor will not appear until the  
user
+  // clicks twice, making the RichTextArea look uneditable. Catching  
the
+  // mouseover event allows us to set design mode earlier. The focus  
event
+  // is still needed to handle tab selection.
+  iframe.contentWindow.onmouseover = function() {
+iframe.contentWindow.onfocus = null;
+iframe.contentWindow.onmouseover = null;
  iframe.contentWindow.document.designMode = 'On';
};
  };

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



[gwt-contrib] [google-web-toolkit commit] r5637 - Adds some assertions to RichTextArea to prevent users from using the formatters before th...

2009-06-29 Thread codesite-noreply

Author: jlaba...@google.com
Date: Mon Jun 29 10:34:10 2009
New Revision: 5637

Modified:
trunk/user/src/com/google/gwt/user/client/ui/RichTextArea.java
 
trunk/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java
 
trunk/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplStandard.java
trunk/user/test/com/google/gwt/user/client/ui/RichTextAreaTest.java

Log:
Adds some assertions to RichTextArea to prevent users from using the  
formatters before the RichTextArea is initialized.

Patch by: jlabanca
Review by: jgw
Issue: 2749



Modified: trunk/user/src/com/google/gwt/user/client/ui/RichTextArea.java
==
--- trunk/user/src/com/google/gwt/user/client/ui/RichTextArea.java   
(original)
+++ trunk/user/src/com/google/gwt/user/client/ui/RichTextArea.java  Mon Jun 
 
29 10:34:10 2009
@@ -43,10 +43,19 @@
  SourcesMouseEvents, HasAllMouseHandlers {

/**
+   * p
 * This interface is used to access basic formatting options, when  
available.
 * If the implementation supports basic formatting, then
 * {...@link RichTextArea#getBasicFormatter()} will return an instance of  
this
 * class.
+   * /p
+   * p
+   * The formatter will format the user selected text in the
+   * {...@link RichTextArea}.  As a result, it will only work reliably if the
+   * {...@link RichTextArea} is attached, visible to on the page, and has been
+   * focused at least once.  If you just want to initialize the content of
+   * the {...@link RichTextArea}, use {...@link RichTextArea#setHTML(String)}  
instead.
+   * /p
 */
public interface BasicFormatter {

@@ -166,10 +175,19 @@
}

/**
+   * p
 * This interface is used to access full formatting options, when  
available.
 * If the implementation supports full formatting, then
 * {...@link RichTextArea#getExtendedFormatter()} will return an instance  
of this
 * class.
+   * /p
+   * p
+   * The formatter will format the user selected text in the
+   * {...@link RichTextArea}.  As a result, it will only work reliably if the
+   * {...@link RichTextArea} is attached, visible to on the page, and has been
+   * focused at least once.  If you just want to initialize the content of
+   * the {...@link RichTextArea}, use {...@link RichTextArea#setHTML(String)}  
instead.
+   * /p
 */
public interface ExtendedFormatter extends BasicFormatter {

@@ -363,7 +381,9 @@
}

/**
-   * Gets the basic rich text formatting interface.
+   * Gets the basic rich text formatting interface.  Note that formatting  
can
+   * only be done when the {...@link RichTextArea} is attached, visible on the
+   * page, and has been focused by the user.
 *
 * @return codenull/code if basic formatting is not supported
 */
@@ -375,7 +395,9 @@
}

/**
-   * Gets the full rich text formatting interface.
+   * Gets the full rich text formatting interface.  Note that formatting  
can
+   * only be done when the {...@link RichTextArea} is attached, visible on the
+   * page, and has been focused by the user.
 *
 * @return codenull/code if full formatting is not supported
 */

Modified:  
trunk/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java
==
---  
trunk/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java  
 
(original)
+++  
trunk/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java  
 
Mon Jun 29 10:34:10 2009
@@ -142,9 +142,4 @@
elem.contentWindow.onblur = null;
  }
}-*/;
-
-  @Override
-  boolean isRichEditingActive(Element elem) {
-return true;
-  }
  }

Modified:  
trunk/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplStandard.java
==
---  
trunk/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplStandard.java 
 
(original)
+++  
trunk/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplStandard.java 
 
Mon Jun 29 10:34:10 2009
@@ -15,6 +15,7 @@
   */
  package com.google.gwt.user.client.ui.impl;

+import com.google.gwt.core.client.JavaScriptException;
  import com.google.gwt.user.client.DOM;
  import com.google.gwt.user.client.Element;
  import com.google.gwt.user.client.ui.RichTextArea;
@@ -28,6 +29,13 @@
  RichTextArea.BasicFormatter, RichTextArea.ExtendedFormatter {

/**
+   * The message displayed when the formatter is used before the  
RichTextArea
+   * is initialized.
+   */
+  private static final String INACTIVE_MESSAGE = RichTextArea  
formatters  +
+  cannot be used until the RichTextArea is attached and focused.;
+
+  /**
 * Holds a cached copy of any user setHTML/setText actions until the real
 * text area is fully initialized.  Becomes codenull/code after init.
 */
@@ -41,6 +49,11 @@
 */
protected 

[gwt-contrib] Re: Add Impl.getNameOf() to expose JNameOf nodes to Java code

2009-06-29 Thread scottb

LGTM, with comment.


http://gwt-code-reviews.appspot.com/46802/diff/1/3
File dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRebinds.java
(right):

http://gwt-code-reviews.appspot.com/46802/diff/1/3#newcode95
Line 95: // Proper JSNI ref
Shouldn't most of this lookup logic be duplicated elsewhere for
resolving jsni refs in general?  IOW, we should factor out a static
method if necessary and share code.

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

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



[gwt-contrib] Update RichTextAreaImplSafari

2009-06-29 Thread jlabanca

Reviewers: jgw,

Description:
Most of RichTextAreaImplSafari was written to support older versions of
Safari, which we know longer need to support.  I've stripped away all of
the old stuff, leaving only a few Safari specific implementations.

This patch also fixes issue 2813 by removing some weird text selection
code, which presumably was needed in Safari 2 or earlier.

Testing:
===
Manually verified that this works on Safari and all other browsers.

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

Affected files:
   user/src/com/google/gwt/user/client/ui/RichTextArea.java
   user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImpl.java
   user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplSafari.java
   user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplStandard.java



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



[gwt-contrib] [google-web-toolkit commit] r5638 - Fixed a broken test that would fail 0.1% of the time because it assumes that a Date has a...

2009-06-29 Thread codesite-noreply

Author: jlaba...@google.com
Date: Mon Jun 29 13:22:41 2009
New Revision: 5638

Modified:
trunk/user/test/com/google/gwt/emultest/java/sql/SqlTimestampTest.java

Log:
Fixed a broken test that would fail 0.1% of the time because it assumes  
that a Date has a non-zero millsecond field.

Patch by: jlabanca
Review by: jat (desk)



Modified:  
trunk/user/test/com/google/gwt/emultest/java/sql/SqlTimestampTest.java
==
--- trunk/user/test/com/google/gwt/emultest/java/sql/SqlTimestampTest.java  
 
(original)
+++ trunk/user/test/com/google/gwt/emultest/java/sql/SqlTimestampTest.java  
 
Mon Jun 29 13:22:41 2009
@@ -22,7 +22,7 @@
  import java.util.Date;

  /**
- * Tests {...@link java.sql.Timestame}. We assume that the underlying
+ * Tests {...@link java.sql.Timestamp}. We assume that the underlying
   * {...@link java.util.Date} implementation is correct and concentrate only  
on the
   * differences between the two.
   */
@@ -32,6 +32,7 @@
/**
 * Sets module name so that javascript compiler can operate.
 */
+  @Override
public String getModuleName() {
  return com.google.gwt.emultest.EmulSuite;
}
@@ -45,7 +46,11 @@
  Date d = new Date(now);

  Timestamp t = new Timestamp(d.getTime());
-t.setNanos(1);
+if (now % 1000 == 0) {
+  t.setNanos(101);
+} else {
+  t.setNanos(1);
+}

  // Timestamps are stored at second-level precision
  Date d2 = new Date(t.getTime());

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



[gwt-contrib] Re: SoyLite

2009-06-29 Thread Katharina Probst
Hi Lex,

all of what you say makes sense to me.  I think SoyLite is a great idea and
we should go ahead with it.

I do have one concern, however: as you mention below, some methods will
simply appear to disappear under SoyLite. For instance, in your first
example, Point.getX() will not appear to produce any output.  I'm a bit
afraid that this will also cause confusion (and, similarly to partial
billing, some people may think the SOYC report is wrong).  It is *less*
confusing than what's currently in trunk, but I am wondering whether there
could be a hybrid approach, where we record in a lightweight way, without
reverting back to the current expensive SOYC, where something gets inlined.

It appears that partial billing is mainly due to inlining.  Would it make
sense to annotate methods with inlining targets, so that the SOYC report
could show, for every method, all places where it was inlined into?  While
this would incur an additional cost during compilation, it could clear up
some confusion in the final report.  Is this too heavy-weight?

For right now, I think SoyLite is a great idea.  I would consider inlining
tracing a possible future enhancement.

kathrin




On Mon, Jun 29, 2009 at 12:20 PM, Lex Spoon sp...@google.com wrote:


 On Sun, Jun 28, 2009 at 12:19 AM, John Tamplinj...@google.com wrote:
  On Fri, Jun 26, 2009 at 3:20 PM, Lex Spoon sp...@google.com wrote:
 
  I've been trying to think of ways to speed up the -soyc option, and
  here is the result of one attempt.  What do people think?
 
  The idea is to mimick some aspects of the speedy symbolMaps files.
  Instead of using the enhanced SourceInfo's to track links between
  before-optimization and after-optimization code, bill size information
  only to the program as it stands at the end of Java optimization.
  Additionally, be careful to avoid needing any massaging of the data
  in StoryRecorder; instead, make a single pass through all
  the size information.
 
  How much would it be skewed by JS-level optimizations?  What about JSNI
  code?

 The basic framework is the same in both cases.  Output bytes get
 billed back to Java code.  That's final output bytes, after all
 optimization is complete.  Both would bill JSNI code to the associated
 Java native method.  The difference is whether to map each byte to
 multiple methods, or to pick just one.

 Let me give some examples.  Suppose Point is a class with a method
 getX() that is always inlined.  Thus, Point.getX() is inlined away
 during Java optimization.  Then suppose some method TextArea.getArea()
 calls Point.getX().

 In trunk, Point.getX() is billed for every place it gets inlined, so
 it will show up in the size breakdown.  TextArea.getArea(), meanwhile,
 will not be billed for all of its output bytes; the ones that it got
 by inlining Point.getX() will be partially billed back to
 Point.getX().  To contrast, with SoyLite, Point.getX() would not show
 up in the size output, and TextArea.getArea() would be billed slightly
 more.

 As another example, suppose Java method Integer.toString ends up
 compiling to JavaScript function toString_3.  Also, suppose the
 compiler creates a static version Integer.toString$, which then
 compiles to function toString_4.  In trunk, Integer.toString is given
 full blame for toString_3 and half blame for toString_4;
 Integer.toString$ is given half blame for toString_4.  With SoyLite,
 Integer.toString is given full blame for toString_3, and
 Integer.toString$ is given full blame for toString_4.

 Does that clear things up better?  If not, perhaps we should examine
 Showaces in more detail to find real examples of differences to look
 at.

 Lex

 


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



[gwt-contrib] Re: Manifest for SOYC permutations

2009-06-29 Thread spoon

LGTM.

Ideally, the similar information in the symbol maps files could be
reused.  However, this patch certainly does the job as is.  It's up to
you.


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

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



[gwt-contrib] using string constants in @def

2009-06-29 Thread Eric Ayers

Bob,

I would like to use a string constant in an @def.

Would you be open to a patch that added a new Method annotation to
distinguish this type of accessor from a class name?

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

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



[gwt-contrib] Re: using string constants in @def

2009-06-29 Thread Eric Ayers

Sorry, a little more context, I'm talking about the CssResource class.

On Mon, Jun 29, 2009 at 5:58 PM, Eric Ayerszun...@google.com wrote:
 Bob,

 I would like to use a string constant in an @def.

 Would you be open to a patch that added a new Method annotation to
 distinguish this type of accessor from a class name?

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




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

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



[gwt-contrib] Re: Manifest for SOYC permutations

2009-06-29 Thread Katharina Probst
Thanks, Lex.

I've uploaded another patch for your review that addresses your comment.
I'm still not quite certain which way is better - what do people think?

Option 1: Create a manifest file for each permutation which carries the same
permutation id as the existing SOYC report files.
Good: Can be used without using symbol maps
Bad: Duplicates some code

Option 2: Modify the symbol map files to output, as the first line, the
permutation ID.
Good: Slick, cheap, adds permutation ID to symbol map, which may come in
handy for use cases other than SOYC in the future.
Bad: SOYC will *have* to be used in conjunction with symbol maps, and the
SOYC dashboard needs to read information from both.

Thanks,
kathrin

On Mon, Jun 29, 2009 at 5:34 PM, sp...@google.com wrote:

 LGTM.

 Ideally, the similar information in the symbol maps files could be
 reused.  However, this patch certainly does the job as is.  It's up to
 you.



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


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



[gwt-contrib] IE8 disappearing history

2009-06-29 Thread Amir Kashani

I’m having a strange issue with trunk and IE8 where the browser’s
history stack inexplicably “disappears”. That is, the history drop
down list empties (including previously visited non-GWT sites, like
MSN) and the back/forward buttons don’t work. My guess is that this is
a bug in IE8 that GWT is somehow triggering since as far as I know, an
application can’t explicitly clear a browser’s back history.

I haven’t been able to find a definitive set of steps to duplicate
this. I’ll be clicking along, adding items to the history stack and
regularly checking the history drop-down menu until at some point, the
list is either completely empty or only contains the current page.
Other times, I’ll click back or forward, and as soon as I do, the
buttons become disabled (list is empty). To complicate matters, I
haven’t been able to create a simple example that exhibits the bug; it
only occurs with my fairly large application.

I _think_ I’ve narrowed down the issue to a change made to the IFrame
linker in r5393. Using r5392, history works exactly as expected.
Unfortunately, I can’t use r5393 directly, as it has a bug which isn’t
fixed way until r5523, where document.body is accessed before it is
initialized, causing my app to not load at all. Swapping out
IFrameTemplate.js with r5523’s version exhibits the broken behavior
with r5393.

I can’t for the life of me explain how the IFrame linker change causes
this, or why it’s not a consistent set of steps (timing issue?) or why
it only happens with my application and not smaller ones.

Any insight or tips on how to further track down the problem so I can
submit a coherent bug report would be greatly appreciated.

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



[gwt-contrib] GWTTestCase fails to run other module's onModuleLoad() methods

2009-06-29 Thread Fred Sauer
Scott,

IIRC, you were most recently working on GWTTestCase changes.

I just filed this issue which is throwing gwt-log users trying to use
GWTTestCase:
  http://code.google.com/p/google-web-toolkit/issues/detail?id=3791
I hoping the described behavior is not as designed.

Thanks
-- 
Fred Sauer
Developer Advocate
Google Inc.1600 Amphitheatre Parkway
Mountain View, CA 94043
fre...@google.com

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