Re: TimeField problem

2012-11-18 Thread Colin Alworth
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

Re: GWT 2.5.0 backwards compatibility

2012-11-05 Thread Colin Alworth
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

Re: Need a tool to find out client side coverage .

2012-09-27 Thread Colin Alworth
For what it is worth, Maven 2.2.1 with the stock Emma plugin (version 1.0-alpha-3) works just fine with gwt-maven-plugin:test. There are certainly issues with Maven 3, but as we run test coverage outside of our normal nightly builds, we drop to Maven 2 for coverage details. With the gwt:test

Re: JSNI file is calling DOM.dispatchEvent(..)

2012-09-18 Thread Colin Alworth
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

Re: GWT RPC Proxy - how to create custom own one

2012-07-31 Thread Colin Alworth
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

Re: JSONParser.parseStrict() exception Unexpected token

2012-07-31 Thread Colin Alworth
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.5.0-rc1 HtmlUnit has broken getElementsByTagNameNS implementation

2012-07-17 Thread Colin Alworth
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

Re: GWT 2.5.0-rc1 HtmlUnit has broken getElementsByTagNameNS implementation

2012-07-17 Thread Colin Alworth
, it'll only be run in real browsers (when using -runStyle Manual, RemoteWeb, Selenium or ExternalBrowser) On Tuesday, July 17, 2012 10:34:31 PM UTC+2, Colin Alworth wrote: GWT 2.4 included a custom copy of htmlunit, apparently built from rev 5940[1] of the htmlunit's source - the following unit

Re: GWTTest Case Error - Cross Talk Between TestClasses - Am I crazy?

2012-06-27 Thread Colin Alworth
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

Re: deferred binding for a/b and cohort testing framework - what do you think

2012-06-26 Thread Colin Alworth
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

Re: Resolution Dependent ImageBundles

2012-04-19 Thread Colin Alworth
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

Re: Resolution Dependent ImageBundles

2012-04-19 Thread Colin Alworth
, etc? Thanks, E On Tuesday, April 17, 2012 4:40:35 PM UTC-4, Colin Alworth wrote: It could be possible to wrap your ClientBundles in an appearance implementation, and use replace-with declarations on that, to check for dpi when the app starts up. Check out the notes on the appearance

Re: Resolution Dependent ImageBundles

2012-04-17 Thread Colin Alworth
It could be possible to wrap your ClientBundles in an appearance implementation, and use replace-with declarations on that, to check for dpi when the app starts up. Check out the notes on the appearance concept at

Re: JSNI error when using GWT canvas

2012-04-01 Thread Colin Alworth
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:

Re: GWT Speed Advice

2012-02-26 Thread Colin Alworth
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

Re: Can AutoBeanFactory encode ListBeanObject ???

2012-01-28 Thread Colin Alworth
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

Re: AutoBeanCodex problems

2012-01-25 Thread Colin Alworth
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

Re: CssResource + Custom Deferred Binding?

2012-01-25 Thread Colin Alworth
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

Re: CssResource + Custom Deferred Binding?

2012-01-25 Thread Colin Alworth
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

Re: add-linker name=xs compiled js files do not work, if compiled obfuscated, only if compiled pretty

2012-01-24 Thread Colin Alworth
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

Re: How to simulate Thread.sleep in GWT?

2012-01-24 Thread Colin Alworth
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

Re: CssResource + Custom Deferred Binding?

2012-01-24 Thread Colin Alworth
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

Re: AutoBean: decoding JSON with an array at the root?

2011-10-18 Thread Colin Alworth
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

Re: AutoBean: decoding JSON with an array at the root?

2011-10-18 Thread Colin Alworth
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

Re: XMLParser EndOfFile question

2011-10-14 Thread Colin Alworth
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

Re: the style write in ui.xml does not work

2011-10-13 Thread Colin Alworth
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

Re: GWTTestCase run by surefire 2.9

2011-09-28 Thread Colin Alworth
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

Re: Is it still preferable to have HashMapString, Panel over MapString, Panel in GWT client side code?

2011-09-01 Thread Colin Alworth
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

Re: Inherited exceptions in GWT-RPC

2011-09-01 Thread Colin Alworth
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

Re: FormPanel and protection against injection attacks ?

2011-08-23 Thread Colin Alworth
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

Re: optimisation

2011-07-17 Thread Colin Alworth
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,

Re: how can i get the proxy that i edited using driver.edit?

2011-06-26 Thread Colin Alworth
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

Re: GWT 2.3 error

2011-06-26 Thread Colin Alworth
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

Re: EntityProxy efficiency

2011-05-03 Thread Colin Alworth
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

Re: RequestFactory, Editor Framework, and CellTable

2011-03-18 Thread Colin Alworth
is that the table is created but no data is added, i mean, no row is created. Do you have any clue? Thanks, Aldo On Fri, Mar 4, 2011 at 2:54 PM, Colin Alworth niloc...@gmail.com wrote: I've already got a generatorhttps://github.com/niloc132/celltable-toolsthat builds FieldUpdater instances

Re: RequestFactory, Editor Framework, and CellTable

2011-03-04 Thread Colin Alworth
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

Re: Window.open handle ?

2011-03-04 Thread Colin Alworth
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

Re: DateBox can't be used with ValueBoxEditorDecorator

2011-03-04 Thread Colin Alworth
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

