gwt

How to use “Scheduler.get().scheduleDeferred” the right way in GWT?

[亡魂溺海] 提交于 2019-12-23 01:37:11
问题 Here is my Pseudocode in my GWT app. -Visible the loading Label -Loading text from properties file (may take long) -Invisible the loading Label & Visible the main HTMLPanel So I want to use Scheduler.get().scheduleDeferred to achive that, here is the code: loadingLabel.setVisible(true); Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { loadingText(); } } loadingLabel.setVisible(false); mainHTMLPanel.setVisible(true); But it doesn't work correctly as

How to access GWT's JsInterop exported types from browser console?

£可爱£侵袭症+ 提交于 2019-12-23 01:18:17
问题 I'm running a GWT application and I want to test something quickly with JsInterop. Specifically, I exported an enum : package com.mypackage.test @JsType enum MyEnum { A, B, C; } And I wanna check if I can access it properly before writing any code. Docs show things like this: var aClass = new com.gwt.example.MyClass('World'); But com is not defined in Window . So how can I access JsInterop from console to test things before writing code? 回答1: Did you remember to pass the

How to dynamically serve manifest for GWT permutations

半城伤御伤魂 提交于 2019-12-22 22:48:13
问题 Consider the following problem. You'd like to serve an offline manifest/appcache file for your GWT project. In such a case, there are two issues: GWT generates different permutations of js files (depending on browser version). When loading the application, some GWT javascript code uses your user-agent properties to include the appropriate one. You'll want to generate a different manifest file for each of these permutations, as you don't want to cache files you won't use (and these files can

GWT Single threaded async callbacks

微笑、不失礼 提交于 2019-12-22 18:45:14
问题 rpc.call(mycallback); { //subsequent code block } How does the single threaded async callback work? When will the callback get called? Will the subsequent code block always finish executing before the callback is allowed to run (i.e. will the callback only run once all code has finished?)? 回答1: #1 javascript is single-thread, but the browser is not, so the js-thread sends the xhr call to the browser to resolve it, and the browser returns the control to it inmediately. #2 when the browser gets

SmartGWT ListGrid is slow, but only in Internet Explorer

点点圈 提交于 2019-12-22 18:42:17
问题 We have migrated from gwtext to SmartGWT and overall the experience is Ok. However, we have big problems with the ListGrid component of SmartGWT. It is very slow if both of the following conditions are met: Internet Explorer is used 5 or more columns the speed will decrease if you add more columns up to the point where the whole thing is unusable and you have to kill the browser, e.g. through the windows task manager. Grids with 1 column are fine in internet explorer Grids with a large number

How to get GWT to compile multiple modules?

爱⌒轻易说出口 提交于 2019-12-22 18:37:44
问题 I've set up a new GWT project in NetBeans 6.9 and created multiple GWT modules I've tried adding them all in the gwt.properties file as follows: *# The names of the modules to compile (separated by a space character) gwt.module=com.company.MyModule1 com.company.MyModule2 com.company.MyModule3* I'm getting an error at compilation time saying that it doesn't find the second module. Now, i can compile just fine only ONE module. Doesn't matter which one. Is it something i'm doing wrong or it's a

vaadin gwt compiler error unknown argument: -war

夙愿已清 提交于 2019-12-22 18:15:56
问题 I have a problem with my vaadin project - and as i am rather new to vaadin, i am not sure on how to solve it. I would like to re-compile my widgetset, but even after customizing eclipse i get the same error message: First it executes the compiler via command line Next it tells me that the widgetsets were found from a certain classpath (which still is correct) And after that, I get the following output: 17.09.2013 11:10:18 com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer

How GWT code runs in development code

a 夏天 提交于 2019-12-22 17:49:37
问题 In GWT web/production mode, Java code is complied into Javascript code that is rendered in the browser. Also,I have always thought that in GWT development mode, GWT developer plugin compiles my Java code into JavaScript to render it in the browser. But after reading on some site, I came to know that there's no compiling of code to JavaScript to view it in the browser in development mode. So, I wonder: What are all these widgets I see in the browser during this mode if they aren't JavaScript

GWT: Calling RPC Service inside another module

╄→尐↘猪︶ㄣ 提交于 2019-12-22 17:09:16
问题 I have a module B, which inherits module A. When I call RPC Services from A inside A, they work ok. But when I call the services from A in B, the RPC invocations always fail. Am I missing something? Thanks in advance for any help. 回答1: I've found the answer for my question here: http://blog.cloudglow.com/2010/03/making-gwt-rpc-endpoint-independent-of.html The default GWT RPC service (Servlet) endpoint is @RemoteServiceRelativePath("some_name"), which resolves to /module_base/some_name at

Efficient representation for large numeric arrays in GWT

怎甘沉沦 提交于 2019-12-22 14:38:14
问题 I have a timeseries class that, over the course of a day will hold 100K-200K values (basically market ticks, uniformly sampled). On the java side the most performant representation is to use double[] (as opposed to say List). I am doubtful that this approach maps well into javasctipt. On the Java side, the double[] array must grow periodically (ie allocate a new array and copy the old into the new). So for instance, the class has a method like: public void add (long time, double price) { ...