JavaScript doesn't have a concept of type, so all type checks are really
just function calls. Both instanceof and casts need to be generated to have
JavaScript behave exactly like Java. Here's a quick demonstration:
public class Test implements EntryPoint {
public static class SomeObject {
I can definitely confirm that with the closure compiler enabled the
compiled size drops on the few apps I've tried it on, on the order of 5-15%
(no hard and fast numbers yet, working on such a writeup now). I can
confirm both a performance and size improvement with turning off cast
checking, but I
What about the first could be optimized out - just the size() accessor?
Most List implementations have a size field (see
http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/super/com/google/gwt/emul/java/util/ArrayList.java?r=6609#77
for the actual ArrayList used in compiled
The skype browser plugin adds additional style tags to the page, and mess
up StyleInjectorImplIE's assumption that no one else is spitting out style
elements. SnagIt used to (and may still) cause exceptions in various IE
versions when some elements resize/reflow (I never nailed down exactly
Think about this question from the other way around - same interfaces, but
now look at the data itself, the JSON:
{name:foo, shape:bar}
What is that? Is it a Binterface with its other properties null? Is it a
Cinterface with its other properties null?
{name:foo, radius:100, height:200}
What
I have a Windows 8 and IE 10, and I can develop GWT apps with no problem,
except that don't use JDK 1.7.
On Wednesday, January 16, 2013 11:34:10 AM UTC-5, Erik Sapir wrote:
This will not work for me - i use objects that are not supported by IE
earlier than 10
On Wednesday, January 16, 2013
saying they can compile GWT 2.5 and run Tomcat 6 with JDK
7, while others saying not. So just want to share this with the group, in
case you run into the same problem.
Colin
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To view
Also GWT 2.4, and is it possible you have more than just 2.4 on the
classpath?
Do you have the GWT-Incubator on your classpath? I've seen cases where the
incubator's extremely outdated ClientBundle generators try to take over and
end up just breaking things.
Otherwise, can you share the full
It looks like it thinks you are sending the CustomFieldSerializer itself
over the wire, so wants to find a serializer serializer... The extra
prefixed package name com.google.gwt.user.client.rpc.core indicates that
it wasn't able to find your field serializer in the normal package where it
Greetings from IRC - glad to see you are continuing with this idea.
It could be worth considering inlining the sizzle.js code as JSNI to avoid
the extra .js file at all, either from the module file or from the base
html file. This has the additional constraint/advantage that you'll need to
I've not seen this specific issue (GWT 2.5.0 from Juno or maven command
line on both mac and linux) in my projects that use RequestFactory, at
least not from a source where I can point to as our own JSNI mistakes.
One kind of error I've seen that only emerges in OBF is JSNI local variable
thats baffling me is that this is all code that has worked and
worked with this version of the tools. I must have changed something small
that has blown things up.
On Thursday, December 13, 2012 11:33:52 AM UTC-8, Colin Alworth wrote:
I've not seen this specific issue (GWT 2.5.0 from Juno
In addition to matthew's comment, you are invoking a method that apparently
has two arguments
callFacebookAPI(Ljava/lang/String;Ljava/lang/String;)
with only one:
(facebookUrl)
Delete one of the two Ljava/lang/String; parts on the method invocation so
you actually point to your method
TimeField, along with all other ComboBox subclasses, by default filters
results in the drop down based on what text is present in the text field -
thus, if only one value matches, that is all that will be displayed. To
turn this behavior off, invoke the setTriggerAction(TriggerAction) method
There is one known issue that is affecting some users who update from GWT
2.4.0 to GWT 2.5.0 detailed in
https://groups.google.com/d/topic/google-web-toolkit/H0Blv3C_fns/discussion.
The easiest workaround seems to be adding requestfactory-server.jar to the
server's classpath, but anything
goal bound to the test phase, we just run `mvn emma:emma`
and get a nice html report (as well as the .ec and .em files). I've been
using this strategy since at least GWT 2.2, and it works up to and
including GWT 2.5.0-rc1.
-Colin
On Wednesday, September 26, 2012 8:14:51 AM UTC-5, Joseph Lust
The DOM class is used to bridge the various gaps between browsers - the
dispatchEvent method, as you've noted, is invoked by the specific
implementation in use at a given time. These browser-specific
implementations live in the com.google.gwt.user.client.impl package:
*DOMImpl
All of the source for the existing RPC proxy generation code can be found
in gwt-user.jar. As with all Generators, the first step is to create a
Generator or GeneratorExt subclass, and reference it in the module (this is
in RemoteService.gwt.xml):
generate-with
Your catch (Exception e) should also be printing out the results, but your
quoted error message didn't contain that exact json - any chance that the
json you started with isn't actually making it to the client? One simple
way to test would be to escape that string and put it in your Java code
GWT 2.4 included a custom copy of htmlunit, apparently built from rev
5940[1] of the htmlunit's source - the following unit test passes under
that version using the com.google.gwt.xml.XML module:
public void testSelectElement() {
String xml = rootchild/childchild /child
testing in
htmlunit first, then going to the actual browsers.
-Colin
On Tuesday, July 17, 2012 4:34:24 PM UTC-5, Thomas Broyer wrote:
This is only a workaround but you can selectively disable the unit-test in
HtmlUnit by annotating it with @DoNotRunWith(Platform.HtmlUnitBug); that
way
The callbacks you are configuring aren't running until the later test is in
the middle of working. You are using the finishTest() and
delayTestFinish(int) correctly in your first test, but the second has a
pair of asserts going off asynchronously, but you are not delaying that
test's
With soft-permutations though, this could cut back on the explosion, though
you are right that the app would be unable to switch at runtime between
which version it is running. That said, once a user has been set to a
particular set of features, you probably want to keep them there. And a
You could wrap them up as a TextResource in your ClientBundle and inject
them into the page, but Android 1-3's Browser doesn't support SVG, nor do
IE versions prior to 9.
On Thursday, April 19, 2012 12:38:54 PM UTC-5, Evan Ruff wrote:
Joe,
SVG would be awesome if my sources were vectors. By
to have the rest of the control that
android has, with defining new layouts, etc - phone vs tablet vs desktop
probably need more than just different images, but in some cases, not a lot
more.
On Thursday, April 19, 2012 12:45:48 PM UTC-5, Evan Ruff wrote:
Colin,
This seems to be similar to Jens
#Appearance_Pattern
-Colin
On Tuesday, April 17, 2012 4:49:25 AM UTC-5, Jens wrote:
What about a custom property for deferred binding in a .gwt.xml file and a
small javascript that fills its value based on window.devicePixelRatio.
Older iOS devices have a ratio of 1 while the retina devices have a ratio
You are running into a Chome/Dev mode bug that has apparently been around
since about Chrome 10. It seems to be intermittent, only happens when
stepping in and out of JSNI methods, and will not affect you application
once it is compiled.
More information, discussion:
via JSNI to interface with
localStorage directly.
Colin E.
On Mar 13, 2:02 am, James Tyner jamesty...@gmail.com wrote:
Well I checked for a null on my storage. It *is* returning null. But on the
website html5test.com it does show that localStorage is supported?
On Mon, Mar 12, 2012 at 9:59
On Mar 13, 9:52 am, Thomas Broyer t.bro...@gmail.com wrote:
On Monday, March 12, 2012 10:40:06 PM UTC+1, Colin Eberhardt wrote:
- Instead of wrapping everything in a UiBinder, I would have kept
part
of the template in the HTML host page (I'd have wrapped only the div
id
This might be of interest to members of this group ...
I have contributed a GWT version to the JavaScript TodoMVC project:
http://www.scottlogic.co.uk/blog/colin/2012/03/developing-a-gwt-todomvc-application/
For those of you who have not come across this project, it provides an
implementation
which is so trivial that I would skip unit testing it.
And, yes, I haven't unit tested - this is in common with the other
TodoGWT projects, none have unit tests, where many are of course
perfectly testable.
Colin E.
--
You received this message because you are subscribed to the Google Groups
Thanks, glad you like it. The whole TodoMVC project is a great idea in
my opinion.
On Mar 12, 9:00 pm, kritic 10wattmindt...@gmail.com wrote:
Must have been a lot of work getting this done. Thank you very much. It's a
huge help with making things a little more clear. Also, the other
It turns out you can only pass data (string) through setData(id,
{your string data}). Any other key values will not work.
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To post to this group, send email to
Sorry it must be setData(text, {your data}).
On Feb 26, 9:29 am, colin colinzhao...@yahoo.com wrote:
It turns out you can only pass data (string) throughsetData(id,
{your string data}). Any other key values will not work.
--
You received this message because you are subscribed to the Google
Ok. I got it wrong to begin with. The first parameter of setData is
format which is mime-type according to API, not a key. I should have
pay more attention to API before use it.
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To post to
The rebinding is how all of the GWT.create calls work, to build browser
specific implementations of most of those (mostly to deal with browser
differences), and to generate the needed source for a few (mostly
i18n/clientbundle interfaces and RPC). This is perfectly normal, and
expected.
As
Ludovit:
Thanks for responding. I posted the code this way just to show the
problem. I have the drop target set up and is getting null from
getData().
Colin
On Feb 25, 5:15 am, Martones ludovit.marton...@gmail.com wrote:
Hi Colin, maybe this document could help you
:http
,
Colin E.
--
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
Has anyone used new Drag and Drop feature with 2.4? I have it work
all fine except the string data set on the event in DragStartHandler
is not passed to the event in other handlers. getData always returns
null.
navLabel.getElement().setDraggable(Element.DRAGGABLE_TRUE);
You are on the right track for this, but you need to wrap each model with
an autobean: encodeBean.as() is not the same instance as t1, even though it
is obtained from the autobean that wraps t1. You need to wrap each
instance, and include the wrapped instance in the eventual tree to be
Long values cannot be sent as a number over JSON, because JavaScript only
support smaller numbers. If you only need Double or Integer precision, then
declare that in your autobean, and you can be sure that JSON will pass
those values correctly. GWT automatically allows you to create values as
I'm fairly certain that the compiler will figure out that those methods
return constants and will either optimize them out, or at least turn them
into static methods anyway, so a singleton isn't going to buy you too much.
If you like the code style, that's one thing, but at least in other cases
I thought you were suggesting the static/singleton part here by way of
suggesting that this was a better way of doing things, avoiding
constructing the same instance over and over, but in retrospect I might
have misunderstood. If you are suggesting the static/singleton stuff to
make it easier
Compiling in PRETTY also turns off some of the optimizations, so turn them
back up again using -optimize 9 in your args. This will hopefully allow you
to reproduce the issue, but still see what the code looks like to find
where the error is taking place.
See
GwtTestCase has support for waiting until an asynchronous part of the test
is complete - check out the delayTestFinish(int) and finishTest() methods.
Beyond that, there really is no way to generally pause execution. You can
use one timer to watch another timer, and call cancel on it if it runs
You can't replace the static method through replace-with, but you can make
the static methods call GWT.create on a class that has one implementation,
and use replace-with to swap in another one. For example,
om.mycompany.client.ui.CssGradientUtil.getLinearGradient could be a static
method that
Yes, your JSON is expected to have an object, not a collection, at its root.
This turns out to be a good idea in general as well - in some browsers it is
possible to load json that starts in an array from another site, and read
the contents of those objects, something which is not possible if
Quoting from http://www.sitepen.com/blog/2008/09/25/security-in-ajax/
It is only possible to hijack JSON data with a root that is an array.
When the root is a primitive, primitive values do not trigger a
constructor. When the root is an object, it is not valid JavaScript
syntax, and therefore
I use both Window.scrollTo() and Element.scrollIntoView() in my app.
I upgraded my GWT to 2.4 to use the new DnD feature and others. But
just find out today that both of them stopped working in my app. No
errors, just don't scroll.
Is it just me or others encounter the same?
GWT 2.4, Chrome
NodeList, the return value of getElementsByTagName, has a method called
getLength(). The standard way of iterating through the contents would
involve using a for loop, and testing that n never reaches getLength()
--
You received this message because you are subscribed to the Google Groups
The @ClassName annotation can be used if you have class names in your css
file that are not legal Java identifiers
from
http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html#CssResourceCookbook
--
You received this message because you are subscribed to the Google Groups
I've gotten emma to work with gwt:test, but only with maven 2 - I havent
tracked down the specifics of why it didn't work with 3. Main piece in doing
this was to stop surefire from running, and make sure that gwt tests run
normally during a build. After that, the only step was to run the
In general the compiler will select the most specific type it can - if you
write
MapString, Panel map = new HashMapString, Panel();
it will change that to
HashMapString, Panel map = new HashMapString, Panel();
as it is clear that the object can only be a HashMap at that location. In
other cases
On Thursday, August 25, 2011 3:09:22 PM UTC-5, Ryan wrote:
However, if I declare AException in the client, but throw either of
the two child classes in the server, GWT wraps it in an
InvocationException.
This is the key to your issue - if the client can't de-serialize it (because
the
Couple of thoughts for you to consider:
- If the servlet is building possibly unsafe html, this should be
considered a bug - content encoding should be made safe at the time when it
is outputted, to whatever format is expected on the client. If you were to
send xml or json with or
The compiler will make the methods it can into static calls. As far as
making an instance static (i.e. making a singleton), this probably won't
gain you anything for a Cell, which has very little state, but in the case
of very large widgets/composites, it might make sense to do.
So Cell,
If one of your editors needs access to the original object, consider
implementing a ValueAwareEditor so it has access to the original model. This
way you can flush changes back as part of the regular editor system.
If you want to make other arbitrary edits outside of the editor system, then
it
com.google.gwt.http.client.URL
The client package in that indicates that this class is only to be used in
client code, code that is compiled to JS. This is causing problems for you,
as part of that class is implemented using native JS, which of course JBoss
can't run.
You'll need to find
As a by-product of our integration with Linkedin, we created a sample
GWT application showing the essential steps of using OAuth with your
app. It is built on top of Scribe, a java OAuth library (https://
github.com/fernandezpablo85/scribe-java) by Pablo Fernandez.
You can download the project
My understanding is that RF assumes you will be using the same persistence
session for the duration of the request to prevent any perf issues here.
Those find operations are done because RF considers the ID to be the only
valid way to know that it has the latest copy of the object - every time
, and stick
with a regular, broken, HasDataEditor+AbstractEditorDelegate, without edits.
Sorry for the confusion, and thank you for your interest.
-Colin
On Fri, Mar 18, 2011 at 12:42 PM, Aldo Neto tumo...@gmail.com wrote:
Hi,
Thanks for your contribution. I checked your code and it seems to help me
I've already got a generator https://github.com/niloc132/celltable-toolsthat
builds FieldUpdater instances (as well as Column instances, complete
with getValue calls), so it is just a matter of extending it a little
further to make this PendingChange-like thing.
And, of course, to either stop
It should be trivial to make your own call in jsni to $wnd.open, returning
whatever handle you want, or doing the focus right away. Look at how
Window.open is implemented, and see if you can replicate it in such a way to
have the exact behavior you need.
--
You received this message because
This isn't a bug, this is just how the class is defined - DateBox is not a
ValueBox, so attempting to pass it into a function that expects a ValueBox
will naturally fail.
A few options you have: Try making a ValueBoxBase instance that wraps a
DateBox - this may or may not be possible, but
to include
templating, but also better tools to programmaticly write code. Perhaps
someone else can pick up their mantle, but at least check out their
thoughts: http://code.google.com/p/rocket-gwt/wiki/Generator.
-Colin
--
You received this message because you are subscribed to the Google Groups
My approach has been to use RequestFactory.getProxyId to turn known ids into
EntityProxyIds, and from there to get the actual instance. This works for
the most part, unless you actually want to use the same id format that the
server uses. In this case, why not add a method to your
Can you share a little more on what exactly is happening? The error
message/stack trace (so as to see exactly what is complaining), the
inheritance of your MapWidget interface, and maybe how it should be bound to
a real class (through a replace-with or generate-with, or through a line or
two
FWIW I've seen this happen a variable will always blow an exception (NPE in
my case). At the time, it appeared that the compiler was deciding that it
wasn't worth it to call any of the code, so no 'error happened!' or 'test
finished' message ever occurred at all, and from your example, I think
Assuming MapWidget extends IsWidget, yes, that should work.
On Sat, Feb 19, 2011 at 8:26 AM, pete superp...@geekcity.de wrote:
But I should be able to use an Interface in my template, if I use
(provided = true)?
On Feb 18, 5:22 pm, Y2i yur...@gmail.com wrote:
Oops, sorry I didn't notice
I think you are addressing the wrong issue – Scott is pointing out that
general exceptions do not allow you to re-fire contexts after modifying the
proxies further. The r/o proxy instance is stuck as read only because there
still exists a context-specific edited copy of it, which did not
Without more information, I would be hesitant to say you've found a bug. The
RPC mechanism must be as conservative as possible in its estimates of what
can and cannot be serializable, otherwise it would attempt to allow every
widget to go across the wire.
A few things to check – does the type
);
Note that if T is ListString, clazz will only equal List, so it won't be
able to tell the difference between different types of Lists.
HTH,
Colin
--
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
I don't think you want to directly gzip the files, as some browser don't
support downloading this. Instead, I would suggest gzipping content on the
fly as needed - it is up to you to decide what should and should not be
gziped (note, for example, that RPC calls over a certain size are already
with
a custom add method (and so custom tags) that would go through a custom dom
setup process, but even those extra custom tags shouldn't be necessary,
except we can't register new handlers for uibinder..
Anyone else thinking these kinds of thoughts with any more success than I?
-Colin
--
You
Take a look at the new google groups as an example of what you are saying
:). The default Linker (IFrameLinker) sets things up to start with a js
file, then load the strongly named html file into an iframe. Additional
linkers include building for running as a google gadget, and you can define
The parameter to set is part of the response from the server - the
content-type header can have an attachment property which indicates the name
of the file to be used.
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To post to this group,
, was enough to give IE the
performance boost we needed.
-Colin
--
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
This issues was worked out in ##gwt - had to do with a class that was not
available to the GWT compiler. Still, the error reported is less than
helpful.
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To post to this group, send email to
, but it can take
some time to learn. Additionally, this is something the GWT app would need
to initiate – the RPC stuff doesn't work for the server to call the client.
Another option you might look into would be the AutoBeanCodex, used in
AutoBean and RequestFactory stuff.
-Colin
--
You received
something with that.
Hope this helps push you in the right direction,
Colin
--
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
For my part, I've not been creating a 'createEditorDriver()' method, but
instead 'getEditorDriver()'. This way, there is no concern about binding and
traversing the tree more than once.
Am I in error with this approach? Each time my presenters get a ref to the
driver and have finished loading
) {
- valueAwareEditor.setValue(object);
+ valueAwareEditor.setValue(getObject());
}
if (object != null) {
On Fri, Feb 4, 2011 at 10:48 AM, Eric Andresen ericandre...@gmail.comwrote:
We are seeing this issue as well. Colin, did you try changing the
AbstractEditorDelegate
own iframe, then your
native call just needs to say 'return $wnd.resourceUrl;' to correctly
reference the window object that the resourceUrl was set in.
Hope this helps,
Colin
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To post
error message you reference project.client.child1.Child1, while your
entrypoints are named project.client.Child1 and
project.client.child2.Child2 – do you really have two different classes
named Child1, or is it possible that there is some mixed dependency here?
-Colin
On Wed, Feb 2, 2011 at 5:39
From the little information here, it seems that either Child2.html has a
script tag loading Child1.nocache.js or Parent.nocache.js
Parent serves no purpose in your setup - if it were compiled and run, it
would try to start both applications at once.
--
You received this message because you
mixed up
dependency.
-Colin
--
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
I don't fully understand the interactions between RequestFactory and the
editor system, but it seems that there is another issue which is still
causing this error to occur, though it seems to be another, unrelated bug,
which only affects the HasDataEditor adapter and the editable HasData
as the methods in the interface...
Hope this sparks some thoughts in others – let me know if you are
interested, and I will share a working version in the next few days.
-Colin
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To post
On an unrelated note, the wysiwyg formatting options and copy/paste in the
new google groups seem to be essentially useless, as indicated by the
terrible display of code above... Apologies for sharing that terrible
looking code segment..
-C
--
You received this message because you are
401 - 489 of 489 matches
Mail list logo