what's wrong here?

2009-04-19 Thread Alex Luya

No exception,no output,that is strange
-
package com.tsolution.crm.client;

public class Model
{
   private String desc;
  
public String getDesc()
{
return desc;
}
public void setDesc(String desc)
{
this.desc = desc;
}

}

-
.
public void onModuleLoad()
{
Model m1 = new Model();
m1.setDesc(Hello);
  
AsyncCallbackString callback=new AsyncCallbackString(){
public void onFailure(Throwable caught)
{
}

public void onSuccess(String result)
{
Window.alert(result);
}
};
   
ArrayListModel modelList=new ArrayListModel();
modelList.add(m1);
  
loginService.greetServer(modelList, callback);
}


--
package com.tsolution.crm.client;

import java.util.ArrayList;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;


@RemoteServiceRelativePath(greet)
public interface GreetingService extends RemoteService {
  String greetServer(ArrayListModel modelList);
  String greetServer1(String modelList);
}
---
package com.tsolution.crm.client;
import java.util.ArrayList;
import com.google.gwt.user.client.rpc.AsyncCallback;

public interface GreetingServiceAsync {
  void greetServer(ArrayListModel modelList, AsyncCallbackString 
callback);
}
-
package com.tsolution.crm.server;

import java.util.ArrayList;
import com.tsolution.crm.client.GreetingService;
import com.tsolution.crm.client.Model;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class GreetingServiceImpl extends RemoteServiceServlet implements
GreetingService
{

public String greetServer(ArrayListModel modelList)
{
return modelList.get(0).getDesc();
}
 
}


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

2009-04-19 Thread Salvador Diaz

If you read the whole stacktrace you'll see that there are other
errors:

 Scanning for additional dependencies: jar:file:/D:/Program%20Files/
gxt-2.0-m1/gxt.jar!/com/extjs/gxt/ui/client/data/BeanModelLookup.java
  Computing all possible rebind results for
'com.extjs.gxt.ui.client.data.BeanModelLookup'
 Rebinding com.extjs.gxt.ui.client.data.BeanModelLookup
Invoking generate-with
class='com.extjs.gxt.ui.rebind.core.BeanModelGenerator'/
   [ERROR] Class
com.extjs.gxt.ui.client.data.BeanModelLookup not found.

It looks like it's a problem with your module declarations but without
more details I can't be sure.

Cheers,

Salvador

On Apr 18, 1:22 pm, bruce bruce.gao@gmail.com wrote:
 when I try compile a sample of Extjs-GWT. it hit the follow exception.
 but I have the missing class
 com.pipnet.resources.client.model.Customer in the same project.
 anybody can tell me why? thanks a lot

 Compiling module com.pipnet.desktop.Desktop
    Refreshing module from source
       Refreshing TypeOracle
          Processing types in compilation unit: file:/C:/Documents%20and
 %20Settings/bruce.gao/workspace_3.4/Desktop/src/com/pipnet/resources/
 client/model/CustomerBeanModel.java
             Found type 'CustomerBeanModel'
                Resolving annotation '@BEAN
 (com.pipnet.resources.client.model.Customer.class)'
                   [ERROR]
 java.lang.ClassNotFoundException:
 com.pipnet.resources.client.model.Customer
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at com.google.gwt.dev.javac.TypeOracleMediator.getClassLiteral
 (TypeOracleMediator.java:763)
         at
 com.google.gwt.dev.javac.TypeOracleMediator.getAnnotationElementValue
 (TypeOracleMediator.java:674)
         at
 com.google.gwt.dev.javac.TypeOracleMediator.createAnnotationInstance
 (TypeOracleMediator.java:442)
         at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotation
 (TypeOracleMediator.java:836)
         at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotations
 (TypeOracleMediator.java:857)
         at com.google.gwt.dev.javac.TypeOracleMediator.resolveTypeDeclaration
 (TypeOracleMediator.java:1384)
         at com.google.gwt.dev.javac.TypeOracleMediator.addNewUnits
 (TypeOracleMediator.java:389)
         at com.google.gwt.dev.javac.TypeOracleMediator.refresh
 (TypeOracleMediator.java:417)
         at com.google.gwt.dev.javac.CompilationState.refresh
 (CompilationState.java:179)
         at com.google.gwt.dev.javac.CompilationState.init
 (CompilationState.java:93)
         at com.google.gwt.dev.cfg.ModuleDef.getCompilationState
 (ModuleDef.java:264)
         at com.google.gwt.dev.Precompile.precompile(Precompile.java:283)
         at com.google.gwt.dev.Compiler.run(Compiler.java:170)
         at com.google.gwt.dev.Compiler$1.run(Compiler.java:124)
         at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
 84)
         at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
 (CompileTaskRunner.java:78)
         at com.google.gwt.dev.Compiler.main(Compiler.java:131)
    Scanning for additional dependencies: jar:file:/D:/Program%20Files/
 gxt-2.0-m1/gxt.jar!/com/extjs/gxt/ui/client/data/BeanModelLookup.java
       Computing all possible rebind results for
 'com.extjs.gxt.ui.client.data.BeanModelLookup'
          Rebinding com.extjs.gxt.ui.client.data.BeanModelLookup
             Invoking generate-with
 class='com.extjs.gxt.ui.rebind.core.BeanModelGenerator'/
                [ERROR] Class
 com.extjs.gxt.ui.client.data.BeanModelLookup not found.
 java.lang.NullPointerException
         at com.extjs.gxt.ui.rebind.core.BeanModelGenerator.getMarkerBean
 (BeanModelGenerator.java:170)
         at com.extjs.gxt.ui.rebind.core.BeanModelGenerator.generate
 (BeanModelGenerator.java:53)
         at com.google.gwt.dev.cfg.RuleGenerateWith.realize
 (RuleGenerateWith.java:49)
         at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.tryRebind
 (StandardRebindOracle.java:113)
         at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind
 (StandardRebindOracle.java:62)
         at com.google.gwt.dev.shell.StandardRebindOracle.rebind
 (StandardRebindOracle.java:172)
         at com.google.gwt.dev.shell.StandardRebindOracle.rebind
 (StandardRebindOracle.java:161)
         at com.google.gwt.dev.Precompile
 $DistillerRebindPermutationOracle.getAllPossibleRebindAnswers
 (Precompile.java:204)
         at
 

Re: send request data to php with requestbuilder

2009-04-19 Thread Salvador Diaz

What do you mean they won't work now ?

 Do you have errors we can look at so we can diagnose the problem ? Or
some sort of analysis of your own ? Have you inspected the requests
being sent by your GWT client with firebug ? It can tell you if the
request is fine so you can be sure that it's not a GWT problem.

Also, make sure that you understand the limitations introduced by the
Same Origin Policy when trying to communicate with a backend different
than plain GWT RPC's

Cheers,

Salvador

On Apr 18, 4:27 pm, Ikon vad.vik...@gmail.com wrote:
 I am trying to send some string to a php file and a request data:

 req_builder.sendRequest(test_key=test_value, new RequestCallback()
 {...

 and I wish to access the test_value like $_REQUEST['test_key'] in php.
 Later i wish to send multiple query variables too. I wish to send
 parameters to give it to sql queries.
 I have tried to set the header to setHeader(Content-Type,
 application/x-www-form-urlencoded), but that won't help either. I am
 getting empty $_REQUEST array.

 I wish to receive some working example for GWT 1.6.
 I know there are some 2-3 year examples out there in this group, but
 they won't work now.
--~--~-~--~~~---~--~~
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: CSS style rules of DecoratorPanel

2009-04-19 Thread Salvador Diaz

I think tht the best way to visualize exactly where the CSS rules are
applied is to inspect your generated code with Firebug. In fact it'll
help you with so many other things that you'll probably adopt it in no
time as one of your day to day tools

cheers,

Salvador

On Apr 18, 6:03 pm, hezjing hezj...@gmail.com wrote:
 Hi
 I'm still trying with DecoratorPanel, and I'm not sure what are the *Inner
 CSS style rules means.
 For example, .what is the different between .bottomLeft and bottomLeftInner?
 And the different between bottomCenter and bottomCenterInner?

 .gwt-DecoratorPanel .bottomLeft { the bottom left cell }
 .gwt-DecoratorPanel .bottomLeftInner { the inner element of the cell }

 .gwt-DecoratorPanel .bottomCenter { the bottom center cell }
 .gwt-DecoratorPanel .bottomCenterInner { the inner element of the cell }

 Hmmm ... I probably need a diagram to visualize exactly where does the CSS
 style rules applied to the DecoratorPanel :-)

 --

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



Re: How much slower is PRETTY mode?

2009-04-19 Thread Vitali Lovich

I just listened to the talk - didn't hear him say anything regarding
performance of long name vs short names.

The execution difference for smaller names shouldn't exist for the new
generation of browsers using JIT for javascript (i.e. FF3.5, Safair 4,
Chrome).

Even with older browsers, I don't see it being super significant -
1-2% at most if it's even measurable.  The execution of the javascript
code by the interpreter should far outweigh the cost of tokenizing the
input even if you have a 100 character name.  The cost of doing a 100
byte memcpy should be insignificant compared to all the other stuff
the interpreter must do.  However, I could be wrong - I haven't tested
this in any way, so hard numbers from real-world examples would
probably be best.

On Sun, Apr 19, 2009 at 12:25 AM, Arthur Kalmenson
arthur.k...@gmail.com wrote:

 I don't know the exact numbers. But if I remember correctly, during
 Bruce's presentation, Faster-than-Possible Code: Deferred Binding
 with GWT 
 (http://sites.google.com/site/io/faster-than-possible-code-deferred-binding-with-gwt)
 at Google I/O 2008, he mentioned something about smaller function and
 variable names executing faster then longer names.

 Also, as Vitali said, you're code is going to be rather bloated. We
 were accidentally running one of our apps in PRETTY and found the
 before compression size was 3 MB and after compression was 400kb. When
 we changed to OBF, the before compression size was 500kb and
 compressed was somewhere around 120kb.

 What's the reason that you want to run it as PRETTY? If you want to
 make the functions callable from regular JS, you should take a look at
 Ray Cromwell's excellent GWT Exporter project:
 http://code.google.com/p/gwt-exporter/

 --
 Arthur Kalmenson



 On Sat, Apr 18, 2009 at 1:46 AM, Vitali Lovich vlov...@gmail.com wrote:

 I believe that it should be the same performance in terms of
 execution.  You're download times will probably suffer - I wouldn't be
 surprised if the code bloats by 2-3x if not more.

 On Fri, Apr 17, 2009 at 11:40 PM, Dobes dob...@gmail.com wrote:

 I'm considering deploying a version in PRETTY mode since it may solve
 a Safari 4 issue I'm having and it would also allow me to interpret
 the stack traces produced by Firefox a lot better.

 However, I'm wondering what experiences people have had with the
 performance of PRETTY more - how is it?

 Thanks in advance,
 Dobes


 


 


 


--~--~-~--~~~---~--~~
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: Simple Loading While GWT Application Loads

2009-04-19 Thread Salvador Diaz

It's not really Loading While GWT Application Loads, because when
that code executes it means that GWT and your application have
finished loading. Your example is about showing a progress bar while
your already loaded application is adding widgets to a table at a rate
of 1 every 25 milliseconds (the data is already loaded).

Before your GWT application loads, there's not much you can do to show
the progress of the loading. One good trick is to have your host HTML
(the file called YourModuleName.html) display a circular progress icon
in a div occupying the whole browser window and then remove that div
as the first call in your GWT code after you've instantiated all of
your UI components.

Cheers,

Salvador

On Apr 18, 10:17 pm, Vagner Araujo araujo...@gmail.com wrote:
 this is a small sample of Loading While GWT Application Loads,
 perhaps this example can help someone.

 package com.javaneses.example.loading.client;

 import java.util.List;

 import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.user.client.Timer;
 import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.rpc.AsyncCallback;
 import com.google.gwt.user.client.ui.FlexTable;
 import com.google.gwt.user.client.ui.PopupPanel;
 import com.google.gwt.user.client.ui.RootPanel;
 import com.google.gwt.widgetideas.client.ProgressBar;
 import com.google.gwt.widgetideas.client.ProgressBar.TextFormatter;
 import com.javaneses.example.loading.client.rpc.service.MyService;
 import
 com.javaneses.example.loading.client.rpc.service.MyServiceAsync;

 public class MainTest implements EntryPoint {

         private final PopupPanel loading = new PopupPanel();

         //ProgressBar gwt incubator
         private final ProgressBar bar = new ProgressBar();

         private final FlexTable flexTable = new FlexTable();

         private Timer timer;

         private final MyServiceAsync myServiceAsync = GWT.create
 (MyService.class);

         private int index;

         public void onModuleLoad() {

                 flexTable.setText(0, 0, Row);
                 flexTable.setText(0, 1, First Name);
                 flexTable.setText(0, 2, Last Name);
                 flexTable.setCellSpacing(5);
                 flexTable.setVisible(false);

                 RootPanel.get().add(flexTable);

                 bar.setTextVisible(false);
                 loading.add(bar);
                 loading.center();

                 AsyncCallbackListMyBean asyncCallback = new
 AsyncCallbackListMyBean() {
                         public void onSuccess(final ListMyBean result) {
                                 bar.setTextVisible(true);
                                 final int count = result.size();
                                 bar.setMaxProgress(count);
                                 bar.setProgress(0);
                                 TextFormatter formatter = new TextFormatter() 
 {
                                         protected String getText(ProgressBar 
 bar, double curProgress) {
                                                 return Loading Data ;
                                         }//end getText(ProgressBar bar, 
 double curProgress)
                                 };
                                 bar.setTextFormatter(formatter);
                                 timer = new Timer() {
                                         public void run() {
                                                 if(count == index){
                                                         loading.hide();
                                                         
 flexTable.setVisible(true);
                                                         timer.cancel();
                                                 }else{
                                                         MyBean bean = 
 result.get(index);
                                                         
 flexTable.setText(index + 1, 0, +index);
                                                         
 flexTable.setText(index + 1, 1, bean.getName());
                                                         
 flexTable.setText(index + 1, 2, bean.getLastName());
                                                         index++;
                                                         
 bar.setProgress(index);
                                                 }//end else
                                         }//end run
                                 };//end timer = new Timer()

                                 timer.scheduleRepeating(25);

                         }//end onSuccess(ListMyBean result)
                         public void onFailure(Throwable caught) {
                                 Window.alert(caught.toString());
                         }//end onFailure(Throwable caught)
                 };

                 myServiceAsync.listMyBean(asyncCallback);

         }//end onModuleLoad

 }//end class

 //SERVICE CLASS


Re: How to load images dynamically?

2009-04-19 Thread Salvador Diaz

Also note that ImageBundles cannot be generated dynamically as they're
created by the GWT Compiler as a single image at compile time.
For more information about ImageBundles and its intended purposes read
this: 
http://code.google.com/webtoolkit/doc/1.6/DevGuideUserInterface.html#DevGuideImageBundles

Cheers,

Salvador

On Apr 19, 1:50 am, Vitali Lovich vlov...@gmail.com wrote:
 new Image(path to remote image file here);

 On Sat, Apr 18, 2009 at 7:16 PM, POLS praveen.polishe...@gmail.com wrote:

  Hi,

  I am using ImageBundle feature.
  I am using �...@resource annotation, specifying image file location and
  image name.
  Its kind of a static behavior.

  I have details of images name and locations in the  database.
  Can you please tell me, How to load the images?

  Thanks,
  POLS
--~--~-~--~~~---~--~~
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: Linked jar ok but then ClassNotFound at runtime for class from inside the jar?

2009-04-19 Thread Salvador Diaz

Could you post the whole stack trace ?

On Apr 19, 2:48 am, Chris xop...@gmail.com wrote:
 I added guice.jar to my project which calls various classes in guice.
 Everything compiled fine. But then when I run it, I get a
 ClassNotFound for a class in the guice.jar.

 Any ideas why this would be?

 com.google.apphosting.utils.jetty.JettyLogger warn
 WARNING: failed gwtPostService
 java.lang.NoClassDefFoundError: com/google/inject/Module
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT 1.6 with Maven and build system questions/survey...

2009-04-19 Thread Salvador Diaz

 I know I am doing something dumb but any suggestions?  Also why am I
 getting the embedded Tomcat message--I thought things in 1.6 were
 transitioning to Jetty?

If you run that goal in debug mode (mvn gwt:run -X) it should tell you
exactly what it's doing (it sounds like it's using a gwt-dev-1.5
instead of 1.6)

 Does the codehaus maven plugin have a decent mailing list?

The mailing list (http://mojo.codehaus.org/gwt-maven-plugin/mail-
lists.html) is for the whole Mojo project so you'll also get mails
from users of other maven plugins hosted at mojo. I agree it's a bit
of a pain, but since the issue tracker only has 11 open issues (http://
jira.codehaus.org/browse/MGWT) I think you should be able to report
any issues you've found and get a quick response.

 Yep, me too.  Yet more time spent futzing around trying to keep my src
 tree clean.

