Re: Large Data Set problems

2009-06-11 Thread Tom Hjellming

Hi Joe,

The trick is to not even try to load that much data into the browser.  
We use the SmartGWT widget library which has very good support for 
virtual pagination of lists and comboboxes.  By default, it only loads 
the first 75 rows and then as the user scrolls down, calls are made back 
to the server to retrieve the desired data - which is then shown to the 
user.  There is an occasional delay when the user sees blank space which 
is then filled in when the data comes in.  But overall, it is a great 
solution -we're viewing tables with thousands of rows and seeing better 
performance than our old Swing-based application.

Tom


Joe Larson wrote:
 I am having a performance problem.  I am trying to build a page that
 allows the user to select from a fairly large list of objects (up to
 20,000).  We have filtering capabilities to trim the list so the user
 doesn't have to scroll through all of them.  It's a reasonable UI.

 Unfortunately, I only get decent performance on Safari.  IE6 is
 exceptionally miserable.  It's okay when the list has 100 items, but
 it crashes as we exceed 300.  So I've been experimenting, and I
 haven't found a way around it.

 So I created a sample app.  All I did was populate an
 ArrayListString with 20,000 fairly short strings that I read out of
 the HTML file.  Under Safari 4 on a G5 Mac Pro, this is almost
 instant.  Under IE6 on a similar age Windows box, it's taking 4
 minutes.  Firefox on the G5 runs out of memory.

 Is it possible to store large amounts of data in my GWT applications?
 Or do I have to store fairly small amounts of data and go back and
 forth to the server a lot?  If it's the latter, I may as well just go
 back to what we used to do (WebObjects).

 I'm including my little sample program.  Maybe there's something
 obvious that I can do?

 -Joe

 --- GWTMinimum.java ---
 package com.missionmode.gwtminimum.client;

 import java.util.*;

 import com.google.gwt.core.client.*;
 import com.google.gwt.user.client.*;
 import com.google.gwt.user.client.ui.*;

 /**
  * Entry point classes define codeonModuleLoad()/code.
  */
 public class GWTMinimum implements EntryPoint {
   public FlexTablepanel;
   public Button   loadBtn;
   public Button   displayBtn;
   public ListBox  listBox;
   public Labellabel;
   public ArrayListStringusernames = new ArrayListString();
   public String[] parts;

   /**
* This is the entry point method.
*/
   public void onModuleLoad() {
   panel = new FlexTable();
   RootPanel.get(web2).add(panel);

   loadBtn = new Button(Click to start load);
   panel.setWidget(0, 0, loadBtn);

   loadBtn.addClickListener(new ClickListener() {
   public void onClick(Widget sender) {
   loadUsers();
   }
   });
   }

   /**
* We've loaded the user table.  Set up so they
* can press another button to display the data.
*/
   public void setupForDisplay() {
   displayBtn = new Button(Click to Display);
   panel.setWidget(0, 1, displayBtn);
   displayBtn.addClickListener(new ClickListener() {
   public void onClick(Widget sender) {
   showUsers();
   }
   });
   }

   /**
* Load the users from the HTML page.
*/
   public void loadUsers() {
   if (parts == null) {
   String str = stringFromDocument(users);
   parts = str.split(===);
   loadBtn.setText(Click me again);
   }
   else {
   for (String name : parts) {
   name = name.trim();
   if (name.length()  0) {
   usernames.add(name);
   }
   }
   showCount();
   setupForDisplay();
   }
   }

   /**
* Just show how many users were actually loaded.
*/
   public void showCount() {
   label = new Label(Total user count:  + usernames.size());
   panel.setWidget(1, 0, label);
   }

   /**
* Show the loaded users.
*/
   public void showUsers() {
   try {
   listBox = new ListBox();
   listBox.setVisibleItemCount(20);
   panel.setWidget(2, 0, listBox);
   for (String str : usernames) {
   listBox.addItem(str);
   }
   }
   catch (Exception e) {
   

Re: GWT 1.5.2

2008-11-12 Thread Tom Hjellming
I found the conflicting class in these jar files:
- jasper-compiler-jdt.jar
- jasper-jdt.jar

The jasper-jdt.jar is a standard jar file shipped with Tomcat 6.0 in the 
lib directory.

Once I removed those jar files from my classpath, the problem went away 
for me.

Tom


Deep wrote:
 Thanks Tom.

 I didn't get this part Check your GWT project build path for that jar
 file and remove it.. What needs to be removed?

 On Nov 6, 9:28 pm, Tom Hjellming [EMAIL PROTECTED] wrote:
   
 I had this same problem last month when I moved to GWT 1.5.2 also.

 It turned out to be a conflict between GWT's dev library and the Jasper
 2 JSP engine which apparently uses the Eclipse JDT Java compiler.  The
 jasper-compiler-jdt.jar had conflicting versions of the
 org.eclipse.jdt.internal.compiler.Compiler class.  Check your GWT
 project build path for that jar file and remove it.

 Hope this helps...

 Tom

 Deep wrote:
 
 I'm using Mac OS 10.5.5  Eclipse 3.3.2 and I migrated my project from
 GWT 1.4.61 to 1.5.2 and getting following error. Please help me.
   
 INFO] [gwt:compile {execution: default}]
 Exception in thread main java.lang.NoSuchMethodError:
 org.eclipse.jdt.internal.compiler.Compiler.init(Lorg/eclipse/jdt/
 internal/compiler/env/INameEnvironment;Lorg/eclipse/jdt/internal/
 compiler/IErrorHandlingPolicy;Lorg/eclipse/jdt/internal/compiler/impl/
 CompilerOptions;Lorg/eclipse/jdt/internal/compiler/
 ICompilerRequestor;Lorg/eclipse/jdt/internal/compiler/
 IProblemFactory;)V
 at com.google.gwt.dev.javac.JdtCompiler
 $CompilerImpl.init(JdtCompiler.java:93)
 at com.google.gwt.dev.javac.JdtCompiler.init(JdtCompiler.java:231)
 at 
 com.google.gwt.dev.javac.JdtCompiler.compile(JdtCompiler.java:193)
 at
 com.google.gwt.dev.javac.CompilationState.compile(CompilationState.java:
 115)
 at com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:327)
 at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:564)
 at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:554)
 at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:214)
 Exception in thread main java.lang.NoSuchMethodError:
 org.eclipse.jdt.internal.compiler.Compiler.init(Lorg/eclipse/jdt/
 internal/compiler/env/INameEnvironment;Lorg/eclipse/jdt/internal/
 compiler/IErrorHandlingPolicy;Lorg/eclipse/jdt/internal/compiler/impl/
 CompilerOptions;Lorg/eclipse/jdt/internal/compiler/
 ICompilerRequestor;Lorg/eclipse/jdt/internal/compiler/
 IProblemFactory;)V
 at com.google.gwt.dev.javac.JdtCompiler
 $CompilerImpl.init(JdtCompiler.java:93)
 at com.google.gwt.dev.javac.JdtCompiler.init(JdtCompiler.java:231)
 at 
 com.google.gwt.dev.javac.JdtCompiler.compile(JdtCompiler.java:193)
 at
 com.google.gwt.dev.javac.CompilationState.compile(CompilationState.java:
 115)
 at com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:327)
 at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:564)
 at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:554)
 at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:214)
 Exception in thread main java.lang.NoSuchMethodError:
 org.eclipse.jdt.internal.compiler.Compiler.init(Lorg/eclipse/jdt/
 internal/compiler/env/INameEnvironment;Lorg/eclipse/jdt/internal/
 compiler/IErrorHandlingPolicy;Lorg/eclipse/jdt/internal/compiler/impl/
 CompilerOptions;Lorg/eclipse/jdt/internal/compiler/
 ICompilerRequestor;Lorg/eclipse/jdt/internal/compiler/
 IProblemFactory;)V
 at com.google.gwt.dev.javac.JdtCompiler
 $CompilerImpl.init(JdtCompiler.java:93)
 at com.google.gwt.dev.javac.JdtCompiler.init(JdtCompiler.java:231)
 at 
 com.google.gwt.dev.javac.JdtCompiler.compile(JdtCompiler.java:193)
 at
 com.google.gwt.dev.javac.CompilationState.compile(CompilationState.java:
 115)
 at com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:327)
 at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:564)
 at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:554)
 at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:214)
   



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