Re: Templating for deferred binding / code generation

2011-03-03 Thread Colin Alworth
My generators tend to be very heavily commented, and I try to keep blocks of printed code as small as possible in my code. I like to work up most of the boilerplate stuff in an existing abstract class or classes, and extend those when making my generated class. Small methods help too - your

Re: creating EntityProxyId from the client side

2011-02-22 Thread Colin Alworth
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

Re: UiBinder problem with IsWidget

2011-02-21 Thread Colin Alworth
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

Re: weird effect with UmbrellaExceptions in GWTTestCase?

2011-02-21 Thread Colin Alworth
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

Re: UiBinder problem with IsWidget

2011-02-19 Thread Colin Alworth
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

Re: RequestFactory/Editor AutoBean has been frozen error

2011-02-19 Thread Colin Alworth
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

Re: Serialization Policy for a HashMap extension

2011-02-18 Thread Colin Alworth
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

Re: detect generics type

2011-02-16 Thread Colin Alworth
Due to how Java does generics by erasure, this is not possible. Instead, try the way that GWT.create() works, where a instance of the expected class is passed in. For example, your method signature could be public static final T void callJSONRPCService(ClassT clazz, AsyncCallbackT callback);

Re: Compressing cache.html files

2011-02-12 Thread Colin Alworth
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

Re: Associating editor errors with source widgets

2011-02-11 Thread Colin Alworth
Every editor knows the primitive fields it's editing. If the editor implements HadEditorErrors.showErrors(), it can simply compare primitiveField.asEditor() with error.getEditor() and highlight the erroneous primitiveField. I've read through this at least half a dozen times, but I am

Re: Putting bootstrap js in host page

2011-02-11 Thread Colin Alworth
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

Re: Setting the name of a downloaded file

2011-02-11 Thread Colin Alworth
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,

Re: GWT Performace Tips

2011-02-11 Thread Colin Alworth
In the past, I have used DynaTrace Ajax Editionhttp://ajax.dynatrace.com/ajax/en/Default.aspx, a free IE profiling tool. It has the downside from hitting you with massive information overload, but I have been able to use it to find array copying and dom manipulation which, when modified, was

Re: Compilation exception with bitwise and(?)

2011-02-07 Thread Colin Alworth
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

Re: Help: Reusing RPC serialization between GWT and Java Applet

2011-02-07 Thread Colin Alworth
Every Async impl on the client gets a serializer instance to go with it - crack open the generated code to see what it comes up with. It is possible to subclass the ServiceInterfaceProxyGenerator to provide your own custom subclass of ProxyCreator which instead of setting the impl's superclass

Re: Associating editor errors with source widgets

2011-02-07 Thread Colin Alworth
What about getting the editor out of the EditorError by calling EditorError.getEditor()? I know it doesn't get a widget per se, but there seems to be a good reason for that - not all editors are also widgets, so you may need to deal differently with each type of editor's error. My

Re: BestPractice : Use of the Editor Framework with MVP (Place, Activity) and RequestFactory

2011-02-07 Thread Colin Alworth
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

Re: Issue 5752: ListEditor.setValue fails once the underlying AutoBean has been frozen

2011-02-04 Thread Colin Alworth
I did, in order to verify the fix, and have just filed an issue. http://code.google.com/p/google-web-toolkit/issues/detail?id=5981 The patch is below - it can be applied to 2.1.1 or 2.2.0-m1 Index: user/src/com/google/gwt/editor/client/impl/AbstractEditorDelegate.java

Re: local script variables in nocache.js

2011-02-03 Thread Colin Alworth
In your *.nocache.js content, you say you will have 'this.resourceUrl = content-replaced-by-velocity;' – what is 'this' in this context? If it is the shared window that all the portlets use, they will each overwrite the resourceUrl property. If each portlet will use a different module, you

Re: 2 Modules in 1 GWT-App, both starting the onModuleLoad?

2011-02-02 Thread Colin Alworth
On 2 Feb., 00:27, Colin Alworth niloc...@gmail.com wrote: [ERROR] Hint: Previous compiler errors may have made this type unavailable Which type? Which error? If you are missing code in your Child1/2 projects that disappears only when the Parent module is missing, something

Re: 2 Modules in 1 GWT-App, both starting the onModuleLoad?

2011-02-01 Thread Colin Alworth
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

Re: 2 Modules in 1 GWT-App, both starting the onModuleLoad?

2011-02-01 Thread Colin Alworth
[ERROR] Hint: Previous compiler errors may have made this type unavailable Which type? Which error? If you are missing code in your Child1/2 projects that disappears only when the Parent module is missing, something is not set up correctly, or perhaps you are still attempting to compile the

Re: Issue 5752: ListEditor.setValue fails once the underlying AutoBean has been frozen

2011-01-30 Thread Colin Alworth
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

Re: Issue 5752: ListEditor.setValue fails once the underlying AutoBean has been frozen

2011-01-29 Thread Colin Alworth
The other question: Is there a way to not to write custom FieldCustomizer for columns? Can't GWT know which proxy/property I am editing? Or am I doing something wrong? Thanks! Assuming by FieldCustomizer you mean FieldUpdater... It seems not – the Column.getValue method must be

Re: Issue 5752: ListEditor.setValue fails once the underlying AutoBean has been frozen

2011-01-29 Thread Colin Alworth
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

<    1   2   3   4   5