HELPPP! GWT HttpServlet mecanism

2009-03-13 Thread 144_genting

Hi all, i am new to the gwt http servlet mechanism and really really
need some help. i know that GWT cannot support some of the java
classes, so had to use their request builder instead. i got a class
not found exception, but is not sure whats wrong! help is really
appreciated!

yup and does anyone know of a full step by step tutorial with the
server side codes as well?
would be great if there was one to follow thru.

--client side-
public class Testing4 implements EntryPoint {

public void onModuleLoad() {
// TODO Auto-generated method stub

String url = "login?login=3&password=3";
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,
URL.encode(url));


try {
//RequestBuilder builder = new 
RequestBuilder(RequestBuilder.GET,
"login");
builder.sendRequest("", new RequestCallback() {
public void onResponseReceived(Request request, 
Response response)
{

 if (200 == response.getStatusCode()) {
  // Process the response in 
response.getText()

 Window.alert("the string: "+ 
response.getText());
  } else {
// Handle the error.  Can get the 
status text from
response.getStatusText()
  Window.alert(" Connected with 
error(maybe)");
  }


}
public void onError(Request request, Throwable 
exception) {
Window.alert("Error ("+ exception 
+")"); } });
} catch(RequestException exception) {
Window.alert("Wooops ("+ exception +")"); }
}

}

--server side

public class LoginServlet extends HttpServlet {
private static final long serialVersionUID = 1L;

/**
 * @see HttpServlet#doGet(HttpServletRequest request,
HttpServletResponse response)
 */
protected void doGet(HttpServletRequest req, HttpServletResponse
resp) throws ServletException, IOException {
String login = (String) req.getParameter("login");
String password = (String) req.getParameter("password");
System.out.println("Login: "+ login +"/"+ password);
GWT.log("Login: "+ login +"/"+ password, null);

Document doc = XMLParser.createDocument();
Element root;
if(login != null && !login.equals("") && 
login.equals(password)) {
root = doc.createElement("loginSuccessful");
root.setAttribute("login", login.toUpperCase()); }
else {
root = doc.createElement("loginFailed");
Element causes = doc.createElement("causes");
Element cause;
if(login == null || login.equals("")) {
cause = doc.createElement("loginIsEmpty"); }
else { cause = 
doc.createElement("loginAndPasswordDontMatch"); }
causes.appendChild(cause);
root.appendChild(causes);
}
doc.appendChild(root);
resp.setContentType("text/xml");
System.out.println(doc.toString());
resp.getOutputStream().print(doc.toString());
}


/**
 * @see HttpServlet#doPost(HttpServletRequest request,
HttpServletResponse response)
 */
protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
// TODO Auto-generated method stub
}

}

xml file--



















---exception --

[ERROR] Unable to instantiate
'com.mycompany.mypackage.server.LoginServlet'
java.lang.ClassNotFoundException:
com.mycompany.mypackage.server.LoginServlet
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.google.gwt.dev.sh

Re: Loading Images into GWT via MySQL

2009-03-13 Thread Magius

I think it's faster to transfer the image using an HttpServlet, in
this way you don't need to encode it,
avoid the overhead of the RPC encoding/decoding,
reduce the size of the data trasfered (base 64 increase the data
size).