Re: GWT 1.5.2

2008-11-06 Thread Tom Hjellming

I had this same problem last month when I moved to GWT 1.5.2 also.

It turned out to be a conflict between GWT's dev library and the Jasper 
2 JSP engine which apparently uses the Eclipse JDT Java compiler.  The 
jasper-compiler-jdt.jar had conflicting versions of the 
org.eclipse.jdt.internal.compiler.Compiler class.  Check your GWT 
project build path for that jar file and remove it.

Hope this helps...

Tom


Deep wrote:
 I'm using Mac OS 10.5.5  Eclipse 3.3.2 and I migrated my project from
 GWT 1.4.61 to 1.5.2 and getting following error. Please help me.


 INFO] [gwt:compile {execution: default}]
 Exception in thread main java.lang.NoSuchMethodError:
 org.eclipse.jdt.internal.compiler.Compiler.init(Lorg/eclipse/jdt/
 internal/compiler/env/INameEnvironment;Lorg/eclipse/jdt/internal/
 compiler/IErrorHandlingPolicy;Lorg/eclipse/jdt/internal/compiler/impl/
 CompilerOptions;Lorg/eclipse/jdt/internal/compiler/
 ICompilerRequestor;Lorg/eclipse/jdt/internal/compiler/
 IProblemFactory;)V
 at com.google.gwt.dev.javac.JdtCompiler
 $CompilerImpl.init(JdtCompiler.java:93)
 at com.google.gwt.dev.javac.JdtCompiler.init(JdtCompiler.java:231)
 at com.google.gwt.dev.javac.JdtCompiler.compile(JdtCompiler.java:193)
 at
 com.google.gwt.dev.javac.CompilationState.compile(CompilationState.java:
 115)
 at com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:327)
 at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:564)
 at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:554)
 at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:214)
 Exception in thread main java.lang.NoSuchMethodError:
 org.eclipse.jdt.internal.compiler.Compiler.init(Lorg/eclipse/jdt/
 internal/compiler/env/INameEnvironment;Lorg/eclipse/jdt/internal/
 compiler/IErrorHandlingPolicy;Lorg/eclipse/jdt/internal/compiler/impl/
 CompilerOptions;Lorg/eclipse/jdt/internal/compiler/
 ICompilerRequestor;Lorg/eclipse/jdt/internal/compiler/
 IProblemFactory;)V
 at com.google.gwt.dev.javac.JdtCompiler
 $CompilerImpl.init(JdtCompiler.java:93)
 at com.google.gwt.dev.javac.JdtCompiler.init(JdtCompiler.java:231)
 at com.google.gwt.dev.javac.JdtCompiler.compile(JdtCompiler.java:193)
 at
 com.google.gwt.dev.javac.CompilationState.compile(CompilationState.java:
 115)
 at com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:327)
 at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:564)
 at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:554)
 at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:214)
 Exception in thread main java.lang.NoSuchMethodError:
 org.eclipse.jdt.internal.compiler.Compiler.init(Lorg/eclipse/jdt/
 internal/compiler/env/INameEnvironment;Lorg/eclipse/jdt/internal/
 compiler/IErrorHandlingPolicy;Lorg/eclipse/jdt/internal/compiler/impl/
 CompilerOptions;Lorg/eclipse/jdt/internal/compiler/
 ICompilerRequestor;Lorg/eclipse/jdt/internal/compiler/
 IProblemFactory;)V
 at com.google.gwt.dev.javac.JdtCompiler
 $CompilerImpl.init(JdtCompiler.java:93)
 at com.google.gwt.dev.javac.JdtCompiler.init(JdtCompiler.java:231)
 at com.google.gwt.dev.javac.JdtCompiler.compile(JdtCompiler.java:193)
 at
 com.google.gwt.dev.javac.CompilationState.compile(CompilationState.java:
 115)
 at com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:327)
 at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:564)
 at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:554)
 at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:214)



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