Stop being disappointed (it doesn't help in anything) and help us in
making GWT better (http://code.google.com/webtoolkit/
makinggwtbetter.html)

Cheers,

Salvador
--~--~-~--~~~---~--~~
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 compiling GWT application in Eclipse

2009-04-19 Thread Salvador Diaz

That's an appengine error, are you sure you want yo use the app engine
sdk in your application ? If you do, try asking your question here:
http://groups.google.com/group/google-appengine

Cheers,

Salvador

On Apr 19, 5:06 am, mabebe meklitabayab...@gmail.com wrote:
 Please help...i keep getting this error when trying to build a GWT
 project in eclipse.

 Apr 18, 2009 11:04:55 PM org.datanucleus.enhancer.DataNucleusEnhancer
 addMessage
 SEVERE: An error occured for ClassEnhancer ASM when trying to call
 the method org.datanucleus.enhancer.asm.ASMClassEnhancer on class
 getClassNameForFileName : org.objectweb.asm.ClassReader.accept(Lorg/
 objectweb/asm/ClassVisitor;I)V
 java.lang.NoSuchMethodError: org.objectweb.asm.ClassReader.accept(Lorg/
 objectweb/asm/ClassVisitor;I)V
         at
 org.datanucleus.enhancer.asm.ASMClassEnhancer.getClassNameForFileName
 (ASMClassEnhancer.java:154)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke
 (NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke
 (DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at
 org.datanucleus.enhancer.DataNucleusEnhancer.getClassNameForFilename
 (DataNucleusEnhancer.java:900)
         at
 org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput
 (DataNucleusEnhancer.java:716)
         at org.datanucleus.enhancer.DataNucleusEnhancer.enhance
 (DataNucleusEnhancer.java:525)
         at org.datanucleus.enhancer.DataNucleusEnhancer.main
 (DataNucleusEnhancer.java:1235)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke
 (NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke
 (DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:
 57)
         at com.google.appengine.tools.enhancer.Enhance.init(Enhance.java:
 60)
         at com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:41)
 .
 An error occured for ClassEnhancer ASM when trying to call the
 method org.datanucleus.enhancer.asm.ASMClassEnhancer on class
 getClassNameForFileName : org.objectweb.asm.ClassReader.accept(Lorg/
 objectweb/asm/ClassVisitor;I)V
 java.lang.NoSuchMethodError: org.objectweb.asm.ClassReader.accept(Lorg/
 objectweb/asm/ClassVisitor;I)V
         at
 org.datanucleus.enhancer.asm.ASMClassEnhancer.getClassNameForFileName
 (ASMClassEnhancer.java:154)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke
 (NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke
 (DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at
 org.datanucleus.enhancer.DataNucleusEnhancer.getClassNameForFilename
 (DataNucleusEnhancer.java:900)
         at
 org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput
 (DataNucleusEnhancer.java:716)
         at org.datanucleus.enhancer.DataNucleusEnhancer.enhance
 (DataNucleusEnhancer.java:525)
         at org.datanucleus.enhancer.DataNucleusEnhancer.main
 (DataNucleusEnhancer.java:1235)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke
 (NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke
 (DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:
 57)
         at com.google.appengine.tools.enhancer.Enhance.init(Enhance.java:
 60)
         at com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:41)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to get scroll bar controll

2009-04-19 Thread Salvador Diaz

Read the javadoc:
http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/ScrollPanel.html#getScrollPosition()

And please read all of the recommended docs before posting
questions ;)

Excerpt from the home page for this discussion group:
 Feel free to post messages on any GWT-related topic, but please
check the list of resources above first; you may find your question
has already been answered. 

Cheers,

Salvador

On Apr 19, 7:00 am, damu daran damu...@gmail.com wrote:
 sir ,

         I am using Google search API , java , GWT 1.5.3 , JSON .

         I want to get the scroll bar  position .

         Actually I am using HorizontalSplitPanel , because of these i am
 having three scroll  bar in a page.

         In mean HorizontalSplitPanel's left Panel having one scroll bar ,
 right panel having another one scroll bar and browser having its own scroll
 bar .
 *
        I want to listen  each of the scroll bar control.

        Especially i want to call a function if scroll reaches reached the
 bottom of the page.

 *

        This is the coding i am using...

 import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.ui.*;

   // some code here
 *
     HorizontalSplitPanel hSplitPanel = new HorizontalSplitPanel();*
     HorizontalPanel hPanel1 = new HorizontalPanel();

     hSplitPanel.setSize(1200px,600px);
     hSplitPanel.setSplitPosition(50%);

 // some code here

     Label label1 =new Label(text);
     Label label2 =new Label(text);

 // some code here

     hSplitPanel.setLeftWidget(label1);
     hSplitPanel.setRightWidget(label2);

 // some code here

     RootPanel.get().add(hSplitPanel);

 }

        * Help me to find the scorll bar position for these three scroll bar.
 *

 Waiting for ur reply.

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



Re: How to load a website in a panel

2009-04-19 Thread Salvador Diaz

Load each site in a different iframe (http://www.w3.org/TR/html401/
present/frames.html#h-16.5)

If you want it to be done after a button click:

Button button = new Button(load iframes);
button.addClickListener(new ClickListener(){
public void onClick(Widget sender){
//get the iframes and set the source to whatever you want
}
});

Cheers,

Salvador

On Apr 19, 7:08 am, jaga.mcap...@gmail.com jaga.mcap...@gmail.com
wrote:
 Hi,
         How to load four different pages in single page.

         If i clicked a button , four different websites(e.g : google.com ,
 yahoo.com , wikipedia.com, gmail.com) to be load in my page .

        Actually i want to know , what is the code to load the website
 in a panel .

         By using Java , GWT 1.5.3 .

 Regards
 Jagadesh
--~--~-~--~~~---~--~~
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: Regarding an Uncaught Exception Displaying

2009-04-19 Thread shajeer kt
Helloo,

  Some body  please help me to solve this issue

On Tue, Apr 14, 2009 at 4:29 PM, shajeer kt shajeerkt...@gmail.com wrote:


 Hiii,

   Thanks for your reply,

 Fusioncharts are widgets which are working with Flash.

 FusionCharts is a flash charting component that can be used to render
 data-driven animated charts. Made in Adobe Flash 8 (formerly Macromedia
 Flash),

 My application is like that,initially when the page is loaded a fusion
 chart is loaded along with that.Now if i clicked on the fusion chart bar
 another chart is getting loaded.If i clicked the second one,third fusion
 chart is loaded. So this is in a drill down manner.

 That means fusion charts are working fine.
 Now i am going to load the second page and the fusion chart is loaded
 perfectly.Now i am going to click the fusion chart for the drill down chart.
 But it is going to blank page where nothing is viewed even the grid in the
 page..


 Now again  i tried to restart my application and loaded the page which
 caused problem previously,it will work fine,But the other page which was
 working fine had gone to a blank page as i said early.

 This is happening only in gogle hosted mode and IE.Its working fine in
 Mozilla firefox.

 I am calling the fusion chart in GWT in below manner.

 *public static Panel createRequestFusionChart(MapString,UrlParam
 urlsParam,int chartWidth, int chartHigh) {

 Panel chartPanel = new Panel();
 final Panel fusionPanel1 = new Panel();

 chartPanel.setWidth(chartWidth);


 final MapString, Object parameters = new HashMapString,
 Object();
 IteratorUrlParam params = urlsParam.values().iterator();
 UrlParam urlParam;
 while(params.hasNext())
 {
 urlParam = params.next();
 parameters.put(urlParam.getName(), urlParam.getValue());


 }

 ParametersProvider parmParametersProvider = new
 ParametersProvider() {

 public MapString, Object getParameters() {

 //Map parameters = new HashMap();
 parameters.put(userid, 0);
 parameters.put(charttype, 1);
 parameters.put(chartmethod, Request);
 parameters.put(dept, 19);
 parameters.put(link, 1);
 return parameters ;
 }
 } ;


 String chartName = StackedColumn3D;
 String chartUrl = GWT.getModuleBaseURL() + FusionCharts/ +
 chartName + .swf;
 String dataUrl = GWT.getModuleBaseURL() + ChartServletNew;

 FusionChart fusionChart = new FusionChart(chartUrl, 450, 400,
 dataUrl, parmParametersProvider) ;


 fusionPanel1.add(fusionChart);

 final Panel firstRowPanel = new Panel(Requests);
 firstRowPanel.setLayout(new HorizontalLayout(30));

 

 ParametersProvider parmParametersProvider1 = new
 ParametersProvider() {

 public MapString, Object getParameters() {
 //Map parameters = new HashMap();
 parameters.put(userid, 0);
 parameters.put(charttype, 1);
 parameters.put(chartmethod, emptychart);

 return parameters ;
 }
 } ;

 chartName = StackedBar3D;
 chartUrl = GWT.getModuleBaseURL() + FusionCharts/ + chartName +
 .swf?ChartNoDataText=Click left chart to view Services Details;
 dataUrl = GWT.getModuleBaseURL() + ChartServletNew;

 fusionChart = new FusionChart(chartUrl, 450, 550, Human Resources
 (Development)ServDetails, dataUrl, parmParametersProvider1) ;

 final Panel fusionPanel2 = new Panel();
 fusionPanel2.add(fusionChart);



 firstRowPanel.add(fusionPanel1);
 firstRowPanel.add(fusionPanel2);


 

 ParametersProvider parmParametersProviderSubServ = new
 ParametersProvider() {

 public MapString, Object getParameters() {

 //Map parameters = new HashMap();
 parameters.put(userid, 0);
 parameters.put(charttype, 1);
 parameters.put(chartmethod, emptychart);
 return parameters ;
 }
 } ;

 chartName = StackedBar3D;
 chartUrl = GWT.getModuleBaseURL() + FusionCharts/ + chartName +
 .swf?ChartNoDataText=Click Services chart to view subservices details;
 dataUrl = GWT.getModuleBaseURL() + ChartServletNew;

 fusionChart = new FusionChart(chartUrl, 450, 500, Human Resources
 (Development)SubServDetails, dataUrl, parmParametersProviderSubServ) ;


 final Panel secondeRowPanel = new Panel(Subservices Chart);
 secondeRowPanel.add(fusionChart);

 chartPanel.add(firstRowPanel);
 chartPanel.add(secondeRowPanel);
 return chartPanel;
 }
 *
 Here *ChartServletNew* is a Servlet which is used to create the xml of
 fusion chart. Inside this 

Re: How to load a web page in tooltip

2009-04-19 Thread Salvador Diaz

You can only display plain text on tooltips, you should use a popup to
display HTML
http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/PopupPanel.html
http://gwt.google.com/samples/Showcase/Showcase.html#CwBasicPopup

You should be aware of the limitations imposed by the Same Origin
Policy though (google it if you don't know what that means)

Cheers,

Salvador Diaz

On Apr 19, 7:05 am, jaga.mcap...@gmail.com jaga.mcap...@gmail.com
wrote:
 Hi,
          I am using Google search ApI .

          If i place a mouse over the search result ,  i want to load
 corresponding page in the tooltip .

          I dont know how to load a web page in tooltip.

          URL for the web page is available.

         Is it possible to load that webpage in a tooltip . Please help
 me to do this.

 Regards
 Jagadesh
--~--~-~--~~~---~--~~
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: what's wrong here?

2009-04-19 Thread Salvador Diaz

Well, your async callback doesn't do anything when there's an error,
try this:

public void onFailure(Throwable caught)
{
throw caught;
}

And are you sure there's no output in the hosted browser shell ?
What's the log level you used ?

Cheers,

Salvador

On Apr 19, 9:47 am, Alex Luya alexander.l...@gmail.com wrote:
 No exception,no output,that is strange
 -
 package com.tsolution.crm.client;

 public class Model
 {
        private String desc;

     public String getDesc()
     {
         return desc;
     }
     public void setDesc(String desc)
     {
         this.desc = desc;
     }

 }

 -
 .
 public void onModuleLoad()
     {
         Model m1 = new Model();
         m1.setDesc(Hello);

         AsyncCallbackString callback=new AsyncCallbackString(){
             public void onFailure(Throwable caught)
             {
             }

             public void onSuccess(String result)
             {
                 Window.alert(result);
             }
         };

         ArrayListModel modelList=new ArrayListModel();
         modelList.add(m1);

         loginService.greetServer(modelList, callback);}

 

 --
 package com.tsolution.crm.client;

 import java.util.ArrayList;
 import com.google.gwt.user.client.rpc.RemoteService;
 import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

 @RemoteServiceRelativePath(greet)
 public interface GreetingService extends RemoteService {
   String greetServer(ArrayListModel modelList);
   String greetServer1(String modelList);}

 ---
 package com.tsolution.crm.client;
 import java.util.ArrayList;
 import com.google.gwt.user.client.rpc.AsyncCallback;

 public interface GreetingServiceAsync {
   void greetServer(ArrayListModel modelList, AsyncCallbackString
 callback);}

 -
 package com.tsolution.crm.server;

 import java.util.ArrayList;
 import com.tsolution.crm.client.GreetingService;
 import com.tsolution.crm.client.Model;
 import com.google.gwt.user.server.rpc.RemoteServiceServlet;

 public class GreetingServiceImpl extends RemoteServiceServlet implements
         GreetingService
 {

     public String greetServer(ArrayListModel modelList)
     {
                 return modelList.get(0).getDesc();
     }

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



Re: How to load a website in a panel

2009-04-19 Thread Darkflame

gwt frame widget helps for this;

Frame frame = new Frame(http://www.google.com/;);
frame.setWidth(100%);
frame.setHeight(700px);
RootPanel.get(demo).add(frame);

On Apr 19, 11:55 am, Salvador Diaz diaz.salva...@gmail.com wrote:
 Load each site in a different iframe (http://www.w3.org/TR/html401/
 present/frames.html#h-16.5)

 If you want it to be done after a button click:

 Button button = new Button(load iframes);
 button.addClickListener(new ClickListener(){
     public void onClick(Widget sender){
         //get the iframes and set the source to whatever you want
     }

 });

 Cheers,

 Salvador

 On Apr 19, 7:08 am, jaga.mcap...@gmail.com jaga.mcap...@gmail.com
 wrote:



  Hi,
          How to load four different pages in single page.

          If i clicked a button , four different websites(e.g : google.com ,
  yahoo.com , wikipedia.com, gmail.com) to be load in my page .

         Actually i want to know , what is the code to load the website
  in a panel .

          By using Java , GWT 1.5.3 .

  Regards
  Jagadesh
--~--~-~--~~~---~--~~
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: Regarding an Uncaught Exception Displaying

2009-04-19 Thread Salvador Diaz

You either didn't bother to read my post or you didn't bother trying
what I suggested. As I said before:

if you don't set the size of the absolutePanel (ie:
absolutePanel.setSize(100%, 100%)) the widgets will be visible in
Firefox but not in IE

So try setting a size for your panels !

Salvador

On Apr 19, 11:56 am, shajeer kt shajeerkt...@gmail.com wrote:
 Helloo,

       Some body  please help me to solve this issue

 On Tue, Apr 14, 2009 at 4:29 PM, shajeer kt shajeerkt...@gmail.com wrote:

  Hiii,

    Thanks for your reply,

  Fusioncharts are widgets which are working with Flash.

  FusionCharts is a flash charting component that can be used to render
  data-driven animated charts. Made in Adobe Flash 8 (formerly Macromedia
  Flash),

  My application is like that,initially when the page is loaded a fusion
  chart is loaded along with that.Now if i clicked on the fusion chart bar
  another chart is getting loaded.If i clicked the second one,third fusion
  chart is loaded. So this is in a drill down manner.

  That means fusion charts are working fine.
  Now i am going to load the second page and the fusion chart is loaded
  perfectly.Now i am going to click the fusion chart for the drill down chart.
  But it is going to blank page where nothing is viewed even the grid in the
  page..

  Now again  i tried to restart my application and loaded the page which
  caused problem previously,it will work fine,But the other page which was
  working fine had gone to a blank page as i said early.

  This is happening only in gogle hosted mode and IE.Its working fine in
  Mozilla firefox.

  I am calling the fusion chart in GWT in below manner.

  *    public static Panel createRequestFusionChart(MapString,UrlParam
  urlsParam,int chartWidth, int chartHigh) {

          Panel chartPanel = new Panel();
          final Panel fusionPanel1 = new Panel();

          chartPanel.setWidth(chartWidth);

          final MapString, Object parameters = new HashMapString,
  Object();
          IteratorUrlParam params = urlsParam.values().iterator();
          UrlParam urlParam;
          while(params.hasNext())
          {
              urlParam = params.next();
              parameters.put(urlParam.getName(), urlParam.getValue());

          }

          ParametersProvider parmParametersProvider = new
  ParametersProvider() {

              public MapString, Object getParameters() {

                  //Map parameters = new HashMap();
                  parameters.put(userid, 0);
                  parameters.put(charttype, 1);
                  parameters.put(chartmethod, Request);
                  parameters.put(dept, 19);
                  parameters.put(link, 1);
                  return parameters ;
              }
          } ;

          String chartName = StackedColumn3D;
          String chartUrl = GWT.getModuleBaseURL() + FusionCharts/ +
  chartName + .swf;
          String dataUrl = GWT.getModuleBaseURL() + ChartServletNew;

          FusionChart fusionChart = new FusionChart(chartUrl, 450, 400,
  dataUrl, parmParametersProvider) ;

          fusionPanel1.add(fusionChart);

          final Panel firstRowPanel = new Panel(Requests);
          firstRowPanel.setLayout(new HorizontalLayout(30));

          

          ParametersProvider parmParametersProvider1 = new
  ParametersProvider() {

              public MapString, Object getParameters() {
                  //Map parameters = new HashMap();
                  parameters.put(userid, 0);
                  parameters.put(charttype, 1);
                  parameters.put(chartmethod, emptychart);

                  return parameters ;
              }
          } ;

          chartName = StackedBar3D;
          chartUrl = GWT.getModuleBaseURL() + FusionCharts/ + chartName +
  .swf?ChartNoDataText=Click left chart to view Services Details;
          dataUrl = GWT.getModuleBaseURL() + ChartServletNew;

          fusionChart = new FusionChart(chartUrl, 450, 550, Human Resources
  (Development)ServDetails, dataUrl, parmParametersProvider1) ;

          final Panel fusionPanel2 = new Panel();
          fusionPanel2.add(fusionChart);

          firstRowPanel.add(fusionPanel1);
          firstRowPanel.add(fusionPanel2);

          

          ParametersProvider parmParametersProviderSubServ = new
  ParametersProvider() {

              public MapString, Object getParameters() {

                  //Map parameters = new HashMap();
                  parameters.put(userid, 0);
                  parameters.put(charttype, 1);
                  parameters.put(chartmethod, emptychart);
                  return parameters ;
              }
          } ;

          chartName = StackedBar3D;
          chartUrl = GWT.getModuleBaseURL() + FusionCharts/ + chartName +
  .swf?ChartNoDataText=Click Services chart to view subservices details;
          dataUrl = GWT.getModuleBaseURL() + ChartServletNew;

          fusionChart = new 

Re: Error compiling GWT application in Eclipse

2009-04-19 Thread mabebe

Thanks salvador...

On Apr 19, 5:16 am, Salvador Diaz diaz.salva...@gmail.com wrote:
 That's an appengine error, are you sure you want yo use the app engine
 sdk in your application ? If you do, try asking your question 
 here:http://groups.google.com/group/google-appengine

 Cheers,

 Salvador

 On Apr 19, 5:06 am, mabebe meklitabayab...@gmail.com wrote:

  Please help...i keep getting this error when trying to build a GWT
  project in eclipse.

  Apr 18, 2009 11:04:55 PM org.datanucleus.enhancer.DataNucleusEnhancer
  addMessage
  SEVERE: An error occured for ClassEnhancer ASM when trying to call
  the method org.datanucleus.enhancer.asm.ASMClassEnhancer on class
  getClassNameForFileName : org.objectweb.asm.ClassReader.accept(Lorg/
  objectweb/asm/ClassVisitor;I)V
  java.lang.NoSuchMethodError: org.objectweb.asm.ClassReader.accept(Lorg/
  objectweb/asm/ClassVisitor;I)V
          at
  org.datanucleus.enhancer.asm.ASMClassEnhancer.getClassNameForFileName
  (ASMClassEnhancer.java:154)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke
  (NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke
  (DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at
  org.datanucleus.enhancer.DataNucleusEnhancer.getClassNameForFilename
  (DataNucleusEnhancer.java:900)
          at
  org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput
  (DataNucleusEnhancer.java:716)
          at org.datanucleus.enhancer.DataNucleusEnhancer.enhance
  (DataNucleusEnhancer.java:525)
          at org.datanucleus.enhancer.DataNucleusEnhancer.main
  (DataNucleusEnhancer.java:1235)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke
  (NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke
  (DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at 
  com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:
  57)
          at com.google.appengine.tools.enhancer.Enhance.init(Enhance.java:
  60)
          at com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:41)
  .
  An error occured for ClassEnhancer ASM when trying to call the
  method org.datanucleus.enhancer.asm.ASMClassEnhancer on class
  getClassNameForFileName : org.objectweb.asm.ClassReader.accept(Lorg/
  objectweb/asm/ClassVisitor;I)V
  java.lang.NoSuchMethodError: org.objectweb.asm.ClassReader.accept(Lorg/
  objectweb/asm/ClassVisitor;I)V
          at
  org.datanucleus.enhancer.asm.ASMClassEnhancer.getClassNameForFileName
  (ASMClassEnhancer.java:154)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke
  (NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke
  (DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at
  org.datanucleus.enhancer.DataNucleusEnhancer.getClassNameForFilename
  (DataNucleusEnhancer.java:900)
          at
  org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput
  (DataNucleusEnhancer.java:716)
          at org.datanucleus.enhancer.DataNucleusEnhancer.enhance
  (DataNucleusEnhancer.java:525)
          at org.datanucleus.enhancer.DataNucleusEnhancer.main
  (DataNucleusEnhancer.java:1235)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke
  (NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke
  (DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at 
  com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:
  57)
          at com.google.appengine.tools.enhancer.Enhance.init(Enhance.java:
  60)
          at com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:41)


--~--~-~--~~~---~--~~
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 compiling GWT application in Eclipse

2009-04-19 Thread mabebe

I  have another build error..do you know the problemi removed the
app engine from the build path already

Loading module 'com.personalsite.Personalsite'
   [ERROR] Failure while parsing XML
org.xml.sax.SAXNotRecognizedException: Feature:
http://apache.org/xml/features/nonvalidating/load-external-dtd
at org.apache.crimson.parser.XMLReaderImpl.setFeature
(XMLReaderImpl.java:213)
at org.apache.crimson.jaxp.SAXParserImpl.setFeatures
(SAXParserImpl.java:143)
at org.apache.crimson.jaxp.SAXParserImpl.init(SAXParserImpl.java:
126)
at org.apache.crimson.jaxp.SAXParserFactoryImpl.newSAXParserImpl
(SAXParserFactoryImpl.java:113)
at org.apache.crimson.jaxp.SAXParserFactoryImpl.setFeature
(SAXParserFactoryImpl.java:141)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse
(ReflectiveParser.java:307)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100
(ReflectiveParser.java:48)
at com.google.gwt.dev.util.xml.ReflectiveParser.parse
(ReflectiveParser.java:385)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad
(ModuleDefLoader.java:243)
at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:
155)
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule
(ModuleDefLoader.java:269)
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath
(ModuleDefLoader.java:127)
at com.google.gwt.dev.Compiler.run(Compiler.java:156)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:124)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
84)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
(CompileTaskRunner.java:78)
at com.google.gwt.dev.Compiler.main(Compiler.java:131)


On Apr 19, 5:16 am, Salvador Diaz diaz.salva...@gmail.com wrote:
 That's an appengine error, are you sure you want yo use the app engine
 sdk in your application ? If you do, try asking your question 
 here:http://groups.google.com/group/google-appengine

 Cheers,

 Salvador

 On Apr 19, 5:06 am, mabebe meklitabayab...@gmail.com wrote:

  Please help...i keep getting this error when trying to build a GWT
  project in eclipse.

  Apr 18, 2009 11:04:55 PM org.datanucleus.enhancer.DataNucleusEnhancer
  addMessage
  SEVERE: An error occured for ClassEnhancer ASM when trying to call
  the method org.datanucleus.enhancer.asm.ASMClassEnhancer on class
  getClassNameForFileName : org.objectweb.asm.ClassReader.accept(Lorg/
  objectweb/asm/ClassVisitor;I)V
  java.lang.NoSuchMethodError: org.objectweb.asm.ClassReader.accept(Lorg/
  objectweb/asm/ClassVisitor;I)V
          at
  org.datanucleus.enhancer.asm.ASMClassEnhancer.getClassNameForFileName
  (ASMClassEnhancer.java:154)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke
  (NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke
  (DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at
  org.datanucleus.enhancer.DataNucleusEnhancer.getClassNameForFilename
  (DataNucleusEnhancer.java:900)
          at
  org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput
  (DataNucleusEnhancer.java:716)
          at org.datanucleus.enhancer.DataNucleusEnhancer.enhance
  (DataNucleusEnhancer.java:525)
          at org.datanucleus.enhancer.DataNucleusEnhancer.main
  (DataNucleusEnhancer.java:1235)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke
  (NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke
  (DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at 
  com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:
  57)
          at com.google.appengine.tools.enhancer.Enhance.init(Enhance.java:
  60)
          at com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:41)
  .
  An error occured for ClassEnhancer ASM when trying to call the
  method org.datanucleus.enhancer.asm.ASMClassEnhancer on class
  getClassNameForFileName : org.objectweb.asm.ClassReader.accept(Lorg/
  objectweb/asm/ClassVisitor;I)V
  java.lang.NoSuchMethodError: org.objectweb.asm.ClassReader.accept(Lorg/
  objectweb/asm/ClassVisitor;I)V
          at
  org.datanucleus.enhancer.asm.ASMClassEnhancer.getClassNameForFileName
  (ASMClassEnhancer.java:154)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke
  (NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke
  (DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at
  org.datanucleus.enhancer.DataNucleusEnhancer.getClassNameForFilename
  

Re: How to load images dynamically?

2009-04-19 Thread Vitali Lovich
Well, that's not technically true.  You could potentially write a framework
that would get the GWT compiler to generate the bundles for you at runtime.
There isn't such a framework right now  it would take some effort to write
I imagine.

You could base it off the work that was done to recompile the code into JS
on the fly when the Java code changes (I forget by which project - it's in
the mailing list archives somewhere).

Something along the lines of - extract the images to disk, generate the code
for the image bundle, invoke the compiler, delete the original images (if
you really want to save space),  then return a map of image alias  the
parameters of the image (i.e. url of the bundle, offsets into the bundle,
size of the image).

On Sun, Apr 19, 2009 at 5:01 AM, Salvador Diaz diaz.salva...@gmail.comwrote:


 Also note that ImageBundles cannot be generated dynamically as they're
 created by the GWT Compiler as a single image at compile time.
 For more information about ImageBundles and its intended purposes read
 this:
 http://code.google.com/webtoolkit/doc/1.6/DevGuideUserInterface.html#DevGuideImageBundles

 Cheers,

 Salvador

 On Apr 19, 1:50 am, Vitali Lovich vlov...@gmail.com wrote:
  new Image(path to remote image file here);
 
  On Sat, Apr 18, 2009 at 7:16 PM, POLS praveen.polishe...@gmail.com
 wrote:
 
   Hi,
 
   I am using ImageBundle feature.
   I am using  @Resource annotation, specifying image file location and
   image name.
   Its kind of a static behavior.
 
   I have details of images name and locations in the  database.
   Can you please tell me, How to load the images?
 
   Thanks,
   POLS
 


--~--~-~--~~~---~--~~
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: stateful service

2009-04-19 Thread Vitali Lovich
Depends on who initiates the service.  If it's the other machine (not the
web server), then in general no, unless you run a custom web server on it
that will convert resource requests (images or JS scripts only) into
commands (the authentication information will have to be encoded in the
names in addition to the commands if you have to have authenticated service)
.  This is quite complicated.

If the web server can control the service, then a simple authenticated RPC
call will suffice.  Don't bother with cookies if you are using RPC.
http://code.google.com/p/google-web-toolkit/wiki/RpcAuth

On Sat, Apr 18, 2009 at 11:16 PM, joshmo captainj...@gmail.com wrote:


 What I want to do is log in to an application.  Once logged in, the
 user clicks a button to start a service.  Then the user will remain
 logged in and monitor the service.  The service is used for
 transferring files a different computer to the computer the web server
 is running on.  The web page will update every minute with status of
 server and bandwidth used.  User can log out and log in the next day
 to the same service and continue to monitor the service.

 Is this possible? I have been reading about setting a cookie with a
 session id but I don't know if this is going to work or not.  Does
 anyone know if you can maintain session state with a service and that
 service continues to run in a daemon thread even if the user logs out?

 Thanks for any response.

 


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



Re: How to load images dynamically?

2009-04-19 Thread Salvador Diaz

 There isn't such a framework right now  it would take some effort to write
 I imagine.

So my remark stands true: ImageBundles cannot be generated dynamically
(and by that I meant: with the standard GWT distribution)


--~--~-~--~~~---~--~~
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: Regarding an Uncaught Exception Displaying

2009-04-19 Thread shajeer kt
Hi,

  Thanks for your reply.

I am pretty new to GWT . Please dont harsh on me if i asked any foolish
question.

  I am not using an Absolute Panel . I am using
Panel(com.gwtext.client.widgets.Panel) .

  I am using a similar application like  http://www.gwt-ext.com/demo/ .
There they are using Panel.

On Sun, Apr 19, 2009 at 1:07 PM, Salvador Diaz diaz.salva...@gmail.comwrote:


 You either didn't bother to read my post or you didn't bother trying
 what I suggested. As I said before:

 if you don't set the size of the absolutePanel (ie:
 absolutePanel.setSize(100%, 100%)) the widgets will be visible in
 Firefox but not in IE

 So try setting a size for your panels !

 Salvador

 On Apr 19, 11:56 am, shajeer kt shajeerkt...@gmail.com wrote:
  Helloo,
 
Some body  please help me to solve this issue
 
  On Tue, Apr 14, 2009 at 4:29 PM, shajeer kt shajeerkt...@gmail.com
 wrote:
 
   Hiii,
 
 Thanks for your reply,
 
   Fusioncharts are widgets which are working with Flash.
 
   FusionCharts is a flash charting component that can be used to render
   data-driven animated charts. Made in Adobe Flash 8 (formerly Macromedia
   Flash),
 
   My application is like that,initially when the page is loaded a fusion
   chart is loaded along with that.Now if i clicked on the fusion chart
 bar
   another chart is getting loaded.If i clicked the second one,third
 fusion
   chart is loaded. So this is in a drill down manner.
 
   That means fusion charts are working fine.
   Now i am going to load the second page and the fusion chart is loaded
   perfectly.Now i am going to click the fusion chart for the drill down
 chart.
   But it is going to blank page where nothing is viewed even the grid in
 the
   page..
 
   Now again  i tried to restart my application and loaded the page which
   caused problem previously,it will work fine,But the other page which
 was
   working fine had gone to a blank page as i said early.
 
   This is happening only in gogle hosted mode and IE.Its working fine in
   Mozilla firefox.
 
   I am calling the fusion chart in GWT in below manner.
 
   *public static Panel createRequestFusionChart(MapString,UrlParam
   urlsParam,int chartWidth, int chartHigh) {
 
   Panel chartPanel = new Panel();
   final Panel fusionPanel1 = new Panel();
 
   chartPanel.setWidth(chartWidth);
 
   final MapString, Object parameters = new HashMapString,
   Object();
   IteratorUrlParam params = urlsParam.values().iterator();
   UrlParam urlParam;
   while(params.hasNext())
   {
   urlParam = params.next();
   parameters.put(urlParam.getName(), urlParam.getValue());
 
   }
 
   ParametersProvider parmParametersProvider = new
   ParametersProvider() {
 
   public MapString, Object getParameters() {
 
   //Map parameters = new HashMap();
   parameters.put(userid, 0);
   parameters.put(charttype, 1);
   parameters.put(chartmethod, Request);
   parameters.put(dept, 19);
   parameters.put(link, 1);
   return parameters ;
   }
   } ;
 
   String chartName = StackedColumn3D;
   String chartUrl = GWT.getModuleBaseURL() + FusionCharts/ +
   chartName + .swf;
   String dataUrl = GWT.getModuleBaseURL() + ChartServletNew;
 
   FusionChart fusionChart = new FusionChart(chartUrl, 450, 400,
   dataUrl, parmParametersProvider) ;
 
   fusionPanel1.add(fusionChart);
 
   final Panel firstRowPanel = new Panel(Requests);
   firstRowPanel.setLayout(new HorizontalLayout(30));
 
   
 
   ParametersProvider parmParametersProvider1 = new
   ParametersProvider() {
 
   public MapString, Object getParameters() {
   //Map parameters = new HashMap();
   parameters.put(userid, 0);
   parameters.put(charttype, 1);
   parameters.put(chartmethod, emptychart);
 
   return parameters ;
   }
   } ;
 
   chartName = StackedBar3D;
   chartUrl = GWT.getModuleBaseURL() + FusionCharts/ + chartName
 +
   .swf?ChartNoDataText=Click left chart to view Services Details;
   dataUrl = GWT.getModuleBaseURL() + ChartServletNew;
 
   fusionChart = new FusionChart(chartUrl, 450, 550, Human
 Resources
   (Development)ServDetails, dataUrl, parmParametersProvider1) ;
 
   final Panel fusionPanel2 = new Panel();
   fusionPanel2.add(fusionChart);
 
   firstRowPanel.add(fusionPanel1);
   firstRowPanel.add(fusionPanel2);
 
   
 
   ParametersProvider parmParametersProviderSubServ = new
   ParametersProvider() {
 
   public MapString, Object getParameters() {
 
   //Map 

Re: GWT 1.6 with Maven and build system questions/survey...

2009-04-19 Thread Murray Waters
I think i'm going to open a new issue saying that they should have their own
mailing list :-)


 The mailing list (http://mojo.codehaus.org/gwt-maven-plugin/mail-
 lists.html http://mojo.codehaus.org/gwt-maven-plugin/mail-%0Alists.html)
 is for the whole Mojo project so you'll also get mails
 from users of other maven plugins hosted at mojo. I agree it's a bit
 of a pain, but since the issue tracker only has 11 open issues (http://
 jira.codehaus.org/browse/MGWT) I think you should be able to report
 any issues you've found and get a quick response.

  Yep, me too.  Yet more time spent futzing around trying to keep my src
  tree clean.

 Stop being disappointed (it doesn't help in anything) and help us in
 making GWT better (http://code.google.com/webtoolkit/
 makinggwtbetter.htmlhttp://code.google.com/webtoolkit/%0Amakinggwtbetter.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: How to load images dynamically?

2009-04-19 Thread Vitali Lovich
I thought you were stating an absolute (i.e. it's not possible at all to use
the image bundle concept).  My bad.

On Sun, Apr 19, 2009 at 6:44 AM, Salvador Diaz diaz.salva...@gmail.comwrote:


  There isn't such a framework right now  it would take some effort to
 write
  I imagine.

 So my remark stands true: ImageBundles cannot be generated dynamically
 (and by that I meant: with the standard GWT distribution)


 


--~--~-~--~~~---~--~~
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: what's wrong here?

2009-04-19 Thread Vagner Araujo

Hi friends,

try now.


package com.tsolution.crm.client;

import java.io.Serializable;


public class Model implements Serializable {

private static final long serialVersionUID = 5693662550097196303L;

private String desc;

public String getDesc() {
return desc;
}//end getDesc

public void setDesc(String desc) {
this.desc = desc;
}//end setDesc

}//end class


//SERVICE CLASS

package com.tsolution.crm.client;

import java.util.ArrayList;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;


@RemoteServiceRelativePath(greet)
public interface GreetingService extends RemoteService {
 String greetServer(ArrayListModel modelList);
 String greetServer1(String modelList);
}//end interface


package com.tsolution.crm.client;
import java.util.ArrayList;
import com.google.gwt.user.client.rpc.AsyncCallback;

public interface GreetingServiceAsync {

void greetServer(ArrayListModel modelList, AsyncCallbackString
callback);

void greetServer1(String modelList, AsyncCallbackString
asyncCallback);
}//end interface



package com.tsolution.crm.server;

import java.util.ArrayList;
import com.tsolution.crm.client.GreetingService;
import com.tsolution.crm.client.Model;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class GreetingServiceImpl extends RemoteServiceServlet
implements
GreetingService {

private static final long serialVersionUID = 1L;

@Override
public String greetServer(ArrayListModel modelList) {
return modelList.get(0).getDesc();
}//end greetServer(ArrayListModel modelList)

@Override
public String greetServer1(String modelList) {
return null;
}//end greetServer1(String modelList)
}//end class


public void onModuleLoad() {

GreetingServiceAsync greetingServiceAsync = GWT
.create(GreetingService.class);

Model m1 = new Model();
m1.setDesc(Hello);

AsyncCallbackString callback = new AsyncCallbackString() {
public void onFailure(Throwable caught) {
}

public void onSuccess(String result) {
Window.alert(result);
}
};

ArrayListModel modelList = new ArrayListModel();
modelList.add(m1);

greetingServiceAsync.greetServer(modelList, callback);

}//end onModuleLoad


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



RE: How to import samples of GWT into Eclipse

2009-04-19 Thread Ananda

Use the below command line 

projectCreator.cmd -out projectname -eclipse projectName

Cheers,
Ananda 

-Original Message-
From: Google-Web-Toolkit@googlegroups.com
[mailto:google-web-tool...@googlegroups.com] On Behalf Of
spike2...@googlemail.com
Sent: Sunday, April 19, 2009 5:44 PM
To: Google Web Toolkit
Subject: Re: How to import samples of GWT into Eclipse


So what exactly do I have to do?
Where in my Cmdline do i have to go and what do I have to execute to
be able to import the samples as eclipse projects?


--~--~-~--~~~---~--~~
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: JServer - Modular to build GWT and SOA applications

2009-04-19 Thread Rauf

The SOAFaces framework itself does not support or care about on-the-
fly GWT compiling. This is a feature of JServer which leverages
SOAFaces to deploy and manage modular and component packagable GWT/SOA
applications. JServer lets you do both, you can compile your GWT code
the usual way and deploy it to the JServer's webserver or you can
leave it in java byte code and let JServer compile it using its GWT
compiler. The main advantage of the on-the-fly GWT compiling is that
if you upgrade your JServer version for example and it is now using
GWT 1.6 (instead of GWT 1.5) you would not need to recompile your
SOAFaces application and redeploy them again, JServer would detect
that the GWT libraries are 1.6 and would recompile the SOAFaces
applications to javascript automatically.

Note, that SOAFaces itself can be used in any web application and can
be used directly as part of any GWT application. The framework is made
up of several key features that can be used separate from each other
(very modular design). The no RPC feature along with the remote
invokation of POJO objects (and ability to return/send JSON and POJO
objects) makes using GWT a real convienence.

-Rauf

On Apr 17, 10:55 pm, Vitali Lovich vlov...@gmail.com wrote:
 The soafaces thing is so cool.  POJO access w/ no RPC - why oh why
 didn't I know about this 2 months ago.

 What's the benefit of using the on-the-fly GWT compiler?  When would
 you ever need to deploy a change to the code like that as opposed to
 compiling it traditionally  simply replacing the resources.

 On Fri, Apr 17, 2009 at 7:52 PM, Rauf grandlo...@gmail.com wrote:

  New release ofJServerwhich supports bulding GWT and SOA powered
  applications using no RPC. Deploy your GWT applications as modular
  components with access to full SOA environment.

 JServeralso includes a unique On-The-Fly GWT compiler that will
  compile your GWT application into javascript on the fly - very cool
  feature.JServeris based on the open source framework SOAFaces.

 JServeravailable for free!
 http://grandlogic.blogspot.com/2009/04/jserver-now-supports-gwt-and-s...

  Open source framework:
 http://code.google.com/p/soafaces/

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



Re: GWT 1.6 with Maven and build system questions/survey...

2009-04-19 Thread Mark Renouf

The thing I'd not like to lose, is live-edit capability. ie: changes
take effect with a simple page reload in HostedMode (and also Restart
Server button in 1.6).

I think GWT provides enough options to make things work, but it's
harder than it should be. If I had a magic wand though, I'd say having
war dir overlay parameter would make life much simpler. If it could
do this, and still detect changes to the source, that would be sweet.
You'd just set -warOverlay /src/main/webapp -war /target/$
{project.build.finalName} That actually wouldn't effect existing users
one bit. Actually... maybe I should work on a patch and submit it to
GWT, you never know ;-)

On Apr 16, 2:00 pm, Matt Bishop m...@re-entry.ca wrote:
 One of the big wins with Maven is the rigid directory structure,
 where source files of all stripes are in src/ and build outputs are in
 target/. It's good practice because it doesn't allow for intermingling
 source files and build files.

 The new GWT war/ dir next to src/ problematic because you have to be
 careful how you clean up.  I can see many an aaargh! being screamed
 out in the early morning hours when a tired developer discovers a bug
 in her ant script, or when he trashes the war/ dir accidentally.

 I would much rather have seen src/java and src/war (better yet, src/
 webapp) and the HostedMode compiler would copy src/webapp to war/
 before compilation. It would be a whole lot safer and wouldn't really
 cost that much, even for large projects with a whole lotta webapp/**
--~--~-~--~~~---~--~~
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 GWT 1.6...and quite a bit more

2009-04-19 Thread Salvador Diaz

Where should we report bugs found in the Eclipse plugin ?

Thanks in advance,

Salvador

On Apr 10, 8:44 am, Ramas ram...@gmail.com wrote:
 why exclusive support for Eclipse ? For the past few years Netbeans
 became a lot better, than it used to, and there's large developer
 community, too. Can you provide out-of-box support for Netbeans in the
 future ?

 On Apr 8, 6:57 am, Bruce Johnson br...@google.com wrote:

  Hi Folks!

  Exciting news today. Rather than attempting to describe everything here, let
  me point you to some blog posts that hopefully you will find interesting:

  GWT 1.6 and 
  friends:http://googlewebtoolkit.blogspot.com/2009/04/introducing-gwt-16-and-f...

  Seriously this time, the new language on App Engine: 
  Javahttp://googleappengine.blogspot.com/2009/04/seriously-this-time-new-l...

  Google Plugin for Eclipse -- Peanut Butter to Eclipse's 
  Chocolatehttp://googlewebtoolkit.blogspot.com/2009/04/google-plugin-for-eclips...

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



Re: How much slower is PRETTY mode?

2009-04-19 Thread Dobes Vandermeer
Thanks ... that helps a little.
I wanted PRETTY so I could interpret the stack traces that show up in
Firefox - there are various stack traces showing up in customer's machines
that I am now seeing on my development environment.

Also, there's a bug in Safari 4 beta where it can't handle my obfuscated GWT
code since a line gets too long (or something).

So PRETTY would be helpful for these.


On Sat, Apr 18, 2009 at 9:25 PM, Arthur Kalmenson arthur.k...@gmail.comwrote:


 I don't know the exact numbers. But if I remember correctly, during
 Bruce's presentation, Faster-than-Possible Code: Deferred Binding
 with GWT (
 http://sites.google.com/site/io/faster-than-possible-code-deferred-binding-with-gwt
 )
 at Google I/O 2008, he mentioned something about smaller function and
 variable names executing faster then longer names.

 Also, as Vitali said, you're code is going to be rather bloated. We
 were accidentally running one of our apps in PRETTY and found the
 before compression size was 3 MB and after compression was 400kb. When
 we changed to OBF, the before compression size was 500kb and
 compressed was somewhere around 120kb.

 What's the reason that you want to run it as PRETTY? If you want to
 make the functions callable from regular JS, you should take a look at
 Ray Cromwell's excellent GWT Exporter project:
 http://code.google.com/p/gwt-exporter/

 --
 Arthur Kalmenson



 On Sat, Apr 18, 2009 at 1:46 AM, Vitali Lovich vlov...@gmail.com wrote:
 
  I believe that it should be the same performance in terms of
  execution.  You're download times will probably suffer - I wouldn't be
  surprised if the code bloats by 2-3x if not more.
 
  On Fri, Apr 17, 2009 at 11:40 PM, Dobes dob...@gmail.com wrote:
 
  I'm considering deploying a version in PRETTY mode since it may solve
  a Safari 4 issue I'm having and it would also allow me to interpret
  the stack traces produced by Firefox a lot better.
 
  However, I'm wondering what experiences people have had with the
  performance of PRETTY more - how is it?
 
  Thanks in advance,
  Dobes
 
 
  
 
 
  
 

 



-- 

Dobes Vandermeer
Director, Habitsoft Inc.
dob...@habitsoft.com
778-891-2922

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



Re: How much slower is PRETTY mode?

2009-04-19 Thread Dobes Vandermeer
Okay, that's helpful.
Maybe it's worth slowing down the downloads for a while to get some better
insight into some of the errors customers are getting, since it'll allow me
to read the stack traces Firefox includes in the exceptions.


On Sun, Apr 19, 2009 at 1:46 AM, Vitali Lovich vlov...@gmail.com wrote:


 I just listened to the talk - didn't hear him say anything regarding
 performance of long name vs short names.

 The execution difference for smaller names shouldn't exist for the new
 generation of browsers using JIT for javascript (i.e. FF3.5, Safair 4,
 Chrome).

 Even with older browsers, I don't see it being super significant -
 1-2% at most if it's even measurable.  The execution of the javascript
 code by the interpreter should far outweigh the cost of tokenizing the
 input even if you have a 100 character name.  The cost of doing a 100
 byte memcpy should be insignificant compared to all the other stuff
 the interpreter must do.  However, I could be wrong - I haven't tested
 this in any way, so hard numbers from real-world examples would
 probably be best.

 On Sun, Apr 19, 2009 at 12:25 AM, Arthur Kalmenson
 arthur.k...@gmail.com wrote:
 
  I don't know the exact numbers. But if I remember correctly, during
  Bruce's presentation, Faster-than-Possible Code: Deferred Binding
  with GWT (
 http://sites.google.com/site/io/faster-than-possible-code-deferred-binding-with-gwt
 )
  at Google I/O 2008, he mentioned something about smaller function and
  variable names executing faster then longer names.
 
  Also, as Vitali said, you're code is going to be rather bloated. We
  were accidentally running one of our apps in PRETTY and found the
  before compression size was 3 MB and after compression was 400kb. When
  we changed to OBF, the before compression size was 500kb and
  compressed was somewhere around 120kb.
 
  What's the reason that you want to run it as PRETTY? If you want to
  make the functions callable from regular JS, you should take a look at
  Ray Cromwell's excellent GWT Exporter project:
  http://code.google.com/p/gwt-exporter/
 
  --
  Arthur Kalmenson
 
 
 
  On Sat, Apr 18, 2009 at 1:46 AM, Vitali Lovich vlov...@gmail.com
 wrote:
 
  I believe that it should be the same performance in terms of
  execution.  You're download times will probably suffer - I wouldn't be
  surprised if the code bloats by 2-3x if not more.
 
  On Fri, Apr 17, 2009 at 11:40 PM, Dobes dob...@gmail.com wrote:
 
  I'm considering deploying a version in PRETTY mode since it may solve
  a Safari 4 issue I'm having and it would also allow me to interpret
  the stack traces produced by Firefox a lot better.
 
  However, I'm wondering what experiences people have had with the
  performance of PRETTY more - how is it?
 
  Thanks in advance,
  Dobes
 
 
  
 
 
  
 
 
  
 

 



-- 

Dobes Vandermeer
Director, Habitsoft Inc.
dob...@habitsoft.com
778-891-2922

--~--~-~--~~~---~--~~
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: stateful service

2009-04-19 Thread Dave M

Thanks for the reply.  I will definitely look at this for
authentication.  Although this doesn't appear to be the full answer to
my question.  Maybe I just don't understand some fundamental piece.  I
am very familiar with java programming but haven't done too much of
the web stuff.  I am used to rmi iiop, and swing/awt thin clients.
The service will be run on the web server.  Whenever I log in for the
first time using this authentication method, I kick off a thread.  I
want to be able to log out and reconnect the next day and gain control
and monitor that same thread (Timertask) that I started the previous
day.  I am guessing since I kicked the thread off in the Impl (service
running on the web server) class, this thread is running inside of the
web server (tomcat).  Do I have to set up a service on the machine
that my Impl class can connect to using rmi or something.  I didn't
want to do this as it adds an extra layer to the connection so I was
hoping to have just the Impl class with a timertask that I can just
control from the web and it maintains state and continues to run.
When I log out, will the thread be garbage collected or can I log back
into the same object running the thread and control/monitor the same
thread?

Thanks again for any reply.

On Sun, Apr 19, 2009 at 6:32 AM, Vitali Lovich vlov...@gmail.com wrote:
 Depends on who initiates the service.  If it's the other machine (not the
 web server), then in general no, unless you run a custom web server on it
 that will convert resource requests (images or JS scripts only) into
 commands (the authentication information will have to be encoded in the
 names in addition to the commands if you have to have authenticated service)
 .  This is quite complicated.

 If the web server can control the service, then a simple authenticated RPC
 call will suffice.  Don't bother with cookies if you are using RPC.
 http://code.google.com/p/google-web-toolkit/wiki/RpcAuth

 On Sat, Apr 18, 2009 at 11:16 PM, joshmo captainj...@gmail.com wrote:

 What I want to do is log in to an application.  Once logged in, the
 user clicks a button to start a service.  Then the user will remain
 logged in and monitor the service.  The service is used for
 transferring files a different computer to the computer the web server
 is running on.  The web page will update every minute with status of
 server and bandwidth used.  User can log out and log in the next day
 to the same service and continue to monitor the service.

 Is this possible? I have been reading about setting a cookie with a
 session id but I don't know if this is going to work or not.  Does
 anyone know if you can maintain session state with a service and that
 service continues to run in a daemon thread even if the user logs out?

 Thanks for any response.




 


--~--~-~--~~~---~--~~
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: List of GWT Open Source Projects?

2009-04-19 Thread Adligo


Hi,

   I don't know of one, but I think this is a GREAT IDEA!

Here's a list of the stuff I am contributing.

http://cvs.adligo.org/viewvc/
i_util (bootstrap to get code working on j2me, gwt and j2se)
i_log (port of apache commons logging which works on j2me, gwt and
j2se)
adi (registry for j2me, gwt and j2se)
gwt_util (gwt specific bootstrap and a mvc framework)
params (xmlt server side needs sql injection fixes)
adi_gwt_rpc_servlet (serverside rpc specific security)

Cheers,
Scott

On Apr 18, 12:14 pm, William whatr...@gmail.com wrote:
 Does anyone know of a list of GWT Open Source projects?

 I've looked on GitHub and Google Code but I'm wondering if there's a
 directory/list maintained somewhere so that it's easy to see
 everything in one place?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Webservice API for my GWT app running on App Engine

2009-04-19 Thread Gunnar Steinn

Hi,

I'm trying to create a web service API (REST/JAX-RS/something else) on
App Engine for a desktop client. The client will update data in the
DataStore and a GWT app running there will display the data.

I have googled around a lot and haven't found anything that seems to
work.

What do you think is the best solution for me?

BR
Gunnar Steinn

--~--~-~--~~~---~--~~
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: Webservice API for my GWT app running on App Engine

2009-04-19 Thread Salvador Diaz

If you want to expose REST services, you light want to look at:
http://wiki.restlet.org/docs_1.2/13-restlet/252-restlet.html

Hope it helps,

Salvador

On Apr 19, 2:47 pm, Gunnar Steinn gunnarste...@gmail.com wrote:
 Hi,

 I'm trying to create a web service API (REST/JAX-RS/something else) on
 App Engine for a desktop client. The client will update data in the
 DataStore and a GWT app running there will display the data.

 I have googled around a lot and haven't found anything that seems to
 work.

 What do you think is the best solution for me?

 BR
 Gunnar Steinn
--~--~-~--~~~---~--~~
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: Linked jar ok but then ClassNotFound at runtime for class from inside the jar?

2009-04-19 Thread William

Figured it out - runtime classpath problem.

On Apr 19, 5:02 am, Salvador Diaz diaz.salva...@gmail.com wrote:
 Could you post the whole stack trace ?

 On Apr 19, 2:48 am, Chris xop...@gmail.com wrote:

  I added guice.jar to my project which calls various classes in guice.
  Everything compiled fine. But then when I run it, I get a
  ClassNotFound for a class in the guice.jar.

  Any ideas why this would be?

  com.google.apphosting.utils.jetty.JettyLogger warn
  WARNING: failed gwtPostService
  java.lang.NoClassDefFoundError: com/google/inject/Module
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Upgrade 1.5.3 to 1.6.4 - 404 Error

2009-04-19 Thread Danny Schimke

Hi!

I've done the upgrade from GWT 1.5.3 to 1.6.4. I followed the
instructions on the GWT docs.Now I get an 404 Warning in my console
[WARN] 404 - GET /GwtWebapp.html (127.0.0.1) 1400 bytes. And my
hosted- window shows the following:

HTTP ERROR: 404
NOT_FOUND
RequestURI=/GwtWebapp.html

I updated all the things according the docs... Where is the problem, I
have no idea. Hope someone can help

Thanks a lot!
-Danny
--~--~-~--~~~---~--~~
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: Upgrade 1.5.3 to 1.6.4 - 404 Error

2009-04-19 Thread Salvador Diaz

I struggled a great deal of time with the same problem, the problem is
with the new hosted mode, it uses a war folder (defaults to
{projectRoot}/war ) and it expects the host html file to sit there.

Put the logLevel to DEBUG or SPAM to get more details about the hosted
mode inner workings.

Hope it helps, and if it doesn't, report back with your project
structure and the arguments you're passing to the hosted mode.

Cheers,

Salvador

On Apr 19, 7:14 pm, Danny Schimke schimk...@googlemail.com wrote:
 Hi!

 I've done the upgrade from GWT 1.5.3 to 1.6.4. I followed the
 instructions on the GWT docs.Now I get an 404 Warning in my console
 [WARN] 404 - GET /GwtWebapp.html (127.0.0.1) 1400 bytes. And my
 hosted- window shows the following:

 HTTP ERROR: 404
 NOT_FOUND
 RequestURI=/GwtWebapp.html

 I updated all the things according the docs... Where is the problem, I
 have no idea. Hope someone can help

 Thanks a lot!
 -Danny
--~--~-~--~~~---~--~~
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: New to app-engine

2009-04-19 Thread vijay
+GWT users

On Mon, Apr 20, 2009 at 12:14 AM, vijay mymail.vi...@gmail.com wrote:


 Hi All,I am planning to use gwt + appengine to develop and deploy my
 website. I am new to both of this though I completed the installation part
 and getting started tutorial of both of this.
 It would be great if you people can give me some tips and other things I
 should be careful about during the development phase. Actually I see a lot
 of help on GWT and appengine individual usage but there is nothing related
 to using gwt with appengine and at this point i am confused if I am missing
 something,
 Isn't using GWT with AppEngine  productive and popular??

 Regards,
 Vijay


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

2009-04-19 Thread Mamadou Alimou DIALLO
I tried to do that but it's not possible. As doFilter method is overrided,
it can not possible to throw a custom Exception. But please, if you have an
example it will be better for me to send me it.

Thanks in advance
dialloma

2009/4/18 hazy1 matt.egyh...@gmail.com


 Yes, use the GWT RPC classes to return failure or exception to the
 client in the servlet filter.

 On Apr 17, 4:49 am, dialloma malim...@gmail.com wrote:
  Hello group,
 
  I would like to implement the method or class that will be called
  before each GWT-RPC. Is there any method in GWT to do that ?
 
  I was trying to implement J2EE Filter on GWT server side. But when I
  throw Exception in my filter throws Exception but my GWT-RPC call
  return success. Is there any method to force my GWT-RPC call to return
  onFailure method when I throw exception in my filter.
  Thanks
  dialloma
 



-- 
Cordialement,
DIALLO M. Alimou
http://dialloma.blogspot.com/
Cel. 00336 13 39 81 88

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



Class name in unused code aren't removed ?

2009-04-19 Thread Ed

Hi all,

I was having a closer look and noticed (I am using gwt 1.5.2 still)
that a variable and field that isn't used, isn't removed by the
compiler if it has the class name as value.

I did a little test with the following code.
The example  class LabelWidgetFactoryCms contains the following
fields and method:

private final Logger F_TEST1 =  FactoryLogger.getLogger(this.getClass
().getName() + TEST1);
private final Logger F_TEST2 =  FactoryLogger.getLogger(TEST2);
private final String F_TEST3 =  TEST3;
private final Logger F_TEST4 = new Logger(this.getClass().getName() +
TEST4);
private final Logger F_TEST5 = new Logger(TEST5);
private final String F_TEST6 = this.getClass().getName() + TEST6;
private final String F_TEST7 = LabelWidgetFactoryCms.class.getName()
+ TEST;


public Widget createTextWidget(final String key) {
Logger L_TEST1 =  
FactoryLogger.getLogger(this.getClass().getName()
+ TEST1);
Logger L_TEST2 =  FactoryLogger.getLogger(TEST2);
String L_TEST3 =  TEST3;
Logger L_TEST4 = new Logger(this.getClass().getName() + 
TEST4);
Logger L_TEST5 = new Logger(TEST5);
String F_TEST6 = this.getClass().getName() + TEST6;
String F_TEST7 = LabelWidgetFactoryCms.class.getName() + 
TEST7;
return createLabelWidget(findContentItem(key));
}

Note:
- FactoryLogger.getLogger(String) simple returns null.
- Neither the fields or the variables aren't used.


The result of compiler with mode PRETTY is the following:

function $LabelWidgetFactoryCms_0(this$static, formatter,
toolTipProvider){
  getLogger(this$static.getClass$().typeName + 'TEST1');
  this$static.getClass$().typeName + 'TEST4';
  this$static.getClass$().typeName + 'TEST6';
  return this$static;
}

...
function $createTextWidget(this$static, key){
  getLogger(this$static.getClass$().typeName + 'TEST1');
  this$static.getClass$().typeName + 'TEST4';
  this$static.getClass$().typeName + 'TEST6';
  return this$static.createLabelWidget($findContentItem_0(this$static,
key));
}
...


Conclusion:
- An unused field isn't removed when it includes the this class
name.
- An unused variable isn't removed when it included the this class
name.

H interesting especially the difference getClass().getName()
and LabelWidgetFactoryCms.class.getName()
Is this a bug or expected behavior?


-- Ed


--~--~-~--~~~---~--~~
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: I installed the GEP and now...

2009-04-19 Thread Alex Rudnick

Ian,

Which jars did you take off the classpath? The errors you're getting
look like the compile step isn't getting the right jars on its cp.

All you should have to do to use the GWT 1.6.2 SDK is set that under
Google  Web Toolkit in your project's properties; manually changing
the classpath really shouldn't be necessary.

On Sat, Apr 18, 2009 at 6:30 AM, Ian Bambury ianbamb...@gmail.com wrote:
 Well, I took the 1.6.4 SDK out since I'm developing and don't want to find
 any nasty surprises. I added 1.6.2 via the GEP, took the jars off the
 classpath and now the compile gives me the errors below. It compiles from
 hosted mode OK
 No doubt there are plans for the future, but I'm wondering how much use the
 plugin would be to me right at the moment even it it were working.
 It's taken a lot of time to get to this point: it wouldn't download, then
 when it finally did, it wouldn't install, and now it's installed it doesn't
 work. That's probably my fault because I don't know what I'm doing, but
 surely if it worked before installing the plugin, it should work with the
 plugin. It's a valid project.
 Why doesn't it assume that I still want to use the version of the SDK that I
 was using before? Why would anyone want to have a different version, which
 might well have methods removed - even between a release candidate being a
 candidate for release and actually being released?
 Anyway, here's the current state of play.

 Compiling module com.roughian.rxframework.Module
    Refreshing module from source
       Validating newly compiled units
          Removing units with errors
             [ERROR] Errors in
 'file:/D:/work/gwt/workspace/Projects/RXFramework-1.6.1.0/src/com/roughian/rxframework/client/RemoteRequestCallback.java'
                [ERROR] Line 11: No source code is available for type
 com.google.gwt.json.client.JSONObject; did you forget to inherit a required
 module?
             [ERROR] Errors in
 'file:/D:/work/gwt/workspace/Projects/RXFramework-1.6.1.0/src/com/roughian/rxframework/client/RXF.java'
                [ERROR] Line 73: No source code is available for type
 com.google.gwt.json.client.JSONObject; did you forget to inherit a required
 module?
                [ERROR] Line 78: No source code is available for type
 com.google.gwt.json.client.JSONValue; did you forget to inherit a required
 module?
                [ERROR] Line 81: No source code is available for type
 com.google.gwt.json.client.JSONArray; did you forget to inherit a required
 module?
                [ERROR] Line 111: No source code is available for type
 com.google.gwt.json.client.JSONBoolean; did you forget to inherit a required
 module?
                [ERROR] Line 124: No source code is available for type
 com.google.gwt.json.client.JSONParser; did you forget to inherit a required
 module?
                [ERROR] Line 222: No source code is available for type
 com.google.gwt.json.client.JSONNumber; did you forget to inherit a required
 module?
                [ERROR] Line 250: No source code is available for type
 com.google.gwt.json.client.JSONString; did you forget to inherit a required
 module?
          Removing invalidated units
             [WARN] Compilation unit
 'file:/D:/work/gwt/workspace/Projects/RXFramework-1.6.1.0/src/com/roughian/rxframework/client/RemotePageCallback.java'
 is removed due to invalid reference(s):
                [WARN]
 file:/D:/work/gwt/workspace/Projects/RXFramework-1.6.1.0/src/com/roughian/rxframework/client/RemoteRequestCallback.java
                [WARN]
 file:/D:/work/gwt/workspace/Projects/RXFramework-1.6.1.0/src/com/roughian/rxframework/client/RXF.java
             [WARN] Compilation unit
 'file:/D:/work/gwt/workspace/Projects/RXFramework-1.6.1.0/src/com/roughian/rxframework/client/RemoteRequestInfoCallback.java'
 is removed due to invalid reference(s):
                [WARN]
 file:/D:/work/gwt/workspace/Projects/RXFramework-1.6.1.0/src/com/roughian/rxframework/client/RemoteRequestCallback.java
                [WARN]
 file:/D:/work/gwt/workspace/Projects/RXFramework-1.6.1.0/src/com/roughian/rxframework/client/RXF.java
             [WARN] Compilation unit
 'file:/D:/work/gwt/workspace/Projects/RXFramework-1.6.1.0/src/com/roughian/rxframework/client/RemoteRequest.java'
 is removed due to invalid reference(s):
                [WARN]
 file:/D:/work/gwt/workspace/Projects/RXFramework-1.6.1.0/src/com/roughian/rxframework/client/RemoteRequestCallback.java
                [WARN]
 file:/D:/work/gwt/workspace/Projects/RXFramework-1.6.1.0/src/com/roughian/rxframework/client/RXF.java
             [WARN] Compilation unit
 'file:/D:/work/gwt/workspace/Projects/RXFramework-1.6.1.0/src/com/roughian/rxframework/client/SilentCallback.java'
 is removed due to invalid reference(s):
                [WARN]
 file:/D:/work/gwt/workspace/Projects/RXFramework-1.6.1.0/src/com/roughian/rxframework/client/RemoteRequestCallback.java
                [WARN]
 

Re: GWT best Practices - JS Library Wrappers Overlay Types

2009-04-19 Thread Bobby

One more for the list:

6. When the original JS library contains one or more classes with
methods that receive functions as parameters, what is the best way to
implement these methods? Should there be a generic Function or
Callback class on the GWT side that is used as the function parameter
type? The function that is passed to the JS method may expect to
receive a different number of parameters itself, so one option is to
define the following class in Java:

public class GenericCallback(){
public void Execute(Object[] Parameters){
   ...
}
}

With this approach the following JavaScript method:

function doSomething(myCallback){}

Would be translated to the following in GWT:

public final native void doSomething(GenericCallback myCallback)/*-{
  var cb = function(a, b, c, d, e){
 var pars = [a,b,c,d,e];//something fancier than this
 var jcb = this.handler;
 @jcb.GenericCallback::Execute([Ljava/lang/Object;)(pars);
  }
  cb.handler = myCallback;//or something like this that actually
works
  this.doSomething(cb);
}-*/

I don't like the idea of joining all the parameters in an array or of
having a function in Java receive an object array, but otherwise there
would need to be multiple Execute methods with a different number of
parameters or even multiple Callback classes in Java, each with its
own particular Execute method. This wouldn't be so difficult if i was
generating the code manually.

Here's a concrete example of what i'm talking about:
http://code.google.com/apis/gdata/jsdoc/1.8/google/gdata/Entry.html

This class has methods that receive function callbacks (for example
deleteEntry). If you were trying to auto generate a GWT wrapper for
that class how would you handle the methods that receive Function
parameters? (assuming that we're using Overlay Types for the
wrapping).

Bobby

On Apr 18, 4:24 pm, Bobby bobbysoa...@gmail.com wrote:
 I'm in the process of trying to dynamically generate a GWT wrapper for
 an existing JS library and i have a few questions which come down to
 best practices for the most part.

 1. When wrapping a JS library with GWT, is it recommended to leave the
 namespaces intact? If the JS library and the GWT wrapper library have
 the same namespaces, is there a chance of a conflict where GWT code
 will overwrite the original namespaces of the JS library? (i don't
 think this is the case but i wanted to verify)

 2. If the JS library that's being wrapped around has classes that may
 need to be constructed from the Java side, then are Overlay Types
 automatically out of the question (in which case plain Java wrapper
 classes would be used) or is it better to still use Overlay Types and
 just expose factory methods for doing the job of the constructors?

 3. If the original JS library has classes where fields are commonly
 accessed directly, as opposed to via getters and setters, then is it
 recommended to remain faithful to the original JS library and expose
 the fields without getters/setters (in which case Overlay Types are
 out of the picture) or ignore this aspect of the original JS library
 and expose getters/setters instead.

 4. If the original JS library has a method that has optional
 parameters, for example, myFunc(a, b) where b may be undefined, should
 a single Java method be added, or should multiple overloaded methods
 be used? For example:
 myFunc(a)
 myFunc(a, b)

 5. Should constants be automatically converted to enumerations or
 should they just be left alone?

 If you have some insight on these questions (or any others i missed) i
 would really welcome your input.
--~--~-~--~~~---~--~~
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: New to app-engine

2009-04-19 Thread Salvador Diaz

  Isn't using GWT with AppEngine  productive and popular??

Productive yes, popular I don't think so, as AppEngine has only been
available for a couple of weeks.

 It would be great if you people can give me some tips and other things I
 should be careful about during the development phase

You should read all of the docs very carefully, normally that'll give
you enough guidance. If you encounter any particular problems, ask
here or at the app engine discussion group.

Cheers,

Salvador

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



Third party classes

2009-04-19 Thread venk

Hello all -

I will caveat this post by saying that I am new to GWT and relatively
new to web applications/java, having spent most of my programming
hours in a MS environment (most notably C#). But, I am having the
darnedest time trying to figure out how to do one thing.

I have a .jar of compiled classes (sorry, don't know the right
terminology) that was provided by a vendor, i.e. there is little
chance I will get the original source or get a jar with the source
included. I would like to write a hybrid google-based app that
allows the user to use the classes in that file (assume it is
installed locally on all user machines) but also is deployed using the
google app engine.

I am open to any way in which this can be accomplished. I have thought
I could have a heavy desktop-type app that does the interaction with
the vendor classes in the GAE/GWT framework, but that is proving
difficult. I am using the eclipse IDE with the google plugins. I also
thought maybe I could write a google desktop gadget using GWT to do
the local interaction.

Am I going to be forced to write a local server that serves the
responses to requests for interacting with my vendor classes. Ugh.
Surely there is a better way?

Thanks to all.

-- V

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

2009-04-19 Thread mike177

Hello,
We have built a very large, complex GWT site and it works great in FF,
Chrome, and Safari (and with limited testing we seem to be ok in IE8
too).  IE7, though, is hit or miss.  I originally thought that our
performance issues were all being caused by IE7's poor JS engine, but
I have started to believe that we have a memory leak issue too.  After
upgrading to GWT 1.6 to see if there was anything there that would fix
the problem, I did some testing and found the following results:

IE7
When performing heavy tasks:
* CPU usage :  95-100% (will stick for 10 to 20 seconds sometimes),
* RAM usage :  55% to 70% (most of the time).
* the one trait that is not stereotypical of a memory leak, though, is
that our site does not progressively get worse ultimately resulting in
the browser freezing.  Instead, it gets bad quickly (after 1-2 minutes
of use) and then stays at this poor level until you quit the site.  Go
figure???

All Other Browsers
When performing heavy tasks
* CPU usage : 50-75%
* RAM usage :   50%

So, we seem to have most of the stereotypical indicators of a leak in
IE7 and unfortunately we will have to live with IE7 for another couple
years (not to mention IE6).

Does anyone have any thoughts on how to find, isolate, and fix memory
leaks specific to IE7 in GWT code?

Below are some of the resources I have dug up.  I did not have much
luck looking for GWT specific information so I am leveraging whatever
I can find.

Many thanks for your thoughts and opinions.

Regards,
Mike

--

While these artcles not GWT specific, lots of information can be
gleaned from them:
* http://www.codeproject.com/KB/scripting/leakpatterns.aspx
* http://msdn.microsoft.com/en-us/library/bb250448.aspx

There is a JS memory leak detector for IE here:
* http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx
Of course, this just confirms that you have a leak, which we do.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Class name in unused code aren't removed ?

2009-04-19 Thread Vitali Lovich

I'm not sure if it's a missed optimization, but it seems the compiler
cannot optimize away getClass() for some reason.  If you do
LabelWidgetFactoryCms.class, then it'll optimize it away properly.  I
just checked  this behaviour is present in trunk as well:

public void onModuleLoad() {
   String nothing = this.getClass().getName() + TEST;
}

In the compiled output, we see

function init(){
  !!$stats  $stats({moduleName:$moduleName, subSystem:'startup',
evtGroup:'moduleStartup', millis:(new Date()).getTime(),
type:'onModuleLoadStart', className:'org.gwt.client.Sample'});
  ($Sample(new Sample()) , Lorg_gwt_client_Sample_2_classLit).typeName + 'TEST';
}

but only if I have
private final GreetingServiceAsync greetingService =
GWT.create(GreetingService.class);

declared as a field.  This problem also appears with OBF.

The problem appears to be that the compiler misses the optimization
On Sun, Apr 19, 2009 at 4:02 PM, Ed post2edb...@hotmail.com wrote:

 Hi all,

 I was having a closer look and noticed (I am using gwt 1.5.2 still)
 that a variable and field that isn't used, isn't removed by the
 compiler if it has the class name as value.

 I did a little test with the following code.
 The example  class LabelWidgetFactoryCms contains the following
 fields and method:
 
        private final Logger F_TEST1 =  FactoryLogger.getLogger(this.getClass
 ().getName() + TEST1);
        private final Logger F_TEST2 =  FactoryLogger.getLogger(TEST2);
        private final String F_TEST3 =  TEST3;
        private final Logger F_TEST4 = new Logger(this.getClass().getName() +
 TEST4);
        private final Logger F_TEST5 = new Logger(TEST5);
        private final String F_TEST6 = this.getClass().getName() + TEST6;
        private final String F_TEST7 = LabelWidgetFactoryCms.class.getName()
 + TEST;


        public Widget createTextWidget(final String key) {
                Logger L_TEST1 =  
 FactoryLogger.getLogger(this.getClass().getName()
 + TEST1);
                Logger L_TEST2 =  FactoryLogger.getLogger(TEST2);
                String L_TEST3 =  TEST3;
                Logger L_TEST4 = new Logger(this.getClass().getName() + 
 TEST4);
                Logger L_TEST5 = new Logger(TEST5);
                String F_TEST6 = this.getClass().getName() + TEST6;
                String F_TEST7 = LabelWidgetFactoryCms.class.getName() + 
 TEST7;
                return createLabelWidget(findContentItem(key));
        }
 
 Note:
 - FactoryLogger.getLogger(String) simple returns null.
 - Neither the fields or the variables aren't used.


 The result of compiler with mode PRETTY is the following:
 
 function $LabelWidgetFactoryCms_0(this$static, formatter,
 toolTipProvider){
  getLogger(this$static.getClass$().typeName + 'TEST1');
  this$static.getClass$().typeName + 'TEST4';
  this$static.getClass$().typeName + 'TEST6';
  return this$static;
 }

 ...
 function $createTextWidget(this$static, key){
  getLogger(this$static.getClass$().typeName + 'TEST1');
  this$static.getClass$().typeName + 'TEST4';
  this$static.getClass$().typeName + 'TEST6';
  return this$static.createLabelWidget($findContentItem_0(this$static,
 key));
 }
 ...
 

 Conclusion:
 - An unused field isn't removed when it includes the this class
 name.
 - An unused variable isn't removed when it included the this class
 name.

 H interesting especially the difference getClass().getName()
 and LabelWidgetFactoryCms.class.getName()
 Is this a bug or expected behavior?


 -- Ed


 

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

2009-04-19 Thread Vitali Lovich
You contradict yourself.  A memory leak by definition does not display a
constant memory usage - *the* defining characteristic is that memory used
keeps increasing.  What you are describing is heavy memory usage  it is
consistent across browsers.

Thus you have a problem with your application - either it actually does need
that much memory, or you are doing some caching of objects somewhere and
never freeing that cache.

Without the code for your app or even knowing what it does, all I can
recommend is you first use Firebug to profile your code to find the heavy
CPU usage to track down what exactly is causing it - that might help you
find where you have heavy memory usage.

There's also the $199 tool that claims to be able to profile your JS memory
usage for you (I've never used it  couldn't find any free alternatives
http://www.softwareverify.com/javascript/memory/index.html)

There's a free tool for IE memory leak detection (
http://www.outofhanwell.com/ieleak/index.php?title=Main_Page) but that
probably won't help you as what you have described is not a leak.

On Sun, Apr 19, 2009 at 6:20 PM, mike177 mikeall...@gmail.com wrote:

 Hello,
 We have built a very large, complex GWT site and it works great in FF,
 Chrome, and Safari (and with limited testing we seem to be ok in IE8
 too).  IE7, though, is hit or miss.  I originally thought that our
 performance issues were all being caused by IE7's poor JS engine, but
 I have started to believe that we have a memory leak issue too.  After
 upgrading to GWT 1.6 to see if there was anything there that would fix
 the problem, I did some testing and found the following results:

 IE7
 When performing heavy tasks:
 * CPU usage :  95-100% (will stick for 10 to 20 seconds sometimes),
 * RAM usage :  55% to 70% (most of the time).
 * the one trait that is not stereotypical of a memory leak, though, is
 that our site does not progressively get worse ultimately resulting in
 the browser freezing.  Instead, it gets bad quickly (after 1-2 minutes
 of use) and then stays at this poor level until you quit the site.  Go
 figure???

 All Other Browsers
 When performing heavy tasks
 * CPU usage : 50-75%
 * RAM usage :   50%

 So, we seem to have most of the stereotypical indicators of a leak in
 IE7 and unfortunately we will have to live with IE7 for another couple
 years (not to mention IE6).

 Does anyone have any thoughts on how to find, isolate, and fix memory
 leaks specific to IE7 in GWT code?

 Below are some of the resources I have dug up.  I did not have much
 luck looking for GWT specific information so I am leveraging whatever
 I can find.

 Many thanks for your thoughts and opinions.

 Regards,
 Mike

 --

 While these artcles not GWT specific, lots of information can be
 gleaned from them:
 * http://www.codeproject.com/KB/scripting/leakpatterns.aspx
 * http://msdn.microsoft.com/en-us/library/bb250448.aspx

 There is a JS memory leak detector for IE here:
 * http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx
 Of course, this just confirms that you have a leak, which we do.
 


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



Re: GWT best Practices - JS Library Wrappers Overlay Types

2009-04-19 Thread Thomas Broyer



On 18 avr, 22:24, Bobby bobbysoa...@gmail.com wrote:
 I'm in the process of trying to dynamically generate a GWT wrapper for
 an existing JS library and i have a few questions which come down to
 best practices for the most part.

 1. When wrapping a JS library with GWT, is it recommended to leave the
 namespaces intact? If the JS library and the GWT wrapper library have
 the same namespaces, is there a chance of a conflict where GWT code
 will overwrite the original namespaces of the JS library? (i don't
 think this is the case but i wanted to verify)

There's no notion of namespaces in the Javascript code resulting
from GWT compilation (actually, there's no notion of namespaces in
JavaScript either, at all, but that's just a problem of vocabulary).
Even when compiling in -style PRETTY or DETAILED, GWT shouldn't
override/shadow any JavaScript variable defined outside the GWT code
(everything's initialized in a closure to not polute the global scope,
and in JSNI you should use $wnd.XXX to access a variable called XXX
defined in the global namespace, so...)

 2. If the JS library that's being wrapped around has classes that may
 need to be constructed from the Java side, then are Overlay Types
 automatically out of the question (in which case plain Java wrapper
 classes would be used) or is it better to still use Overlay Types and
 just expose factory methods for doing the job of the constructors?

Overlay types have no overhead, at all, compared to wrapper classes,
so prefer overlay types and static factory methods.

 3. If the original JS library has classes where fields are commonly
 accessed directly, as opposed to via getters and setters, then is it
 recommended to remain faithful to the original JS library and expose
 the fields without getters/setters (in which case Overlay Types are
 out of the picture) or ignore this aspect of the original JS library
 and expose getters/setters instead.

See answer to 2; yes, use getters/setters in Java overlay types, I
repeat: there's no overhead implied!

 4. If the original JS library has a method that has optional
 parameters, for example, myFunc(a, b) where b may be undefined, should
 a single Java method be added, or should multiple overloaded methods
 be used? For example:
 myFunc(a)
 myFunc(a, b)

You can use overloads.

 5. Should constants be automatically converted to enumerations or
 should they just be left alone?

As you like. There are many ways to map JS constants to GWT Java; all
imply an overhead, except if you hard-code the constant value as a
constant Java field, or if you provide a static getter method that
returns the JS constant using JSNI.

 If you have some insight on these questions (or any others i missed) i
 would really welcome your input.


On 19 avr, 22:42, Bobby bobbysoa...@gmail.com wrote:
 One more for the list:

 6. When the original JS library contains one or more classes with
 methods that receive functions as parameters, what is the best way to
 implement these methods? Should there be a generic Function or
 Callback class on the GWT side that is used as the function parameter
 type?

Functions are not a first-class citizen in Java, so you have to use
interfaces or abstract classes or... and in your JSNI code, pass a
function as the argument that will call back the... callback ;-)

I wouldn't use a generic Callback interface though. One of the
advantages of working with Java is static typing: if you use specific
interfaces, your IDE will flag an error if you pass an erroneous such
callback instance as an argument to a method (and now that the Google
Plugin for Eclipse checks the JSNI code as well and allows for
autocompletion there, there really is not reason not to do it; apart
for the fear of the overhead implied by adding such an interface --
very minor, compared to the number of classes implementing those
interfaces, and probably quickly overweighted by the additional checks
that you'd have to make in your callback instances)

 The function that is passed to the JS method may expect to
 receive a different number of parameters itself, so one option is to
 define the following class in Java:

 public class GenericCallback(){
 public void Execute(Object[] Parameters){
...
 }

 }

 With this approach the following JavaScript method:

 function doSomething(myCallback){}

 Would be translated to the following in GWT:

 public final native void doSomething(GenericCallback myCallback)/*-{
   var cb = function(a, b, c, d, e){
  var pars = [a,b,c,d,e];//something fancier than this
  var jcb = this.handler;
  @jcb.GenericCallback::Execute([Ljava/lang/Object;)(pars);
   }
   cb.handler = myCallback;//or something like this that actually
 works
   this.doSomething(cb);

 }-*/

public final native void doSomething(GenericCallback myCallback)/*-{
var that = this;
this.doSomething(function(a, b, c, d, e) {

Re: How much slower is PRETTY mode?

2009-04-19 Thread John Gunther

A while back I was doing some performance tests and my recollection
was, for that application, in FF2, it was something like 10% slower in
PRETTY. This was with GWT 1.4. Not a lot, but just enough that I
decided not to performance test in PRETTY.

(The big performance impact in FF2 is if Firebug is completely
disabled or not. Firebug must be completely disabled (via Tools/
Addons) with a FF restart to get the real numbers (plus just about
everything looks like it has a memory leak with Firebug on))

John

On Apr 19, 10:20 am, Dobes Vandermeer dob...@gmail.com wrote:
 Okay, that's helpful.
 Maybe it's worth slowing down the downloads for a while to get some better
 insight into some of the errors customers are getting, since it'll allow me
 to read the stack traces Firefox includes in the exceptions.



 On Sun, Apr 19, 2009 at 1:46 AM, Vitali Lovich vlov...@gmail.com wrote:

  I just listened to the talk - didn't hear him say anything regarding
  performance of long name vs short names.

  The execution difference for smaller names shouldn't exist for the new
  generation of browsers using JIT for javascript (i.e. FF3.5, Safair 4,
  Chrome).

  Even with older browsers, I don't see it being super significant -
  1-2% at most if it's even measurable.  The execution of the javascript
  code by the interpreter should far outweigh the cost of tokenizing the
  input even if you have a 100 character name.  The cost of doing a 100
  byte memcpy should be insignificant compared to all the other stuff
  the interpreter must do.  However, I could be wrong - I haven't tested
  this in any way, so hard numbers from real-world examples would
  probably be best.

  On Sun, Apr 19, 2009 at 12:25 AM, Arthur Kalmenson
  arthur.k...@gmail.com wrote:

   I don't know the exact numbers. But if I remember correctly, during
   Bruce's presentation, Faster-than-Possible Code: Deferred Binding
   with GWT (
 http://sites.google.com/site/io/faster-than-possible-code-deferred-bi...
  )
   at Google I/O 2008, he mentioned something about smaller function and
   variable names executing faster then longer names.

   Also, as Vitali said, you're code is going to be rather bloated. We
   were accidentally running one of our apps in PRETTY and found the
   before compression size was 3 MB and after compression was 400kb. When
   we changed to OBF, the before compression size was 500kb and
   compressed was somewhere around 120kb.

   What's the reason that you want to run it as PRETTY? If you want to
   make the functions callable from regular JS, you should take a look at
   Ray Cromwell's excellent GWT Exporter project:
  http://code.google.com/p/gwt-exporter/

   --
   Arthur Kalmenson

   On Sat, Apr 18, 2009 at 1:46 AM, Vitali Lovich vlov...@gmail.com
  wrote:

   I believe that it should be the same performance in terms of
   execution.  You're download times will probably suffer - I wouldn't be
   surprised if the code bloats by 2-3x if not more.

   On Fri, Apr 17, 2009 at 11:40 PM, Dobes dob...@gmail.com wrote:

   I'm considering deploying a version in PRETTY mode since it may solve
   a Safari 4 issue I'm having and it would also allow me to interpret
   the stack traces produced by Firefox a lot better.

   However, I'm wondering what experiences people have had with the
   performance of PRETTY more - how is it?

   Thanks in advance,
   Dobes

 --

 Dobes Vandermeer
 Director, Habitsoft Inc.
 dob...@habitsoft.com
 778-891-2922
--~--~-~--~~~---~--~~
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: Easiest way to package a library with optional features requiring a sub-library?

2009-04-19 Thread Thomas Broyer



On 18 avr, 07:42, John Gunther johncurtisgunt...@yahoo.com wrote:
 Thanks for the great info, sorry I didn't see your reply till now.

 I think your first idea would not work in my case because I would have
 to have code that referenced the optional module even if they didn't
 use it (there are if (usingOptionModule) do this by invoking its
 methods otherwise do something else kinds of constructs in there) So
 they would always have to include the module anyway, or the compiler
 would complain about the method invocations not being defined?

Right.

 I've never used deferred binding before (except what GWT does
 automatically) but had begun to read up on it (Hanson and Tacy's GWT
 in Action and Dewsbury's Google Web Toolkit Applications both cover
 it) after making my post. Your set-property variant seems like it
 would be the nicest for users. I've never compiled anything that had
 multiple variants (say for different browsers) but where I only had
 selected a single one of them...I've always just let GWT crank out all
 the various permutations. The compiler won't complain that the code
 for actually implementing the value=true option isn't available if I
 only actually use the value=false setting?

It won't.

 It just grabs the replace-
 with I actually selected for and ignores the other ones..does not
 attempt to verify that my module is correct regardless of the
 specific property setting some specific user may have selected?

No, it only compiles (and checks) what you tell it to compile. (maybe
the -validateOnly would do it, but wouldn't bet on it)

 BUT...how can it know before it gets used which properties will be
 specified, so it seems that it must check that all the code for any
 permutation is available, since a module that has a true option and
 associated replace-withs has to provide the code to implement that
 option, too, since someone might use it with true.

If you call the compiler, it means you're compiling an application, so
checking other permutations would be useless (woudl take time without
any impact on the output; would you like the compiler throwing an
error for something you're actually not compiling?). The compiler
doesn't know about libraries.

 That implies I
 somehow have to physically bundle the optional module with my module,

No.

 So what I am leaning towards now is defining an ordinary Java
 interface (IOptionalLibraryObjectFactory) that creates instances of
 the optional library's objects that users of the optional library must
 implement (I tried this, and it does work). If they don't implement
 it, there are no refs to the optional library and I compile without
 error. Problem with this approach (at least the way I've tried it) is
 users end up having to add a good deal of boilerplate Java code to use
 the optional library.

Try the deferred-binding way and judge by yourself ;-)

 If you check out chapter 10 of Google Web Toolkit Applications there
 is an example there that maybe would do everything I'd need, but it
 involves actually generating the said boilerplate automatically via
 putting stuff in the rebind folder, generate-with clauses, etc. and
 that just seemed like too much work...if it's that hard maybe wiser to
 make the users of my library paste in their own boilerplate and
 concentrate on just making it easy for them to grab that boilerplate?

Using simple replace-with deferred bindings as I proposed is much
simpler and less error-prone thatn generating code that's probably not
needed...
(just replace your if(useOptionalModule) structures with 2 classes
(the one using the useOptionalModule could eventually inherit the
other) and a replace-with rule; if the class to be split is public,
refactor to use a helper internal class and split that one, so that
your users won't have to use GWT.create())
For best performances, your internal helper classes should be
singletons (private static class, instantiated once only in a private
static final field); the compiler should then inline the helper's
methods and your helper's class won't exist at all in the compiled JS.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT best Practices - JS Library Wrappers Overlay Types

2009-04-19 Thread Bobby

Thomas, thanks for the reply that's what i wanted to hear for
questions 1, 2, 3 and 4.

While i have your attention, on #5 and constants Vs enumerations - I
won't know the value of the constants at the time of generating the
wrapper (i think that even if i did i would still rather not have them
hard coded in the wrapper class). This means that i can't have JS
constants become static final fields in the Java class. I guess in the
worst case i could have a single JSNI method for retrieving the value
of a given constant, given the name, or one JSNI method per constant,
but Enums would be much more developer friendly.

Just to put things into context, here's a class that defines some
constants:
http://code.google.com/apis/gdata/jsdoc/1.8/google/gdata/Im.html

Right now, using enums, this is the GWT wrapper that the generator
would yield:

[code]
package google.gdata;
public class Im extends com.google.gwt.core.client.JavaScriptObject {
public final native String getAddress() /*-{ return this.getAddress
(); }-*/;
public final native String getLabel() /*-{ return this.getLabel(); }-
*/;
public final native boolean getPrimary() /*-{ return this.getPrimary
(); }-*/;
public final native String getProtocol() /*-{ return this.getProtocol
(); }-*/;
public final native String getRel() /*-{ return this.getRel(); }-*/;
public final native void setAddress(String address) /*-{ return
this.setAddress(address); }-*/;
public final native void setLabel(String label) /*-{ return
this.setLabel(label); }-*/;
public final native void setPrimary(boolean primary) /*-{ return
this.setPrimary(primary); }-*/;
public final native void setProtocol(String protocol) /*-{ return
this.setProtocol(protocol); }-*/;
public final native void setRel(String rel) /*-{ return this.setRel
(rel); }-*/;

public static enum Constants {
PROTOCOL_AIM (PROTOCOL_AIM),
PROTOCOL_GOOGLE_TALK (PROTOCOL_GOOGLE_TALK),
PROTOCOL_ICQ (PROTOCOL_ICQ),
PROTOCOL_JABBER (PROTOCOL_JABBER),
PROTOCOL_MSN (PROTOCOL_MSN),
PROTOCOL_QQ (PROTOCOL_QQ),
PROTOCOL_SKYPE (PROTOCOL_SKYPE),
PROTOCOL_YAHOO (PROTOCOL_YAHOO),
REL_HOME (REL_HOME),
REL_OTHER (REL_OTHER),
REL_WORK (REL_WORK);
private final String name;
Constants(String name) {
this.name = name;
}
public String value(){ return getConstantValue(this.name); }
private static native String getConstantValue(String name) /*-
{ return google.gdata.Im[name]; }-*/;
}
}
[/code]

So the class would have an inner enumeration that retrieves the values
via JSNI. Right now i have now idea if this works because i don't know
how GWT handles enums, let alone inner enums in an overlay type.

For #6 and Callbacks, i agree that interfaces are much more developer
friendly, but these would be difficult to dynamically generate (for
example, what would the generator name the interface, whould it reuse
interfaces across different methods?). I don't have to auto-generate
100% of the code, in the end there may always be some manual editing,
but it's a pity.
Right now (without constants) 90% of the generated wrapper for
Google.GData compiles, the callbacks are the missing 10%.

Bobby

On Apr 19, 7:07 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On 18 avr, 22:24, Bobby bobbysoa...@gmail.com wrote:

  I'm in the process of trying to dynamically generate a GWT wrapper for
  an existing JS library and i have a few questions which come down to
  best practices for the most part.

  1. When wrapping a JS library with GWT, is it recommended to leave the
  namespaces intact? If the JS library and the GWT wrapper library have
  the same namespaces, is there a chance of a conflict where GWT code
  will overwrite the original namespaces of the JS library? (i don't
  think this is the case but i wanted to verify)

 There's no notion of namespaces in the Javascript code resulting
 from GWT compilation (actually, there's no notion of namespaces in
 JavaScript either, at all, but that's just a problem of vocabulary).
 Even when compiling in -style PRETTY or DETAILED, GWT shouldn't
 override/shadow any JavaScript variable defined outside the GWT code
 (everything's initialized in a closure to not polute the global scope,
 and in JSNI you should use $wnd.XXX to access a variable called XXX
 defined in the global namespace, so...)

  2. If the JS library that's being wrapped around has classes that may
  need to be constructed from the Java side, then are Overlay Types
  automatically out of the question (in which case plain Java wrapper
  classes would be used) or is it better to still use Overlay Types and
  just expose factory methods for doing the job of the constructors?

 Overlay types have no overhead, at all, compared to 

Re: How much slower is PRETTY mode?

2009-04-19 Thread Vitali Lovich
So wait, even with Firebug disabled in FF2 you saw a 10% hit?

On Sun, Apr 19, 2009 at 7:44 PM, John Gunther
johncurtisgunt...@yahoo.comwrote:


 A while back I was doing some performance tests and my recollection
 was, for that application, in FF2, it was something like 10% slower in
 PRETTY. This was with GWT 1.4. Not a lot, but just enough that I
 decided not to performance test in PRETTY.

 (The big performance impact in FF2 is if Firebug is completely
 disabled or not. Firebug must be completely disabled (via Tools/
 Addons) with a FF restart to get the real numbers (plus just about
 everything looks like it has a memory leak with Firebug on))

 John

 On Apr 19, 10:20 am, Dobes Vandermeer dob...@gmail.com wrote:
  Okay, that's helpful.
  Maybe it's worth slowing down the downloads for a while to get some
 better
  insight into some of the errors customers are getting, since it'll allow
 me
  to read the stack traces Firefox includes in the exceptions.
 
 
 
  On Sun, Apr 19, 2009 at 1:46 AM, Vitali Lovich vlov...@gmail.com
 wrote:
 
   I just listened to the talk - didn't hear him say anything regarding
   performance of long name vs short names.
 
   The execution difference for smaller names shouldn't exist for the new
   generation of browsers using JIT for javascript (i.e. FF3.5, Safair 4,
   Chrome).
 
   Even with older browsers, I don't see it being super significant -
   1-2% at most if it's even measurable.  The execution of the javascript
   code by the interpreter should far outweigh the cost of tokenizing the
   input even if you have a 100 character name.  The cost of doing a 100
   byte memcpy should be insignificant compared to all the other stuff
   the interpreter must do.  However, I could be wrong - I haven't tested
   this in any way, so hard numbers from real-world examples would
   probably be best.
 
   On Sun, Apr 19, 2009 at 12:25 AM, Arthur Kalmenson
   arthur.k...@gmail.com wrote:
 
I don't know the exact numbers. But if I remember correctly, during
Bruce's presentation, Faster-than-Possible Code: Deferred Binding
with GWT (
  http://sites.google.com/site/io/faster-than-possible-code-deferred-bi.
 ..
   )
at Google I/O 2008, he mentioned something about smaller function and
variable names executing faster then longer names.
 
Also, as Vitali said, you're code is going to be rather bloated. We
were accidentally running one of our apps in PRETTY and found the
before compression size was 3 MB and after compression was 400kb.
 When
we changed to OBF, the before compression size was 500kb and
compressed was somewhere around 120kb.
 
What's the reason that you want to run it as PRETTY? If you want to
make the functions callable from regular JS, you should take a look
 at
Ray Cromwell's excellent GWT Exporter project:
   http://code.google.com/p/gwt-exporter/
 
--
Arthur Kalmenson
 
On Sat, Apr 18, 2009 at 1:46 AM, Vitali Lovich vlov...@gmail.com
   wrote:
 
I believe that it should be the same performance in terms of
execution.  You're download times will probably suffer - I wouldn't
 be
surprised if the code bloats by 2-3x if not more.
 
On Fri, Apr 17, 2009 at 11:40 PM, Dobes dob...@gmail.com wrote:
 
I'm considering deploying a version in PRETTY mode since it may
 solve
a Safari 4 issue I'm having and it would also allow me to interpret
the stack traces produced by Firefox a lot better.
 
However, I'm wondering what experiences people have had with the
performance of PRETTY more - how is it?
 
Thanks in advance,
Dobes
 
  --
 
  Dobes Vandermeer
  Director, Habitsoft Inc.
  dob...@habitsoft.com
  778-891-2922
 


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



Re: GWT best Practices - JS Library Wrappers Overlay Types

2009-04-19 Thread Thomas Broyer



On 20 avr, 01:47, Bobby bobbysoa...@gmail.com wrote:

 While i have your attention, on #5 and constants Vs enumerations - I
 won't know the value of the constants at the time of generating the
 wrapper (i think that even if i did i would still rather not have them
 hard coded in the wrapper class). This means that i can't have JS
 constants become static final fields in the Java class. I guess in the
 worst case i could have a single JSNI method for retrieving the value
 of a given constant, given the name, or one JSNI method per constant,
 but Enums would be much more developer friendly.

There has been some news recently about enums in GWT:
http://code.google.com/p/google-web-toolkit/wiki/EnumOptimizations
http://timepedia.blogspot.com/2009/04/gwts-type-system-is-more-powerful-than.html

 Just to put things into context, here's a class that defines some
 constants:http://code.google.com/apis/gdata/jsdoc/1.8/google/gdata/Im.html

 Right now, using enums, this is the GWT wrapper that the generator
 would yield:

 [code]
 package google.gdata;
 public class Im extends com.google.gwt.core.client.JavaScriptObject {
         public final native String getAddress() /*-{ return this.getAddress
 (); }-*/;

Er, shouldn't it instead be:
public final native String getAddress() /*-{ return this.address; }-
*/;

         public final native String getLabel() /*-{ return this.getLabel(); }-
 */;
         public final native boolean getPrimary() /*-{ return this.getPrimary
 (); }-*/;
         public final native String getProtocol() /*-{ return this.getProtocol
 (); }-*/;
         public final native String getRel() /*-{ return this.getRel(); }-*/;
         public final native void setAddress(String address) /*-{ return
 this.setAddress(address); }-*/;

This return is not necessary.

         public final native void setLabel(String label) /*-{ return
 this.setLabel(label); }-*/;
         public final native void setPrimary(boolean primary) /*-{ return
 this.setPrimary(primary); }-*/;
         public final native void setProtocol(String protocol) /*-{ return
 this.setProtocol(protocol); }-*/;
         public final native void setRel(String rel) /*-{ return this.setRel
 (rel); }-*/;

         public static enum Constants {
                 PROTOCOL_AIM (PROTOCOL_AIM),
                 PROTOCOL_GOOGLE_TALK (PROTOCOL_GOOGLE_TALK),
                 PROTOCOL_ICQ (PROTOCOL_ICQ),
                 PROTOCOL_JABBER (PROTOCOL_JABBER),
                 PROTOCOL_MSN (PROTOCOL_MSN),
                 PROTOCOL_QQ (PROTOCOL_QQ),
                 PROTOCOL_SKYPE (PROTOCOL_SKYPE),
                 PROTOCOL_YAHOO (PROTOCOL_YAHOO),
                 REL_HOME (REL_HOME),
                 REL_OTHER (REL_OTHER),
                 REL_WORK (REL_WORK);
             private final String name;
             Constants(String name) {
                 this.name = name;
             }
 public String value(){ return getConstantValue(this.name); }

If the enum's value is the same, I'd rather not use this private
field, and instead use name():
public String value() { return getConstantValue(this.name()); }

You could also probably initialize a static map (or at least keep a
reference to the google.gdata.Im object) for slight better perfs:

private static final jso;

static {
   jso = initJso();
}
private static native JavaScriptObject initJso() /*-{ return
google.gdata.Im; }-*/;

private static native String getConstantValue(JavaScriptObject map,
String name) /*-{
return map[name];
}-*/;

 So the class would have an inner enumeration that retrieves the values
 via JSNI. Right now i have now idea if this works because i don't know
 how GWT handles enums, let alone inner enums in an overlay type.

I'm almost sure it would work.

In this particlar case, I wouldn't use an enum though, as these
constants are only sample values (common values). And I would use
true Java constants too.
(FYI, the GData Java Client use constants for these:
http://code.google.com/intl/fr-FR/apis/gdata/javadoc/com/google/gdata/data/extensions/Im.html
)

An example using an enum:
http://code.google.com/p/gwt-in-the-air/source/browse/trunk/src/net/ltgt/gwt/air/core/client/html/HTMLLoader.java
http://code.google.com/p/gwt-in-the-air/source/browse/trunk/src/net/ltgt/gwt/air/core/client/html/HTMLPDFCapability.java

An example using just constants:
http://code.google.com/p/gwt-in-the-air/source/browse/trunk/src/net/ltgt/gwt/air/core/client/events/Event.java

 For #6 and Callbacks, i agree that interfaces are much more developer
 friendly, but these would be difficult to dynamically generate (for
 example, what would the generator name the interface, whould it reuse
 interfaces across different methods?).

After a quick scan of the GData Java client API, there doesn't seem to
be much callbacks, so in the JS API most if not all callbacks should
be due to its async nature, thus are likely to be a pair of (function
(Object) continuation, function(Error) opt_errorHandler), 

what's wrong here?

2009-04-19 Thread Alex Luya

No exception,no output,that is strange
-
package com.tsolution.crm.client;

public class Model
{
   private String desc;
  
public String getDesc()
{
return desc;
}
public void setDesc(String desc)
{
this.desc = desc;
}

}

-
.
public void onModuleLoad()
{
Model m1 = new Model();
m1.setDesc(Hello);
  
AsyncCallbackString callback=new AsyncCallbackString(){
public void onFailure(Throwable caught)
{
}

public void onSuccess(String result)
{
Window.alert(result);
}
};
   
ArrayListModel modelList=new ArrayListModel();
modelList.add(m1);
  
loginService.greetServer(modelList, callback);
}


--
package com.tsolution.crm.client;

import java.util.ArrayList;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;


@RemoteServiceRelativePath(greet)
public interface GreetingService extends RemoteService {
  String greetServer(ArrayListModel modelList);
  String greetServer1(String modelList);
}
---
package com.tsolution.crm.client;
import java.util.ArrayList;
import com.google.gwt.user.client.rpc.AsyncCallback;

public interface GreetingServiceAsync {
  void greetServer(ArrayListModel modelList, AsyncCallbackString 
callback);
}
-
package com.tsolution.crm.server;

import java.util.ArrayList;
import com.tsolution.crm.client.GreetingService;
import com.tsolution.crm.client.Model;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class GreetingServiceImpl extends RemoteServiceServlet implements
GreetingService
{

public String greetServer(ArrayListModel modelList)
{
return modelList.get(0).getDesc();
}
 
}


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



Is it possible to resize the viewport of the Image

2009-04-19 Thread Yifan

If I have the following code:

image = new Image(url);
image.setVisibleRect( a, b, c, d);

is it possible that I can resize the area to 2c X 2d which will
enlarge the picture in the viewport?

--~--~-~--~~~---~--~~
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: Is it possible to resize the viewport of the Image

2009-04-19 Thread Vitali Lovich
image.setPixelSize(2*c, 2*d + px).  I'm not sure how if that does or does
not interfere with visible rect - you'll have to test that out.

On Sun, Apr 19, 2009 at 6:56 PM, Yifan heavens...@gmail.com wrote:


 If I have the following code:

 image = new Image(url);
 image.setVisibleRect( a, b, c, d);

 is it possible that I can resize the area to 2c X 2d which will
 enlarge the picture in the viewport?

 


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



Re: How much slower is PRETTY mode?

2009-04-19 Thread Dobes Vandermeer
I've turned PRETTY on and one thing I have noticed is that it increases my
compile times by about 20%-25% - from 430 seconds to ~ 570, which sucks.
 But I guess 7 minutes to 9 isn't that bad - once I passed the 5 minute mark
I leaned to go surf the web while I wait .. :-/

On Sun, Apr 19, 2009 at 4:54 PM, Vitali Lovich vlov...@gmail.com wrote:

 So wait, even with Firebug disabled in FF2 you saw a 10% hit?


 On Sun, Apr 19, 2009 at 7:44 PM, John Gunther johncurtisgunt...@yahoo.com
  wrote:


 A while back I was doing some performance tests and my recollection
 was, for that application, in FF2, it was something like 10% slower in
 PRETTY. This was with GWT 1.4. Not a lot, but just enough that I
 decided not to performance test in PRETTY.

 (The big performance impact in FF2 is if Firebug is completely
 disabled or not. Firebug must be completely disabled (via Tools/
 Addons) with a FF restart to get the real numbers (plus just about
 everything looks like it has a memory leak with Firebug on))

 John

 On Apr 19, 10:20 am, Dobes Vandermeer dob...@gmail.com wrote:
  Okay, that's helpful.
  Maybe it's worth slowing down the downloads for a while to get some
 better
  insight into some of the errors customers are getting, since it'll allow
 me
  to read the stack traces Firefox includes in the exceptions.
 
 
 
  On Sun, Apr 19, 2009 at 1:46 AM, Vitali Lovich vlov...@gmail.com
 wrote:
 
   I just listened to the talk - didn't hear him say anything regarding
   performance of long name vs short names.
 
   The execution difference for smaller names shouldn't exist for the new
   generation of browsers using JIT for javascript (i.e. FF3.5, Safair 4,
   Chrome).
 
   Even with older browsers, I don't see it being super significant -
   1-2% at most if it's even measurable.  The execution of the javascript
   code by the interpreter should far outweigh the cost of tokenizing the
   input even if you have a 100 character name.  The cost of doing a 100
   byte memcpy should be insignificant compared to all the other stuff
   the interpreter must do.  However, I could be wrong - I haven't tested
   this in any way, so hard numbers from real-world examples would
   probably be best.
 
   On Sun, Apr 19, 2009 at 12:25 AM, Arthur Kalmenson
   arthur.k...@gmail.com wrote:
 
I don't know the exact numbers. But if I remember correctly, during
Bruce's presentation, Faster-than-Possible Code: Deferred Binding
with GWT (
  http://sites.google.com/site/io/faster-than-possible-code-deferred-bi.
 ..
   )
at Google I/O 2008, he mentioned something about smaller function
 and
variable names executing faster then longer names.
 
Also, as Vitali said, you're code is going to be rather bloated. We
were accidentally running one of our apps in PRETTY and found the
before compression size was 3 MB and after compression was 400kb.
 When
we changed to OBF, the before compression size was 500kb and
compressed was somewhere around 120kb.
 
What's the reason that you want to run it as PRETTY? If you want to
make the functions callable from regular JS, you should take a look
 at
Ray Cromwell's excellent GWT Exporter project:
   http://code.google.com/p/gwt-exporter/
 
--
Arthur Kalmenson
 
On Sat, Apr 18, 2009 at 1:46 AM, Vitali Lovich vlov...@gmail.com
   wrote:
 
I believe that it should be the same performance in terms of
execution.  You're download times will probably suffer - I wouldn't
 be
surprised if the code bloats by 2-3x if not more.
 
On Fri, Apr 17, 2009 at 11:40 PM, Dobes dob...@gmail.com wrote:
 
I'm considering deploying a version in PRETTY mode since it may
 solve
a Safari 4 issue I'm having and it would also allow me to
 interpret
the stack traces produced by Firefox a lot better.
 
However, I'm wondering what experiences people have had with the
performance of PRETTY more - how is it?
 
Thanks in advance,
Dobes
 
  --
 
  Dobes Vandermeer
  Director, Habitsoft Inc.
  dob...@habitsoft.com
  778-891-2922



 



-- 

Dobes Vandermeer
Director, Habitsoft Inc.
dob...@habitsoft.com
778-891-2922

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



Increasing job market demand for GWT?

2009-04-19 Thread rob


My impression from job boards is that demand for GWT is increasing in
the job market.

http://www.indeed.com/jobtrends?q=gwtl=

Does anyone believe this is inaccurate?

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



Re: How much slower is PRETTY mode?

2009-04-19 Thread Arthur Kalmenson

 I just listened to the talk - didn't hear him say anything regarding
 performance of long name vs short names.

Oops, guess it wasn't that one, although that presentation did rock
:P. I watched it a year ago, so my memory is rather vague there.

 Even with older browsers, I don't see it being super significant -
 1-2% at most if it's even measurable.  The execution of the javascript
 code by the interpreter should far outweigh the cost of tokenizing the
 input even if you have a 100 character name.  The cost of doing a 100
 byte memcpy should be insignificant compared to all the other stuff
 the interpreter must do.  However, I could be wrong - I haven't tested
 this in any way, so hard numbers from real-world examples would
 probably be best.

That's true, but any performance gain is good. Anyway, the main
disadvantage of going with PRETTY is that your application ends up
being larger so the initial start up is slower.

--
Arthur Kalmenson



On Sun, Apr 19, 2009 at 4:46 AM, Vitali Lovich vlov...@gmail.com wrote:

 I just listened to the talk - didn't hear him say anything regarding
 performance of long name vs short names.

 The execution difference for smaller names shouldn't exist for the new
 generation of browsers using JIT for javascript (i.e. FF3.5, Safair 4,
 Chrome).

 Even with older browsers, I don't see it being super significant -
 1-2% at most if it's even measurable.  The execution of the javascript
 code by the interpreter should far outweigh the cost of tokenizing the
 input even if you have a 100 character name.  The cost of doing a 100
 byte memcpy should be insignificant compared to all the other stuff
 the interpreter must do.  However, I could be wrong - I haven't tested
 this in any way, so hard numbers from real-world examples would
 probably be best.

 On Sun, Apr 19, 2009 at 12:25 AM, Arthur Kalmenson
 arthur.k...@gmail.com wrote:

 I don't know the exact numbers. But if I remember correctly, during
 Bruce's presentation, Faster-than-Possible Code: Deferred Binding
 with GWT 
 (http://sites.google.com/site/io/faster-than-possible-code-deferred-binding-with-gwt)
 at Google I/O 2008, he mentioned something about smaller function and
 variable names executing faster then longer names.

 Also, as Vitali said, you're code is going to be rather bloated. We
 were accidentally running one of our apps in PRETTY and found the
 before compression size was 3 MB and after compression was 400kb. When
 we changed to OBF, the before compression size was 500kb and
 compressed was somewhere around 120kb.

 What's the reason that you want to run it as PRETTY? If you want to
 make the functions callable from regular JS, you should take a look at
 Ray Cromwell's excellent GWT Exporter project:
 http://code.google.com/p/gwt-exporter/

 --
 Arthur Kalmenson



 On Sat, Apr 18, 2009 at 1:46 AM, Vitali Lovich vlov...@gmail.com wrote:

 I believe that it should be the same performance in terms of
 execution.  You're download times will probably suffer - I wouldn't be
 surprised if the code bloats by 2-3x if not more.

 On Fri, Apr 17, 2009 at 11:40 PM, Dobes dob...@gmail.com wrote:

 I'm considering deploying a version in PRETTY mode since it may solve
 a Safari 4 issue I'm having and it would also allow me to interpret
 the stack traces produced by Firefox a lot better.

 However, I'm wondering what experiences people have had with the
 performance of PRETTY more - how is it?

 Thanks in advance,
 Dobes


 


 


 


 


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



html convert to gwt

2009-04-19 Thread asianCoolz

any tool that can be used to convert html (div tag) into gwt codes ? I
am wondering fast way to convert div codes with css into gwt easily
--~--~-~--~~~---~--~~
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: Does GWT 1.6 break in Safari 4?

2009-04-19 Thread Jason Essington

In Safari 4 I get a javascript error:
 SyntaxError: Expression too deep

Not sure what that is about, but maybe you can compile with -pretty  
and step into it with webinspector?

-jason

On Apr 17, 2009, at 9:39 PM, Dobes Vandermeer wrote:


 I just tried it myself and it is in fact not working for our app.  I
 guess it's something just between my app and Safari 4, though, if
 nobody else is having this issue.

 You can see it for yourself : http://www.clarityaccounting.com/demo
 and launch the demo.  Works in Firefox 3 but not Safari 4.

 A bit more investigation reveals that I'm hitting this problem in
 Safari 4 that was previously reported for WebKit in Adobe AIR:

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


 On Apr 17, 8:34 am, Jason Essington jason.essing...@gmail.com wrote:
 I've been using GWT (both 1.5.3 and 1.6.4) with Safari 4, and haven't
 noticed any issues.

 -jason
 On Apr 16, 2009, at 5:42 PM, Dobes wrote:



 A customer of ours reported that last week (before we uploaded a new
 version based on GWT 1.6) he could use our app in Safari 4 beta, but
 this week the app never finishes loading.  Has anyone else noticed
 problems showing up with Safari 4 beta in GWT 1.6 that were not  
 there
 in GWT 1.5 ?
 


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



Using History, navigation bw pages

2009-04-19 Thread mrfreeze81

I am creating an app, navigating from one page to another using
history. I have a main.html page and I have a div=mainpanel as a
place holder for my GWT panel. My panel has the core features of the
app, some HTML content, etc. When I navigate from one page to another
I use

Rootpanel.get(mainpanel).clear();
Rootpanel.get(mainpanel).add(new NextPanel());

This panel has it's own Html content. When I do a view source, all I
get is mail.html's source.

How do I code such that web bots can pick up the content on my site?
Or how can they (when my site is being searched) look for keywords in
my site to return a search result?

Thanks

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



How to call/response/load Widget from normal Sevlet(Not RPC based)?

2009-04-19 Thread Arun

Hi,

I am developing an application where i came across a situation and now
looking for the solution.

Application Discription:

I developing an application which contains two pages,

1. SubmitDataWidget
It contains two Textboxes, a FileUpload widget and a Button. On click
to button i am going to a servlet and passing data through servlet
(Here i am not using GWT-RPC as it is not supporting file transfering)

2 LoadTreeWidget
   once the process of servlet finish i have go to second page, which
would load a dynamic tree.
   I have created a widget which is performing this task, It is using
GWT-RPC.

In general JSP/Servlet/Struts applications we have Response forward/
sendredirect methods which we use from servlet.

My confusion/delima in this application:

How i should call/response the second widget(LoadTreeWidget) from the
servlet once servlet finsh it's process?

Thanks in advance for your suggestion

Arun.
--~--~-~--~~~---~--~~
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: Does GWT 1.6 break in Safari 4?

2009-04-19 Thread Dobes Vandermeer
Yeah, it's a reported for Adobe AIR and GWT previously, now Safari 4 Beta is
doing the same thing.  Apparently compiling with PRETTY fixes it, but of
course we'd prefer not to deploy the app with PRETTY since the initial
download is so much bigger.

On Sun, Apr 19, 2009 at 9:17 PM, Jason Essington
jason.essing...@gmail.comwrote:


 In Safari 4 I get a javascript error:
 SyntaxError: Expression too deep

 Not sure what that is about, but maybe you can compile with -pretty
 and step into it with webinspector?

 -jason

 On Apr 17, 2009, at 9:39 PM, Dobes Vandermeer wrote:

 
  I just tried it myself and it is in fact not working for our app.  I
  guess it's something just between my app and Safari 4, though, if
  nobody else is having this issue.
 
  You can see it for yourself : http://www.clarityaccounting.com/demo
  and launch the demo.  Works in Firefox 3 but not Safari 4.
 
  A bit more investigation reveals that I'm hitting this problem in
  Safari 4 that was previously reported for WebKit in Adobe AIR:
 
  http://code.google.com/p/google-web-toolkit/issues/detail?id=3455
 
 
  On Apr 17, 8:34 am, Jason Essington jason.essing...@gmail.com wrote:
  I've been using GWT (both 1.5.3 and 1.6.4) with Safari 4, and haven't
  noticed any issues.
 
  -jason
  On Apr 16, 2009, at 5:42 PM, Dobes wrote:
 
 
 
  A customer of ours reported that last week (before we uploaded a new
  version based on GWT 1.6) he could use our app in Safari 4 beta, but
  this week the app never finishes loading.  Has anyone else noticed
  problems showing up with Safari 4 beta in GWT 1.6 that were not
  there
  in GWT 1.5 ?
  


 



-- 

Dobes Vandermeer
Director, Habitsoft Inc.
dob...@habitsoft.com
778-891-2922

--~--~-~--~~~---~--~~
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: what's wrong here?

2009-04-19 Thread Alex Luya

That is it,Sorry,I forgot it .
Vagner Araujo a écrit :
 Hi friends,

 try now.


 package com.tsolution.crm.client;

 import java.io.Serializable;


 public class Model implements Serializable {

   private static final long serialVersionUID = 5693662550097196303L;

   private String desc;

   public String getDesc() {
   return desc;
   }//end getDesc

   public void setDesc(String desc) {
   this.desc = desc;
   }//end setDesc

 }//end class


 //SERVICE CLASS

 package com.tsolution.crm.client;

 import java.util.ArrayList;
 import com.google.gwt.user.client.rpc.RemoteService;
 import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;


 @RemoteServiceRelativePath(greet)
 public interface GreetingService extends RemoteService {
  String greetServer(ArrayListModel modelList);
  String greetServer1(String modelList);
 }//end interface


 package com.tsolution.crm.client;
 import java.util.ArrayList;
 import com.google.gwt.user.client.rpc.AsyncCallback;

 public interface GreetingServiceAsync {

   void greetServer(ArrayListModel modelList, AsyncCallbackString
   callback);

   void greetServer1(String modelList, AsyncCallbackString
 asyncCallback);
 }//end interface



 package com.tsolution.crm.server;

 import java.util.ArrayList;
 import com.tsolution.crm.client.GreetingService;
 import com.tsolution.crm.client.Model;
 import com.google.gwt.user.server.rpc.RemoteServiceServlet;

 public class GreetingServiceImpl extends RemoteServiceServlet
 implements
 GreetingService {

   private static final long serialVersionUID = 1L;

   @Override
   public String greetServer(ArrayListModel modelList) {
   return modelList.get(0).getDesc();
   }//end greetServer(ArrayListModel modelList)

   @Override
   public String greetServer1(String modelList) {
   return null;
   }//end greetServer1(String modelList)
 }//end class


 public void onModuleLoad() {

   GreetingServiceAsync greetingServiceAsync = GWT
   .create(GreetingService.class);

   Model m1 = new Model();
   m1.setDesc(Hello);

   AsyncCallbackString callback = new AsyncCallbackString() {
   public void onFailure(Throwable caught) {
   }

   public void onSuccess(String result) {
   Window.alert(result);
   }
   };

   ArrayListModel modelList = new ArrayListModel();
   modelList.add(m1);

   greetingServiceAsync.greetServer(modelList, callback);

 }//end onModuleLoad


 Vagner Araujo
 Java + Vagner = Javagner
 

   


--~--~-~--~~~---~--~~
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: send request data to php with requestbuilder

2009-04-19 Thread Ikon

I am very sorry, it was my fault. I had a little trouble with caching
and the pages didn't refresh as I expected them to.  As a newbe to GWT
I was a bit desperate of not seeing the compiled pages to update. So
this error is a false positive, sorry for that! :(

On Apr 19, 10:30 am, Salvador Diaz diaz.salva...@gmail.com wrote:
 What do you mean they won't work now ?

  Do you have errors we can look at so we can diagnose the problem ? Or
 some sort of analysis of your own ? Have you inspected the requests
 being sent by your GWT client with firebug ? It can tell you if the
 request is fine so you can be sure that it's not a GWT problem.

 Also, make sure that you understand the limitations introduced by the
 Same Origin Policy when trying to communicate with a backend different
 than plain GWT RPC's

 Cheers,

 Salvador

 On Apr 18, 4:27 pm, Ikon vad.vik...@gmail.com wrote:

  I am trying to send some string to a php file and a request data:

  req_builder.sendRequest(test_key=test_value, new RequestCallback()
  {...

  and I wish to access the test_value like $_REQUEST['test_key'] in php.
  Later i wish to send multiple query variables too. I wish to send
  parameters to give it to sql queries.
  I have tried to set the header to setHeader(Content-Type,
  application/x-www-form-urlencoded), but that won't help either. I am
  getting empty $_REQUEST array.

  I wish to receive some working example for GWT 1.6.
  I know there are some 2-3 year examples out there in this group, but
  they won't work now.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Automatic logout feature

2009-04-19 Thread Mark

Hi All;

I earlier requested help in regard tothe above subject but i have
waited in vain.

I am new to GWT and I am working on a data critical application where
security is imperative.

I want to implement an automatic logout feature if the application
does not receive activity for n - minutes

Help out

Mark
--~--~-~--~~~---~--~~
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: New to app-engine

2009-04-19 Thread vijay
Thanks everyone for your replies, I think the situation is more clear to me
now.

On Mon, Apr 20, 2009 at 2:35 AM, Salvador Diaz diaz.salva...@gmail.comwrote:


   Isn't using GWT with AppEngine  productive and popular??

 Productive yes, popular I don't think so, as AppEngine has only been
 available for a couple of weeks.

  It would be great if you people can give me some tips and other things I
  should be careful about during the development phase

 You should read all of the docs very carefully, normally that'll give
 you enough guidance. If you encounter any particular problems, ask
 here or at the app engine discussion group.

 Cheers,

 Salvador

 


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



Making a call to more than one server

2009-04-19 Thread AnaLena

Hi, I'm just starting out with GWT and making my way through the
various tutorials on the subject.

My issue:
Can I make a call to a different server than just my native one with
the classes/language gwt provides? For example, I interact normally
with my server, but want to ask a different server for the time or
current stock values. Or even want to poll more than one server with
the methods I have written in GWT (for example to collect data for a
statistical analysis, server A has this much traffic, server B has
this much traffic).

Is that even possible in GWT or will I have to write javascript code
to make connections to multiple servers? All examples and documention
I found so far seems to assume communication with only one server.

--~--~-~--~~~---~--~~
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: Making a call to more than one server

2009-04-19 Thread AnaLena

Sorry for the newbie question. After a lot of searching I finally got
sent in the right direction. I assume RequestBuilder is what I want?
http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/http/client/RequestBuilder.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
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Patch to add getElementsByClassName support

2009-04-19 Thread Vitali Lovich
Here's my second attempt at the patch (2 of 2 is just a documentation
adjustment).

One caveat I forgot to mention is that there is slightly different
cross-platform behaviour right now.  The native implementations return
NodeLists which are live whereas the Javascript implementations simply
return arrays.

The question is should I change it so that a JsArray is always returned
(i.e. copy the node list into an array) so that semantics are constant
across browsers or leave as is for performance with maybe a caveat that the
user should be careful when using with FF3, Safari 3.1 or Opera 9.5  copy
into an array if they need array semantics?

Changes from first patch:
getElementsByClassName should now display the HTML5 behaviour in quirks mode
if the browser supports the native implementation or doesn't provide XPath
(IE or really really old versions of FF, Safari  friends).  I'm not sure
how to get case insensitive string matching with XPath (so quirks mode won't
work according to the HTML5 spec in FF2, Safari 3, Opera 9.4 or earlier).
Is it even possible to do, or should I just fall back to using the DOM
implementation in quirks mode  make a note that performance could be
improved drastically if quirks mode is turned off on browsers that support
XPath?  Or just leave as is - it'll certainly have the same behaviour as all
the other JS libraries out there.

Only DOMImpl, DOMImplStandard,  DOMImplSafari now require code changes.

DOMImpl: contains a native implementation using DOM.  By default this gets
called.
DOMImplStandard now defines getElementsByXPath.  The fastest approach is
assigned* to getElementsByClassName in the Element prototype  document.
overrides getElementsByClassName
DOMImplSafari: getElementsByXPath calls the native one supplied by
Safari.  I'm assuming that document._getElementsByXPath  document.evaluate
came in with the same version of Safari (the one that implemented
XPath).  If that's not the case, then I'll have to rework the code a bit.
Document: added isBackCompat().  Could use !isCSS1Compat() for now, but this
ensures no code change required if other compat modes are added in the
future ('cause !quirks is all we care about).

*I'm assuming that the way I wrote it ensures that if the developer doesn't
use getElementsByClassName, then there's 0-cost: the function is never
registered because the GWT compiler will recognize the dead code.

If it is used, then there's only the overhead of performing the
implementation selection once on startup.

Thank you,
Vitali

On 4/18/09, Vitali Lovich vlov...@gmail.com wrote:
 Also, what's the difference between DOMImplMozilla  DOMImplMozillaOld
  in terms of Firefox versions?

  And what versions of each browser are supported?  Are all versions of
  Safari, FF,  Opera supported as much as possible?  Is there a minimum
  version for any of them?


  On Sat, Apr 18, 2009 at 4:05 AM, Vitali Lovich vlov...@gmail.com wrote:
   If I put the check in a static block, then the check is only done once
   on startup, right?  Is this acceptable, or is it frowned upon because
   it adds a slight penalty to the startup even if the developer never
   uses the function.
  
   Something like,
  
   static {
ensureGetElementsByClassNameRegistered();
   }
  
   private static native void ensureGetElementsByClassNameRegistered() {
 if (!document.getElementsByClassName) {
document.getElementsByClassName = function(element, class) {
   // etc
}
 }
   }
  
   On Sat, Apr 18, 2009 at 3:54 AM, Ray Cromwell cromwell...@gmail.com
wrote:
  
   You don't want to create a separate property just for native
   getElementsByClassName() as that would almost double the number of
   permutations (except IE where is it known not to exist)  What you
   could provide is 3 implementations. IE gets raw DOM version,
   Safari/Firefox/Opera get a version that checks
   if(document.getElementsByClassName) exists, and if not, falls back to
   document.evaluate.
  
   -Ray
  
  
   On Fri, Apr 17, 2009 at 11:03 PM, Vitali Lovich vlov...@gmail.com
wrote:
  
   Do you have any suggestions regarding how to do the proper deferred
   binding for the various versions?  Should I just put the typical JS
   check that regular libraries use? (i.e. if
   (!document.getElementsByClassName) { // provide fallback }.  I
thought
   the whole point of deferred binding was to get around that.
  
   What is the list of officially supported browsers?  In particular the
   specific minimum version for each?
  
   I guess I'm going to have to install a virtual machine for this
   because Safari refuses to work in wine 1.0.19 - chrome is useable
   although no HTTPS sites.
  
   Is there a guide somewhere on writing  integrating the tests into
   GWT, or just look at existing ones in the source.
  
   On Sat, Apr 18, 2009 at 1:49 AM, Miroslav Pokorny
   miroslav.poko...@gmail.com wrote:
  
   Provide some tests and make sure it works on all officially
supported
   browsers 

[gwt-contrib] Re: Patch to add getElementsByClassName support

2009-04-19 Thread Vitali Lovich
Oops - missed some compile errors in the JSNI code.  This is meant to be
applied over top of the previous patches.  I've verified that if
getElementsByClassName is not used then no code related to it appears in the
output (compiled the GWT samples  grepped for getElementsByClassName).

I still need to test whether or not the implementations work  write unit
tests.

Just for easy reference for myself, [].slice.call(nodeList, 0); is the code
to convert a nodelist into an array.

On Sun, Apr 19, 2009 at 5:47 AM, Vitali Lovich vlov...@gmail.com wrote:

 Here's my second attempt at the patch (2 of 2 is just a documentation
 adjustment).

 One caveat I forgot to mention is that there is slightly different
 cross-platform behaviour right now.  The native implementations return
 NodeLists which are live whereas the Javascript implementations simply
 return arrays.

 The question is should I change it so that a JsArray is always returned
 (i.e. copy the node list into an array) so that semantics are constant
 across browsers or leave as is for performance with maybe a caveat that the
 user should be careful when using with FF3, Safari 3.1 or Opera 9.5  copy
 into an array if they need array semantics?

 Changes from first patch:
 getElementsByClassName should now display the HTML5 behaviour in quirks
 mode if the browser supports the native implementation or doesn't provide
 XPath (IE or really really old versions of FF, Safari  friends).  I'm not
 sure how to get case insensitive string matching with XPath (so quirks mode
 won't work according to the HTML5 spec in FF2, Safari 3, Opera 9.4 or
 earlier).  Is it even possible to do, or should I just fall back to using
 the DOM implementation in quirks mode  make a note that performance could
 be improved drastically if quirks mode is turned off on browsers that
 support XPath?  Or just leave as is - it'll certainly have the same
 behaviour as all the other JS libraries out there.

 Only DOMImpl, DOMImplStandard,  DOMImplSafari now require code changes.

 DOMImpl: contains a native implementation using DOM.  By default this gets
 called.
 DOMImplStandard now defines getElementsByXPath.  The fastest approach is
 assigned* to getElementsByClassName in the Element prototype  document.
 overrides getElementsByClassName
 DOMImplSafari: getElementsByXPath calls the native one supplied by
 Safari.  I'm assuming that document._getElementsByXPath  document.evaluate
 came in with the same version of Safari (the one that implemented
 XPath).  If that's not the case, then I'll have to rework the code a bit.
 Document: added isBackCompat().  Could use !isCSS1Compat() for now, but
 this ensures no code change required if other compat modes are added in the
 future ('cause !quirks is all we care about).

 *I'm assuming that the way I wrote it ensures that if the developer doesn't
 use getElementsByClassName, then there's 0-cost: the function is never
 registered because the GWT compiler will recognize the dead code.

 If it is used, then there's only the overhead of performing the
 implementation selection once on startup.

 Thank you,
 Vitali


 On 4/18/09, Vitali Lovich vlov...@gmail.com wrote:
  Also, what's the difference between DOMImplMozilla  DOMImplMozillaOld
   in terms of Firefox versions?
 
   And what versions of each browser are supported?  Are all versions of
   Safari, FF,  Opera supported as much as possible?  Is there a minimum
   version for any of them?
 
 
   On Sat, Apr 18, 2009 at 4:05 AM, Vitali Lovich vlov...@gmail.com
 wrote:
If I put the check in a static block, then the check is only done once
on startup, right?  Is this acceptable, or is it frowned upon because
it adds a slight penalty to the startup even if the developer never
uses the function.
   
Something like,
   
static {
 ensureGetElementsByClassNameRegistered();
}
   
private static native void ensureGetElementsByClassNameRegistered() {
  if (!document.getElementsByClassName) {
 document.getElementsByClassName = function(element, class) {
// etc
 }
  }
}
   
On Sat, Apr 18, 2009 at 3:54 AM, Ray Cromwell cromwell...@gmail.com
 wrote:
   
You don't want to create a separate property just for native
getElementsByClassName() as that would almost double the number of
permutations (except IE where is it known not to exist)  What you
could provide is 3 implementations. IE gets raw DOM version,
Safari/Firefox/Opera get a version that checks
if(document.getElementsByClassName) exists, and if not, falls back to
document.evaluate.
   
-Ray
   
   
On Fri, Apr 17, 2009 at 11:03 PM, Vitali Lovich vlov...@gmail.com
 wrote:
   
Do you have any suggestions regarding how to do the proper deferred
binding for the various versions?  Should I just put the typical JS
check that regular libraries use? (i.e. if
(!document.getElementsByClassName) { // provide fallback }.  I
 thought
   

[gwt-contrib] Java source transformation

2009-04-19 Thread nicolas de loof
Hi
If I understand well the GWTCompiler process, The generator are used to
create complementary Java files to be added in the project sources and
compiled to JavaScript.
I wonder if there is any way to also pre-process Java sources, for example
this would enable support for Aspect Oriented Programming or maybe some
DataBinding framework.

Cheers,
Nicolas

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



[gwt-contrib] Re: RPC HashSet HashMap deserialization bug/limitation

2009-04-19 Thread Paul Robinson
I've created an issue for this:
http://code.google.com/p/google-web-toolkit/issues/detail?id=3577

The issue includes a complete code example demonstrating the problem
(written for GWT 1.6.4), together with a detailed explanation of what
happens during deserialization to cause the effect.

Paul

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



[gwt-contrib] Re: RPC HashSet HashMap deserialization bug/limitation

2009-04-19 Thread Vitali Lovich
Verified that that test case does indeed work using regular Java
serialization.

Main.java
---
import java.io.*;

public class Main
{
   public static void main(String [] args) throws Exception
   {
   PipedOutputStream output = new PipedOutputStream();
   PipedInputStream input = new PipedInputStream(output);

   ObjectOutputStream objWriter = new ObjectOutputStream(output);
   ObjectInputStream objReader = new ObjectInputStream(input);

   objWriter.writeObject(Foo.getData());
   Foo result = (Foo) objReader.readObject();

   System.out.println(result);
   }
}


On Sun, Apr 19, 2009 at 11:04 AM, Paul Robinson ukcue...@gmail.com wrote:

 I've created an issue for this:
 http://code.google.com/p/google-web-toolkit/issues/detail?id=3577

 The issue includes a complete code example demonstrating the problem
 (written for GWT 1.6.4), together with a detailed explanation of what
 happens during deserialization to cause the effect.


 Paul


 


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



[gwt-contrib] Re: Eclipse Plugin and OSX woes

2009-04-19 Thread Matt Mastracci

Jason,

Thanks for the idea, it works well.  I blogged the full instructions  
below and included the final Python script I used to wrap the Java  
executable.  I've now managed to deploy an AppEngine project that uses  
a 1.6 JVM to run (and is compatible with 1.6-level-compiled JAR files)  
along with the supporting GWT code.

http://grack.com/blog/2009/04/19/the-final-word-on-google-eclipse-plugin-osx-crashes/

 8 
#!/usr/bin/env python
import sys
import os

print sys.argv
cmd = os.path.dirname(sys.argv[0]) + '/java_wrapped'

args = ['',
 '-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/ 
DataTreeNode,forwardDeltaWith',
 '-XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/ 
lookup/ParameterizedTypeBinding,init',
 '-XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/ 
lookup/ParameterizedMethodBinding,init']

args.extend(sys.argv[1:])

print cmd
print args
print 

os.execv(cmd, args)
 8 

On 17-Apr-09, at 12:41 PM, Jason Parekh wrote:


 Hey Matt,

 Unfortunately, it's not currently possible to specify arguments to the
 JVM that runs the GWT compile.  We're aware of the demand for this
 feature though, so expect it in a future release.

 As an absolute workaround, could you rename your java binary and
 create a shell script in its place that launches the real java binary
 with whichever args you want (prepended to the args given to the shell
 script)?

 jason

 On Fri, Apr 17, 2009 at 2:34 PM, Matt Mastracci  
 matt...@mastracci.com wrote:

 I'm running into the same JVM crash under Eclipse that I was running
 into from Ant a few weeks ago 
 (http://grack.com/blog/2009/04/14/gwt-16-crashes-and-a-fix/
 ) while trying to deploy a test AppEngine+GWT project.  The output
 from the compiler is pretty much:

 Compiling module ...
 Invalid memory access of location  rip=01160767

 Any ideas where the Eclipse Plugin gets the JVM and the JVM arguments
 to run to GWT portion of the compile?  I tried adding the JIT
 overrides to the workspace JRE default JVM properties, but those  
 don't
 seem to get picked up.

 -XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/
 DataTreeNode,forwardDeltaWith
 -XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/lookup/
 ParameterizedTypeBinding,init
 -XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/lookup/
 ParameterizedMethodBinding,init

 The only argument I can see in the process list is -Xmx512m.

 Thoughts/ideas?

 Thanks,
 Matt.





 


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



[gwt-contrib] Re: Eclipse Plugin and OSX woes

2009-04-19 Thread Vitali Lovich
You asked on your blog how to quote spaces in bash.

$@.  bash understands that  automatically does the right thing.

On Sun, Apr 19, 2009 at 11:50 PM, Matt Mastracci matt...@mastracci.comwrote:


 Jason,

 Thanks for the idea, it works well.  I blogged the full instructions
 below and included the final Python script I used to wrap the Java
 executable.  I've now managed to deploy an AppEngine project that uses
 a 1.6 JVM to run (and is compatible with 1.6-level-compiled JAR files)
 along with the supporting GWT code.


 http://grack.com/blog/2009/04/19/the-final-word-on-google-eclipse-plugin-osx-crashes/

  8 
 #!/usr/bin/env python
 import sys
 import os

 print sys.argv
 cmd = os.path.dirname(sys.argv[0]) + '/java_wrapped'

 args = ['',
 '-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/
 DataTreeNode,forwardDeltaWith',
 '-XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/
 lookup/ParameterizedTypeBinding,init',
 '-XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/
 lookup/ParameterizedMethodBinding,init']

 args.extend(sys.argv[1:])

 print cmd
 print args
 print 

 os.execv(cmd, args)
  8 

 On 17-Apr-09, at 12:41 PM, Jason Parekh wrote:

 
  Hey Matt,
 
  Unfortunately, it's not currently possible to specify arguments to the
  JVM that runs the GWT compile.  We're aware of the demand for this
  feature though, so expect it in a future release.
 
  As an absolute workaround, could you rename your java binary and
  create a shell script in its place that launches the real java binary
  with whichever args you want (prepended to the args given to the shell
  script)?
 
  jason
 
  On Fri, Apr 17, 2009 at 2:34 PM, Matt Mastracci
  matt...@mastracci.com wrote:
 
  I'm running into the same JVM crash under Eclipse that I was running
  into from Ant a few weeks ago (
 http://grack.com/blog/2009/04/14/gwt-16-crashes-and-a-fix/
  ) while trying to deploy a test AppEngine+GWT project.  The output
  from the compiler is pretty much:
 
  Compiling module ...
  Invalid memory access of location  rip=01160767
 
  Any ideas where the Eclipse Plugin gets the JVM and the JVM arguments
  to run to GWT portion of the compile?  I tried adding the JIT
  overrides to the workspace JRE default JVM properties, but those
  don't
  seem to get picked up.
 
  -XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/
  DataTreeNode,forwardDeltaWith
  -XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/lookup/
  ParameterizedTypeBinding,init
  -XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/lookup/
  ParameterizedMethodBinding,init
 
  The only argument I can see in the process list is -Xmx512m.
 
  Thoughts/ideas?
 
  Thanks,
  Matt.
 
 
 
 
 
  


 


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