In my application I ask to the server for thumbnails ( image1.serURL
( "/thumbnail/album1/photo2").
If I have cached previously the thumbnail the HttpServlet returns the
reduce image directly.
If not, the servlet loads the full photo, resize it and sends to the
client.
It's very easy and clear.


On Mar 13, 3:07 pm, Darren  wrote:
> The one case that hasn't been mentioned is when one dynamically
> creates transient images on the server.
>
> We transform various XML data sources into SVG and then transcode into
> JPG (using Batik) on the fly, then base 64 encode the JPG into a
> string and send it across via GWT-RPC.
>
> Then on the client, once you have the image data from the RPC callback
> (as a String):
> String base64EncodedImage = ... ;
> Image img = new Image();
> img.setUrl("data:image/jpg;base64," + base64EncodedImage);
>
> On Mar 13, 5:08 am, stone  wrote:
>
> > use a servlet url for downloading img.
> > for example: myapp/dbimage/123456
> > and the servlet mapping is /dbimage/*
>
> > On Mar 13, 9:52 am, Itamar Ravid  wrote:
>
> > > Don't forget however to set the content type on the response to an image 
> > > of
> > > some type, otherwise the client's browser will try to download the picture
> > > rather than display it.
>
> > > On Fri, Mar 13, 2009 at 2:28 AM, gregor 
> > > wrote:
>
> > > > I think Itamar is right, Jack, you should use a standard HttpServlet
> > > > for this, not GWT-RPC, because this sends the image over to the
> > > > browser as byte steam, and I don't think RPC can do that.
>
> > > > First, I take it these are not images used in your UI (like icons
> > > > etc), 'cos those should go in an ImageBundle. I assume you know that &
> > > > these images are downloaded as user selections etc.
>
> > > > 1) Consult your MySQL docs/forum to find out how to obtain an
> > > > InputStream for the image via JDBC. You want to pass an InputStream
> > > > back to your image download HttpServlet. You don't want to read out
> > > > the image bytes yet.
>
> > > > 2) You write the HttpServlet something like this example (there are
> > > > lots of others around):
>
> > > >http://snippets.dzone.com/posts/show/4629
>
> > > > Notice that the key is a looping read of the InputStream (which you
> > > > got from MySQL) that writes straight into the HttpServlet's response
> > > > OutputStream. Notice also it uses a buffer byte[] array. This is so
> > > > that your web server does not get it's memory clogged up with big
> > > > image byte arrays - the image bytes just get shunted from the DB
> > > > straight out to the browser via this buffer. Therefore set this buffer
> > > > small. Apache tend to use 2048 bytes. I think Oracle prefer 4096. That
> > > > sort of size for the buffer. Take care to set the response content
> > > > type so the browser knows what it's dealing with.
>
> > > > 3) In your client you can set the Image widget's URL to your image
> > > > download HttpServlet adding a parameter for the image id.
>
> > > > regards
> > > > gregor
>
> > > > On Mar 12, 8:54 pm, "fatjack1...@googlemail.com"
> > > >  wrote:
> > > > > Hi,
>
> > > > > I'm not too sure how to implement a HTTPServlet. Does anyone know how
> > > > > to use images using RPC?
>
> > > > > Im really stuck on this.
>
> > > > > On Mar 12, 8:43 pm, Itamar Ravid  wrote:
>
> > > > > > The best way, IMO, is to not use GWT-RPC, but rather implement an
> > > > > > HttpServlet, that retrieves the data from the database and returns 
> > > > > > it
> > > > with
> > > > > > the appropriate Content-Type in response to a GET http request. 
> > > > > > Then,
> > > > you
> > > > > > simply place an image in your GWT code, with its source being the 
> > > > > > path
> > > > to
> > > > > > the servlet (defined in your web.xml), passing along any parameters
> > > > required
> > > > > > - such as the ID of the image in the database.
>
> > > > > > On Thu, Mar 12, 2009 at 12:59 PM, fatjack1...@googlemail.com <
>
> > > > > > fatjack1...@googlemail.com> wrote:
>
> > > > > > > Hi,
>
> > > > > > > I am new to loading images into GWT from MySQL and am abit lost on
> > > > the
> > > > > > > best way to do it.
>
> > > > > > > I already have my image in the database. How do I retrieve it? I 
> > > > > > > read
> > > > > > > somewhere that it can just be stored as a String. Is this 
> > > > > > > correct? So
> > > > > > > my code on the server side would look like:
>
> > > > > > > //Open database connection
> > > > > > > dc.openConnection();
> > > > > > > resultSet = dc.statement.executeQuery(SELECT CategoryImage FROM
> > > > > > > itemcategory_table WHERE ItemType = 'Test');
>
> > > > > > >   while(resultSet.next()) {
> > > > > > >        String test = resultSet.getString(1);
> > > > > > > }
>
> > > > > > > dc.closeConnection();
>
> > > 

Re: Announcing GDE 1.0.0 Beta Release - M20090313

2009-03-13 Thread Dop Sun

Oops. it works after clear all cache of FireFox.
--~--~-~--~~~---~--~~
You 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: Announcing GDE 1.0.0 Beta Release - M20090313

2009-03-13 Thread Dop Sun

Don't know the exactly reason, the above link does not work in
FireFox. Someone suggests that it's because of the file mime type is
text/plain. And I re-upload all files with the correct type
(currently, they are text/html or image/gif ...), but still not
working.

Please using the IE to view the demo atm.
--~--~-~--~~~---~--~~
You 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: Anyway to clone a listbox?

2009-03-13 Thread Velu

Hopefully the solution below will help you.

Create your list box once and -

String listBoxHtmlString = yourListBox.toString();

Once you have the html string you can create as many number of HTML
objects out of that as needed.

HTML listBoxHtml = new HTML(listBoxHtmlString);
yourWidget.add(listBoxHtml, left, top);

However, I am not sure this is anymore efficient than creating as many
instances of the ListBox itself.

Try it and let us know.

Thanks
S. Velu

On Mar 13, 1:04 pm, "flyingb...@gmail.com" 
wrote:
> Just wondering is there any way to make clone of listbox where I would
> not have to readd all the values to a new listbox again.
>
> For example my listbox is filled with like 100 items.
>
> It will have to go though a loop to add them. I have more than one
> listbox so it would have to go though a loop to add them to the new
> listbox.
>
> So is there any where where you can create one listbox and than make
> new listbox use the old lsitbox name/values

--~--~-~--~~~---~--~~
You 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: error in database connection

2009-03-13 Thread tskaife

I thought I had posted this already, but it looks like your issue is
with your URL. MySql normally runs on port 3306, so your url should
look like this "jdbc:mysql://localhost:3306/test". Also make sure you
have a database named "test".

-Trevor Skaife

On Mar 12, 2:02 pm, Arthur Kalmenson  wrote:
> You can either use Gilead or Dozer. We use Dozer here.
>
> --
> Arthur Kalmenson
>
> On Thu, Mar 12, 2009 at 2:55 PM, Vitali Lovich  wrote:
> > Also just to point out, there's a number of GWT libraries for passing
> > persistent objects across the client/server barrier.  I'm not sure how well
> > they work or of any of the dragons involved, but they do exist
> > (hibernate4gwt was one back in the day - I believe it's been deprecated and
> > there are more robust ones available these days).
>
> > On Thu, Mar 12, 2009 at 2:48 PM, Sumit Chandel 
> > wrote:
>
> >> Hi Poonam,
> >> Apart from making sure your Hibernate and applicationContext.xml
> >> configurations are correct, I think another major cause for the stack trace
> >> you're seeing is that you're mixing server-side Java code with client-side
> >> GWT code. It's important to recall that GWT code gets converted into
> >> equivalent JavaScript, therefore you can't directly use server-side Java
> >> concepts in GWT code and expect them to work as they would in a Java
> >> runtime.
> >> That said, there is a set of emulated JRE types supported in GWT. You can
> >> check out the link below to the types that are supported in the emulated
> >> JRE.
> >> Emulated JRE:
>
> >>http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=goog...
>
> >> Vitali's suggestion of getting your server-side properly configured
> >> without introducing GWT at first, and then creating the client-side using
> >> GWT and integrating with the server-side using GWT RPC sounds like a sound
> >> approach if you're just getting started.
> >> Hope that helps,
> >> -Sumit Chandel
>
> >> On Tue, Mar 10, 2009 at 12:26 AM, Vitali Lovich  wrote:
>
> >>> This is more a Hibernate than GWT issue.  From your error log, it looks
> >>> like it boils down to you not configuring it correctly.  If you look at 
> >>> the
> >>> newer Hibernate, there's no XML configuration.  It's all done through
> >>> annotations, which are a lot easier to understand.
>
> >>> You may want to look into just getting hibernate running on its own in a
> >>> standalone java application, and then just adding a GWT RPC glue layer
> >>> around it if you are indeed planning on doing some kind of web-app stuff.
>
> >>> On Tue, Mar 10, 2009 at 3:06 AM, poonam  wrote:
>
>  Hi,
>   I have developed the application using the 3parts tutorial from the
>  site  www.eggsylife.blogspot.comas suggested by you.
>  Actually for database I have used MySQL and for  the connection with
>  database I have created the applicationContext.xml as follows :
>
>  - applicationContext.xml
>
>  
>  http://www.springframework.org/schema/beans";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xmlns:aop="http://www.springframework.org/schema/aop";
>  xmlns:tx="http://www.springframework.org/schema/tx";
>   xsi:schemaLocation="http://www.springframework.org/schema/beans
>  classpath:spring-beans-2.0.xsdhttp://www.springframework.org/schema/tx
>  classpath:spring-tx-2.0.xsdhttp://www.springframework.org/schema/aop
>  classpath:spring-aop-2.0.xsd">
>     class="org.apache.commons.dbcp.BasicDataSource">
>    
>        com.mysql.jdbc.Driver
>    
>    
>       >jdbc:mysql://localhost/test
>    
>
>   
>         root
>   
>   
>      root
>    
>    
>        2
>    
>    
>             5
>    
>    
>       2
>    
>   
>      class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>     
>      
>     
>    
>     hibernate.cfg.xml
>     
>      
>          org.hibernate.cfg.AnnotationConfiguration
>      
>      
>        
>             key="hibernate.dialect">org.hibernate.dialect.HSQLDialect
>              true
>           
>      
>     
>       class="org.springframework.orm.hibernate3.HibernateTransactionManager">
>      
>       
>       
>         target-class="false" />
>
>             class="com.company.server.domain.PupilCollectionImpl"
>  scope="prototype">    bean="sessionFactory"/> 
>      
>
>  Also, in the lib folder I have included the jar that is,  mysql-
>  connector-java-5.0.4-bin.jar  in the 'lib' folder.
>  But now I am getting the errors as,
>
>  1. [WARN] SQL Error: 0, SQLState: null
>
>  2. [WARN] Cannot create JDBC driver of class 'com.mysql.jdbc.Driver'
>  for connect URL '>jdbc:mysql://localhost/test'
>
>  3. [WARN] Could not obtain connection metadata
>  org.apache.commons.dbcp.SQLNestedExcep

Re: error in database connection

2009-03-13 Thread tskaife

I'm guessing your problem is with your database URL. I see you have
"jdbc:mysql://localhost/test" and normally MySql runs on port 3306, so
I would suggest changing it to "jdbc:mysql://localhost:3306/test".
Also make sure that you actually have a database called "test" as
well.

-Trevor Skaife

On Mar 12, 2:02 pm, Arthur Kalmenson  wrote:
> You can either use Gilead or Dozer. We use Dozer here.
>
> --
> Arthur Kalmenson
>
> On Thu, Mar 12, 2009 at 2:55 PM, Vitali Lovich  wrote:
> > Also just to point out, there's a number of GWT libraries for passing
> > persistent objects across the client/server barrier.  I'm not sure how well
> > they work or of any of the dragons involved, but they do exist
> > (hibernate4gwt was one back in the day - I believe it's been deprecated and
> > there are more robust ones available these days).
>
> > On Thu, Mar 12, 2009 at 2:48 PM, Sumit Chandel 
> > wrote:
>
> >> Hi Poonam,
> >> Apart from making sure your Hibernate and applicationContext.xml
> >> configurations are correct, I think another major cause for the stack trace
> >> you're seeing is that you're mixing server-side Java code with client-side
> >> GWT code. It's important to recall that GWT code gets converted into
> >> equivalent JavaScript, therefore you can't directly use server-side Java
> >> concepts in GWT code and expect them to work as they would in a Java
> >> runtime.
> >> That said, there is a set of emulated JRE types supported in GWT. You can
> >> check out the link below to the types that are supported in the emulated
> >> JRE.
> >> Emulated JRE:
>
> >>http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=goog...
>
> >> Vitali's suggestion of getting your server-side properly configured
> >> without introducing GWT at first, and then creating the client-side using
> >> GWT and integrating with the server-side using GWT RPC sounds like a sound
> >> approach if you're just getting started.
> >> Hope that helps,
> >> -Sumit Chandel
>
> >> On Tue, Mar 10, 2009 at 12:26 AM, Vitali Lovich  wrote:
>
> >>> This is more a Hibernate than GWT issue.  From your error log, it looks
> >>> like it boils down to you not configuring it correctly.  If you look at 
> >>> the
> >>> newer Hibernate, there's no XML configuration.  It's all done through
> >>> annotations, which are a lot easier to understand.
>
> >>> You may want to look into just getting hibernate running on its own in a
> >>> standalone java application, and then just adding a GWT RPC glue layer
> >>> around it if you are indeed planning on doing some kind of web-app stuff.
>
> >>> On Tue, Mar 10, 2009 at 3:06 AM, poonam  wrote:
>
>  Hi,
>   I have developed the application using the 3parts tutorial from the
>  site  www.eggsylife.blogspot.comas suggested by you.
>  Actually for database I have used MySQL and for  the connection with
>  database I have created the applicationContext.xml as follows :
>
>  - applicationContext.xml
>
>  
>  http://www.springframework.org/schema/beans";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xmlns:aop="http://www.springframework.org/schema/aop";
>  xmlns:tx="http://www.springframework.org/schema/tx";
>   xsi:schemaLocation="http://www.springframework.org/schema/beans
>  classpath:spring-beans-2.0.xsdhttp://www.springframework.org/schema/tx
>  classpath:spring-tx-2.0.xsdhttp://www.springframework.org/schema/aop
>  classpath:spring-aop-2.0.xsd">
>     class="org.apache.commons.dbcp.BasicDataSource">
>    
>        com.mysql.jdbc.Driver
>    
>    
>       >jdbc:mysql://localhost/test
>    
>
>   
>         root
>   
>   
>      root
>    
>    
>        2
>    
>    
>             5
>    
>    
>       2
>    
>   
>      class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
>     
>      
>     
>    
>     hibernate.cfg.xml
>     
>      
>          org.hibernate.cfg.AnnotationConfiguration
>      
>      
>        
>             key="hibernate.dialect">org.hibernate.dialect.HSQLDialect
>              true
>           
>      
>     
>       class="org.springframework.orm.hibernate3.HibernateTransactionManager">
>      
>       
>       
>         target-class="false" />
>
>             class="com.company.server.domain.PupilCollectionImpl"
>  scope="prototype">    bean="sessionFactory"/> 
>      
>
>  Also, in the lib folder I have included the jar that is,  mysql-
>  connector-java-5.0.4-bin.jar  in the 'lib' folder.
>  But now I am getting the errors as,
>
>  1. [WARN] SQL Error: 0, SQLState: null
>
>  2. [WARN] Cannot create JDBC driver of class 'com.mysql.jdbc.Driver'
>  for connect URL '>jdbc:mysql://localhost/test'
>
>  3. [WARN] Could not obtain connection metadata
> >>

Re: Strange List serialization behaviour

2009-03-13 Thread Arthur

Hi Rob

> I can't fathom why, but it seems when using a parameterised List as a
> return object, it seems to get lost if I have more than 1 method doing
> so.

We have services which have more than one method returning
parameterised lists (using GWT 1.5.3). Any error messages?

Arthur

--~--~-~--~~~---~--~~
You 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: Loading Images into GWT via MySQL

2009-03-13 Thread Darren


The one case that hasn't been mentioned is when one dynamically
creates transient images on the server.

We transform various XML data sources into SVG and then transcode into
JPG (using Batik) on the fly, then base 64 encode the JPG into a
string and send it across via GWT-RPC.

Then on the client, once you have the image data from the RPC callback
(as a String):
String base64EncodedImage = ... ;
Image img = new Image();
img.setUrl("data:image/jpg;base64," + base64EncodedImage);




On Mar 13, 5:08 am, stone  wrote:
> use a servlet url for downloading img.
> for example: myapp/dbimage/123456
> and the servlet mapping is /dbimage/*
>
> On Mar 13, 9:52 am, Itamar Ravid  wrote:
>
> > Don't forget however to set the content type on the response to an image of
> > some type, otherwise the client's browser will try to download the picture
> > rather than display it.
>
> > On Fri, Mar 13, 2009 at 2:28 AM, gregor wrote:
>
> > > I think Itamar is right, Jack, you should use a standard HttpServlet
> > > for this, not GWT-RPC, because this sends the image over to the
> > > browser as byte steam, and I don't think RPC can do that.
>
> > > First, I take it these are not images used in your UI (like icons
> > > etc), 'cos those should go in an ImageBundle. I assume you know that &
> > > these images are downloaded as user selections etc.
>
> > > 1) Consult your MySQL docs/forum to find out how to obtain an
> > > InputStream for the image via JDBC. You want to pass an InputStream
> > > back to your image download HttpServlet. You don't want to read out
> > > the image bytes yet.
>
> > > 2) You write the HttpServlet something like this example (there are
> > > lots of others around):
>
> > >http://snippets.dzone.com/posts/show/4629
>
> > > Notice that the key is a looping read of the InputStream (which you
> > > got from MySQL) that writes straight into the HttpServlet's response
> > > OutputStream. Notice also it uses a buffer byte[] array. This is so
> > > that your web server does not get it's memory clogged up with big
> > > image byte arrays - the image bytes just get shunted from the DB
> > > straight out to the browser via this buffer. Therefore set this buffer
> > > small. Apache tend to use 2048 bytes. I think Oracle prefer 4096. That
> > > sort of size for the buffer. Take care to set the response content
> > > type so the browser knows what it's dealing with.
>
> > > 3) In your client you can set the Image widget's URL to your image
> > > download HttpServlet adding a parameter for the image id.
>
> > > regards
> > > gregor
>
> > > On Mar 12, 8:54 pm, "fatjack1...@googlemail.com"
> > >  wrote:
> > > > Hi,
>
> > > > I'm not too sure how to implement a HTTPServlet. Does anyone know how
> > > > to use images using RPC?
>
> > > > Im really stuck on this.
>
> > > > On Mar 12, 8:43 pm, Itamar Ravid  wrote:
>
> > > > > The best way, IMO, is to not use GWT-RPC, but rather implement an
> > > > > HttpServlet, that retrieves the data from the database and returns it
> > > with
> > > > > the appropriate Content-Type in response to a GET http request. Then,
> > > you
> > > > > simply place an image in your GWT code, with its source being the path
> > > to
> > > > > the servlet (defined in your web.xml), passing along any parameters
> > > required
> > > > > - such as the ID of the image in the database.
>
> > > > > On Thu, Mar 12, 2009 at 12:59 PM, fatjack1...@googlemail.com <
>
> > > > > fatjack1...@googlemail.com> wrote:
>
> > > > > > Hi,
>
> > > > > > I am new to loading images into GWT from MySQL and am abit lost on
> > > the
> > > > > > best way to do it.
>
> > > > > > I already have my image in the database. How do I retrieve it? I 
> > > > > > read
> > > > > > somewhere that it can just be stored as a String. Is this correct? 
> > > > > > So
> > > > > > my code on the server side would look like:
>
> > > > > > //Open database connection
> > > > > > dc.openConnection();
> > > > > > resultSet = dc.statement.executeQuery(SELECT CategoryImage FROM
> > > > > > itemcategory_table WHERE ItemType = 'Test');
>
> > > > > >   while(resultSet.next()) {
> > > > > >        String test = resultSet.getString(1);
> > > > > > }
>
> > > > > > dc.closeConnection();
>
> > > > > > Or have I got this completely wrong?
>
> > > > > > Next, I need to send this over to the client. What is the best way 
> > > > > > to
> > > > > > send an image over from the server to the client and how should it 
> > > > > > be
> > > > > > stored?
>
> > > > > > Any help on how to use images would be much appreciated!
>
> > > > > > Regards,
> > > > > > Jack

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

Error running GetTestCase from maven

2009-03-13 Thread sachinik

Hi all,

Im using maven 2, I've written a gwttestcase which is executing
properly from eclipse but when im running the testcase using maven as
explained in the following url :
http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/testing.html

Its giving error :

.** Unable to find a usable Mozilla install **
You may specify one in mozilla-hosted-browser.conf, see comments in
the file for details.

Regarding configuration of gwt-plugin in maven, im using "Auto
Configuration" as explained in
http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/examples.html

For configuration of gwttestcase in eclipse i refered :
http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideJUnitIntegration

Please help me with the problem
Thanks

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



Re: Back & Refresh button handling

2009-03-13 Thread levi.bracken

You can restore state, but it's a bit more work than just using GWT
History.  Basically you'll need to come up with some way of modifying
the url search parameter (stuff after the #) to include some info so
that you can bring the user back into the same state as they were
before.   For example, if your application has a number of screens and
they were on screen foo, which was loading with properties for an item
with id 10 then you'd need that information in the Url.

ex:  http://yourApp.com/gwtHostPage.html#screen=foo_id=10

You could also put a conversation id in the url param and then keep
the fine details cached on the server, but that makes the state/data
more transient. If you go with an option like this though it can help
make your pages open and work in other tabs and even make points in
your application bookmark'able'.


Now for the easy answer, yes you can just prevent the user from
carelessly clicking refresh.  Fortunately there isn't a way to trap
somebody on a webpage (think about how bad the web would be).   But,
you can use the WindowCloseListener to present a user with a
confirmation before they close the window, navigate to a new page, or
hit refresh.  It'd look something like this (not tested):

/
Window.addWindowCloseListener(
  new WindowCloseLisener(){

public String onWindowClosing(){
  return "Are you sure you want to leave this application?";
}

public void onWindowClosed(){
// Cleanup if need be
 }
});





On Mar 13, 2:52 pm, dodo  wrote:
> GWT provides History.onHistoryChange event to handle history but how
> can we restore application state when a user clicks on Refresh button?
> For example the user performed multiple actions on the web site and
> then clicked refresh button. Now how using GWT History class we can
> restore the same state?
>
> Another question, is there a way to trap "Refresh" click before
> actually the app refreshes and can be cancel the event?
>
> Rajesh
--~--~-~--~~~---~--~~
You 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
-~--~~~~--~~--~--~---



Exception when add spring.jar in project GWT 1.6

2009-03-13 Thread wiltonj

Hi,
I have a problem (exception) when add "spring.jar" in my project gwt
1.6 (WEB-INF/lib).

 javax.servlet.UnavailableException: Servlet class
org.apache.jasper.servlet.JspServlet is not a javax.servlet.Servlet
at org.mortbay.jetty.servlet.ServletHolder.checkServletType
(ServletHolder.java:377)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
234)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:39)
at org.mortbay.jetty.servlet.ServletHandler.initialize
(ServletHandler.java:616)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext
(WebAppContext.java:1220)
at org.mortbay.jetty.handler.ContextHandler.doStart
(ContextHandler.java:513)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
448)
at br.gov.senado.lib.util.jetty.CustomJettyLauncher
$WebAppContextWithReload.doStart(CustomJettyLauncher.java:387)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerWrapper.doStart
(HandlerWrapper.java:130)
at org.mortbay.jetty.handler.RequestLogHandler.doStart
(RequestLogHandler.java:115)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerWrapper.doStart
(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:39)
at br.gov.senado.lib.util.jetty.CustomJettyLauncher.start
(CustomJettyLauncher.java:437)
at com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:367)
at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:590)
at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397)
at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
--
[WARN] Failed startup of context
br.gov.senado.lib.util.jetty.CustomJettyLauncher
$webappcontextwithrel...@1f5b5fd{/,D:\Prodasen\ADMU\admu\war}
org.mortbay.util.MultiException: Multiple exceptions
at org.mortbay.jetty.servlet.ServletHandler.initialize
(ServletHandler.java:587)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext
(WebAppContext.java:1220)
at org.mortbay.jetty.handler.ContextHandler.doStart
(ContextHandler.java:513)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
448)
at br.gov.senado.lib.util.jetty.CustomJettyLauncher
$WebAppContextWithReload.doStart(CustomJettyLauncher.java:387)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:39)
---
Spring WebApplictation initialization completed... But, the
application not start...

INFO: Using context class
[org.springframework.web.context.support.XmlWebApplicationContext] for
root WebApplicationContext
Root WebApplicationContext: initialization completed in 157 ms

Thanks in advance for your help!
Wilton


--~--~-~--~~~---~--~~
You 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: Plugin based gwt web application

2009-03-13 Thread Rosh PR
Yeah, I think there is no other better solution for now. Will have to take
up some of
views been shared and try to figure out the best possible one. Thanks a lot
guys.
Its a pleasure having such a fine discussion with you all. Hopefully we have
something
coming up from GWt to fix such a issue in a easier manner..

On Sat, Mar 14, 2009 at 12:29 AM, Matías Costa wrote:

> On Fri, Mar 13, 2009 at 4:31 PM, Andreas Karlsson wrote:
>
>> Therefor I don't think the dynamic addition of (at compile time
>> unknown) modules is doable with the current (or future) versions of
>> GWT.
>>
>
> Yeah, you are right.
>
> I've talking with a colleague about the idea, its posible, with
> restrictions, with a JSNI interface in both sides, the plugin and the app.
> This is the way gwt-exporter works, you can see it in the timepedia blog:
>
> http://timepedia.blogspot.com/2009/03/gwt-exporter-205-released.html
>
> But the more simple solution, as you say, is compiling all plugins all at
> once, and activate them in runtime.
>
> I consider myself satisfied with this. Josh, are you done?
>
>
> >
>

--~--~-~--~~~---~--~~
You 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: Plugin based gwt web application

2009-03-13 Thread Matías Costa
On Fri, Mar 13, 2009 at 4:31 PM, Andreas Karlsson  wrote:

> Therefor I don't think the dynamic addition of (at compile time
> unknown) modules is doable with the current (or future) versions of
> GWT.
>

Yeah, you are right.

I've talking with a colleague about the idea, its posible, with
restrictions, with a JSNI interface in both sides, the plugin and the app.
This is the way gwt-exporter works, you can see it in the timepedia blog:

http://timepedia.blogspot.com/2009/03/gwt-exporter-205-released.html

But the more simple solution, as you say, is compiling all plugins all at
once, and activate them in runtime.

I consider myself satisfied with this. Josh, are you done?

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



Tomcat Deploy: Problem with TreeNode.disable()

2009-03-13 Thread joe young

I had some problem while deploying to Tomcat/GlassFish, note that
everything works fine with gwt-shell-hosted.

I found out that while building the children tree node
(com.gwtext.client.widgets.tree.TreeNode)  with recurrsive method, it
stops when I set the node to disable()

if (theObject.getDeprecated().equals("1")) {
childTreeNode.disable();   <---
//this will stop the funciton and the tree cannot built.
} else {
childTreeNode.enable();
}
firebug give me this error:
this.getOwnerTree() is undefined
[Break on this error] Ext.tree.TreeNode=function(A){A=A||{};if...
(this.ui.destroy){this.ui.destroy()}}});

and chrome's javascript console output this error
Uncaught TypeError: Cannot call method 'getSelectionModel' of
undefined http://localhost:8084/DMTAdmin/com.DMTAdmin/js/ext/ext-all.js
(line 102)

How come tomcat cause this error??? Does anyone know??

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



LoadRunner script

2009-03-13 Thread dodo

We are using Load Runner to record script for performance testing. I
guess it records the URL of the app and when ever we rebuild the app
with changes, filename of updated files changes and script fails to
run. Is there any solution for this?j

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



Back & Refresh button handling

2009-03-13 Thread dodo

GWT provides History.onHistoryChange event to handle history but how
can we restore application state when a user clicks on Refresh button?
For example the user performed multiple actions on the web site and
then clicked refresh button. Now how using GWT History class we can
restore the same state?

Another question, is there a way to trap "Refresh" click before
actually the app refreshes and can be cancel the event?

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



1.6 key event

2009-03-13 Thread Riyaz Mansoor


The following code generates keydown, keypress, keyup events in the
CASE statement. How to get the press event only?

popup = new DecoratedPopupPanel(true) {

  @Override
  protected void onPreviewNativeEvent(NativePreviewEvent event) {
switch (event.getNativeEvent().getKeyCode()) {
  case KeyCodes.KEY_ENTER:
GWT.log(event.getNativeEvent().getType(), null);
processFilterApply();
break;
}
super.onPreviewNativeEvent(event);
  }

};



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



Anyway to clone a listbox?

2009-03-13 Thread flyingb...@gmail.com

Just wondering is there any way to make clone of listbox where I would
not have to readd all the values to a new listbox again.


For example my listbox is filled with like 100 items.

It will have to go though a loop to add them. I have more than one
listbox so it would have to go though a loop to add them to the new
listbox.

So is there any where where you can create one listbox and than make
new listbox use the old lsitbox name/values
--~--~-~--~~~---~--~~
You 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
-~--~~~~--~~--~--~---



Performance of history handling with IE - The larger the app the worse the performance

2009-03-13 Thread maku

Hi,

we have a very strange performance problem especially in context with
history handling and IE6 / IE7

Our application is based on GXT and is already a rather large one (1.6
MB).

On less powerfull computers (e.g. Netbooks -> Asus EEE 1000h) the
performance of history handling is really bad (calling
History.newItem)

E.g. time performing History.newItem(...) lasts ca. 4.5 seconds

It seems that it depends on the size of the application.

When I try the same with a reduced app (size 980 KB) the performance
is dramatically better (but of course not satisfying) -> Time to
perform History.newItem(..) reduced from 4.5 seconds to 1.6 seconds.

Is it possible that the reason for this is IE's IFrame handling?

Does anybody of you know the reason for these kind of problems. Is
there a solution to solve the problem (or to improve the situation)?

TIA

Martin
--~--~-~--~~~---~--~~
You 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 project with multiple pages

2009-03-13 Thread Vitali Lovich
It seems like deferred binding would be a better approach from a whole
number of perspectives (although I'm not sure if you can define a custom
pivot point that's not based on user-agent or localization).

If you can figure out a way, you'll get performance benefits
(compilation-time determination of which module to use) & cleaner code
(modules don't have to filter - it'll be done by GWT.create at
compile-time).  The trick is that the title on the HTML page isn't available
to the GWT compiler.

On the other hand, it will slow down your compilation by num pivot points
again.

Trade-offs, trade-offs.

On Fri, Mar 13, 2009 at 7:14 AM, Magius  wrote:

>
> One Abstract EntryPoint with a child EntryPoint for each form was OOP-
> nicer,
> but only one EntryPoint with a 'switch-case' will do the job.
>
>
> On Mar 13, 11:56 am, Vitali Lovich  wrote:
> > Why have multiple entry points?  Why not just the one that decides which
> > code to run?
> >
> > On Fri, Mar 13, 2009 at 6:12 AM, Magius 
> wrote:
> >
> > > I had this problem some months ago.
> > > I had several pages in the same project (GWT 1.4), sharing services,
> > > code and images.
> > > The first approach was to create several modules, but each module had
> > > to be compiled separately.
> > > The problem was that the whole compilation took num-modules times more
> > > than a single compilation.
> > > And the static contents (/public folder) were repeated num-modules
> > > times.
> >
> > > Finally I moved to a single module approach with several EntryPoints.
> > > Each EntryPoint had a 'name' (Java constant): "Module1",
> > > "Module2", 
> > > And each HTML page had a corresponding title:  "Module1",
> > > "Module2", ...
> > > When opening an HTML page, all the EntryPoints are fired and each of
> > > them checks the HTML title against its name, and only the EntryPoint
> > > associated with the page begins to generate its panels.
> > > With a bit of OOP it's easy to implement.
> >
> > > This was the only solution I found in case of:
> > > - several HTMLs, each for one specific form
> > > - almost all the code and images shared between forms
> >
> > > And the benefits:
> > > - Only 1 compilation (4 minutes).
> > > - Only 1 copy of static contents (images, etc).
> >
> > > On Mar 12, 9:47 am, zep  wrote:
> > > > Hello!
> >
> > > > My question is perhaps not so relevant for Ajax applications, but for
> > > > various reasons (including CMS), I would like to have a GWT
> > > > application with multiple pages. What is the best way to do this? I
> > > > have thought to have a GWT module for each page, but wonder if it is
> > > > practical? Grateful for your answers!
> >
>

--~--~-~--~~~---~--~~
You 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: Memory leak in GWT based application

2009-03-13 Thread Magius

With GWT 1.4 + IE, there was a problem with ImageBundles.
For each image in the form, IE loaded in memory a copy off the whole
ImageBundle.
Then, when my app grows, a simple form with a few image-buttons used
200Mb, 300 Mb, 400 Mb...
It tought it was a memory leak until we found a great message about
that in this group.
But this IE problem is better managed by GWT 1.5...

To test it we split a big ImageBundle in two. The memory consumption
decrease about a 40%.


On Mar 13, 4:20 pm, Jason Essington  wrote:
> If you are using any of the regular GWT methods ... remove() or  
> clear() or what not, then yes GWT does remove the elements from DOM  
> and break the circular reference. GWT is very diligent at preventing  
> memory leaks. That is not always the case if you are using 3rd party  
> libraries (that may have less diligent quality control procedures), or  
> trying to do something sneaky with JSNI or DOM methods yourself.
>
> IE (particularly ie6) is a horrible platform for dynamic web  
> applications due in part to its incredibly slow javascript engine, and  
> its penchant for leaking memory like a sieve.
>
> I tend to not use singletons for UI stuff, so you could try to  
> instantiate those panels as needed, and simply toss them away when you  
> are done with them, and see if that doesn't make things any better.
>
> But again, check what is happening in FF as well and if there is no  
> leak then you are likely fighting a losing battle against well known  
> bugs in IE.
>
> -jason
>
> On Mar 13, 2009, at 5:54 AM, chauhan.sac...@gmail.com wrote:
>
>
>
> > How can we make sure that the GUI objects that we created are actually
> > removed from DOM?
>
> > On Mar 13, 1:58 pm, Vitali Lovich  wrote:
> >> Make sure that if you remove panels & whatnot from the page, that you
> >> actually also remove the DOM element as well as the GUI one.  I'm  
> >> not sure
> >> if Google's methods actually do that (if they don't, I think that's  
> >> a bug).
> >> I'll have to look into it though.
>
> >> On Fri, Mar 13, 2009 at 4:49 AM, LEDUQUE Mickaël  
> >>  wrote:
>
> >>> We made some tests and found (using very simple application showing
> >>> and removing the same UI in a repeated timer) that IE has huge  
> >>> memory
> >>> leaks.
> >>> With one add/remove cycle every 2 seconds, we had IE taking 4Gb of
> >>> memory in 10 hours.
> >>> The others tested browsers (firefox, chrome) didn't have that  
> >>> problem.- 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: JavaScriptException in hosted mode (Win XP - IE6)

2009-03-13 Thread Miles T.

Yes sorry. As it is a very generic error message, I thought it was
useless to translate it. Actually, the exact message with english
locale is "Object doesn't support this property or method". Yes, a
null object has no property...

By the way, I just removed the final keyword on method parameters of
an object, and now I don't have the issue... I have absolutely no idea
why. Doesn't GWT compiler just strip final keyword on method
parameters ???

On 12 mar, 20:25, Vitali Lovich  wrote:
> Just as a future hint, you may want to translate the error messages into
> English as well.  I understood it & there might be enough friend words for
> context for people who don't speek French, but you're more likely to get
> responses if everything is in English.
>
> On Thu, Mar 12, 2009 at 1:35 PM, Miles T.  wrote:
>
> > Mmm, it looks my Element was null. Strange that it doesn't throw a
> > NullPointerException instead.
>
> > On 12 mar, 16:29, "Miles T."  wrote:
> > > Hi all,
>
> > > I have an issue which randomly happens in hosted mode in Windows XP
> > > (IE6) when calling getElementsByTagName("td") on an Element.
>
> > > [ERROR] Uncaught exception escaped
> > > com.google.gwt.core.client.JavaScriptException: (TypeError): Cet objet
> > > ne gère pas cette propriété ou cette méthode
> > >  number: -2146827850
> > >  description: Cet objet ne gère pas cette propriété ou cette méthode
> > >         at
> > com.google.gwt.dom.client.Element$.getElementsByTagName$(Native
> > > Method)
>
> > > I've already encountered such "unsolvable" exception but I had found a
> > > workaround (refactoring a lot of code...). Did anyone already
> > > encounter such issue ?
>
> > > Cheers,
>
> > > Miles
--~--~-~--~~~---~--~~
You 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: Running HTTPServlet alongside RemoteServiceServlet in Tomcat

2009-03-13 Thread Isaac Truett

> Why is it that Tomcat doesn't log when an item/servlet is requested which 
> doesn't exist lol?

You might need to search your server.xml for "AccessLogValve" and
uncomment that valve configuration.


On Thu, Mar 12, 2009 at 4:21 PM, Feltros  wrote:
>
> I uncovered the error as an extremely simple mistake in my servlet
> location naming convention which was causing nothing to be run, and no
> errors to be printed. Why is it that Tomcat doesn't log when an item/
> servlet is requested which doesn't exist lol? GWT detects this error
> when your running in normal/hosted mode. Would have made this mistake
> so much clearer. It was the difference between /albumUpload and /
> AlbumUpload in the web.xml and project.gwt.xml lol.
>
> Your other comments have been massively helpful, and despite having
> read in tutorials and on other posts here that getting HTTPServlets to
> run with RPCServlets is tricky, I have to agree with yourself and say
> there isn't any trick to it other than having a good solid
> configuration in place.
>
> Thanks again :) I had spent at least 100 hours trying to track down
> the issues in running this and never thought to double check
> capitalisation.
>
> On Mar 12, 7:28 pm, Isaac Truett  wrote:
>> On Thu, Mar 12, 2009 at 3:01 PM, Feltros  wrote:
>>
>> > Oh no sorry when I said the rather peculiar way, its the same peculiar
>> > way you have to do it in GWT - as in you create a 'form' with the
>> > target of your form-receiving-servlet (In my case
>> > AlbumUploadController) which has some subelements which are fileupload
>> > boxes. The implementation would be exactly the same in GWT and both
>> > were tested. Didn't even mean to mention GXT lol :P I only said
>> > 'peculiar' because its not the normal way you'd reference a servlet
>> > which responded to a GET activity like /returnPictures?
>> > img="someimg.jpg" or the way you use RPCServlets.
>>
>> Oh, well. Can't always get away with a simple
>> blame-the-third-party-library. Just to narrow things down a bit, is
>> the form is actually being submitted? Firebug's useful for checking
>> that sort of thing, if you develop with Firefox.
>>
>> > A few questions to yourself then if you wouldn't mind assisting me in
>> > a few things?
>>
>> Not at all.
>>
>> > When creating your war do you leave your front end bits in the www/
>> > com.Blah.blah/ directory, or do you move them to the root of the WAR
>> > file for simpler URL's? (This isn't perhaps related to my error but
>> > i'd be interested to know if the location of the front end has a
>> > bearing on how you should call server side bits and where it should
>> > 'properly' be).
>>
>> Yes, I rebase everything to the web root. It does make it easier to
>> keep track of what each URL is relative to.
>>
>> > In any of the HTTPServlets you run how do you handle errors? Are they
>> > thrown for Tomcat to deal with, do you catch them and do
>> > error.printStackTrace() or do you handle them some other way to get
>> > them to end up in the logs?
>>
>> My current approach:
>>
>> I catch declared exceptions and log them (java.util.logging, or your
>> preference of logger). Not every exception is a dire emergency, of
>> course, so a lot of benign things like a request for an invalid record
>> ID might be logged at INFO level or lower. For routine errors like
>> that, I'll set the HTTP status (404 seems appropriate for an "ID not
>> found" scenario) and leave it at that. For something worse (gee,
>> suddenly I can't find the database) I'll throw a new ServletException
>> with an appropriate message (but not including the original exception,
>> since I've already logged that).
>>
>> > Thanks kindly for your help :)
>>
>> You're welcome.
>>
>>
>>
>> > On Mar 12, 6:48 pm, Isaac Truett  wrote:
>> >> > If anyone knows of any examples of a project with an RPCServlet and
>> >> > HTTPServlet (Any kind, a picture server, a file upload receiver, etc)
>> >> > running in conjunction on the server side and they both print their
>> >> > logs in Tomcat WAR deployment correctly that would be extraordinarily
>> >> > fantastic.
>>
>> >> Yes, it can be done. I've done it in a couple of different projects.
>> >> Unfortunately, no, it's not something I can point you to as an
>> >> example. But there really isn't anything tricky about it.
>>
>> >> You mentioned GXT; have you tried writing a simple test without GXT?
>> >> It seems quite likely that GXT is part of your problem, especially
>> >> given "the rather peculiar way you have to do with file uploading in
>> >> GXT" to which you refer. Have you searched a GXT forum for information
>> >> about this problem?
>>
>> >> On Thu, Mar 12, 2009 at 2:34 PM, Feltros  wrote:
>>
>> >> > I have read several posts that seem to be explaining a problem similar
>> >> > to my own and yet it is constantly misinterpreted and so the replies
>> >> > are somewhat useless. I will attempt to explain the problem as clearly
>> >> > as possible:
>> >> > I have 2 server classes,
>> >> > Albu

Re: Plugin based gwt web application

2009-03-13 Thread Andreas Karlsson

Rosh,

I don't understand your comment. My approach is to pre-generate the
whole JS with GWT as a dynamically configured project, so there's no
worry about consuming obfuscated JS as at compile time it's normal
Java...

Your approach if I understand it correctly is to dynamically on the
client side combine differently compiled GWT applications (or other
JS) then you would get multiple obfuscated emulated JRE-classes and
other shared code between the modules. Which would give a larger
memory and network footprint.

Therefor I don't think the dynamic addition of (at compile time
unknown) modules is doable with the current (or future) versions of
GWT.

/Andreas


On Fri, Mar 13, 2009 at 4:14 PM, Rosh PR  wrote:
> Andreas, The idea is to have different plugins loaded and run by different
> users
> at run time. So even if we manage to compile the code how is the framework
> gonna consume the generated obfuscated JS code, Cos the framework is already
> in a
> obfuscated JS state. Unless the framework try loading some js files from
> the
> file system dynamically & add it as new HTML. Which I think is not a
> practical think todo.
> On Fri, Mar 13, 2009 at 6:13 AM, Andreas Karlsson  wrote:
>>
>> > I am in the design phase of a application that will be deployed on
>> > different
>> > offices, each one with almost equal  workflows, automatizing, staff and
>> > requisites. Yeah, that "almost" sucks. The idea is to get one big common
>> > or
>> > default subset, build some kind of plugin / extension / delegation
>> > system
>> > for the specific and deploy different builds without forking the
>> > codebase.
>> > That forking should be a nightmare.
>> >
>> > So, your way was the initial idea, and in our project fits. But some
>> > kind of
>> > dynamic plugin loading and upgrading, without touching the core install
>> > is
>> > ideal, and a very powerful tool. For example, you can do per user plugin
>> > configs.
>> >
>>
>> But is the dynamic plugin idea to compile each plugin as a seperate
>> gwt-module (compilation unit)? If this is the case the end-user would
>> need to download duplicates of the JRE-emulation (and other common and
>> shared classes/code) which would not be an ideal solution. I will make
>> a server-side framework which manages the deployment of the GWT
>> application, as mentioned it will take minutes to recompile and deploy
>> the updated gwt application after the plugin configuration has
>> changed, but that is not a problem as the idea is not to have
>> different users have different plugins but rather different
>> offices/client of the application.
>>
>> /Andreas
>>
>>
>
>
> >
>

--~--~-~--~~~---~--~~
You 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: Memory leak in GWT based application

2009-03-13 Thread Jason Essington

If you are using any of the regular GWT methods ... remove() or  
clear() or what not, then yes GWT does remove the elements from DOM  
and break the circular reference. GWT is very diligent at preventing  
memory leaks. That is not always the case if you are using 3rd party  
libraries (that may have less diligent quality control procedures), or  
trying to do something sneaky with JSNI or DOM methods yourself.

IE (particularly ie6) is a horrible platform for dynamic web  
applications due in part to its incredibly slow javascript engine, and  
its penchant for leaking memory like a sieve.

I tend to not use singletons for UI stuff, so you could try to  
instantiate those panels as needed, and simply toss them away when you  
are done with them, and see if that doesn't make things any better.

But again, check what is happening in FF as well and if there is no  
leak then you are likely fighting a losing battle against well known  
bugs in IE.

-jason

On Mar 13, 2009, at 5:54 AM, chauhan.sac...@gmail.com wrote:

>
> How can we make sure that the GUI objects that we created are actually
> removed from DOM?
>
> On Mar 13, 1:58 pm, Vitali Lovich  wrote:
>> Make sure that if you remove panels & whatnot from the page, that you
>> actually also remove the DOM element as well as the GUI one.  I'm  
>> not sure
>> if Google's methods actually do that (if they don't, I think that's  
>> a bug).
>> I'll have to look into it though.
>>
>>
>>
>> On Fri, Mar 13, 2009 at 4:49 AM, LEDUQUE Mickaël  
>>  wrote:
>>
>>> We made some tests and found (using very simple application showing
>>> and removing the same UI in a repeated timer) that IE has huge  
>>> memory
>>> leaks.
>>> With one add/remove cycle every 2 seconds, we had IE taking 4Gb of
>>> memory in 10 hours.
>>> The others tested browsers (firefox, chrome) didn't have that  
>>> problem.- 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
-~--~~~~--~~--~--~---



Strange List serialization behaviour

2009-03-13 Thread RobW

Under 1.4 we used to use the old typeArgs for returning a List

When we moved to 1.5 we went to parameterized types, as recommended
for Lists.

All of a sudden, a method on an RPC service I was writing today that
returned a List failed:

public List getRepositories()

(the specifics of what this do don't matter)

I knew we used a parameterized List return in another RPC service we
had

public List getEvents(long firstId, int maxEvents)
throws Exception;

so couldn't figure why this failed.

And then I noticed - the original code that worked also now failed.
Digging some more, I realised these are the only 2 methods in our RPC
services that return Lists.

Odder still - if I change the new one to return an  Array - both start
working.

I can't fathom why, but it seems when using a parameterised List as a
return object, it seems to get lost if I have more than 1 method doing
so.

-- Rob



--~--~-~--~~~---~--~~
You 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: Plugin based gwt web application

2009-03-13 Thread Rosh PR
Andreas, The idea is to have different plugins loaded and run by different
users at run time. So even if we manage to compile the code how is the
framework
gonna consume the generated obfuscated JS code, Cos the framework is already
in a
obfuscated JS state. Unless the framework try loading some js files from
the
file system dynamically & add it as new HTML. Which I think is not a
practical think todo.

On Fri, Mar 13, 2009 at 6:13 AM, Andreas Karlsson  wrote:

>
> > I am in the design phase of a application that will be deployed on
> different
> > offices, each one with almost equal  workflows, automatizing, staff and
> > requisites. Yeah, that "almost" sucks. The idea is to get one big common
> or
> > default subset, build some kind of plugin / extension / delegation system
> > for the specific and deploy different builds without forking the
> codebase.
> > That forking should be a nightmare.
> >
> > So, your way was the initial idea, and in our project fits. But some kind
> of
> > dynamic plugin loading and upgrading, without touching the core install
> is
> > ideal, and a very powerful tool. For example, you can do per user plugin
> > configs.
> >
>
> But is the dynamic plugin idea to compile each plugin as a seperate
> gwt-module (compilation unit)? If this is the case the end-user would
> need to download duplicates of the JRE-emulation (and other common and
> shared classes/code) which would not be an ideal solution. I will make
> a server-side framework which manages the deployment of the GWT
> application, as mentioned it will take minutes to recompile and deploy
> the updated gwt application after the plugin configuration has
> changed, but that is not a problem as the idea is not to have
> different users have different plugins but rather different
> offices/client of the application.
>
> /Andreas
>
> >
>

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



Disable menu shifting to stay visible

2009-03-13 Thread goolie

I've recently upgraded from gwt 1.4 to 1.5 and I have a rather strange
problem.
Our application constantly resizes itself to be as small as possible.
This means that when a menu is opened, IE automatically resizes itself
to fit the menu.

The problem is that with gwt 1.5 it seems like some command is
performed which tries to shift the menu if the browser is to small and
this didn't happen in 1.4. The result for us is an ugly glitch when
the menu itself first shifts to fit the small window and then once our
resize has been performed it is shifted back.

Is there any way to disable this "shifting into visibility" thing?

Any help would be highly appreciated!

/Oskar
--~--~-~--~~~---~--~~
You 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: Loading Images into GWT via MySQL

2009-03-13 Thread mars1412

I would recommend anyone to think carefully of the pros and cons of
each way and then decide carefully what you need for your specific
application.
some things that come to my mind:
pros (of storing images in the database vs. images on the filesystem):
 * atomicity & concurrency: the database will make sure, that the
image and its related data always exist and are in sync
 if you store only the reference of the file in the database and
the file itself on the filesystem you will have to take care of
special cases:
 * storing the file was ok , but the database entry failed: if
this happens frequently, you'll have loads of unrefernced files
lingering around
 * storing the db-entry was ok, but the file could not be saved on
the filesystem: in this case your buissneslogic must take care of this
issue to prevent errors
 * easier backup:
   * simply run a db-dump and you have all data backed up and you are
sure that it is consistent:
 if you did this with the filesystem approach you would have to
backup the db-dump and the images-directory - which would bring you
synchronisation problems again
 * single security realm:
   both the imagedata and its related data can take full advantage of
the databases security system
 * accessing the data may be easier: e.g.. when you use hibernate, you
could store a reference to the file in the user-entity

cons:
 * increased network traffic - as described before (but this would
also be true, if you decide to store the images on another machine's
filesystem, wouldn't it?)
 * database needs to be able to handle big amounts of data well
   * how does the database perform when you have a lot of data - how
much data do you expect in the first place?
   * does your database support BLOB fields - does the JDBC driver
support it, .. etc.

but in the end I guess it's always a matter of taste and of your
requirements...

On Mar 13, 10:04 am, Zé Vicente  wrote:
> Hi,
>
> I will give you my honestly opinion. It seems that you are new on the
> subject and I can say that I have a lot of experience on that.
>
> First of all, don't store images on the database :)
>
> It is true that we can do it, but depending of what you are going to
> do, the site of your database will be 90% images and 10% data.
>
> The images are always served by httpservers, even if you retrieve it
> from the database. So if you store the images in the file system of
> your httpserver, there is no need for network usage in case your
> database is hosted in a different server.
>
> So, use the database just to store the path of your images. Then in
> GWT, retrieve the object or list of objects that contains the path for
> your images. Again in GWT, Create an Image object and set the src
> property.
>
> That is all you need to do to display the image.
>
> What do you think?
>
> Regards,
> José Vicente
>
> On Mar 13, 2:52 am, Itamar Ravid  wrote:
>
> > Don't forget however to set the content type on the response to an image of
> > some type, otherwise the client's browser will try to download the picture
> > rather than display it.
>
> > On Fri, Mar 13, 2009 at 2:28 AM, gregor wrote:
>
> > > I think Itamar is right, Jack, you should use a standard HttpServlet
> > > for this, not GWT-RPC, because this sends the image over to the
> > > browser as byte steam, and I don't think RPC can do that.
>
> > > First, I take it these are not images used in your UI (like icons
> > > etc), 'cos those should go in an ImageBundle. I assume you know that &
> > > these images are downloaded as user selections etc.
>
> > > 1) Consult your MySQL docs/forum to find out how to obtain an
> > > InputStream for the image via JDBC. You want to pass an InputStream
> > > back to your image download HttpServlet. You don't want to read out
> > > the image bytes yet.
>
> > > 2) You write the HttpServlet something like this example (there are
> > > lots of others around):
>
> > >http://snippets.dzone.com/posts/show/4629
>
> > > Notice that the key is a looping read of the InputStream (which you
> > > got from MySQL) that writes straight into the HttpServlet's response
> > > OutputStream. Notice also it uses a buffer byte[] array. This is so
> > > that your web server does not get it's memory clogged up with big
> > > image byte arrays - the image bytes just get shunted from the DB
> > > straight out to the browser via this buffer. Therefore set this buffer
> > > small. Apache tend to use 2048 bytes. I think Oracle prefer 4096. That
> > > sort of size for the buffer. Take care to set the response content
> > > type so the browser knows what it's dealing with.
>
> > > 3) In your client you can set the Image widget's URL to your image
> > > download HttpServlet adding a parameter for the image id.
>
> > > regards
> > > gregor
>
> > > On Mar 12, 8:54 pm, "fatjack1...@googlemail.com"
> > >  wrote:
> > > > Hi,
>
> > > > I'm not too sure how to implement a HTTPServlet. Does anyone know how
> > > > to use images using RPC?
>
> > > > Im really stuck 

Re: Announcing GDE 1.0.0 Beta Release - M20090313

2009-03-13 Thread Dop Sun

The modified demo app can be found at:
http://ming-gwt.googlecode.com/svn/trunk/ming-gwt-test/war/default.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: Plugin based gwt web application

2009-03-13 Thread Rosh PR
A prototype that sounds like a good idea. We can keep talking about doing
all sorts of stuffs butwill never be through until we put this into a
working code.

On Fri, Mar 13, 2009 at 5:48 AM, Matías Costa  wrote:

> On Fri, Mar 13, 2009 at 12:00 PM, Andreas Karlsson wrote:
>
>> What I (plan) to do is to automatically recompile the whole
>> application when a client-plugin is added.
>>
>> So I keep a plugin registry on the server side and when I enable/add a
>> plugin I generate some glue files and recompile + redeploy the whole
>> GWT-client automatically, this to get the most benefits from GWT
>> optimizations.
>>
>
> I am in the design phase of a application that will be deployed on
> different offices, each one with almost equal  workflows, automatizing,
> staff and requisites. Yeah, that "almost" sucks. The idea is to get one big
> common or default subset, build some kind of plugin / extension / delegation
> system for the specific and deploy different builds without forking the
> codebase. That forking should be a nightmare.
>
> So, your way was the initial idea, and in our project fits. But some kind
> of dynamic plugin loading and upgrading, without touching the core install
> is ideal, and a very powerful tool. For example, you can do per user plugin
> configs.
>
> So, Rosh, what do you think about doing a small prototype? I see
> appropriate contact via private mail, work on that and publish the results
> pointing problems and wait for feedback. We can be days talking about the
> idea, but only the code can prove it can work, and looks like anybody has
> done something similar.
>
>
> >
>

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



Announcing GDE 1.0.0 Beta Release - M20090313

2009-03-13 Thread Dop Sun
I'm here happy to announce that the GDE Beta release finally reached.
GDE is one step closer to its goal: enable you build GWT applications
based on Plug-ins delivered by you or others.

Getting Started guidelines and binaries can be found at GDE Google
Code Project:
http://code.google.com/p/ming-gde/wiki/GDEGettingStarted

Till now, the following features have been fully implemented:
* GDE Build: support headless build outside the eclipse
* GWT 1.6.0 support: new Shell, new project structure, new compiler,
and other new features delivered in GWT 1.6.0
* Minimum Target Platform Defined: currently, to start with the GDE
development, only 3 plug-ins required: gwt-core-runtime and gwt-osgi,
plus plug-in wrapped the gwt.user.jar.
* New Example Projects: modified GWT Mail project which demonstrates
the plugin, extension point and extensions: the key features delivered
by GDE.

Please report bugs to gde issue tracker (http://code.google.com/p/ming-
gde/issues/list). If you run into any issues, feel free to leave a
messages in GDE project.

Dop Sun

The following is notes in the Chinese:

GDE Beta (M20090313)发布了!

在GDE项目的网站上可以找到相关的文档与下载。这个链接有如何上手使用GDE最新版本的介绍:
http://code.google.com/p/ming-gde/wiki/GDEGettingStarted

从发布至今,GDE包括以下的功能:
* GDE构建插件:最新的构建插件支持在Eclipse的项目上直接进行编译,或者集成于Ant脚本中执行构建。
* GWT 1.6.0支持:支持最新的特性,包括新的编译,项目结构,运行框架。包括最新的服务器:Jetty
* 最小目标平台:现在,运行GDE的目标程序,最少只需要三个插件:gwt.osgi, gwt.core.runtime,以及基于
gwt.user导出的一个插件。
* 最新的示例项目:基于GWT Mail示例改编的示例项目,演示了现有的GWT程序如何被方便地移植到GDE架构,同时,演示了如何定义基于GDE
的接口与扩展。

在使用过程中有任何问题,或建议,可以记录在GDE项目的问题列表中:http://code.google.com/p/ming-gde/
issues/list。

欢迎试用!

Dop Sun

--~--~-~--~~~---~--~~
You 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: Performance better setting attributes in CSS or in Java code?

2009-03-13 Thread Thomas Broyer



On 12 mar, 22:37, Sumit Chandel  wrote:
>
> Regarding performance, whether you set properties like width and height in
> GWT code or in CSS doesn't make a huge difference. What does matter is how
> you go about applying the CSS styles (for example, how you use CSS selectors
> to style your application). For this topic, you should get a good number of
> reads by performing a web search for terms like "CSS performance".

It actually seems tweaking CSS selectors might not be worth it:
http://ajaxian.com/archives/is-optimizing-css-selectors-worth-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: Memory leak in GWT based application

2009-03-13 Thread mikedshaffer

IE (especially IE6) has been notorious for leaks...this is neither
new, nor specific to GWT.  I was working on a "traditional" AJAX
application back in 2003 - 2005 (it was a monster!) and we fought
memory leaks all the time.  One of the big challenges is, as was
mentioned, is when you make an RPC call and grab data and "forget
about it".  You need to be deliberate and exhaustive throwing out data
that isn't used and sizing your data fetches to be as small as is
reasonable.  Another way to investigate is to use Firefox with the
Firebug extension.  Even though IE is your standard, Firebug let's you
dynamically look at the DOM and see what is taking up a lot of space.
Another great tool is Fiddler, which will allow you to look at your
RPC calls and determine if your application is doing what you think it
should be doing.  In the past I've seen Fiddler traffic that I thought
was only happening once, happen many times and that was causing a lot
of size issues.

Then, unfortunately in the end, IE is going to hang onto memory and
have problems of it's own and that can't be fixed.  And even if you
were to move to another browser platform, you're sometimes stuck as
the browser is sometimes (emphasis sometimes) not the most efficient
way to manage a UI

Good luck!

Later,

Shaffer

On Mar 13, 6:22 am, Vitali Lovich  wrote:
> Just do a lookup through the methods in Document.  For instance, iterate
> over all children in a depth-first manner to get a feel for the number of
> elements over time.  Also, if you want, categorize them by something like
> tag name.
>
> It's not the RPC call per se.  It would be you making RPC calls, getting
> back data, & never freeing references to that data, thereby not allowing the
> Javascript garbage collector to free the memory.  The reason I asked if you
> were making RPC calls is because those tend to generate data and so it's
> easy to keep appending/caching data somewhere & forget about it.
>
>
>
> On Fri, Mar 13, 2009 at 7:54 AM,  wrote:
>
> > How can we make sure that the GUI objects that we created are actually
> > removed from DOM?
>
> > On Mar 13, 1:58 pm, Vitali Lovich  wrote:
> > > Make sure that if you remove panels & whatnot from the page, that you
> > > actually also remove the DOM element as well as the GUI one.  I'm not
> > sure
> > > if Google's methods actually do that (if they don't, I think that's a
> > bug).
> > > I'll have to look into it though.
>
> > > On Fri, Mar 13, 2009 at 4:49 AM, LEDUQUE Mickaël 
> > wrote:
>
> > > > We made some tests and found (using very simple application showing
> > > > and removing the same UI in a repeated timer) that IE has huge memory
> > > > leaks.
> > > > With one add/remove cycle every 2 seconds, we had IE taking 4Gb of
> > > > memory in 10 hours.
> > > > The others tested browsers (firefox, chrome) didn't have that problem.-
> > Hide quoted text -
>
> > > - Show quoted text -- 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: Shouldn't everyone stop using GWT-Ext so we can get critical mass in a supported library?

2009-03-13 Thread david peters

Ah.. it's not that easy to cast aside GWT-EXT, unfortunately.  While
SmartGWT is coming along.. it still does not have quite the same
polish of EXT.  Ext-GWT may be equivalent to GWT-EXT, but the dual-
license is restrictive for some environments.

Although it's original creator, Sanjiv, may have abandoned the GWT-EXT
project, I believe that others have taken it up, although the backend
EXT library will never be updated.


On Mar 11, 3:20 pm, tv  wrote:
> FWIW:
>
> I'm looking at starting a GWT project using a widget library add-in.
> Only after reading for some time did I realize there was some tension
> between the team that created the Ext JS library and the team that
> created the GWT-Ext library (that relies on Ext-JS).  So now there are
> two alternatives it seems to me for those that want to carry on using
> a widget library like this:
>
> smartGWT (LGPL or commercial)
>
> -or-
>
> Ext-GWT  (GPL or commercial)
>
> I don't have a bias in either one, except that it would be great if
> there was a clear leader or at least if people stopped developing
> expertise in GWT-Ext since it is essentially a project that is no
> longer of interest to its creators.  I learn so much from other
> people's questions on these topics - I would rather see everyone start
> using a library that will continue to evolve, so we can start helping
> one another.
>
> Is there a better alternative out there?
>
> Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Ideas on Using GWT for a Project

2009-03-13 Thread Sean

Yeah, everything done on iGoogle can be done in GWT.

You are right, you can use GWT's mouse listener class to implement
Drag and Drop. There are a bunch of libraries out there that can't
give you a huge jump forward in that area like :http://code.google.com/
p/gwt-dnd/

As for the widgets themselves, check out Composites. You can combine
any amount of GWT Widgets in one neat object.

As for the CSS, you could probably keep them all in the same file and
just keep the .css file ordered. This way you're not downloading tons
of .css files, lots of overhead for no gain.  Though you CAN have
multiple .css files, just declare them all in your GWT's project .xml



On Mar 13, 2:58 am, Chitra  wrote:
> Hi all,
>
> I am a newbie to GWT. I am trying to create a panel that can display
> multiple widgets. These widgets cab be dragged and dropped to any part
> of the screen and will have configuration values that determine thier
> location on the screen, some user preferences etc. A good example is
> igoogle. the easeness of moving around widgets and editting their
> settings in igoogle is exactly what I am trying to achieve.
>
> Can I use GWT for this? I am aware of the GWT's MouseListener class
> which will enable me to listen for drags and drops. And GWT's panels
> will be very useful too. But how can I create multiple widgets (with
> their own html files, java code and css files) and put them all
> together onto a host page? Should I create multiple modules (how do I
> do that)? Or should I create multiple GWT projects (how do I import
> those projects to the hostpage)?
>
> Thank you very much for your time.
>
> Kind regards,
> Chitra
--~--~-~--~~~---~--~~
You 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: Plugin based gwt web application

2009-03-13 Thread Andreas Karlsson

> I am in the design phase of a application that will be deployed on different
> offices, each one with almost equal  workflows, automatizing, staff and
> requisites. Yeah, that "almost" sucks. The idea is to get one big common or
> default subset, build some kind of plugin / extension / delegation system
> for the specific and deploy different builds without forking the codebase.
> That forking should be a nightmare.
>
> So, your way was the initial idea, and in our project fits. But some kind of
> dynamic plugin loading and upgrading, without touching the core install is
> ideal, and a very powerful tool. For example, you can do per user plugin
> configs.
>

But is the dynamic plugin idea to compile each plugin as a seperate
gwt-module (compilation unit)? If this is the case the end-user would
need to download duplicates of the JRE-emulation (and other common and
shared classes/code) which would not be an ideal solution. I will make
a server-side framework which manages the deployment of the GWT
application, as mentioned it will take minutes to recompile and deploy
the updated gwt application after the plugin configuration has
changed, but that is not a problem as the idea is not to have
different users have different plugins but rather different
offices/client of the application.

/Andreas

--~--~-~--~~~---~--~~
You 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: ScrollPanel Viewport Width and Height

2009-03-13 Thread Isaac Truett

Patches are always welcome.


On Fri, Mar 13, 2009 at 9:08 AM, mel  wrote:
>
> Indeed the method only works in IE and not in FF, Safari, Chrome,
> Opera. I even tried using Element.innerWidth and it still did not do
> the job for these browsers.
>
> I do hope the GWT team can just include stuff like this in the main
> API instead of having to figure out which method and property to get
> for different browsers.
>
> I have run into too many of such seemingly inexplicable oversights in
> the 2-3 years I have worked with the product (great as it is, it can
> also be very frustrating especially when you have sold it as the holy
> grail of Ajax programming to you executives and based a whole product
> line on it)
>
> Otherwise what is GWT right.
> >
>

--~--~-~--~~~---~--~~
You 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: ScrollPanel Viewport Width and Height

2009-03-13 Thread mel

Indeed the method only works in IE and not in FF, Safari, Chrome,
Opera. I even tried using Element.innerWidth and it still did not do
the job for these browsers.

I do hope the GWT team can just include stuff like this in the main
API instead of having to figure out which method and property to get
for different browsers.

I have run into too many of such seemingly inexplicable oversights in
the 2-3 years I have worked with the product (great as it is, it can
also be very frustrating especially when you have sold it as the holy
grail of Ajax programming to you executives and based a whole product
line on it)

Otherwise what is GWT right.
--~--~-~--~~~---~--~~
You 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: Plugin based gwt web application

2009-03-13 Thread Matías Costa
On Fri, Mar 13, 2009 at 6:39 AM, Vitali Lovich  wrote:

> The "obfuscated" code is just javascript which I explained to you how to
> load.
>

I disagree because:

* Obfuscated, optimized code mangles the functions and classes names. If
this mangling, is not deterministic and constant between compiler
executions, the plugin method names are different. So, how the app and the
plugin can invoke each other?
* There are missing code paths never used by your app, but needed by the
plugin. And the reverse. Oh, and inlining.
* Gwt builds are self contained, we do not want the plugin to have its own
copy of everything.

With optimized, obfuscated code you need some way to tell the compiler what
symbols preserve. The same as you tell a C++ compiler/linker when doing a
library, the symbols to export.

--~--~-~--~~~---~--~~
You 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: Plugin based gwt web application

2009-03-13 Thread Matías Costa
On Fri, Mar 13, 2009 at 12:00 PM, Andreas Karlsson wrote:

> What I (plan) to do is to automatically recompile the whole
> application when a client-plugin is added.
>
> So I keep a plugin registry on the server side and when I enable/add a
> plugin I generate some glue files and recompile + redeploy the whole
> GWT-client automatically, this to get the most benefits from GWT
> optimizations.
>

I am in the design phase of a application that will be deployed on different
offices, each one with almost equal  workflows, automatizing, staff and
requisites. Yeah, that "almost" sucks. The idea is to get one big common or
default subset, build some kind of plugin / extension / delegation system
for the specific and deploy different builds without forking the codebase.
That forking should be a nightmare.

So, your way was the initial idea, and in our project fits. But some kind of
dynamic plugin loading and upgrading, without touching the core install is
ideal, and a very powerful tool. For example, you can do per user plugin
configs.

So, Rosh, what do you think about doing a small prototype? I see appropriate
contact via private mail, work on that and publish the results pointing
problems and wait for feedback. We can be days talking about the idea, but
only the code can prove it can work, and looks like anybody has done
something similar.

--~--~-~--~~~---~--~~
You 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: Loading Images into GWT via MySQL

2009-03-13 Thread Magius

Usually I add a /etc directory for configuration files.
If you want to store the files in the filesystem it's better to have a
property like "image.directory" in a property file (ex. /etc/
myApp.property).
I don't have enough space in my project filesystem and I've placed the
images in another filesystem.


On Mar 13, 1:28 pm, "fatjack1...@googlemail.com"
 wrote:
> Ok, Thanks for all your replies.
>
> So which folder should I store the images in? Here is my current
> folder structure:
>
> -bin
> -src
> -temp
> -tomcat
> -WWW
>
> On Mar 13, 10:47 am, gregor  wrote:
>
> > +1 to Ze's comment
>
> > My reply assumed you had a reason why you *must* store images in DB.
> > If you don't Ze is right that it is a very inefficient way to store
> > and serve images.
>
> > On Mar 13, 9:04 am, Zé Vicente  wrote:
>
> > > Hi,
>
> > > I will give you my honestly opinion. It seems that you are new on the
> > > subject and I can say that I have a lot of experience on that.
>
> > > First of all, don't store images on the database :)
>
> > > It is true that we can do it, but depending of what you are going to
> > > do, the site of your database will be 90% images and 10% data.
>
> > > The images are always served by httpservers, even if you retrieve it
> > > from the database. So if you store the images in the file system of
> > > your httpserver, there is no need for network usage in case your
> > > database is hosted in a different server.
>
> > > So, use the database just to store the path of your images. Then in
> > > GWT, retrieve the object or list of objects that contains the path for
> > > your images. Again in GWT, Create an Image object and set the src
> > > property.
>
> > > That is all you need to do to display the image.
>
> > > What do you think?
>
> > > Regards,
> > > José Vicente
>
> > > On Mar 13, 2:52 am, Itamar Ravid  wrote:
>
> > > > Don't forget however to set the content type on the response to an 
> > > > image of
> > > > some type, otherwise the client's browser will try to download the 
> > > > picture
> > > > rather than display it.
>
> > > > On Fri, Mar 13, 2009 at 2:28 AM, gregor 
> > > > wrote:
>
> > > > > I think Itamar is right, Jack, you should use a standard HttpServlet
> > > > > for this, not GWT-RPC, because this sends the image over to the
> > > > > browser as byte steam, and I don't think RPC can do that.
>
> > > > > First, I take it these are not images used in your UI (like icons
> > > > > etc), 'cos those should go in an ImageBundle. I assume you know that &
> > > > > these images are downloaded as user selections etc.
>
> > > > > 1) Consult your MySQL docs/forum to find out how to obtain an
> > > > > InputStream for the image via JDBC. You want to pass an InputStream
> > > > > back to your image download HttpServlet. You don't want to read out
> > > > > the image bytes yet.
>
> > > > > 2) You write the HttpServlet something like this example (there are
> > > > > lots of others around):
>
> > > > >http://snippets.dzone.com/posts/show/4629
>
> > > > > Notice that the key is a looping read of the InputStream (which you
> > > > > got from MySQL) that writes straight into the HttpServlet's response
> > > > > OutputStream. Notice also it uses a buffer byte[] array. This is so
> > > > > that your web server does not get it's memory clogged up with big
> > > > > image byte arrays - the image bytes just get shunted from the DB
> > > > > straight out to the browser via this buffer. Therefore set this buffer
> > > > > small. Apache tend to use 2048 bytes. I think Oracle prefer 4096. That
> > > > > sort of size for the buffer. Take care to set the response content
> > > > > type so the browser knows what it's dealing with.
>
> > > > > 3) In your client you can set the Image widget's URL to your image
> > > > > download HttpServlet adding a parameter for the image id.
>
> > > > > regards
> > > > > gregor
>
> > > > > On Mar 12, 8:54 pm, "fatjack1...@googlemail.com"
> > > > >  wrote:
> > > > > > Hi,
>
> > > > > > I'm not too sure how to implement a HTTPServlet. Does anyone know 
> > > > > > how
> > > > > > to use images using RPC?
>
> > > > > > Im really stuck on this.
>
> > > > > > On Mar 12, 8:43 pm, Itamar Ravid  wrote:
>
> > > > > > > The best way, IMO, is to not use GWT-RPC, but rather implement an
> > > > > > > HttpServlet, that retrieves the data from the database and 
> > > > > > > returns it
> > > > > with
> > > > > > > the appropriate Content-Type in response to a GET http request. 
> > > > > > > Then,
> > > > > you
> > > > > > > simply place an image in your GWT code, with its source being the 
> > > > > > > path
> > > > > to
> > > > > > > the servlet (defined in your web.xml), passing along any 
> > > > > > > parameters
> > > > > required
> > > > > > > - such as the ID of the image in the database.
>
> > > > > > > On Thu, Mar 12, 2009 at 12:59 PM, fatjack1...@googlemail.com <
>
> > > > > > > fatjack1...@googlemail.com> wrote:
>
> > > > > > > > Hi,
>
> > > > > > > > I am new to loading ima

Re: Loading Images into GWT via MySQL

2009-03-13 Thread fatjack1...@googlemail.com

Ok, Thanks for all your replies.

So which folder should I store the images in? Here is my current
folder structure:

-bin
-src
-temp
-tomcat
-WWW


On Mar 13, 10:47 am, gregor  wrote:
> +1 to Ze's comment
>
> My reply assumed you had a reason why you *must* store images in DB.
> If you don't Ze is right that it is a very inefficient way to store
> and serve images.
>
> On Mar 13, 9:04 am, Zé Vicente  wrote:
>
> > Hi,
>
> > I will give you my honestly opinion. It seems that you are new on the
> > subject and I can say that I have a lot of experience on that.
>
> > First of all, don't store images on the database :)
>
> > It is true that we can do it, but depending of what you are going to
> > do, the site of your database will be 90% images and 10% data.
>
> > The images are always served by httpservers, even if you retrieve it
> > from the database. So if you store the images in the file system of
> > your httpserver, there is no need for network usage in case your
> > database is hosted in a different server.
>
> > So, use the database just to store the path of your images. Then in
> > GWT, retrieve the object or list of objects that contains the path for
> > your images. Again in GWT, Create an Image object and set the src
> > property.
>
> > That is all you need to do to display the image.
>
> > What do you think?
>
> > Regards,
> > José Vicente
>
> > On Mar 13, 2:52 am, Itamar Ravid  wrote:
>
> > > Don't forget however to set the content type on the response to an image 
> > > of
> > > some type, otherwise the client's browser will try to download the picture
> > > rather than display it.
>
> > > On Fri, Mar 13, 2009 at 2:28 AM, gregor 
> > > wrote:
>
> > > > I think Itamar is right, Jack, you should use a standard HttpServlet
> > > > for this, not GWT-RPC, because this sends the image over to the
> > > > browser as byte steam, and I don't think RPC can do that.
>
> > > > First, I take it these are not images used in your UI (like icons
> > > > etc), 'cos those should go in an ImageBundle. I assume you know that &
> > > > these images are downloaded as user selections etc.
>
> > > > 1) Consult your MySQL docs/forum to find out how to obtain an
> > > > InputStream for the image via JDBC. You want to pass an InputStream
> > > > back to your image download HttpServlet. You don't want to read out
> > > > the image bytes yet.
>
> > > > 2) You write the HttpServlet something like this example (there are
> > > > lots of others around):
>
> > > >http://snippets.dzone.com/posts/show/4629
>
> > > > Notice that the key is a looping read of the InputStream (which you
> > > > got from MySQL) that writes straight into the HttpServlet's response
> > > > OutputStream. Notice also it uses a buffer byte[] array. This is so
> > > > that your web server does not get it's memory clogged up with big
> > > > image byte arrays - the image bytes just get shunted from the DB
> > > > straight out to the browser via this buffer. Therefore set this buffer
> > > > small. Apache tend to use 2048 bytes. I think Oracle prefer 4096. That
> > > > sort of size for the buffer. Take care to set the response content
> > > > type so the browser knows what it's dealing with.
>
> > > > 3) In your client you can set the Image widget's URL to your image
> > > > download HttpServlet adding a parameter for the image id.
>
> > > > regards
> > > > gregor
>
> > > > On Mar 12, 8:54 pm, "fatjack1...@googlemail.com"
> > > >  wrote:
> > > > > Hi,
>
> > > > > I'm not too sure how to implement a HTTPServlet. Does anyone know how
> > > > > to use images using RPC?
>
> > > > > Im really stuck on this.
>
> > > > > On Mar 12, 8:43 pm, Itamar Ravid  wrote:
>
> > > > > > The best way, IMO, is to not use GWT-RPC, but rather implement an
> > > > > > HttpServlet, that retrieves the data from the database and returns 
> > > > > > it
> > > > with
> > > > > > the appropriate Content-Type in response to a GET http request. 
> > > > > > Then,
> > > > you
> > > > > > simply place an image in your GWT code, with its source being the 
> > > > > > path
> > > > to
> > > > > > the servlet (defined in your web.xml), passing along any parameters
> > > > required
> > > > > > - such as the ID of the image in the database.
>
> > > > > > On Thu, Mar 12, 2009 at 12:59 PM, fatjack1...@googlemail.com <
>
> > > > > > fatjack1...@googlemail.com> wrote:
>
> > > > > > > Hi,
>
> > > > > > > I am new to loading images into GWT from MySQL and am abit lost on
> > > > the
> > > > > > > best way to do it.
>
> > > > > > > I already have my image in the database. How do I retrieve it? I 
> > > > > > > read
> > > > > > > somewhere that it can just be stored as a String. Is this 
> > > > > > > correct? So
> > > > > > > my code on the server side would look like:
>
> > > > > > > //Open database connection
> > > > > > > dc.openConnection();
> > > > > > > resultSet = dc.statement.executeQuery(SELECT CategoryImage FROM
> > > > > > > itemcategory_table WHERE ItemType = 'Test');
>
> > > > > > >   while

Re: Memory leak in GWT based application

2009-03-13 Thread Vitali Lovich
Just do a lookup through the methods in Document.  For instance, iterate
over all children in a depth-first manner to get a feel for the number of
elements over time.  Also, if you want, categorize them by something like
tag name.

It's not the RPC call per se.  It would be you making RPC calls, getting
back data, & never freeing references to that data, thereby not allowing the
Javascript garbage collector to free the memory.  The reason I asked if you
were making RPC calls is because those tend to generate data and so it's
easy to keep appending/caching data somewhere & forget about it.

On Fri, Mar 13, 2009 at 7:54 AM,  wrote:

>
> How can we make sure that the GUI objects that we created are actually
> removed from DOM?
>
> On Mar 13, 1:58 pm, Vitali Lovich  wrote:
> > Make sure that if you remove panels & whatnot from the page, that you
> > actually also remove the DOM element as well as the GUI one.  I'm not
> sure
> > if Google's methods actually do that (if they don't, I think that's a
> bug).
> > I'll have to look into it though.
> >
> >
> >
> > On Fri, Mar 13, 2009 at 4:49 AM, LEDUQUE Mickaël 
> wrote:
> >
> > > We made some tests and found (using very simple application showing
> > > and removing the same UI in a repeated timer) that IE has huge memory
> > > leaks.
> > > With one add/remove cycle every 2 seconds, we had IE taking 4Gb of
> > > memory in 10 hours.
> > > The others tested browsers (firefox, chrome) didn't have that problem.-
> 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: Memory leak in GWT based application

2009-03-13 Thread chauhan . sachin

How can we make sure that the GUI objects that we created are actually
removed from DOM?

On Mar 13, 1:58 pm, Vitali Lovich  wrote:
> Make sure that if you remove panels & whatnot from the page, that you
> actually also remove the DOM element as well as the GUI one.  I'm not sure
> if Google's methods actually do that (if they don't, I think that's a bug).
> I'll have to look into it though.
>
>
>
> On Fri, Mar 13, 2009 at 4:49 AM, LEDUQUE Mickaël  wrote:
>
> > We made some tests and found (using very simple application showing
> > and removing the same UI in a repeated timer) that IE has huge memory
> > leaks.
> > With one add/remove cycle every 2 seconds, we had IE taking 4Gb of
> > memory in 10 hours.
> > The others tested browsers (firefox, chrome) didn't have that problem.- 
> > 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: Memory leak in GWT based application

2009-03-13 Thread chauhan . sachin

I am using IE 7.
Also I am doing lots of RPC for geting the data from db and sending it
back in db.
Can RPC cause memory leaks?

On Mar 13, 12:50 pm, Vitali Lovich  wrote:
> Singleton's are unlikely to cause memory leaks - they will be more
> responsible for initial startup (although of course it is possible).
>
> One question I would have is whether or not you periodically add data to
> your application or if you perform queries or RPC calls to some server.
> That would be a good place to look and see whether or not you are creating
> objects without clearing.
>
> One other request would be to provide the IE version & also test it out on
> several browsers to narrow it down to a cross-browser issue, or just IE.
>
>
>
> On Fri, Mar 13, 2009 at 3:37 AM, Sachin  wrote:
>
> > I have a GWT (we are using version 1.5.3) based application having a
> > large number of forms/screens. It has a single EntryPoint. Application
> > has become very slow as it takes lot of memory. Now we are running
> > into memory leak problem, my application sometimes takes huge amount
> > of memory (more that 200MB) if it is run for a long time in a single
> > browser. IE is the official browser.
>
> > I have done some investigation and came up with these points:
>
> > 1. Huge Application is using single EntryPoint (only one module).
> > 2. Application have a large number of Sigleton objects. Even the Main
> > Panel which is attached to Root Panel is singleton.
>
> > Can someone suggest these Singleton objects cause Memory Leak. Or may
> > there some other reasons for it.
>
> > Also suggest me what corrective measures I can take to reduce this
> > problem.
>
> > Thanks in advance for your help!
>
> > Sachin- 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
-~--~~~~--~~--~--~---



Rpc deferred binding limits

2009-03-13 Thread LEDUQUE Mickaël

Hello,
Does anyone know if there are limitations to the number of classes and/
or to the depth of object graphs that can be serialized.
We have here a very complex transfert object (I didn't conceive it, I
just provide support - and I already suggested modifing the model, no
need to tell me that), and the service deferred binding fails with no
apparent reason (already checked all the classic ways to make an
object not serializable : no Objects, not raw types, no public
constructors, both ISerializable and Serializable (needed because we
Serialize objects on the server side too) etc.)

Is that possible that the SerializableTypeOracleBuilder fails on some
stack overflow or IndexOutOfBounds without telling me?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Plugin based gwt web application

2009-03-13 Thread Rosh PR
The only problem is I will have to recompile the whole framework along with
the plugin which would at least take 5 - 10 minutesfor compiling. That would
be too much to ask for from a enduser perspective.

On Fri, Mar 13, 2009 at 4:00 AM, Andreas Karlsson  wrote:

>
> Hi,
>
> What I (plan) to do is to automatically recompile the whole
> application when a client-plugin is added.
>
> So I keep a plugin registry on the server side and when I enable/add a
> plugin I generate some glue files and recompile + redeploy the whole
> GWT-client automatically, this to get the most benefits from GWT
> optimizations.
>
> Regards,
> Andreas
>
> On Fri, Mar 13, 2009 at 10:38 AM, Rosh PR  wrote:
> > For Drag and drop we use the SmartGWT. Will give a shot at your ideas.
> > Thanks
> >
> > On Thu, Mar 12, 2009 at 10:39 PM, Vitali Lovich 
> wrote:
> >>
> >> I'm pretty sure that you need an entry point to compile a module.  My
> >> abstract method approach should do it for you.
> >>
> >> The "obfuscated" code is just javascript which I explained to you how to
> >> load.
> >>
> >> As for the drag and drop, just search up drag & drop on GWT - I'm pretty
> >> sure there's support for it.
> >>
> >>
> >> On Fri, Mar 13, 2009 at 12:38 AM, Rosh PR  wrote:
> >>>
> >>> Hi Matías & Vitali
> >>> You are right about the Pointers
> >>> a) Know what plugins exists, a registry of plugins
> >>> b) Attach them into a panel, listen events and useful stuff
> >>>
> >>> We have exactly followed the same approach as you have mentioned
> for
> >>> installing the
> >>> plugin into a directory & setting up a file with the list of plugins
> >>> installed.
> >>> But some of the issues I'm facing are
> >>>   *   getting to compile a plugin without any entrypoint to Javascript.
> >>>   *   Then the second biggest issue is getting the obfuscated code
> loaded
> >>> by the framework.
> >>>   *   Even if i manage to load it using some of the options you have
> >>> mentioned, The plugins should be able to interact
> >>>   be able to interact between them selfs like drag an object from
> one
> >>> plugin and drop it in to another.
> >>> Are totally unaware of most of options mentioned by Vitali. I shall
> give
> >>> it a try. If you guys have any thing more
> >>> solid and you feel it will work, Let me know about it.
> >>> I think GWt should be coming up with some way we can load there
> >>> Obfuscated code dynamically.
> >>> Thanks a lot guys.
> >>>
> >>> On Fri, Mar 13, 2009 at 1:00 AM, Vitali Lovich 
> wrote:
> 
>  Oh, and the RootPanel way of dynamically adding the plugin's
> javascript
>  will probably only work in onModuleLoad.  The DOM approach I gave
> should
>  work at any time (i.e. as a response to user action).
> 
>  On Thu, Mar 12, 2009 at 3:21 PM, Vitali Lovich 
>  wrote:
> >
> > Uggh - sorry.  Gmail decided to send the message for me.  I've
> > completed the class below.
> >
> > Anyways, plugins would extend PluginEntry.  Again, your GWT would be
> > reponsible for actually injecting the plugin javascript into your
> page. Not
> > sure what the GWT-preferred way would be, but in theory (I haven't
> tried
> > this out), you might be able to do a RootPanel.get().add(new
> HTML("

Re: GWT project with multiple pages

2009-03-13 Thread Magius

One Abstract EntryPoint with a child EntryPoint for each form was OOP-
nicer,
but only one EntryPoint with a 'switch-case' will do the job.


On Mar 13, 11:56 am, Vitali Lovich  wrote:
> Why have multiple entry points?  Why not just the one that decides which
> code to run?
>
> On Fri, Mar 13, 2009 at 6:12 AM, Magius  wrote:
>
> > I had this problem some months ago.
> > I had several pages in the same project (GWT 1.4), sharing services,
> > code and images.
> > The first approach was to create several modules, but each module had
> > to be compiled separately.
> > The problem was that the whole compilation took num-modules times more
> > than a single compilation.
> > And the static contents (/public folder) were repeated num-modules
> > times.
>
> > Finally I moved to a single module approach with several EntryPoints.
> > Each EntryPoint had a 'name' (Java constant): "Module1",
> > "Module2", 
> > And each HTML page had a corresponding title:  "Module1",
> > "Module2", ...
> > When opening an HTML page, all the EntryPoints are fired and each of
> > them checks the HTML title against its name, and only the EntryPoint
> > associated with the page begins to generate its panels.
> > With a bit of OOP it's easy to implement.
>
> > This was the only solution I found in case of:
> > - several HTMLs, each for one specific form
> > - almost all the code and images shared between forms
>
> > And the benefits:
> > - Only 1 compilation (4 minutes).
> > - Only 1 copy of static contents (images, etc).
>
> > On Mar 12, 9:47 am, zep  wrote:
> > > Hello!
>
> > > My question is perhaps not so relevant for Ajax applications, but for
> > > various reasons (including CMS), I would like to have a GWT
> > > application with multiple pages. What is the best way to do this? I
> > > have thought to have a GWT module for each page, but wonder if it is
> > > practical? Grateful for your answers!
--~--~-~--~~~---~--~~
You 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: Plugin based gwt web application

2009-03-13 Thread Andreas Karlsson

Hi,

What I (plan) to do is to automatically recompile the whole
application when a client-plugin is added.

So I keep a plugin registry on the server side and when I enable/add a
plugin I generate some glue files and recompile + redeploy the whole
GWT-client automatically, this to get the most benefits from GWT
optimizations.

Regards,
Andreas

On Fri, Mar 13, 2009 at 10:38 AM, Rosh PR  wrote:
> For Drag and drop we use the SmartGWT. Will give a shot at your ideas.
> Thanks
>
> On Thu, Mar 12, 2009 at 10:39 PM, Vitali Lovich  wrote:
>>
>> I'm pretty sure that you need an entry point to compile a module.  My
>> abstract method approach should do it for you.
>>
>> The "obfuscated" code is just javascript which I explained to you how to
>> load.
>>
>> As for the drag and drop, just search up drag & drop on GWT - I'm pretty
>> sure there's support for it.
>>
>>
>> On Fri, Mar 13, 2009 at 12:38 AM, Rosh PR  wrote:
>>>
>>> Hi Matías & Vitali
>>>     You are right about the Pointers
>>> a) Know what plugins exists, a registry of plugins
>>> b) Attach them into a panel, listen events and useful stuff
>>>
>>>     We have exactly followed the same approach as you have mentioned for
>>> installing the
>>> plugin into a directory & setting up a file with the list of plugins
>>> installed.
>>> But some of the issues I'm facing are
>>>   *   getting to compile a plugin without any entrypoint to Javascript.
>>>   *   Then the second biggest issue is getting the obfuscated code loaded
>>> by the framework.
>>>   *   Even if i manage to load it using some of the options you have
>>> mentioned, The plugins should be able to interact
>>>       be able to interact between them selfs like drag an object from one
>>> plugin and drop it in to another.
>>> Are totally unaware of most of options mentioned by Vitali. I shall give
>>> it a try. If you guys have any thing more
>>> solid and you feel it will work, Let me know about it.
>>> I think GWt should be coming up with some way we can load there
>>> Obfuscated code dynamically.
>>> Thanks a lot guys.
>>>
>>> On Fri, Mar 13, 2009 at 1:00 AM, Vitali Lovich  wrote:

 Oh, and the RootPanel way of dynamically adding the plugin's javascript
 will probably only work in onModuleLoad.  The DOM approach I gave should
 work at any time (i.e. as a response to user action).

 On Thu, Mar 12, 2009 at 3:21 PM, Vitali Lovich 
 wrote:
>
> Uggh - sorry.  Gmail decided to send the message for me.  I've
> completed the class below.
>
> Anyways, plugins would extend PluginEntry.  Again, your GWT would be
> reponsible for actually injecting the plugin javascript into your page. 
> Not
> sure what the GWT-preferred way would be, but in theory (I haven't tried
> this out), you might be able to do a RootPanel.get().add(new HTML("

Re: GWT project with multiple pages

2009-03-13 Thread Vitali Lovich
Why have multiple entry points?  Why not just the one that decides which
code to run?

On Fri, Mar 13, 2009 at 6:12 AM, Magius  wrote:

>
> I had this problem some months ago.
> I had several pages in the same project (GWT 1.4), sharing services,
> code and images.
> The first approach was to create several modules, but each module had
> to be compiled separately.
> The problem was that the whole compilation took num-modules times more
> than a single compilation.
> And the static contents (/public folder) were repeated num-modules
> times.
>
> Finally I moved to a single module approach with several EntryPoints.
> Each EntryPoint had a 'name' (Java constant): "Module1",
> "Module2", 
> And each HTML page had a corresponding title:  "Module1",
> "Module2", ...
> When opening an HTML page, all the EntryPoints are fired and each of
> them checks the HTML title against its name, and only the EntryPoint
> associated with the page begins to generate its panels.
> With a bit of OOP it's easy to implement.
>
> This was the only solution I found in case of:
> - several HTMLs, each for one specific form
> - almost all the code and images shared between forms
>
> And the benefits:
> - Only 1 compilation (4 minutes).
> - Only 1 copy of static contents (images, etc).
>
>
> On Mar 12, 9:47 am, zep  wrote:
> > Hello!
> >
> > My question is perhaps not so relevant for Ajax applications, but for
> > various reasons (including CMS), I would like to have a GWT
> > application with multiple pages. What is the best way to do this? I
> > have thought to have a GWT module for each page, but wonder if it is
> > practical? Grateful for your answers!
> >
>

--~--~-~--~~~---~--~~
You 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: RPC error - garbled text as the response.

2009-03-13 Thread gregor

(DefaultServlet.java:698)
at org.apache.catalina.servlets.DefaultServlet.doGet
(DefaultServlet.java:354)

That doesn't look right. Are you sure this stack trace was caused by
your RPC service call? If it was you need to figure out how come a
doGet(..) is being called. GWT RPC servlets use POST AFAIK.


On Mar 13, 10:25 am, Magius  wrote:
> I remenber to have read that GWT-RPC zips the data sent in some cases.
> And your message has a "PK" mark, the same that for ZIP files.
> If this is true the RPC message could be ok.
>
> I cannot help wtith the rest. In the exception log there isn't any gwt
> classes...
>
> By the way, I migrated from GWT 1.4 to 1.5 with almost no changes in
> the code.
> And GWT 1.5 compiles faster and using a lot of less memory.
>
> I hope it helps a bit.
>
> On Mar 12, 10:16 am, cij100  wrote:
>
> > Hi,
>
> > I have a gwt based application,that uses RPC calls to communicate with
> > the server. Normally this works fine, however occasionally the
> > response fails and I'm unsure what is causing it. Using firebug, I can
> > see the response is garbled text instead of the OK message. An example
> > of the response is below:
>
> > f8
> >   PKk 0 /9 ` G > 0rXYz ] Q f ~N 8
> > V IH 77 k "  ~ I4 *3 , A1 e_< - * vچ xi th r + '8F C
> > $ + q  xJ ' F ˛7q O 6 ̵ J h/ ㍕
>
> > ռ j y Vb O ^g " +  -5
> > 0
>
> > The server logs seem to show the server impl processing was completed
> > sucessfully, but the localhost log shows the following stack trace:
>
> > 12-Mar-2009 08:52:13 org.apache.catalina.core.StandardWrapperValve
> > invoke
> > SEVERE: Servlet.service() for servlet default threw exception
> > java.lang.IllegalStateException
> >         at org.apache.catalina.connector.ResponseFacade.sendError
> > (ResponseFacade.java:404)
> >         at org.apache.catalina.servlets.DefaultServlet.serveResource
> > (DefaultServlet.java:698)
> >         at org.apache.catalina.servlets.DefaultServlet.doGet
> > (DefaultServlet.java:354)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> > (ApplicationFilterChain.java:252)
> >         at org.apache.catalina.core.ApplicationFilterChain.doFilter
> > (ApplicationFilterChain.java:173)
> >         at org.apache.catalina.core.StandardWrapperValve.invoke
> > (StandardWrapperValve.java:213)
> >         at org.apache.catalina.core.StandardContextValve.invoke
> > (StandardContextValve.java:178)
> >         at org.apache.catalina.core.StandardHostValve.invoke
> > (StandardHostValve.java:126)
> >         at org.apache.catalina.valves.ErrorReportValve.invoke
> > (ErrorReportValve.java:105)
> >         at org.apache.catalina.core.StandardEngineValve.invoke
> > (StandardEngineValve.java:107)
> >         at org.apache.catalina.connector.CoyoteAdapter.service
> > (CoyoteAdapter.java:148)
> >         at org.apache.coyote.http11.Http11AprProcessor.process
> > (Http11AprProcessor.java:833)
> >         at org.apache.coyote.http11.Http11AprProtocol
> > $Http11ConnectionHandler.process(Http11AprProtocol.java:639)
> >         at 
> > org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:
> > 1285)
> >         at java.lang.Thread.run(Thread.java:619)
>
> > At present I am still using gwt1.4, the inention is to upgrade to 1.5
> > shortly, and it's running against a tomcat 6 server.
>
> > Is there anything obvious that I need to do to avoid these sorts of
> > error, or methods to debug what has gone wrong between me completing
> > the impl code processing and recieving the response on the client?
>
> > Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Loading Images into GWT via MySQL

2009-03-13 Thread gregor

+1 to Ze's comment

My reply assumed you had a reason why you *must* store images in DB.
If you don't Ze is right that it is a very inefficient way to store
and serve images.


On Mar 13, 9:04 am, Zé Vicente  wrote:
> Hi,
>
> I will give you my honestly opinion. It seems that you are new on the
> subject and I can say that I have a lot of experience on that.
>
> First of all, don't store images on the database :)
>
> It is true that we can do it, but depending of what you are going to
> do, the site of your database will be 90% images and 10% data.
>
> The images are always served by httpservers, even if you retrieve it
> from the database. So if you store the images in the file system of
> your httpserver, there is no need for network usage in case your
> database is hosted in a different server.
>
> So, use the database just to store the path of your images. Then in
> GWT, retrieve the object or list of objects that contains the path for
> your images. Again in GWT, Create an Image object and set the src
> property.
>
> That is all you need to do to display the image.
>
> What do you think?
>
> Regards,
> José Vicente
>
> On Mar 13, 2:52 am, Itamar Ravid  wrote:
>
> > Don't forget however to set the content type on the response to an image of
> > some type, otherwise the client's browser will try to download the picture
> > rather than display it.
>
> > On Fri, Mar 13, 2009 at 2:28 AM, gregor wrote:
>
> > > I think Itamar is right, Jack, you should use a standard HttpServlet
> > > for this, not GWT-RPC, because this sends the image over to the
> > > browser as byte steam, and I don't think RPC can do that.
>
> > > First, I take it these are not images used in your UI (like icons
> > > etc), 'cos those should go in an ImageBundle. I assume you know that &
> > > these images are downloaded as user selections etc.
>
> > > 1) Consult your MySQL docs/forum to find out how to obtain an
> > > InputStream for the image via JDBC. You want to pass an InputStream
> > > back to your image download HttpServlet. You don't want to read out
> > > the image bytes yet.
>
> > > 2) You write the HttpServlet something like this example (there are
> > > lots of others around):
>
> > >http://snippets.dzone.com/posts/show/4629
>
> > > Notice that the key is a looping read of the InputStream (which you
> > > got from MySQL) that writes straight into the HttpServlet's response
> > > OutputStream. Notice also it uses a buffer byte[] array. This is so
> > > that your web server does not get it's memory clogged up with big
> > > image byte arrays - the image bytes just get shunted from the DB
> > > straight out to the browser via this buffer. Therefore set this buffer
> > > small. Apache tend to use 2048 bytes. I think Oracle prefer 4096. That
> > > sort of size for the buffer. Take care to set the response content
> > > type so the browser knows what it's dealing with.
>
> > > 3) In your client you can set the Image widget's URL to your image
> > > download HttpServlet adding a parameter for the image id.
>
> > > regards
> > > gregor
>
> > > On Mar 12, 8:54 pm, "fatjack1...@googlemail.com"
> > >  wrote:
> > > > Hi,
>
> > > > I'm not too sure how to implement a HTTPServlet. Does anyone know how
> > > > to use images using RPC?
>
> > > > Im really stuck on this.
>
> > > > On Mar 12, 8:43 pm, Itamar Ravid  wrote:
>
> > > > > The best way, IMO, is to not use GWT-RPC, but rather implement an
> > > > > HttpServlet, that retrieves the data from the database and returns it
> > > with
> > > > > the appropriate Content-Type in response to a GET http request. Then,
> > > you
> > > > > simply place an image in your GWT code, with its source being the path
> > > to
> > > > > the servlet (defined in your web.xml), passing along any parameters
> > > required
> > > > > - such as the ID of the image in the database.
>
> > > > > On Thu, Mar 12, 2009 at 12:59 PM, fatjack1...@googlemail.com <
>
> > > > > fatjack1...@googlemail.com> wrote:
>
> > > > > > Hi,
>
> > > > > > I am new to loading images into GWT from MySQL and am abit lost on
> > > the
> > > > > > best way to do it.
>
> > > > > > I already have my image in the database. How do I retrieve it? I 
> > > > > > read
> > > > > > somewhere that it can just be stored as a String. Is this correct? 
> > > > > > So
> > > > > > my code on the server side would look like:
>
> > > > > > //Open database connection
> > > > > > dc.openConnection();
> > > > > > resultSet = dc.statement.executeQuery(SELECT CategoryImage FROM
> > > > > > itemcategory_table WHERE ItemType = 'Test');
>
> > > > > >   while(resultSet.next()) {
> > > > > >        String test = resultSet.getString(1);
> > > > > > }
>
> > > > > > dc.closeConnection();
>
> > > > > > Or have I got this completely wrong?
>
> > > > > > Next, I need to send this over to the client. What is the best way 
> > > > > > to
> > > > > > send an image over from the server to the client and how should it 
> > > > > > be
> > > > > > stored?
>
> > > > > > Any help o

Re: RPC error - garbled text as the response.

2009-03-13 Thread Magius

I remenber to have read that GWT-RPC zips the data sent in some cases.
And your message has a "PK" mark, the same that for ZIP files.
If this is true the RPC message could be ok.

I cannot help wtith the rest. In the exception log there isn't any gwt
classes...

By the way, I migrated from GWT 1.4 to 1.5 with almost no changes in
the code.
And GWT 1.5 compiles faster and using a lot of less memory.

I hope it helps a bit.


On Mar 12, 10:16 am, cij100  wrote:
> Hi,
>
> I have a gwt based application,that uses RPC calls to communicate with
> the server. Normally this works fine, however occasionally the
> response fails and I'm unsure what is causing it. Using firebug, I can
> see the response is garbled text instead of the OK message. An example
> of the response is below:
>
> f8
>   PKk 0 /9 ` G > 0rXYz ] Q f ~N 8
> V IH 77 k "  ~ I4 *3 , A1 e_< - * vچ xi th r + '8F C
> $ + q  xJ ' F ˛7q O 6 ̵ J h/ ㍕
>
> ռ j y Vb O ^g " +  -5
> 0
>
> The server logs seem to show the server impl processing was completed
> sucessfully, but the localhost log shows the following stack trace:
>
> 12-Mar-2009 08:52:13 org.apache.catalina.core.StandardWrapperValve
> invoke
> SEVERE: Servlet.service() for servlet default threw exception
> java.lang.IllegalStateException
>         at org.apache.catalina.connector.ResponseFacade.sendError
> (ResponseFacade.java:404)
>         at org.apache.catalina.servlets.DefaultServlet.serveResource
> (DefaultServlet.java:698)
>         at org.apache.catalina.servlets.DefaultServlet.doGet
> (DefaultServlet.java:354)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:252)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:173)
>         at org.apache.catalina.core.StandardWrapperValve.invoke
> (StandardWrapperValve.java:213)
>         at org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValve.java:178)
>         at org.apache.catalina.core.StandardHostValve.invoke
> (StandardHostValve.java:126)
>         at org.apache.catalina.valves.ErrorReportValve.invoke
> (ErrorReportValve.java:105)
>         at org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.java:107)
>         at org.apache.catalina.connector.CoyoteAdapter.service
> (CoyoteAdapter.java:148)
>         at org.apache.coyote.http11.Http11AprProcessor.process
> (Http11AprProcessor.java:833)
>         at org.apache.coyote.http11.Http11AprProtocol
> $Http11ConnectionHandler.process(Http11AprProtocol.java:639)
>         at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:
> 1285)
>         at java.lang.Thread.run(Thread.java:619)
>
> At present I am still using gwt1.4, the inention is to upgrade to 1.5
> shortly, and it's running against a tomcat 6 server.
>
> Is there anything obvious that I need to do to avoid these sorts of
> error, or methods to debug what has gone wrong between me completing
> the impl code processing and recieving the response on the client?
>
> Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT project with multiple pages

2009-03-13 Thread Magius

I had this problem some months ago.
I had several pages in the same project (GWT 1.4), sharing services,
code and images.
The first approach was to create several modules, but each module had
to be compiled separately.
The problem was that the whole compilation took num-modules times more
than a single compilation.
And the static contents (/public folder) were repeated num-modules
times.

Finally I moved to a single module approach with several EntryPoints.
Each EntryPoint had a 'name' (Java constant): "Module1",
"Module2", 
And each HTML page had a corresponding title:  "Module1",
"Module2", ...
When opening an HTML page, all the EntryPoints are fired and each of
them checks the HTML title against its name, and only the EntryPoint
associated with the page begins to generate its panels.
With a bit of OOP it's easy to implement.

This was the only solution I found in case of:
- several HTMLs, each for one specific form
- almost all the code and images shared between forms

And the benefits:
- Only 1 compilation (4 minutes).
- Only 1 copy of static contents (images, etc).


On Mar 12, 9:47 am, zep  wrote:
> Hello!
>
> My question is perhaps not so relevant for Ajax applications, but for
> various reasons (including CMS), I would like to have a GWT
> application with multiple pages. What is the best way to do this? I
> have thought to have a GWT module for each page, but wonder if it is
> practical? Grateful for your answers!
--~--~-~--~~~---~--~~
You 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: Loading Images into GWT via MySQL

2009-03-13 Thread Magius

I stored images in the filesystem.
At the client code, I use image1.setURL( "/servlet/...") as 'stone'
describes above.
An HttpServlet receive it and sends the image (resized in my case).
It performs well.

On Mar 13, 10:08 am, stone  wrote:
> use a servlet url for downloading img.
> for example: myapp/dbimage/123456
> and the servlet mapping is /dbimage/*
>
> On Mar 13, 9:52 am, Itamar Ravid  wrote:
>
> > Don't forget however to set the content type on the response to an image of
> > some type, otherwise the client's browser will try to download the picture
> > rather than display it.
>
> > On Fri, Mar 13, 2009 at 2:28 AM, gregor wrote:
>
> > > I think Itamar is right, Jack, you should use a standard HttpServlet
> > > for this, not GWT-RPC, because this sends the image over to the
> > > browser as byte steam, and I don't think RPC can do that.
>
> > > First, I take it these are not images used in your UI (like icons
> > > etc), 'cos those should go in an ImageBundle. I assume you know that &
> > > these images are downloaded as user selections etc.
>
> > > 1) Consult your MySQL docs/forum to find out how to obtain an
> > > InputStream for the image via JDBC. You want to pass an InputStream
> > > back to your image download HttpServlet. You don't want to read out
> > > the image bytes yet.
>
> > > 2) You write the HttpServlet something like this example (there are
> > > lots of others around):
>
> > >http://snippets.dzone.com/posts/show/4629
>
> > > Notice that the key is a looping read of the InputStream (which you
> > > got from MySQL) that writes straight into the HttpServlet's response
> > > OutputStream. Notice also it uses a buffer byte[] array. This is so
> > > that your web server does not get it's memory clogged up with big
> > > image byte arrays - the image bytes just get shunted from the DB
> > > straight out to the browser via this buffer. Therefore set this buffer
> > > small. Apache tend to use 2048 bytes. I think Oracle prefer 4096. That
> > > sort of size for the buffer. Take care to set the response content
> > > type so the browser knows what it's dealing with.
>
> > > 3) In your client you can set the Image widget's URL to your image
> > > download HttpServlet adding a parameter for the image id.
>
> > > regards
> > > gregor
>
> > > On Mar 12, 8:54 pm, "fatjack1...@googlemail.com"
> > >  wrote:
> > > > Hi,
>
> > > > I'm not too sure how to implement a HTTPServlet. Does anyone know how
> > > > to use images using RPC?
>
> > > > Im really stuck on this.
>
> > > > On Mar 12, 8:43 pm, Itamar Ravid  wrote:
>
> > > > > The best way, IMO, is to not use GWT-RPC, but rather implement an
> > > > > HttpServlet, that retrieves the data from the database and returns it
> > > with
> > > > > the appropriate Content-Type in response to a GET http request. Then,
> > > you
> > > > > simply place an image in your GWT code, with its source being the path
> > > to
> > > > > the servlet (defined in your web.xml), passing along any parameters
> > > required
> > > > > - such as the ID of the image in the database.
>
> > > > > On Thu, Mar 12, 2009 at 12:59 PM, fatjack1...@googlemail.com <
>
> > > > > fatjack1...@googlemail.com> wrote:
>
> > > > > > Hi,
>
> > > > > > I am new to loading images into GWT from MySQL and am abit lost on
> > > the
> > > > > > best way to do it.
>
> > > > > > I already have my image in the database. How do I retrieve it? I 
> > > > > > read
> > > > > > somewhere that it can just be stored as a String. Is this correct? 
> > > > > > So
> > > > > > my code on the server side would look like:
>
> > > > > > //Open database connection
> > > > > > dc.openConnection();
> > > > > > resultSet = dc.statement.executeQuery(SELECT CategoryImage FROM
> > > > > > itemcategory_table WHERE ItemType = 'Test');
>
> > > > > >   while(resultSet.next()) {
> > > > > >        String test = resultSet.getString(1);
> > > > > > }
>
> > > > > > dc.closeConnection();
>
> > > > > > Or have I got this completely wrong?
>
> > > > > > Next, I need to send this over to the client. What is the best way 
> > > > > > to
> > > > > > send an image over from the server to the client and how should it 
> > > > > > be
> > > > > > stored?
>
> > > > > > Any help on how to use images would be much appreciated!
>
> > > > > > Regards,
> > > > > > Jack
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Plugin based gwt web application

2009-03-13 Thread Rosh PR
For Drag and drop we use the SmartGWT. Will give a shot at your ideas.
Thanks

On Thu, Mar 12, 2009 at 10:39 PM, Vitali Lovich  wrote:

> I'm pretty sure that you need an entry point to compile a module.  My
> abstract method approach should do it for you.
>
> The "obfuscated" code is just javascript which I explained to you how to
> load.
>
> As for the drag and drop, just search up drag & drop on GWT - I'm pretty
> sure there's support for it.
>
>
>
> On Fri, Mar 13, 2009 at 12:38 AM, Rosh PR  wrote:
>
>> Hi Matías & Vitali
>> You are right about the Pointers
>> a) Know what plugins exists, a registry of plugins
>> b) Attach them into a panel, listen events and useful stuff
>>
>> We have exactly followed the same approach as you have mentioned for
>> installing the
>> plugin into a directory & setting up a file with the list of plugins
>> installed.
>>
>> But some of the issues I'm facing are
>>   *   getting to compile a plugin without any entrypoint to Javascript.
>>   *   Then the second biggest issue is getting the obfuscated code loaded
>> by the framework.
>>   *   Even if i manage to load it using some of the options you have
>> mentioned, The plugins should be able to interact
>>   be able to interact between them selfs like drag an object from one
>> plugin and drop it in to another.
>>
>> Are totally unaware of most of options mentioned by Vitali. I shall give
>> it a try. If you guys have any thing more
>> solid and you feel it will work, Let me know about it.
>>
>> I think GWt should be coming up with some way we can load there Obfuscated
>> code dynamically.
>>
>> Thanks a lot guys.
>>
>>
>> On Fri, Mar 13, 2009 at 1:00 AM, Vitali Lovich  wrote:
>>
>>> Oh, and the RootPanel way of dynamically adding the plugin's javascript
>>> will probably only work in onModuleLoad.  The DOM approach I gave should
>>> work at any time (i.e. as a response to user action).
>>>
>>>
>>> On Thu, Mar 12, 2009 at 3:21 PM, Vitali Lovich wrote:
>>>
 Uggh - sorry.  Gmail decided to send the message for me.  I've completed
 the class below.

 Anyways, plugins would extend PluginEntry.  Again, your GWT would be
 reponsible for actually injecting the plugin javascript into your page. Not
 sure what the GWT-preferred way would be, but in theory (I haven't tried
 this out), you might be able to do a RootPanel.get().add(new HTML("

Re: Performance better setting attributes in CSS or in Java code?

2009-03-13 Thread lowecg2004

This is great primer on GWT performance and briefly discusses in-line
style vs. CSS around 31:05.

http://www.youtube.com/watch?v=nBdvSdDAzHM



On Mar 12, 9:37 pm, Sumit Chandel  wrote:
> Hi John H,
> I would also encourage you to check out a recent blog post on the GWT blog
> by fellow GWT developers Chris Klundt and Eric Wuebben, who talk about their
> strategy on applying CSS styles (link below). Hopefully from what was
> discussed here and in the blog, you will be able to find out what approach
> works best for you.
>
> GWT: No need to shortchange your 
> style:http://googlewebtoolkit.blogspot.com/2008/12/gwt-no-need-to-shortchan...
>
> Regarding performance, whether you set properties like width and height in
> GWT code or in CSS doesn't make a huge difference. What does matter is how
> you go about applying the CSS styles (for example, how you use CSS selectors
> to style your application). For this topic, you should get a good number of
> reads by performing a web search for terms like "CSS performance".
>
> Hope that helps,
> -Sumit Chandel
>
> On Mon, Mar 9, 2009 at 9:06 PM, John H  wrote:
>
> > In general, for better performance. Would you rather
>
> > public SomePanel extends Panel {
>
> >    public SomePanel() {
> >        setWidth("100px");
> >        setWidth("100px");
> >        
> >    }
> >    ..
> > }
>
> > OR
>
> > panel-style {
> >    width: 100px;
> >    height: 100px;
> > }
>
> > I tend to try setting every css style attribute during the creation of
> > a panel object just cause I think it's more readable and more flexible
> > to organize code outside of CSS style sheets. But is this a better
> > approach trying to achieve better performance or not or does it really
> > matter?
--~--~-~--~~~---~--~~
You 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: Loading Images into GWT via MySQL

2009-03-13 Thread stone

use a servlet url for downloading img.
for example: myapp/dbimage/123456
and the servlet mapping is /dbimage/*

On Mar 13, 9:52 am, Itamar Ravid  wrote:
> Don't forget however to set the content type on the response to an image of
> some type, otherwise the client's browser will try to download the picture
> rather than display it.
>
> On Fri, Mar 13, 2009 at 2:28 AM, gregor wrote:
>
>
>
> > I think Itamar is right, Jack, you should use a standard HttpServlet
> > for this, not GWT-RPC, because this sends the image over to the
> > browser as byte steam, and I don't think RPC can do that.
>
> > First, I take it these are not images used in your UI (like icons
> > etc), 'cos those should go in an ImageBundle. I assume you know that &
> > these images are downloaded as user selections etc.
>
> > 1) Consult your MySQL docs/forum to find out how to obtain an
> > InputStream for the image via JDBC. You want to pass an InputStream
> > back to your image download HttpServlet. You don't want to read out
> > the image bytes yet.
>
> > 2) You write the HttpServlet something like this example (there are
> > lots of others around):
>
> >http://snippets.dzone.com/posts/show/4629
>
> > Notice that the key is a looping read of the InputStream (which you
> > got from MySQL) that writes straight into the HttpServlet's response
> > OutputStream. Notice also it uses a buffer byte[] array. This is so
> > that your web server does not get it's memory clogged up with big
> > image byte arrays - the image bytes just get shunted from the DB
> > straight out to the browser via this buffer. Therefore set this buffer
> > small. Apache tend to use 2048 bytes. I think Oracle prefer 4096. That
> > sort of size for the buffer. Take care to set the response content
> > type so the browser knows what it's dealing with.
>
> > 3) In your client you can set the Image widget's URL to your image
> > download HttpServlet adding a parameter for the image id.
>
> > regards
> > gregor
>
> > On Mar 12, 8:54 pm, "fatjack1...@googlemail.com"
> >  wrote:
> > > Hi,
>
> > > I'm not too sure how to implement a HTTPServlet. Does anyone know how
> > > to use images using RPC?
>
> > > Im really stuck on this.
>
> > > On Mar 12, 8:43 pm, Itamar Ravid  wrote:
>
> > > > The best way, IMO, is to not use GWT-RPC, but rather implement an
> > > > HttpServlet, that retrieves the data from the database and returns it
> > with
> > > > the appropriate Content-Type in response to a GET http request. Then,
> > you
> > > > simply place an image in your GWT code, with its source being the path
> > to
> > > > the servlet (defined in your web.xml), passing along any parameters
> > required
> > > > - such as the ID of the image in the database.
>
> > > > On Thu, Mar 12, 2009 at 12:59 PM, fatjack1...@googlemail.com <
>
> > > > fatjack1...@googlemail.com> wrote:
>
> > > > > Hi,
>
> > > > > I am new to loading images into GWT from MySQL and am abit lost on
> > the
> > > > > best way to do it.
>
> > > > > I already have my image in the database. How do I retrieve it? I read
> > > > > somewhere that it can just be stored as a String. Is this correct? So
> > > > > my code on the server side would look like:
>
> > > > > //Open database connection
> > > > > dc.openConnection();
> > > > > resultSet = dc.statement.executeQuery(SELECT CategoryImage FROM
> > > > > itemcategory_table WHERE ItemType = 'Test');
>
> > > > >   while(resultSet.next()) {
> > > > >        String test = resultSet.getString(1);
> > > > > }
>
> > > > > dc.closeConnection();
>
> > > > > Or have I got this completely wrong?
>
> > > > > Next, I need to send this over to the client. What is the best way to
> > > > > send an image over from the server to the client and how should it be
> > > > > stored?
>
> > > > > Any help on how to use images would be much appreciated!
>
> > > > > Regards,
> > > > > Jack
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Loading Images into GWT via MySQL

2009-03-13 Thread Zé Vicente

Hi,

I will give you my honestly opinion. It seems that you are new on the
subject and I can say that I have a lot of experience on that.

First of all, don't store images on the database :)

It is true that we can do it, but depending of what you are going to
do, the site of your database will be 90% images and 10% data.

The images are always served by httpservers, even if you retrieve it
from the database. So if you store the images in the file system of
your httpserver, there is no need for network usage in case your
database is hosted in a different server.

So, use the database just to store the path of your images. Then in
GWT, retrieve the object or list of objects that contains the path for
your images. Again in GWT, Create an Image object and set the src
property.

That is all you need to do to display the image.

What do you think?

Regards,
José Vicente

On Mar 13, 2:52 am, Itamar Ravid  wrote:
> Don't forget however to set the content type on the response to an image of
> some type, otherwise the client's browser will try to download the picture
> rather than display it.
>
> On Fri, Mar 13, 2009 at 2:28 AM, gregor wrote:
>
>
>
> > I think Itamar is right, Jack, you should use a standard HttpServlet
> > for this, not GWT-RPC, because this sends the image over to the
> > browser as byte steam, and I don't think RPC can do that.
>
> > First, I take it these are not images used in your UI (like icons
> > etc), 'cos those should go in an ImageBundle. I assume you know that &
> > these images are downloaded as user selections etc.
>
> > 1) Consult your MySQL docs/forum to find out how to obtain an
> > InputStream for the image via JDBC. You want to pass an InputStream
> > back to your image download HttpServlet. You don't want to read out
> > the image bytes yet.
>
> > 2) You write the HttpServlet something like this example (there are
> > lots of others around):
>
> >http://snippets.dzone.com/posts/show/4629
>
> > Notice that the key is a looping read of the InputStream (which you
> > got from MySQL) that writes straight into the HttpServlet's response
> > OutputStream. Notice also it uses a buffer byte[] array. This is so
> > that your web server does not get it's memory clogged up with big
> > image byte arrays - the image bytes just get shunted from the DB
> > straight out to the browser via this buffer. Therefore set this buffer
> > small. Apache tend to use 2048 bytes. I think Oracle prefer 4096. That
> > sort of size for the buffer. Take care to set the response content
> > type so the browser knows what it's dealing with.
>
> > 3) In your client you can set the Image widget's URL to your image
> > download HttpServlet adding a parameter for the image id.
>
> > regards
> > gregor
>
> > On Mar 12, 8:54 pm, "fatjack1...@googlemail.com"
> >  wrote:
> > > Hi,
>
> > > I'm not too sure how to implement a HTTPServlet. Does anyone know how
> > > to use images using RPC?
>
> > > Im really stuck on this.
>
> > > On Mar 12, 8:43 pm, Itamar Ravid  wrote:
>
> > > > The best way, IMO, is to not use GWT-RPC, but rather implement an
> > > > HttpServlet, that retrieves the data from the database and returns it
> > with
> > > > the appropriate Content-Type in response to a GET http request. Then,
> > you
> > > > simply place an image in your GWT code, with its source being the path
> > to
> > > > the servlet (defined in your web.xml), passing along any parameters
> > required
> > > > - such as the ID of the image in the database.
>
> > > > On Thu, Mar 12, 2009 at 12:59 PM, fatjack1...@googlemail.com <
>
> > > > fatjack1...@googlemail.com> wrote:
>
> > > > > Hi,
>
> > > > > I am new to loading images into GWT from MySQL and am abit lost on
> > the
> > > > > best way to do it.
>
> > > > > I already have my image in the database. How do I retrieve it? I read
> > > > > somewhere that it can just be stored as a String. Is this correct? So
> > > > > my code on the server side would look like:
>
> > > > > //Open database connection
> > > > > dc.openConnection();
> > > > > resultSet = dc.statement.executeQuery(SELECT CategoryImage FROM
> > > > > itemcategory_table WHERE ItemType = 'Test');
>
> > > > >   while(resultSet.next()) {
> > > > >        String test = resultSet.getString(1);
> > > > > }
>
> > > > > dc.closeConnection();
>
> > > > > Or have I got this completely wrong?
>
> > > > > Next, I need to send this over to the client. What is the best way to
> > > > > send an image over from the server to the client and how should it be
> > > > > stored?
>
> > > > > Any help on how to use images would be much appreciated!
>
> > > > > Regards,
> > > > > Jack
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http

Re: Memory leak in GWT based application

2009-03-13 Thread Vitali Lovich
Make sure that if you remove panels & whatnot from the page, that you
actually also remove the DOM element as well as the GUI one.  I'm not sure
if Google's methods actually do that (if they don't, I think that's a bug).
I'll have to look into it though.

On Fri, Mar 13, 2009 at 4:49 AM, LEDUQUE Mickaël  wrote:

>
> We made some tests and found (using very simple application showing
> and removing the same UI in a repeated timer) that IE has huge memory
> leaks.
> With one add/remove cycle every 2 seconds, we had IE taking 4Gb of
> memory in 10 hours.
> The others tested browsers (firefox, chrome) didn't have that problem.
> >
>

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



Re: Memory leak in GWT based application

2009-03-13 Thread LEDUQUE Mickaël

We made some tests and found (using very simple application showing
and removing the same UI in a repeated timer) that IE has huge memory
leaks.
With one add/remove cycle every 2 seconds, we had IE taking 4Gb of
memory in 10 hours.
The others tested browsers (firefox, chrome) didn't have that problem.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Memory leak in GWT based application

2009-03-13 Thread Vitali Lovich
Singleton's are unlikely to cause memory leaks - they will be more
responsible for initial startup (although of course it is possible).

One question I would have is whether or not you periodically add data to
your application or if you perform queries or RPC calls to some server.
That would be a good place to look and see whether or not you are creating
objects without clearing.

One other request would be to provide the IE version & also test it out on
several browsers to narrow it down to a cross-browser issue, or just IE.

On Fri, Mar 13, 2009 at 3:37 AM, Sachin  wrote:

>
> I have a GWT (we are using version 1.5.3) based application having a
> large number of forms/screens. It has a single EntryPoint. Application
> has become very slow as it takes lot of memory. Now we are running
> into memory leak problem, my application sometimes takes huge amount
> of memory (more that 200MB) if it is run for a long time in a single
> browser. IE is the official browser.
>
> I have done some investigation and came up with these points:
>
> 1. Huge Application is using single EntryPoint (only one module).
> 2. Application have a large number of Sigleton objects. Even the Main
> Panel which is attached to Root Panel is singleton.
>
> Can someone suggest these Singleton objects cause Memory Leak. Or may
> there some other reasons for it.
>
> Also suggest me what corrective measures I can take to reduce this
> problem.
>
>
> Thanks in advance for your help!
>
> Sachin
> >
>

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



Re: Help Please : How to add my own jar file in Gwt Module

2009-03-13 Thread Matías Costa
On Fri, Mar 13, 2009 at 8:08 AM, shashi  wrote:

> Loading inherited module 'com.span.gwt.client.widgets.events'
>  [ERROR] Unable to find 'com/span/gwt/client/widgets/
> events.gwt.xml' on your classpath; could be a typo, or maybe you
> forgot to include a classpath entry for source?
>
>
> Please any body help me out from this issue?
>

Remember that gwt is a java *source code* to javascript compiler. All
classes used in client side must be available as source code when compiling.
You must include the .java files in the jar.

--~--~-~--~~~---~--~~
You 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: Can't download GWT even older versions

2009-03-13 Thread alex.d

That kind of error with FF occures mostly when your internet
connection breaks (even for a few seconds). Try to download it with
any download manager - it should work.

On 12 Mrz., 17:41, Sumal Wijewardhana  wrote:
> Hi Bill,
>
> I have found the way of doing it.. just download the older version on GWT
> and install in your PC... then you can upgrade it to the latest versions
> Try this..
>
> Sumal
>
> On Thu, Mar 12, 2009 at 7:25 PM, Bill  wrote:
>
> > Hello,
>
> > I've had the same problem trying to download gwt-windows-1.5.3.zip the
> > past two days (3/11 and 3/12 PDT).  Using Firefox 3.0.7, the download
> > will begin and download anywhere from 5-15 MB before terminating.
> > Firefox does not report any error, the download appears to have
> > terminated normally.  I've tried this on two separate wireless
> > networks with the same result.  Any idea what the problem might be?
>
> > Thanks,
>
> > Bill
>
> > On Mar 11, 9:55 am, Sumal Wijewardhana  wrote:
> > > Hi Sumit,
>
> > > Downloading is starting and going till 5MB, after that its get stop. This
> > > was happened several times. Any idea of this issue? But normally I
> > download
> > > software, movie even more than 1GB files.
>
> > > Regards,
> > > Sumal
>
> > > On Tue, Mar 10, 2009 at 11:34 PM, Sumit Chandel  > >wrote:
>
> > > > Hi Sumal,
> > > > What errors are you receiving when trying to download a GWT
> > distribution?
> > > > As far as I know, there shouldn't be anything stopping you from
> > downloading
> > > > a distro on our end.
>
> > > > Regards,
> > > > -Sumit Chandel
>
> > > > On Mon, Mar 9, 2009 at 11:58 PM, suma...@gmail.com  > >wrote:
>
> > > >> HI,
>
> > > >> I'm Sumal from Sri Lanka... I tried many times to download GWT even
> > > >> older versions to download but can't. I'm using a DSL connection and
> > > >> PIV PC. Regularary I'm downloading SW, Movies but get error messages
> > > >> when downloading this. Please be kind enough to send the downloaded
> > > >> GWT to my email address in below.
>
> > > >> great...@hotmail.com
> > > >> copy to   suma...@gmail.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
-~--~~~~--~~--~--~---



Memory leak in GWT based application

2009-03-13 Thread Sachin

I have a GWT (we are using version 1.5.3) based application having a
large number of forms/screens. It has a single EntryPoint. Application
has become very slow as it takes lot of memory. Now we are running
into memory leak problem, my application sometimes takes huge amount
of memory (more that 200MB) if it is run for a long time in a single
browser. IE is the official browser.

I have done some investigation and came up with these points:

1. Huge Application is using single EntryPoint (only one module).
2. Application have a large number of Sigleton objects. Even the Main
Panel which is attached to Root Panel is singleton.

Can someone suggest these Singleton objects cause Memory Leak. Or may
there some other reasons for it.

Also suggest me what corrective measures I can take to reduce this
problem.


Thanks in advance for your help!

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



Help Please : How to add my own jar file in Gwt Module

2009-03-13 Thread shashi

Hi Experts,

I am facing an issue to configure my own jar file into GWT
Application.

Could you please help me out from the issue.

I have created my own .jar file which contain reusable .class(jar
contains only .class files) files for my application.

If i add that .jar file in class i am getting following error.

Loading inherited module 'com.span.gwt.client.widgets.events'
  [ERROR] Unable to find 'com/span/gwt/client/widgets/
events.gwt.xml' on your classpath; could be a typo, or maybe you
forgot to include a classpath entry for source?


Please any body help me out from this issue?

Thanks in advance,
Shashi
--~--~-~--~~~---~--~~
You 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
-~--~~~~--~~--~--~---



Ideas on Using GWT for a Project

2009-03-13 Thread Chitra

Hi all,

I am a newbie to GWT. I am trying to create a panel that can display
multiple widgets. These widgets cab be dragged and dropped to any part
of the screen and will have configuration values that determine thier
location on the screen, some user preferences etc. A good example is
igoogle. the easeness of moving around widgets and editting their
settings in igoogle is exactly what I am trying to achieve.

Can I use GWT for this? I am aware of the GWT's MouseListener class
which will enable me to listen for drags and drops. And GWT's panels
will be very useful too. But how can I create multiple widgets (with
their own html files, java code and css files) and put them all
together onto a host page? Should I create multiple modules (how do I
do that)? Or should I create multiple GWT projects (how do I import
those projects to the hostpage)?

Thank you very much for your time.

Kind regards,
Chitra

--~--~-~--~~~---~--~~
You 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 add my own jar file to GWT Projecct.

2009-03-13 Thread shashi

Hi Experts,

I have created my own jar file, which contains some reusable classes
(only .class files ).

Now i want to use this jar file in my GWT Application.If i put
that .jar file in class path i am getting following errors


"Removing units with errors
   [ERROR] Errors in 'file:/C:/shashikiran_b/workspace/gwt-scheduler/
src/com/span/gwt/client/controllers/week/CustomGrid.java'
  [ERROR] Line 41: No source code is available for type
com.span.gwt.client.widgets.events.IDesignerForLayout; did you forget
to inherit a required module?
   [ERROR] Errors in 'file:/C:/shashikiran_b/workspace/gwt-scheduler/
src/com/span/gwt/client/controllers/CalendarEvents.java'
  [ERROR] Line 76: No source code is available for type
com.span.gwt.client.widgets.events.MergedEventComponent; did you
forget to inherit a required module?
  [ERROR] Line 159: No source code is available for type
com.span.gwt.client.widgets.events.GridAdapter; did you forget to
inherit a required module?
   [ERROR] Errors in 'file:/C:/shashikiran_b/workspace/gwt-scheduler/
src/com/span/gwt/client/controllers/week/LayoutCreater.java'
  [ERROR] Line 31: No source code is available for type
com.span.gwt.client.widgets.events.DesignSupervisor; did you forget to
inherit a required module?
  [ERROR] Line 45: No source code is available for type
com.span.gwt.client.widgets.events.MergedEventComponent; did you
forget to inherit a required module?
   [ERROR] Errors in 'file:/C:/shashikiran_b/workspace/gwt-scheduler/
src/com/span/gwt/client/CalScheduler.java'
  [ERROR] Line 52: No source code is available for type
com.span.gwt.client.widgets.events.GridAdapter; did you forget to
inherit a required module?
   [ERROR] Errors in 'file:/C:/shashikiran_b/workspace/gwt-scheduler/
src/com/span/gwt/client/widgets/base/GridCreater.java'
  [ERROR] Line 251: No source code is available for type
com.span.gwt.client.widgets.events.IDesignerForLayout; did you forget
to inherit a required module?
Computing all possible rebind results for
'com.span.gwt.client.CalScheduler'
   Rebinding com.span.gwt.client.CalScheduler
  Checking rule 
 [ERROR] Unable to find type
'com.span.gwt.client.CalScheduler'
[ERROR] Hint: Previous compiler errors may have made this
type unavailable
[ERROR] Hint: Check the inheritance chain from your
module; it may not be inheriting a required module or a module may not
be adding its source path entries properly
[ERROR] Build failed"



Do i need to do any other configuration to use this jar file.

Could any body please help me out from this issue.

Thanks in advance,
Shashi



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