Re: what GUI creator are you using ?

2008-10-20 Thread Tom Hjellming
IntelliJ does not have a d-n-d GUI designer for GWT.  I think they were 
referring to the pretty-basic GWT plug-in that doesn't provide a GWT GUI 
builder.

Tom


JacoGr wrote:
 I use IntelliJ IDEA.
 

 I actually wan't aware that IDEA had a drag-n-drop GUI designer for
 GWT. (I know about the GWT support, but though that was just
 contextual.)

 GWT Designer for me - not perfect, but more or less does the job.

 Jaco




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



Re: Best GWT canvas (vector graphics) library?

2008-10-08 Thread Tom Hjellming

Dojo has a pretty decent GFX library that provides an SVG-like 
abstraction that works on IE's VML as well as FireFox's native SVG.

The tatami project/library provides a GWT wrapper for dojo including the 
GFX library:
http://code.google.com/p/tatami/

The downside is that it pulls in a fair amount of dojo stuff.

Tom


John Gunther wrote:
 I've recently used the GWTCanvas widget from the GWT incubator
 (nothing fancy, just to draw lines--will likely do more canvas stuff
 later, though) and so far so good.

 However, a Google search shows there are quite a few GWT canvas
 libraries out there. Wondering if I'm missing out on a better
 library...

 Anyone used (or written) any of them? Care to share your opinions
 about which ones work best?

 John



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



Re: GWT Timers - say no to it with IE

2008-10-02 Thread Tom Hjellming

Timer works fine for me in both IE and Firefox.

Tom

Ivan wrote:
 Hello everybody,

 I have encountered one problem:

  it's well known that there's a Timer class:
 com.google.gwt.user.client.Timer
  and of cource it is not a secret that it works in Firefox, Opera, and
 Google Chrome
  without any problems,

 but what's about Internet Explorer ?

 Well, the answer is unfortunately - no!

 Does anybody have an idea how it is possible to run this function in
 IE?



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



Re: Accessing Location of an iframe from another iframe and Cross Domain Security

2008-09-02 Thread Tom Hjellming

You could implement a backend proxy that fetches the html page, parses 
the content to patch all link references to go back through the proxy 
prior to sending the modified page to the browser.  Since the browser 
thinks the iFrame pages are loaded form the backend proxy (same domain 
as the rest of your GWT app), the cross domain security issues won't be 
a problem.

Tom


Jayant wrote:
 Hello,

 I am trying to create an application where I have to watch the
 location and content of an iframe. I wrote a simple prototype where a
 top page contains 2 iframes. One is used for the real content and one
 just contains a script that watches the content iframe. Now as long as
 the pages in the iframe are coming from the same server, this works.
 However when the user navigates to a page from another server, the
 scheme fails. I cannot stop the user from going to any other page in
 that iframe. I only need to know where the iframe is pointing to. I
 have gone through a numerous references on the cross domain security
 and there does not seem to be an answer to this. I have two questions:
 1. Is this impossible to resolve in pure javascript. May be there is
 some scheme used by portlets that could help and 2. Can use of flash /
 flex help get over this problem.

 Following is the code for the four files in the little prorotype.

 --main.html---
 html
 head
 titleMain Co-Browser Page/title
 script language=javascript
 function getContentURL()
 {
 d = document;
 f = d.frames ? d.frames['content'] : d.getElementById('content');
 var  url = ;
 try
 {
 if (f.getCurrentLocation)
 {
 url = f.getCurrentLocation();
 }
 else if (f.contentWindow.getCurrentLocation)
 {
 url = f.contentWindow.getCurrentLocation();
 }
 }
 catch(e)
 {
 url = ;
 }
   returnurl;
 }
 /script
 /head
 body
  iframe id=content src=sample1.html width=100% height=200px/
 iframe
  iframe id=tracker src=tracker.html/iframe
 /body
 /html
 ---
 -sample1.html--
 html
 head
 titleSample1/title
 script language=javascript
 function getCurrentLocation()
 {
   returndocument.location;
 }
 /script
 /head
 body
 pThis is page sample 1
 pa href=sample2.htmlSample2/a
 pa href=http://www.google.com;Google/a
 /body
 /html
 ---
 -sample2.html--
 html
 head
 titleSample1/title
 script language=javascript
 function getCurrentLocation()
 {
   returndocument.location;
 }
 /script
 /head
 body
 pThis is page sample 2
 pa href=sample1.htmlSample1/a
 pa href=http://www.yahoo.com;Yahoo/a
 /body
 /html
 ---
 -tracker.html--
 html
 head
 titleTracker/title
 script language=javascript
 function test()
 {
 var frameUrl = parent.getContentURL();
 if (frameUrl == )
 {
   alert(Content is out of scope);
 }
 else
 {
   alert('frameUrl = '+frameUrl);
 }
 setTimeout(test(), 3000);
 }
 var timerID = setTimeout(test(), 3000);
 /script
 /head
 body
 /body
 /html
 ---

 Thanks,
 -Jayant.




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