Re: Dynamic CSS
Firstly, you have to decide which way you want to use for it, I mean the way you are going to solve the problem. If you are an OO-guy, then the better solution is to use styling interfaces and just appropriate method (http://code.google.com/intl/ru-RU/webtoolkit/doc/latest/ DevGuideUiBinder.html#Programmatic_access). But this approach requires you to use UiBinder. So, result will look like this: myUiField.setStyleName(style.grey()). Less beautiful way is to define all your styles in some external css file and set style names for any widget ( it does not matter is it is your custom one or a default one ) directly specifying its name. For ex: anyWidget.setStyleName(myColorStyle). This appoach does not sensitive to the way you declare\code your user interface. The hard-rock way is to use DOM. : Widget.getElement().getStyle().setProperty(backgroundColor, #AABBCD); /* very wrong way in nowadays, in my point */ Any way it is up to you to chose one. By the way: try to play with addStyleName(style1) method. If I remmeber thing right, you can add some extra style when you need it with that method, and delete it with method deleteStyleName(style1) On 26 июл, 16:35, sanjay kanwar sanj.kan...@gmail.com wrote: Hi There, I have two Css background color and i want to show one color at a time when a certain kind of condition fulfill. Confused how to proceeed. any help or example (sample) would be great. Thx in Advance -- Regards Sam -- 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 handle dependencies in minor UI controls within the MVP framework.
I have used both methods in my app, if the interactions are simple like responding to a click then handling it in the parent presenter is fine but if there are many operations possible then it is worth grouping them into a helper. On Jul 26, 5:35 pm, DrG drgenejo...@gmail.com wrote: I aim to have a discussion on best practices with regards to the MVP framework and minor UI Controls. Imagine a typical MVP entity in your application where the view element is made up of many interesting UI controls. Some UI Controls contain further UI controls as the application is re-factored to contain each element in its own logical class. I have taken the presenter component to mean that all logical operations of the application should take place in the presenter so therefore any events that occur in the sub-sub UI controls should be wired back up to the presenter. I have a problem with this type of working in that imagine a click event, the parent UI has to handle that, then that is passed to another parent and then finally to the presenter where the click event is analysed and acted upon. I would much prefer a scenario where a, say for example, a navigationHelper dependency is injected into a view control that requires it, thereby it can be acted on immediately without having to wire up through the UIs to the presenter. I wonder if anyone had any thoughts on this as to the best practices in this scenario. Or should all controls in the application be created in the MVP style so that each object no matter how insignificant always has a presenter associated with it? Any thoughts are much appreciated! -- 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.
Aw: App runs dev-mode but doesn't run if deployed
Ok, we looked futher into this issue, so far i can you tell this: - the war file looks fine - there are no 404 html errors within firebugs - there IS a javascript error, which will stop the whole app. I've tried to compile it pretty but this won't help us much, but i doubt it will help anyone to track down our problem :-D Uncaught TypeError: Cannot read property 'impl' of null function entry_0(jsFunction){ return function(){ try { return entry0(jsFunction, this, arguments); } catch (e) { throw e; } } ; } D567810C3CA526CC2D2D07399319FBAD.cache.html:577Uncaught TypeError: Cannot read property 'impl' of null But we tracked down our problem to our logging. Our log guy will look further into this ;-) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/GevZUSGliXkJ. 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.
Aw: App runs dev-mode but doesn't run if deployed
Hi, I am the log guy, I solved the problem. But i did not undrestand really why this error occured. Everything works fine in dev-mode. But as soon as i deploy it on tomcat, we get the problem. The problem was: In the Logactivity class I tried to test the logger with this.logger.log(Level.SEVERE, Message). I think at that time the logger was null. I don't know why. But it is only guess. The reason can be something else. Maybe somebody has an idea??? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/ypwaH7AarX4J. 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: page background color
This should work: body { background-color: #D2 !important; } There is no need to mess with setting a class in your code. Andrei On Jul 26, 4:12 pm, Robert Lockwood rnlockw...@gmail.com wrote: I'm really new at all this but really frustrated in that I cannot change the page background color in the GWT example MyWebApp that demonstrates Asynch. I put this in the CSS file, both as the first item and then as the last. (Tried other things as well.) body { background-color: #D2; } Occasionally when the page loads it quickly blinks the color but always displays a white background. Why is this happening? I'm using Eclipse Helios on Ubuntu. -- When I was 12 I thought I would live forever. So far, so good. -- 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.
Editing a word document within GWT page
Dear Team, Any ideas on how i can open and edit a word document on the GWT client side,am currently only able to convert an object on the server side into xml,then using a third party tool Winward reports which has tags mapped into the xml data source,then downloading the document for user viewing. What happens is word templates and xml files are stored on the server side, i pass an id from the client side to a servlet which uses the winward reports library to map data from the xml datasource to the the tags in the word document and the download the document onto the client machine. However i need to have this document edited on the client side,instead of downloading this doc,i want to have it open on the client side for editing. Regards -- Gibson Wasukira Making Technology a Business Asset www.gwasky.wordpress.com www.thegrid.ug -- 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: RequestFactory: Generate history token on the server-side.
If you've reach that point that you need to construct a history token on the server side, then you'd probably better build your tokens on your own rather than rely on RequestFactory's getHistoryToken (which to my knowledge was mostly there for the scaffolding of Spring Roo, so that it just works out of the box). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/DSDTTnvUi0gJ. 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: page background color
Well, how about simply not using a given theme if it doesn't suit you? Or, put differently, copy and tweak it to your needs/taste rather than hacking around. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/dneF7fjAiQAJ. 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 and SOA
hi do any one have any idea of implementing SOA .I have developed a simple Webservice and wants to implement SOA in that web service is it possible .. 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.
Re: Question about the API of Validation
Ok. Thanks for the info. Regards. 2011/7/26 Nick Chalko ncha...@google.com Remember @Valid Foo foo. Just recurses into foo calling the Validator on it. @Valid Integer int. at best will do nothing because the Integer class has no constraints. @Valid is made for your classes that you have put constraints on. -- 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. -- El precio es lo que pagas. El valor es lo que recibes. Warren Buffet -- 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.
Zip download without Window.open()
Hi, I've followed a bunch of tutorials and I'm able to click a button, send parameters via a Window.open() call to an HttpServlet and it will construct a bunch of files, zip them up and send them back. The problem is sometimes creating these files can take some time, and a blank window just stares at me while it's doing so. I was wondering if there's a nicer way, like an RPC so I can tell when it's returned or an error has occurred but still have a File Dialog pop up for the user to save the .zip as normal? Thank you. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/kQsCsv37wKsJ. 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 package a gwt project into a jar so that it can be included into other projects
It can be packaged into a single jar. Have a folder structure like com shared *.java *.class server *.class yourProduct.gwt.xml Jar up com directory. Tell the user to put com.jar into his /WEB-INF/ lib. Hope it helps. J.Ganesan www.DataStoreGwt.com On Jul 25, 6:27 pm, Komal Goyal ko...@ensarm.com wrote: Hi, I need to package a gwt project into a jar and use the implementations of this project ie its client side class in the importing projects client package and the server side classes to the importing projects server classes how will the Impls work in this case..? -- 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.
GWTTestCase meddling/not meddling
This tip comes from Communicate with a Server Although GWT translates Java into JavaScript for client-side code, GWT does not meddle with your ability to run Java bytecode on your server whatsoever. Server-side code doesn't need to be translatable, so you're free to use any Java library you find useful. Simply put, I want GWT to meddle with some of my code, but not all of it. Is there a way to have a unit test with both server and client code? This code fails with an error message. import com.example.myproject.server.GreetingServiceImpl; public class ProjectTest extends GWTTestCase { public String getModuleName() { return com.example.myproject.Project; } GreetingServiceImpl greet = new GreetingServiceImpl(); @Test public void test01(){ } } No source code is available for type com.example.myproject.server.GreetingServiceImpl; did you forget to inherit a required module? I understand why this fails. How can we get this to work? Thanks, Tim -- 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: GWTTestCase meddling/not meddling
Make two distinct classes to test either client-side or server-side code? A bit more seriously, what are you trying to achieve here mixing both client-side and server-side code in a single testcase? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/8ZzAZ0gfZtsJ. 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: SimpleEventBus : why such a non-predictive behavior implementation ?
thanks, committed patch here : http://gwt-code-reviews.appspot.com/1500804/ On 26 juil, 22:43, Gal Dolber gal.dol...@gmail.com wrote: I am, but your post is too long to read :) For what I understood, I had a similar problem, and I solved it encapsulating the create widgetC in a DeferredCommand (for your example). Its really hard for me to understand the modification you purpose, maybe someone from google could see it. But I think that if you found a better way of doing something you should send a patch and make us all happyhttp://code.google.com/webtoolkit/makinggwtbetter.html(also you will get more help in gwt-code-reviews.appspot.com than here) Regards! // on the WidgetA.EventType reception is decided to create a widget C create widgetC On Tue, Jul 26, 2011 at 5:11 PM, david.herv...@gmail.com david.herv...@gmail.com wrote: No body concerned ? On 25 juil, 10:50, david.herv...@gmail.com david.herv...@gmail.com wrote: Hi, I'm facing a problem when using the simple implementation of the EventBus. // register widget B to be notified when WidgetA trigger an event register handler of WidgetB on WidgetA.EventType // dispatch (firingDepth is incremented) WidgetA.fireEvent // my widget is really called !!! that's good news WidgetB.onWidgetAEvent // on the WidgetA.EventType reception is decided to create a widget C create widgetC // this widget register himself to be notified on widgetB events - here the widget is registered in the deferredDeltas map (enqueueing) register handler of widgetC on WidgetB.EventType // widget B fired an event which is never trapped by the widget C because the handler of Widget C is in the deferredDeltas AND firingDepth is not 0 WidgetB.fireEvent I'm doubtful because I was expected Widget C to receive event from Widget B. A work around is to encapsulate the WidgetB.fireEvent into a DeferredCommand but it's not really a solution. An other solution is to reconsider the usage of firingDepth, I don't really know why it is used (actually I know, but avoid concurrency modification that way leads to the upper that strange behavior). In simple implementation (thread safe) will be to get rid of the usage of this firingDepth/deferredDeltas and that getHandlerList return a copy of the handlers to go through and that's it: We insert directly the handler when they request for registration and we fire on the current map of handlers Below is a possible implementation of what I think is a better implementation (behaviorally speaking) : package com.google.web.bindery.event.shared; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.ListIterator; import java.util.Map; import java.util.Set; import com.google.web.bindery.event.shared.Event.Type; public class MySimpleEventBus extends EventBus { private final boolean isReverseOrder; /** * Map of event type to map of event source to list of their handlers. */ private final MapEvent.Type?, MapObject, List? map = new HashMapEvent.Type?, MapObject, List?(); public MySimpleEventBus() { this(false); } /** * Allows creation of an instance that fires its handlers in the reverse of * the order in which they were added, although filtered handlers all fire * before unfiltered handlers. * p * * @deprecated This is a legacy feature, required by GWT's old HandlerManager. * Reverse order is not honored for handlers tied to a specific * event source (via {@link #addHandlerToSource}. */ @Deprecated protected MySimpleEventBus(boolean fireInReverseOrder) { isReverseOrder = fireInReverseOrder; } @Override public H HandlerRegistration addHandler(TypeH type, H handler) { return doAdd(type, null, handler); } @Override public H HandlerRegistration addHandlerToSource(final Event.TypeH type, final Object source, final H handler) { if (source == null) { throw new NullPointerException(Cannot add a handler with a null source); } return doAdd(type, source, handler); } @Override public void fireEvent(Event? event) { doFire(event, null); } @Override public void fireEventFromSource(Event? event, Object source) { if (source == null) { throw new NullPointerException(Cannot fire from a null source); } doFire(event, source); } /** * @deprecated required by legacy features in GWT's old HandlerManager */ @Deprecated protected H void doRemove(Event.TypeH type, Object
To google team : position of selected row in a celltable
Dear GWT team, Is this possible to get the position/margin of a selected row in celltable. If yes, pls let me know else should i need to open an issue. Thanks Deepak On Tue, Jul 26, 2011 at 8:29 PM, Deepak Singh deepaksingh...@gmail.comwrote: Anyone kindly help on the issue. On Mon, Jul 25, 2011 at 11:28 PM, Deepak Singh deepaksingh...@gmail.comwrote: I also tried a lot but could not get to it. I think we need to raise this to gwt team. Regards Deepak On Mon, Jul 25, 2011 at 10:57 PM, BST babusri...@gmail.com wrote: I did try what you wanted, but even I am stumped. What I was trying was getting the source from the SelectedModel, and getting its absoluteTop and absoluteLeft, but that did not work. I will surely update if I find any other way to do this. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/YU0t9x64xVgJ. 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. -- 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: Zip download without Window.open()
We show a wait dialog, then send an RPC telling the server to kick off a backend process (ie. zip up the files), the RPC returns an identifier (a UUID) to the caller, the caller then polls every so often sending that UUID to identify which service it's asking about to get an update on whether the backend process is done or not. When the polling call indicates the process is done, the client initiates the download by calling a download servlet directly. On Jul 27, 8:07 am, Sean slough...@gmail.com wrote: Hi, I've followed a bunch of tutorials and I'm able to click a button, send parameters via a Window.open() call to an HttpServlet and it will construct a bunch of files, zip them up and send them back. The problem is sometimes creating these files can take some time, and a blank window just stares at me while it's doing so. I was wondering if there's a nicer way, like an RPC so I can tell when it's returned or an error has occurred but still have a File Dialog pop up for the user to save the .zip as normal? Thank you. -- 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 Developer Plugin on Safari 5.1 (OS X Lion 10.7) doesn't load
On Tue, Jul 26, 2011 at 6:57 PM, Jurriaan Mous m...@lable.org wrote: A workaround: We fixed it with downloading http://support.apple.com/downloads/Safari_4_0_3 and extracting Safari.app from the dmg its Applications folder with a trial of http://www.macupdate.com/app/mac/6812/pacifist It works both on Snow Leopard as on Lion. You can rename the old Safari so you can have both together on one system. The App uses the new Webkit on the system so it is only the old Safari user interface shell which uses the old Webkit API. Great catch - thanks :) Raphael On 20 jul, 21:28, Eric Ridge eeb...@gmail.com wrote: Is there a trick to get the currently-available-for-Safari plugin to work with Safari 5.1/OS X 10.7? Safari refuses to load it, and I can find no indication as to why. (fortunately, I keep around a copy of Safari 4.0.5 so I can keep working.) Any insight will be greatly appreciated! eric -- 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. -- inc: http://ars-machina.raphaelbauer.com tech: http://ars-codia.raphaelbauer.com web: http://raphaelbauer.com -- 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: Google Products using GWT
Just did a cursory inspection of the new Google Offers application and it looks like an application built using GWT. https://www.google.com/offers/home -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/bF9oB8W1bNoJ. 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 Java Interfaces in JSNI
Hi, I have the following: interface I { myInterfaceFunction } A implements I { } B implements I { } I want to pass A or B using interface I to a js code I am writting, ie public native void makeUseOfI(I myObjectAorB) /*-{ var val = myObjectAorB.@pkg.I.myInterfaceFunction(); $wnd.whateverFunction(val) }-*/; Is this possible? Thanks, Thomas -- 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 Designer and tree widget problem
Hi, I'm working with Eclipse Helios, GWT plugin and GWT Designer installed. I made my interface ( many panels, textbox, buttons etc...). When i try to add a Tree widget, the result is an exception in Eclipse. I try to find precisions about tree widget in documentation, but i didn't find anything. Could you help ? Thanks. Regards. Karim Duran. -- 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 handle dependencies in minor UI controls within the MVP framework.
Sometimes I use sending custom events (including parameterized, when needed) to the presenter through HandlerManager.fireEvent(..). But more often I prefer to keep a reference to the presenter in the view, and my colleagues also think this approach simplifies the code. -- 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.
Cannot open GWT classes with GWT Designer
I am using the GWT plugin along with GWT Designer on Eclipse 3.6. I get the following error when trying to switch from Source to Design view in GWT Designer: Any suggestion would be greatly appreciated! java.lang.NoSuchMethodError: com.google.gdt.eclipse.designer.model.widgets.support.GwtState.getCSSFiles()Ljava/ util/List; at com.google.gdt.eclipse.designer.gxt.parser.ClassLoaderValidator.hasRequiredStyles(ClassLoaderValidator.java: 89) at com.google.gdt.eclipse.designer.gxt.parser.ClassLoaderValidator.validate(ClassLoaderValidator.java: 45) at com.google.gdt.eclipse.designer.parser.ParseFactory.validate(ParseFactory.java: 465) at com.google.gdt.eclipse.designer.parser.ParseFactory.getClassLoader(ParseFactory.java: 433) at org.eclipse.wb.internal.core.parser.AbstractParseFactory.initializeClassLoader(AbstractParseFactory.java: 732) at com.google.gdt.eclipse.designer.parser.ParseFactory.getRootContext(ParseFactory.java: 103) at org.eclipse.wb.internal.core.parser.JavaInfoParser.prepareParseContext(JavaInfoParser.java: 1185) at org.eclipse.wb.internal.core.parser.JavaInfoParser.parse(JavaInfoParser.java: 244) at org.eclipse.wb.internal.core.parser.JavaInfoParser.access $9(JavaInfoParser.java:240) at org.eclipse.wb.internal.core.parser.JavaInfoParser $1.runObject(JavaInfoParser.java:153) at org.eclipse.wb.internal.core.parser.JavaInfoParser $1.runObject(JavaInfoParser.java:1) at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runDesignTime(ExecutionUtils.java: 153) at org.eclipse.wb.internal.core.parser.JavaInfoParser.parse(JavaInfoParser.java: 151) at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java: 513) at org.eclipse.wb.internal.core.editor.DesignPage.access $9(DesignPage.java:501) at org.eclipse.wb.internal.core.editor.DesignPage $8$1.run(DesignPage.java:434) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java: 179) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java: 150) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4584) at org.eclipse.wb.internal.core.editor.DesignPage $8.run(DesignPage.java:431) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java: 464) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java: 372) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java: 507) at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF_withProgress(DesignPage.java: 450) at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java: 400) at org.eclipse.wb.internal.core.editor.UndoManager.refreshDesignerEditor(UndoManager.java: 381) at org.eclipse.wb.internal.core.editor.UndoManager.activate(UndoManager.java: 90) at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState_True(DesignPage.java: 248) at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState(DesignPage.java: 226) at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode.showPage(DefaultMultiMode.java: 125) at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode $1.widgetSelected(DefaultMultiMode.java:63) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java: 234) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774) at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java: 2743) at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1429) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java: 257) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java: 4066) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java: 2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java: 332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java: 664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java: 149) at
how to restrict to click only on image not out side area of ImageCell
Hi All, I am using CellTable with ImageResourceCell and, everything working fine other then, user able to click on outside cell area and same action pop up. I want to trigger 'onBrowserEvent' only on image click not for out side area The same think happening for all Type of Cell , do we have some thing so that we can restrict click on outside area of cell ? Please help me , thank in advance. -- 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.
Eclipse GWT pluggin code formating
Hi I work in an organisation with a specified code format. One of the rules is no tabs, we use checkstyles to enforce this. I am heavily involved in GWT projects which requires some minimal use of JSNI code. When I enable the gwt plugin on the project my code formatter replaces spaces with tabs, just inside the javascript tags (/*-{ }- */). This causes checkstyle errors and I have to manually search and replace the tabs with spaces to be able to check in my changes. When I disable the gwt plugin on the project the output of the formatter returns to normal. I could not find a setting or any description about how to disable the auto formatting. Is there a way to disable the formatting of JSNI code? Thanks in advanced. Simon -- 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: SimpleEventBus : why such a non-predictive behavior implementation ?
i feel alike, all new registrations are delayed until the end of firing (depth=0) .. so nothing will happen if firing those new events before the end .. depth behaves like a lock for concurrency, but not really necessary for single-thread JavaScript .. On Jul 27, 9:58 am, david.herv...@gmail.com david.herv...@gmail.com wrote: thanks, committed patch here :http://gwt-code-reviews.appspot.com/1500804/ On 26 juil, 22:43, Gal Dolber gal.dol...@gmail.com wrote: I am, but your post is too long to read :) For what I understood, I had a similar problem, and I solved it encapsulating the create widgetC in a DeferredCommand (for your example). Its really hard for me to understand the modification you purpose, maybe someone from google could see it. But I think that if you found a better way of doing something you should send a patch and make us all happyhttp://code.google.com/webtoolkit/makinggwtbetter.html(alsoyou will get more help in gwt-code-reviews.appspot.com than here) Regards! // on the WidgetA.EventType reception is decided to create a widget C create widgetC On Tue, Jul 26, 2011 at 5:11 PM, david.herv...@gmail.com david.herv...@gmail.com wrote: No body concerned ? On 25 juil, 10:50, david.herv...@gmail.com david.herv...@gmail.com wrote: Hi, I'm facing a problem when using the simple implementation of the EventBus. // register widget B to be notified when WidgetA trigger an event register handler of WidgetB on WidgetA.EventType // dispatch (firingDepth is incremented) WidgetA.fireEvent // my widget is really called !!! that's good news WidgetB.onWidgetAEvent // on the WidgetA.EventType reception is decided to create a widget C create widgetC // this widget register himself to be notified on widgetB events - here the widget is registered in the deferredDeltas map (enqueueing) register handler of widgetC on WidgetB.EventType // widget B fired an event which is never trapped by the widget C because the handler of Widget C is in the deferredDeltas AND firingDepth is not 0 WidgetB.fireEvent I'm doubtful because I was expected Widget C to receive event from Widget B. A work around is to encapsulate the WidgetB.fireEvent into a DeferredCommand but it's not really a solution. An other solution is to reconsider the usage of firingDepth, I don't really know why it is used (actually I know, but avoid concurrency modification that way leads to the upper that strange behavior). In simple implementation (thread safe) will be to get rid of the usage of this firingDepth/deferredDeltas and that getHandlerList return a copy of the handlers to go through and that's it: We insert directly the handler when they request for registration and we fire on the current map of handlers Below is a possible implementation of what I think is a better implementation (behaviorally speaking) : package com.google.web.bindery.event.shared; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.ListIterator; import java.util.Map; import java.util.Set; import com.google.web.bindery.event.shared.Event.Type; public class MySimpleEventBus extends EventBus { private final boolean isReverseOrder; /** * Map of event type to map of event source to list of their handlers. */ private final MapEvent.Type?, MapObject, List? map = new HashMapEvent.Type?, MapObject, List?(); public MySimpleEventBus() { this(false); } /** * Allows creation of an instance that fires its handlers in the reverse of * the order in which they were added, although filtered handlers all fire * before unfiltered handlers. * p * * @deprecated This is a legacy feature, required by GWT's old HandlerManager. * Reverse order is not honored for handlers tied to a specific * event source (via {@link #addHandlerToSource}. */ @Deprecated protected MySimpleEventBus(boolean fireInReverseOrder) { isReverseOrder = fireInReverseOrder; } @Override public H HandlerRegistration addHandler(TypeH type, H handler) { return doAdd(type, null, handler); } @Override public H HandlerRegistration addHandlerToSource(final Event.TypeH type, final Object source, final H handler) { if (source == null) { throw new NullPointerException(Cannot add a handler with a null source); } return doAdd(type, source, handler); } @Override public void fireEvent(Event? event) { doFire(event, null);
CurrencyBox?
Hello, I've searched for an example of a CurrencyBox, that is, a ValueBox that would use a NumberFormat.getCurrencyFormat(userProvidedCode) and would map that to an Integer instead of a Double, since it's not very safe to store floating point monetary values. But, well, I couldn't find any. Does any generous soul in this group have any example of such box and would be willing to provide it? Thank you, -- Tiago Rinck Caveden -- 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.
UI Class Structure
Hello, This query isn't specifically a GWT issue, but as I'm using the framework to develop my application I thought someone here may be able to give me some advice. I'm creating a graphic design program and so far I have implemented the business logic classes and started work on the UI components in a seperate package. My question concerns the program architecture, as I'm unsure as to the most effective way to structure these classes. The UI consists of a main DockPanel with one sub-panel in each slot(N,S,E,W and center.) 1. Should I create distinct classes for each sub-panel to encapsulate it? So far I have created an abstract class for each slot and plan to contain all code related to each-sub panel in abstract methods. 2. Where should I put the functional code, such as the controllers and listeners etc.? In the entry point class or with each sub-panel(either in distinct class or the abstract workers?) Any advice would be much appreciated, Gary -- 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: NullPointerException During Compile
I' had exactly the same error. I seems Google has changed the behavior of the compiler. In my case I used the visitor pattern; removing it the project compiles correctly. I suggest you to get the sources of the gwt-dev packages and debug the compiling process. On Jul 7, 4:30 pm, Brian Cabana b.k.cab...@gmail.com wrote: Hi members, I recently upgraded to GWT 2.3.0 and recompiled my projects in Eclipse. On one project I got the following error and stack: [ERROR] An internal compiler exception occurred com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit. at com.google.gwt.dev.js.ast.JsVisitor.translateException(JsVisitor.java: 459) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:445) at com.google.gwt.dev.js.ast.JsModVisitor $NodeContext.traverse(JsModVisitor.java:141) at com.google.gwt.dev.js.ast.JsModVisitor.doAccept(JsModVisitor.java: 166) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.ast.JsConditional.traverse(JsConditional.java: 87) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:443) at com.google.gwt.dev.js.ast.JsModVisitor $NodeContext.traverse(JsModVisitor.java:141) at com.google.gwt.dev.js.ast.JsModVisitor.doAccept(JsModVisitor.java: 166) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.ast.JsBinaryOperation.traverse(JsBinaryOperation.java: 114) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:443) at com.google.gwt.dev.js.ast.JsModVisitor $NodeContext.traverse(JsModVisitor.java:141) at com.google.gwt.dev.js.ast.JsModVisitor.doAccept(JsModVisitor.java: 166) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.ast.JsReturn.traverse(JsReturn.java:47) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:443) at com.google.gwt.dev.js.ast.JsModVisitor $ListContext.traverse(JsModVisitor.java:75) at com.google.gwt.dev.js.ast.JsModVisitor.doAcceptWithInsertRemove(JsModVisitor.java: 188) at com.google.gwt.dev.js.ast.JsVisitor.acceptWithInsertRemove(JsVisitor.java: 110) at com.google.gwt.dev.js.ast.JsBlock.traverse(JsBlock.java:44) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:443) at com.google.gwt.dev.js.ast.JsModVisitor $NodeContext.traverse(JsModVisitor.java:141) at com.google.gwt.dev.js.ast.JsModVisitor.doAccept(JsModVisitor.java: 166) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.ast.JsFunction.traverse(JsFunction.java:179) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:443) at com.google.gwt.dev.js.ast.JsModVisitor $NodeContext.traverse(JsModVisitor.java:141) at com.google.gwt.dev.js.ast.JsModVisitor.doAccept(JsModVisitor.java: 166) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.ast.JsExprStmt.traverse(JsExprStmt.java:38) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:443) at com.google.gwt.dev.js.ast.JsModVisitor $ListContext.traverse(JsModVisitor.java:75) at com.google.gwt.dev.js.ast.JsModVisitor.doAcceptWithInsertRemove(JsModVisitor.java: 188) at com.google.gwt.dev.js.ast.JsVisitor.acceptWithInsertRemove(JsVisitor.java: 110) at com.google.gwt.dev.js.ast.JsBlock.traverse(JsBlock.java:44) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:443) at com.google.gwt.dev.js.ast.JsModVisitor $NodeContext.traverse(JsModVisitor.java:141) at com.google.gwt.dev.js.ast.JsModVisitor.doAccept(JsModVisitor.java: 166) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.ast.JsProgramFragment.traverse(JsProgramFragment.java: 37) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:443) at com.google.gwt.dev.js.ast.JsModVisitor $NodeContext.traverse(JsModVisitor.java:141) at com.google.gwt.dev.js.ast.JsModVisitor.doAccept(JsModVisitor.java: 166) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.ast.JsProgram.traverse(JsProgram.java:128) at com.google.gwt.dev.js.ast.JsVisitor.doTraverse(JsVisitor.java:443) at com.google.gwt.dev.js.ast.JsModVisitor $NodeContext.traverse(JsModVisitor.java:141) at com.google.gwt.dev.js.ast.JsModVisitor.doAccept(JsModVisitor.java: 166) at com.google.gwt.dev.js.ast.JsVisitor.accept(JsVisitor.java:97) at com.google.gwt.dev.js.JsInliner.execImpl(JsInliner.java:1683) at com.google.gwt.dev.js.JsInliner.exec(JsInliner.java:1625)
using jmock with jsni methods
Hi all, i'm trying to use jmock for mocking object while testing our application. While some of the classes make use of jsni methods which form core part of application. these classes are being used by classes which are used in test class. e.g. class Core uses jsni code for important functionality class Manager creates object of Core class class Client takes services from Manager class Now what I need to test is Client class using CleintTest class Can you suggest me how can it be done using jmock or any other mocking framework cause things fails due unsatisfied linking exception when it comes to Core class which uses jsni code Regards -- 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.
Eclipse: Depending on a non-GWT project
Hello, I've only used Java for GWT purposes, so sorry in advance if this is a dumb question :) In Eclipse, I would like to have my GWT project depend on code in a non-GWT project (so I don't think GWT module inheritance will work). In setting this up, my preferences in order would be: 1. No need to compile the parent project into a JAR, for both dev-mode and deployment compilation. 2. Need to compile into JAR when deploying, but not for dev-mode. 3. Need to compile into JAR even during development (which would be pretty painful). I'm wondering, how can I set up any of these? Thanks! - Steve P.S. The closest link I could find about this question was about GWT module inheritance: http://stackoverflow.com/questions/5247372/how-to-add-a-project-as-a-dependency-on-a-gwt-gae-project -- 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.
ERROR: GWT 2.3 + gwt-maps
Hi, i using GWT 2.3 with gwt-maps.jar , but i've trouble, didn't compile, but i follow all steps that guide. A part of problems are listed bellow: [ERROR] Errors in 'jar:file:/C:/eclipse/gwt-maps-1.1.0/gwt- maps3-0.2a.jar!/com/google/gwt/maps/client/base/LatLng.java' [ERROR] Internal compiler error java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected at com.google.gwt.jsio.rebind.JSWrapperGenerator.generate(JSWrapperGenerator.java: 276) at com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java: 48) Someone can help me? -- 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.
AutoBeanCodex.decode performance
Hi all I'm seeing some slowness with AutoBeanCodex.decode(...), and I have a few questions. In my application, it needs to decode hundreds of json objects. Here are some rough timings: FF3 on Mac: 1 second Safari on Mac: 1 second Chrome on Mac: seconds, but still reasonable IE6 on XP: 1 minute+ Is there anything I can do to make the parsing run faster on IE6? I know the parsing code is slow because when I substitute json parsing with randomly generated data, IE6 renders within reasonable time. (I hate IE6, hate IE6, hate IE6... but that doesn't mean I can skip its support =/) I'm looking at the AutoBeanCodex.decode code. Does it have any calls that are known to be slow on IE6? What about builtin function eval? I heard there are security risks, but say if I mind them (crossing fingers _), is there a way to tell autobean codex to use eval instead of the default parser? many thanks p.s. I understand that there are other work arounds (like incremental loading etc) to this issue, for now, I just want to focus on AutoBeanCodex.decode. -- 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.
Regarding ImageCell on click only on image not surrounding area in GWT cellTable
Hi All, I am new to GWT, I am using GWT CellTable to display 5 columns in which 4 are TextCell and one is Imagecell, On click on imagecell image I have to call one popup. cellTable is printing properly and pop up is also comming on ImageCell click. My problem is, I want to get popup only on image click , not surrounding area of image in ImageCell. Please let me know how i can restrict to call onBrowserEvent click event for surrounding image area. I need it urgently please help me , i tried many option but not get success. Thanks in advance. -- Thanks and Regards Vidhi Jain -- 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 Developer Plugin on Safari 5.1 (OS X Lion 10.7) doesn't load
Thanks Jurriaan... a real lifesaver. If you don't want to go back to such an old version, 5.0.5 also works, and you can get it from http://appldnld.apple.com.edgesuite.net/content.info.apple.com/Safari5/041-0564.20110413.Fi9pb/Safari5.0.5SnowLeopard.dmg For everyone's benefit, here're the detailed steps I used: 1. download 5.0.5, extract the .pkg from the dmg. 2. get pacifist using Jurriaan's supplied link, use it to open the safari pkg. 3. extract safari.app and put it somewhere other than your Applications folder (otherwise it'll overwrite 5.1). It'll be called 'Safari'; I renamed it to 'Safari 5.0.5'. (all the other stuff in the pkg didn't seem to be necessary) 4. run you gwt webapp, then on the url, right-click, open withAdd a browser, pick the 5.0.5 app, and bob's your uncle! (or just open browser, and paste url) tested on lion and showcase, seems to work fine. btw, there's 5.0.6 in the apple support download pages, but that's a leopard only thing. On Wednesday, July 27, 2011 12:57:47 AM UTC+8, Jurriaan Mous wrote: A workaround: We fixed it with downloading http://support.apple.com/downloads/Safari_4_0_3 and extracting Safari.app from the dmg its Applications folder with a trial of http://www.macupdate.com/app/mac/6812/pacifist It works both on Snow Leopard as on Lion. You can rename the old Safari so you can have both together on one system. The App uses the new Webkit on the system so it is only the old Safari user interface shell which uses the old Webkit API. On 20 jul, 21:28, Eric Ridge eeb...@gmail.com wrote: Is there a trick to get the currently-available-for-Safari plugin to work with Safari 5.1/OS X 10.7? Safari refuses to load it, and I can find no indication as to why. (fortunately, I keep around a copy of Safari 4.0.5 so I can keep working.) Any insight will be greatly appreciated! eric -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/WwHQK0YtaFMJ. 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: SimpleEventBus : why such a non-predictive behavior implementation ?
Even if multithreaded my implementation is (normally) done. I really don't know why they have used such a mecanism... There may be a use case I'm missing On 27 juil, 17:28, Sixin Zhang sixin.zh...@gmail.com wrote: i feel alike, all new registrations are delayed until the end of firing (depth=0) .. so nothing will happen if firing those new events before the end .. depth behaves like a lock for concurrency, but not really necessary for single-thread JavaScript .. On Jul 27, 9:58 am, david.herv...@gmail.comdavid.herv...@gmail.com wrote: thanks, committed patch here :http://gwt-code-reviews.appspot.com/1500804/ On 26 juil, 22:43, Gal Dolber gal.dol...@gmail.com wrote: I am, but your post is too long to read :) For what I understood, I had a similar problem, and I solved it encapsulating the create widgetC in a DeferredCommand (for your example). Its really hard for me to understand the modification you purpose, maybe someone from google could see it. But I think that if you found a better way of doing something you should send a patch and make us all happyhttp://code.google.com/webtoolkit/makinggwtbetter.html(alsoyouwill get more help in gwt-code-reviews.appspot.com than here) Regards! // on the WidgetA.EventType reception is decided to create a widget C create widgetC On Tue, Jul 26, 2011 at 5:11 PM, david.herv...@gmail.com david.herv...@gmail.com wrote: No body concerned ? On 25 juil, 10:50, david.herv...@gmail.com david.herv...@gmail.com wrote: Hi, I'm facing a problem when using the simple implementation of the EventBus. // register widget B to be notified when WidgetA trigger an event register handler of WidgetB on WidgetA.EventType // dispatch (firingDepth is incremented) WidgetA.fireEvent // my widget is really called !!! that's good news WidgetB.onWidgetAEvent // on the WidgetA.EventType reception is decided to create a widget C create widgetC // this widget register himself to be notified on widgetB events - here the widget is registered in the deferredDeltas map (enqueueing) register handler of widgetC on WidgetB.EventType // widget B fired an event which is never trapped by the widget C because the handler of Widget C is in the deferredDeltas AND firingDepth is not 0 WidgetB.fireEvent I'm doubtful because I was expected Widget C to receive event from Widget B. A work around is to encapsulate the WidgetB.fireEvent into a DeferredCommand but it's not really a solution. An other solution is to reconsider the usage of firingDepth, I don't really know why it is used (actually I know, but avoid concurrency modification that way leads to the upper that strange behavior). In simple implementation (thread safe) will be to get rid of the usage of this firingDepth/deferredDeltas and that getHandlerList return a copy of the handlers to go through and that's it: We insert directly the handler when they request for registration and we fire on the current map of handlers Below is a possible implementation of what I think is a better implementation (behaviorally speaking) : package com.google.web.bindery.event.shared; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.ListIterator; import java.util.Map; import java.util.Set; import com.google.web.bindery.event.shared.Event.Type; public class MySimpleEventBus extends EventBus { private final boolean isReverseOrder; /** * Map of event type to map of event source to list of their handlers. */ private final MapEvent.Type?, MapObject, List? map = new HashMapEvent.Type?, MapObject, List?(); public MySimpleEventBus() { this(false); } /** * Allows creation of an instance that fires its handlers in the reverse of * the order in which they were added, although filtered handlers all fire * before unfiltered handlers. * p * * @deprecated This is a legacy feature, required by GWT's old HandlerManager. * Reverse order is not honored for handlers tied to a specific * event source (via {@link #addHandlerToSource}. */ @Deprecated protected MySimpleEventBus(boolean fireInReverseOrder) { isReverseOrder = fireInReverseOrder; } @Override public H HandlerRegistration addHandler(TypeH type, H handler) { return doAdd(type, null, handler); } @Override public H HandlerRegistration addHandlerToSource(final Event.TypeH type, final Object source,
Re: Using Java Interfaces in JSNI
Yes it s possible. But you might want to actually call the function in the JSNI in the right way.(see bold entry) public native void makeUseOfI(I myObjectAorB) /*-{ var val = myObjectAorB.@pkg.I*::*myInterfaceFunction()*();* $wnd.whateverFunction(val) }-*/; 2011/7/27 Thomas Lefort lefortho...@gmail.com Hi, I have the following: interface I { myInterfaceFunction } A implements I { } B implements I { } I want to pass A or B using interface I to a js code I am writting, ie public native void makeUseOfI(I myObjectAorB) /*-{ var val = myObjectAorB.@pkg.I.myInterfaceFunction(); $wnd.whateverFunction(val) }-*/; Is this possible? Thanks, Thomas -- 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 API for non Java based platforms http://code.google.com/p/gwt4air/ http://www.gwt4air.appspot.com/ -- 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: Eclipse GWT pluggin code formating
Sorry, I've no answer for you. However I can't resist pointing out to the plug-in creators Google's own style guidelines: We use 2-space indents for blocks. No tabs at all, anywhere. (http://code.google.com/ webtoolkit/makinggwtbetter.html#codestyle under Indentation) While I like Eclipse, I've had no luck making this the default (using 3.6.2). Tabs in my XML files are 2 spaces, but I'm still getting a 4- space tabs in my Java files. On Jul 26, 7:56 pm, Simon Borysiewicz simon.borysiew...@gmail.com wrote: Hi I work in an organisation with a specified code format. One of the rules is no tabs, we use checkstyles to enforce this. I am heavily involved in GWT projects which requires some minimal use of JSNI code. When I enable the gwt plugin on the project my code formatter replaces spaces with tabs, just inside the javascript tags (/*-{ }- */). This causes checkstyle errors and I have to manually search and replace the tabs with spaces to be able to check in my changes. When I disable the gwt plugin on the project the output of the formatter returns to normal. I could not find a setting or any description about how to disable the auto formatting. Is there a way to disable the formatting of JSNI code? Thanks in advanced. Simon -- 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.
Applying CSS to Grid
Hello, I am currently struggling to apply the proper CSS styles to my Grid component. What I have is: g:Grid ui:field=rankingGrid styleName={style.leaderboard} !-- Header row -- g:row g:customCell g:Label ui:field=skillRangeLabel/g:Label /g:customCell ... /g:row /g:Grid And the styles are ui:style .leaderboard td { padding: 3px 15px; text-align: center; font-size: medium; } .leaderboard headerRow { font-size: xx-large; font-weight: bold; } /ui:style When the view is loaded, I also run: @Override protected void onLoad() { super.onLoad(); this.rankingGrid.getRowFormatter().setStyleName(0, headerRow); } where rankingGrid is my Grid object. What I want to do is to apply the headerRow style to my first row (i.e. that it is displayed in big bold letters), but I can't find what I am doing wrong. Would you have any idea? Thanks in advance, -- Sébastien Tromp -- 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: Zip download without Window.open()
While the RPC preps the file(s), I put up a wait dialog. The download is done with a servlet which I direct to a hidden frame. In my project's HTML I put iframe src=javascript:'' id=__gwt_downloadFrame style=width: 0;height:0;border:0/iframe just below my history frame. In loading my module class is private static final String DOWNLOAD_IFRAME = __gwt_downloadFrame; private static Frame downloadFrame; which I wrap in onModule load with // Get the hidden frame that's our download target. downloadFrame = Frame.wrap(Document.get().getElementById(DOWNLOAD_IFRAME)); and make available with a static method: public static void downloadURL(String url) { downloadFrame.setUrl(url); } If the RPC completes properly, I call the download servlet: String saveURL = GWT.getModuleBaseURL() + downloadServlet?... [params] MyProject.downloadURL(saveURL); You may have to do some other hand waving in the servlet to set the proper headers, esp.with SSL (http://www.jspwiki.org/wiki/ BugSSLAndIENoCacheBug). On Jul 27, 8:07 am, Sean slough...@gmail.com wrote: Hi, I've followed a bunch of tutorials and I'm able to click a button, send parameters via a Window.open() call to an HttpServlet and it will construct a bunch of files, zip them up and send them back. The problem is sometimes creating these files can take some time, and a blank window just stares at me while it's doing so. I was wondering if there's a nicer way, like an RPC so I can tell when it's returned or an error has occurred but still have a File Dialog pop up for the user to save the .zip as normal? Thank you. -- 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: Eclipse: Depending on a non-GWT project
On 26 July 2011 16:11, Steve Wedig stevewe...@gmail.com wrote: Hello, I've only used Java for GWT purposes, so sorry in advance if this is a dumb question :) In Eclipse, I would like to have my GWT project depend on code in a non-GWT project (so I don't think GWT module inheritance will work). In setting this up, my preferences in order would be: 1. No need to compile the parent project into a JAR, for both dev-mode and deployment compilation. 2. Need to compile into JAR when deploying, but not for dev-mode. 3. Need to compile into JAR even during development (which would be pretty painful). I'm wondering, how can I set up any of these? The GWT compiler simply needs the source of your dependency available at compile time. It doesn't matter whether it's in the form of a JAR file or a directory on the classpath. You do need to make sure GWT knows where to look, so see source path=... (for your *.gwt.xml). Be careful that your new dependency doesn't use reflection because most of that is not supported by GWT (for obvious reasons). -- 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: Cannot open GWT classes with GWT Designer
Hi Jordi, here's my opinion after reading your log. 1) sometimes Eclipse just open the code in a certain way because you may click in a alternative view ( package view, navigator view instead of project view) depending how you customized your Eclipse. May be you should try right-clic - open with - GWT designer from project view. And try to reproduce the incident after restarting Eclipse. 2) But, by reading your log, i think there's also a pb with your project folders. It seems that Eclipse can't find a CSS file. And then a GEF exception occurs...GEF is the plugin responsible to draw the palette and visual designer interface. Specially, by binding UI components and their CSS properties. So, did you import that project ? did you create it from scratch ? did you delete a CSS file before this action ? did you change manually any important file ( conf, xml etc...) ? did you respect GWT project folders structure ? regards. karim duran 2011/7/27 Jordan Reynolds jordan%aesgs@gtempaccount.com I am using the GWT plugin along with GWT Designer on Eclipse 3.6. I get the following error when trying to switch from Source to Design view in GWT Designer: Any suggestion would be greatly appreciated! java.lang.NoSuchMethodError: com.google.gdt.eclipse.designer.model.widgets.support.GwtState.getCSSFiles()Ljava/ util/List; at com.google.gdt.eclipse.designer.gxt.parser.ClassLoaderValidator.hasRequiredStyles(ClassLoaderValidator.java: 89) at com.google.gdt.eclipse.designer.gxt.parser.ClassLoaderValidator.validate(ClassLoaderValidator.java: 45) at com.google.gdt.eclipse.designer.parser.ParseFactory.validate(ParseFactory.java: 465) at com.google.gdt.eclipse.designer.parser.ParseFactory.getClassLoader(ParseFactory.java: 433) at org.eclipse.wb.internal.core.parser.AbstractParseFactory.initializeClassLoader(AbstractParseFactory.java: 732) at com.google.gdt.eclipse.designer.parser.ParseFactory.getRootContext(ParseFactory.java: 103) at org.eclipse.wb.internal.core.parser.JavaInfoParser.prepareParseContext(JavaInfoParser.java: 1185) at org.eclipse.wb.internal.core.parser.JavaInfoParser.parse(JavaInfoParser.java: 244) at org.eclipse.wb.internal.core.parser.JavaInfoParser.access $9(JavaInfoParser.java:240) at org.eclipse.wb.internal.core.parser.JavaInfoParser $1.runObject(JavaInfoParser.java:153) at org.eclipse.wb.internal.core.parser.JavaInfoParser $1.runObject(JavaInfoParser.java:1) at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runDesignTime(ExecutionUtils.java: 153) at org.eclipse.wb.internal.core.parser.JavaInfoParser.parse(JavaInfoParser.java: 151) at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java: 513) at org.eclipse.wb.internal.core.editor.DesignPage.access $9(DesignPage.java:501) at org.eclipse.wb.internal.core.editor.DesignPage $8$1.run(DesignPage.java:434) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java: 179) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java: 150) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4584) at org.eclipse.wb.internal.core.editor.DesignPage $8.run(DesignPage.java:431) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java: 464) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java: 372) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java: 507) at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF_withProgress(DesignPage.java: 450) at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java: 400) at org.eclipse.wb.internal.core.editor.UndoManager.refreshDesignerEditor(UndoManager.java: 381) at org.eclipse.wb.internal.core.editor.UndoManager.activate(UndoManager.java: 90) at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState_True(DesignPage.java: 248) at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState(DesignPage.java: 226) at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode.showPage(DefaultMultiMode.java: 125) at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode $1.widgetSelected(DefaultMultiMode.java:63) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java: 234) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774) at
FYHSIAO is out of the office.
I will be out of the office starting 2011/07/28 and will not return until 2011/08/01. I will respond to your message when I return. --- TSMC PROPERTY This email communication (and any attachments) is proprietary information for the sole use of its intended recipient. Any unauthorized review, use or distribution by anyone other than the intended recipient is strictly prohibited. If you are not the intended recipient, please notify the sender by replying to this email, and then delete this email and any copies of it immediately. Thank you. --- -- 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/GPE 2.4.0 RC1 is available
GWT 2.4.0 adds a new DataGrid widget with scrollable data area and many enhancements to RequestFactory (see http://code.google.com/p/google-web-toolkit/wiki/RequestFactory_2_4). Google Plugin for Eclipse 2.4.0 introduces a wizard to publish your application to Google Apps Marketplace. SDK: http://code.google.com/p/google-web-toolkit/downloads/list Eclipse update sites: http://code.google.com/eclipse/beta/docs/download.html gwt-2.4.0-rc1 will appear in Maven Central shortly. Docs, Javadocs, and release notes will be published with the final release. -- David Chandler Developer Programs Engineer, GWT+GAE w: http://code.google.com/ b: http://turbomanage.wordpress.com/ b: http://googlewebtoolkit.blogspot.com/ t: @googledevtools -- 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: N-tier with RequestFactory is possible?
Hi David, Thanks for answer, the RequestContext polymorphic on 2.4 RC works fine now! And about my first question you could tell me if I did the best choice? Kind Regards, Rafael Dipold -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/2LGORDZPYkIJ. 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/GPE 2.4.0 RC1 is available
Thanks David! One thing people should be aware of is that if you just use check for updates option in eclipse, you won't get the designer. You have to manually go back into the download site and select those options. Otherwise I have to say this is a very exciting release. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Gy9uqQfrybsJ. 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.
Size of permutations getting too bigger
Hi all, I currently working on a project using gwt in appengine and I am having problem with the size of the permutations that are breaking the appengine limit of 150MB deploy size. My project has 14 modules. The folders of permutations under the war directory has a average of 1MB. No problem here. But, the directories of modules under the DEPLOY folder has 6 files .symbolMap each. Each symbolMap file has a average of 1,5MB totalizing 9MB per module folder. With my 14 modules x 9MB = 126MB + 4,7MB images and static files + some external jar libraries, gives the 150MB thats is breaking the deploy limit. I am surely doing something wrong, cause I dont believe that my project is that big. Can you please compare these files sizes values with your projects please? Maybe should I clean the deploy folder? Its very strange. Just for know... I am NOT using internacionalization and I am compiling with OBFUSCATED , Log Level: Info parameters of GWT. Thanks in advance, [], Rodrigo. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/X3_n-AD98L0J. 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: Size of permutations getting too bigger
You should probably add a comment to this post: https://groups.google.com/forum/#!searchin/google-web-toolkit-contributors/symbolMap$20gzip/google-web-toolkit-contributors/oPUF0i46a3U/adA6GU1ymswJ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/DNLY2WVe-LUJ. 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: Zip download without Window.open()
Thank you for the ideas guys! I will try to implement something like that! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Hk7LumPhrDAJ. 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 set the font in code and measure text dimensions?
Hello, Is there a way to set the font and font size of either a HTML, RichTextArea or TextArea in code? Is there a way to calculate the width and height of a text if i know the font? Any ideas? -- 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 Spring related post
Hi, I am using GWT 2.0 integrated with Spring in the application, after executing the applicationwhen I try to login into the application..I am getting the following error. I have searched a lot to find out the solution, if anyone has encountered this kind of error and found some solution, please help me out with this, I would atleast need what might be the root cause for this exception..thanks in advance. [WARN] Exception while dispatching incoming RPC call java.lang.NullPointerException at javax.servlet.GenericServlet.getServletName(GenericServlet.java: 322) at javax.servlet.GenericServlet.log(GenericServlet.java:277) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doGetSerializationPolicy(RemoteServiceServlet.java: 237) at com.google.gwt.user.server.rpc.RemoteServiceServlet.getSerializationPolicy(RemoteServiceServlet.java: 117) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead(ServerSerializationStreamReader.java: 429) at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:234) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java: 164) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java: 86) at com.shris.emr.server.common.rpc.AbstractShrisRpcSerivce.handleRequest(AbstractShrisRpcSerivce.java: 60) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java: 48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java: 771) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java: 716) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java: 647) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java: 563) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1097) at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java: 113) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java: 76) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1088) at org.springframework.security.web.FilterChainProxy $VirtualFilterChain.doFilter(FilterChainProxy.java:343) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java: 109) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java: 83) at org.springframework.security.web.FilterChainProxy $VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java: 97) at org.springframework.security.web.FilterChainProxy $VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java: 100) at org.springframework.security.web.FilterChainProxy $VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java: 78) at org.springframework.security.web.FilterChainProxy $VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java: 54) at org.springframework.security.web.FilterChainProxy $VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java: 35) at org.springframework.security.web.FilterChainProxy $VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java: 187) at org.springframework.security.web.FilterChainProxy $VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java: 105) at org.springframework.security.web.FilterChainProxy $VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java: 79)
Re: Cannot open GWT classes with GWT Designer
Hello. I have the same problem. it worked for the previous version - com.google.gdt.eclipse.designer.doc.user_2.3.2.r36x201106201114 but does not work on the current com.google.gdt.eclipse.designer.hosted.lib_2.3.2.r37x201107161253 It does not depend on the version of eclipse or platform (Windows, linux). What is my configuration differs from the standard: I added *. gwt.xml parameter stylesheet src=../MainCabinetGWTOverride.css / tried to restore the default behavior and to remove all mention of this file, but I did not work (it was under Linux. perhaps in the process I did not REFRESH the project, so maybe the default configuration will work) by the way the old version of CSS Designer absent in the list file MainCabinetGWTOverride.css I tested this little situation so strongly bound by these can not be trusted Sorry my bad English - Google translator On 27 июл, 20:55, karim duran karim.du...@gmail.com wrote: Hi Jordi, here's my opinion after reading your log. 1) sometimes Eclipse just open the code in a certain way because you may click in a alternative view ( package view, navigator view instead of project view) depending how you customized your Eclipse. May be you should try right-clic - open with - GWT designer from project view. And try to reproduce the incident after restarting Eclipse. 2) But, by reading your log, i think there's also a pb with your project folders. It seems that Eclipse can't find a CSS file. And then a GEF exception occurs...GEF is the plugin responsible to draw the palette and visual designer interface. Specially, by binding UI components and their CSS properties. So, did you import that project ? did you create it from scratch ? did you delete a CSS file before this action ? did you change manually any important file ( conf, xml etc...) ? did you respect GWT project folders structure ? regards. karim duran 2011/7/27 Jordan Reynolds jordan%aesgs@gtempaccount.com I am using the GWT plugin along with GWT Designer on Eclipse 3.6. I get the following error when trying to switch from Source to Design view in GWT Designer: Any suggestion would be greatly appreciated! java.lang.NoSuchMethodError: com.google.gdt.eclipse.designer.model.widgets.support.GwtState.getCSSFiles()Ljava/ util/List; at com.google.gdt.eclipse.designer.gxt.parser.ClassLoaderValidator.hasRequiredStyles(ClassLoaderValidator.java: 89) at com.google.gdt.eclipse.designer.gxt.parser.ClassLoaderValidator.validate(ClassLoaderValidator.java: 45) at com.google.gdt.eclipse.designer.parser.ParseFactory.validate(ParseFactory.java: 465) at com.google.gdt.eclipse.designer.parser.ParseFactory.getClassLoader(ParseFactory.java: 433) at org.eclipse.wb.internal.core.parser.AbstractParseFactory.initializeClassLoader(AbstractParseFactory.java: 732) at com.google.gdt.eclipse.designer.parser.ParseFactory.getRootContext(ParseFactory.java: 103) at org.eclipse.wb.internal.core.parser.JavaInfoParser.prepareParseContext(JavaInfoParser.java: 1185) at org.eclipse.wb.internal.core.parser.JavaInfoParser.parse(JavaInfoParser.java: 244) at org.eclipse.wb.internal.core.parser.JavaInfoParser.access $9(JavaInfoParser.java:240) at org.eclipse.wb.internal.core.parser.JavaInfoParser $1.runObject(JavaInfoParser.java:153) at org.eclipse.wb.internal.core.parser.JavaInfoParser $1.runObject(JavaInfoParser.java:1) at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runDesignTime(ExecutionUtils.java: 153) at org.eclipse.wb.internal.core.parser.JavaInfoParser.parse(JavaInfoParser.java: 151) at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java: 513) at org.eclipse.wb.internal.core.editor.DesignPage.access $9(DesignPage.java:501) at org.eclipse.wb.internal.core.editor.DesignPage $8$1.run(DesignPage.java:434) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java: 179) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java: 150) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4584) at org.eclipse.wb.internal.core.editor.DesignPage $8.run(DesignPage.java:431) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java: 464) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java: 372) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java: 507) at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF_withProgress(DesignPage.java: 450) at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java: 400) at org.eclipse.wb.internal.core.editor.UndoManager.refreshDesignerEditor(UndoManager.java: 381)
Re: Applying CSS to Grid
You appear to be missing a period in your CSS, in front of headerRow. -Ben -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/2eNxTmFTIRMJ. 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: Size of permutations getting too bigger
Surely not, cause I just received this message of the moderator of the thread above: Wrong forum. Please post on google-web-toolkit-users group instead. So, can someone help me how to reduce the deploy size? Thanks in advance, [], Rodrigo. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/3S62n7lIa58J. 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.
CellTable question
I'm working on an GAE app using GWT and I'm running to a problem using CellTable. I don't know until run time how many columns are needed and their type in my CellTable (Note: there are always two fixed columns) so I can't just hook up the columns at design time. The values I'm reading are currently three strings where the third string gets parsed into however many columns I need (just a simple split into a String []). Is there a way to do this? I'm still learning Java so I'm thinking there is some very simple way that I haven't discovered. -- 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: Size of permutations getting too bigger
Hi Rodrigo, you can pass the -deploy argument to specify a location outside your project for symboMaps and rpcPolicyManifest so they won't get deployed. See http://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebugging.html#DevGuideCompilerOptions HTH, /dmc On Wed, Jul 27, 2011 at 1:44 PM, Rodrigo Teixo horariofa...@gmail.com wrote: Surely not, cause I just received this message of the moderator of the thread above: Wrong forum. Please post on google-web-toolkit-users group instead. So, can someone help me how to reduce the deploy size? Thanks in advance, [], Rodrigo. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/3S62n7lIa58J. 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. -- David Chandler Developer Programs Engineer, GWT+GAE w: http://code.google.com/ b: http://turbomanage.wordpress.com/ b: http://googlewebtoolkit.blogspot.com/ t: @googledevtools -- 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: xxx.ui.xml is not in GWT client package
And did you try to take use of @UiTemplate annotation to point the actual location of ui.xml file? -- 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 Designer and tree widget problem
Please create and submit a report as suggested in the error window. At minimum, we need to see a complete test case and any associated exception logs. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/xR7y9aLz0HkJ. 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: Cannot open GWT classes with GWT Designer
This NoSuchMethodError exception indicates that GWT Designer is not properly installed or that there was some sort of partial update. A re-install or update to the latest build should take care of that problem immediately. BTW, any time you see a NoSuchMethodError exception that refers to code in the plugin itself, that is a very clear indication that you have a broken/partial installation. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/-l6HnGlKcs0J. 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: Can't set styles with GWT Designer / UiBinder
Please update to the latest GWT Designer build... http://code.google.com/webtoolkit/tools/download-gwtdesigner-beta.html It has much improved CSS support both for UiBinder and for Java files. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/ChQ7ntYeKp8J. 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: After using Context menu, how to trigger the browsers default one? (on, say, an image)
unregistering the ContextMenuHandler does not work? I assume you have sth like this: class YourWidget extends Composite implements ContextMenuHandler { HandlerRegistration registration; public YourWidget(){ final HTML html = new HTML(divRight-click here please ;)/div); Button setCustomMenuButton = new Button(Set Custom Menu); Button setNativeMenuButton = new Button(Set Native Menu); setCustomMenuButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { registration = addDomHandler(YourWidget.this, ContextMenuEvent.getType()); } }); setNativeMenuButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { registration.removeHandler(); } }); FlowPanel mainPanel = new FlowPanel(); initWidget(mainPanel); mainPanel.add(html); mainPanel.add(setCustomMenuButton); mainPanel.add(setNativeMenuButton); } @Override public void onContextMenu(ContextMenuEvent event) { final int x = event.getNativeEvent().getClientX() + Window.getScrollLeft(); final int y = event.getNativeEvent().getClientY() + Window.getScrollTop(); final PopupPanel popup = new PopupPanel(true, true); popup.add(new HTML(my context menu)); popup.setPopupPositionAndShow(new PositionCallback() { @Override public void setPosition(int offsetWidth, int offsetHeight) { popup.setPopupPosition(x, y); } }); } } -- 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 add checkbox in header.
atul emailatulg@... writes: Hello, Thanks for showing how to add an checkbox in the celltable header. I have another question in this regard. I am showing this celltable data with checkbox header as above as first column and other columns as Name, Address, etc. Also I am using SimplePager to show the data in celltable in paginated format with pagesize 5. Question: The first 5 records are shown in first page and when the uses clicks the checkbox header cell all the first 5 records in the celltable are selected alongwith the checkbox header cell itself. On paging to next page by clicking the next page image(or icon) on the SimplePager, the next 5 records from the celltable are shown but the checkbox header cell remains selected (true) as I had clicked it in the first page. I need the checkbox header as unchecked again (false) when the user clicks on the next page and new records are shown. SimplePager does on raise any event on clickcing the next page image(or icon). Please Help Thanks and Regards, atul gaikwad atul- I used the MyHeader class from http://snipt.net/araujo921/checkbox-in-gwt-celltable-header/ and added one more method to it: public void setValue(int column, boolean value) { this.value = value; changeValue.changedValue(column, value); } for the celltable, add loading state change handler; this way you don't have to worry about what happens on sort (if you are doing server-side sorting), pagination etc. table.addLoadingStateChangeHandler(new LoadingStateChangeEvent.Handler() { @Override public void onLoadingStateChanged(LoadingStateChangeEvent event) { if (event.getLoadingState().equals(LoadingState.LOADING)) { checkBoxHeader.setValue(false); } }); taha -- 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: AutoBeanCodex.decode performance
FYI, AutoBeanCodex.decode uses StringQuoter, whose super-source implementation (used in compiled code only) uses JsonUtils.safeEval, which in turn uses eval() in IE6 to parse the JSON, after checking it with a couple regexps. So maybe the regexps are slow with large strings? You could try overriding the StringQuoter (put your version earlier on the classpath) with a version that uses JsonUtils.unsafeEval to see if it makes a difference (at your own risks). But AutoBeans do create a lot of objects (an AutoBean and a wrapper implementing your interface for each object in the JSON), and that could really be the bottleneck in your case. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/CZPQ2TVlK7UJ. 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: Applying CSS to Grid
Try .leaderboard td:first-child { font-size: xx-large; font-weight: bold; } This should do the trick - you don't need to set a headerRow style to the first row. On Jul 27, 12:44 pm, Sébastien Tromp sebastien.tr...@gmail.com wrote: Hello, I am currently struggling to apply the proper CSS styles to my Grid component. What I have is: g:Grid ui:field=rankingGrid styleName={style.leaderboard} !-- Header row -- g:row g:customCell g:Label ui:field=skillRangeLabel/g:Label /g:customCell ... /g:row /g:Grid And the styles are ui:style .leaderboard td { padding: 3px 15px; text-align: center; font-size: medium;} .leaderboard headerRow { font-size: xx-large; font-weight: bold;} /ui:style When the view is loaded, I also run: @Override protected void onLoad() { super.onLoad(); this.rankingGrid.getRowFormatter().setStyleName(0, headerRow); } where rankingGrid is my Grid object. What I want to do is to apply the headerRow style to my first row (i.e. that it is displayed in big bold letters), but I can't find what I am doing wrong. Would you have any idea? Thanks in advance, -- Sébastien Tromp -- 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 set the font in code and measure text dimensions?
Font size depends on display resolution and display/browser settings (users can increase or decrease the font size as they like). Also remember that users are not guaranteed to have the font you want (even the most popular ones), and their browser may use a sightly different font instead. You can render the page, then measure the element (span or div) that contains your text, then adjust the font size as necessary, but this may result in a jumpy page (in some cases a browser will have to re- render the entire page if dimensions of a single div change). I don't know your requirements, but if you have to be precise, you can use canvas. On Jul 27, 12:20 pm, Nano Elefant nanof...@gmail.com wrote: Hello, Is there a way to set the font and font size of either a HTML, RichTextArea or TextArea in code? Is there a way to calculate the width and height of a text if i know the font? Any ideas? -- 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 set the font in code and measure text dimensions?
Something like that? http://www.visualfox.me/app/bold I plan to open source this in the next few months On Jul 28, 2011, at 3:36 AM, Andrei wrote: Font size depends on display resolution and display/browser settings (users can increase or decrease the font size as they like). Also remember that users are not guaranteed to have the font you want (even the most popular ones), and their browser may use a sightly different font instead. You can render the page, then measure the element (span or div) that contains your text, then adjust the font size as necessary, but this may result in a jumpy page (in some cases a browser will have to re- render the entire page if dimensions of a single div change). I don't know your requirements, but if you have to be precise, you can use canvas. On Jul 27, 12:20 pm, Nano Elefant nanof...@gmail.com wrote: Hello, Is there a way to set the font and font size of either a HTML, RichTextArea or TextArea in code? Is there a way to calculate the width and height of a text if i know the font? Any ideas? -- 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. -- 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.
Exception in thread UnitWriteThread
We recently upgraded from GWT 2.1 to GWT 2.4 Beta. Since the update we have been getting Exception in thread UnitWriteThread java.lang.NullPointerException. It doesn't seem to cause any problems in that the code still successfully compiles and runs. Here's some GWT Compiler debug output: [java] Found better fallback match for replace-with class='com.google.gwt.user.client.ui.impl.RichTextAreaImplIE6'/ [java] Checking rule replace-with class='com.google.gwt.user.client.ui.ResizeLayoutPanel.ImplIE6'/ [java]Checking if all subconditions are true (all) [java] when-type-is class='com.google.gwt.user.client.ui.ResizeLayoutPanel.Impl'/ [java] Not an exact match [java] No: One or more subconditions was false [java] Rule did not match [java] Found better fallback match for replace-with class='com.google.gwt.user.client.ui.ResizeLayoutPanel.ImplIE6'/ [java] Checking rule replace-with class='com.google.gwt.user.client.ui.ResizeLayoutPanel.ImplTrident'/ [java]Checking if all subconditions are true (all) [java] when-type-is class='com.google.gwt.user.client.ui.ResizeLayoutPanel.Impl'/ [java] Not an exact match [java] No: One or more subconditions was false [java] Rule did not match [java] Found better fallback match for replace-with class='com.google.gwt.user.client.ui.ResizeLayoutPanel.ImplTrident'/ [java] Checking rule replace-with class='com.google.gwt.user.client.ui.ResizeLayoutPanel.ImplStandard'/ [java]Checking if all subconditions are true (all) [java] when-type-is class='com.google.gwt.user.client.ui.ResizeLayoutPanel.Impl'/ [java] Not an exact match [java] No: One or more subconditions was false [java] Rule did not match [java] Found better fallback match for replace-with class='com.google.gwt.user.client.ui.ResizeLayoutPanel.ImplStandard'/ [java] Checking rule generate-with class='com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator'/ [java]Checking if all subconditions are true (all) [java] when-assignable class='com.google.gwt.user.client.rpc.RemoteService'/ [java] Exception in thread UnitWriteThread java.lang.NullPointerException [java] at com.google.gwt.dev.util.DiskCache.transferFromStream(DiskCache.java: 154) [java] at com.google.gwt.dev.javac.SourceFileCompilationUnit.asCachedCompilationUnit(SourceFileCompilationUnit.java: 59) [java] at com.google.gwt.dev.javac.CompilationUnit.writeReplace(CompilationUnit.java: 392) [java] at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25) [java] at java.lang.reflect.Method.invoke(Method.java:597) [java] at java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java: 1032) [java] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1115) [java] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330) [java] at com.google.gwt.dev.javac.PersistentUnitCache $UnitWriter.run(PersistentUnitCache.java:226) [java] No, the requested type was not assignable [java] No: One or more subconditions was false [java] Rule did not match [java] Found better fallback match for generate-with class='com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator'/ [java] Checking rule replace-with class='com.google.gwt.user.client.ui.impl.PopupImplIE6'/ [java]Checking if all subconditions are true (all) [java] when-type-is class='com.google.gwt.user.client.ui.impl.PopupImpl'/ [java] Not an exact match [java] No: One or more subconditions was false [java] Rule did not match [java] Found better fallback match for replace-with class='com.google.gwt.user.client.ui.impl.PopupImplIE6'/ [java] Checking rule replace-with class='com.google.gwt.user.client.ui.impl.PopupImplMozilla'/ [java]Checking if all subconditions are true (all) [java] when-type-is class='com.google.gwt.user.client.ui.impl.PopupImpl'/ [java] Not an exact match [java] No: One or more subconditions was false [java] Rule did not match [java] Found better fallback match for replace-with
StatusCodeException 12007 12029
We've been seeing a lot of 12007 and 12029 StatusCodeExceptions in our logs in the last few weeks. Since the beginning of July, in fact. I understand these status codes relate to a flaky internet connection but more than one customer is experiencing them. What sort of symptoms would cause these to be thrown in RPC calls? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/4MwQaBSkXZsJ. 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 Compiler Hanging when compiling permutations
Hey, for some reason, starting today, my project refuses to compile. As in it gets to the following stage: Compiling module com.sparkplug.AppDev Compiling 1 permutation Compiling permutation 0... And then nothing... I let it run for 30 mins or so while I went to get dinner, so I'm fairly sure its not looping infinitely, or is in deadlock. If I turn on more detailed logging, it essentially gets stuck in the same place, with a ton more stuff before line 1 and between lines 1 and 2. Has anyone seen anything like this before? (In the meantime, I'm going to try reinstalling Eclipse, then rolling back a few changesets.) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/J2DIat0ME8AJ. 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 Compiler Hanging when compiling permutations
K disregard, that was weird. I commented out the recent JSNI-filled class I wrote, then it worked again, uncommented the class and it still worked... not working with some source code, then working with the same source code is the tiniest bit strange but... ...chaos monkeys at work i'd guess -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/x4CrbXQ9K3MJ. 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.
Error Polymorphic RequestContext GWT 2.4 RC
Maybe I spoke too soon about 2.4 RC. I get the error: Scanning for additional dependencies: file:/C:/JAVA/workspace/Test/src/com/test/client/Main.java Computing all possible rebind results for 'com.test.shared.request.BaseEntityRF' Rebinding com.test.shared.request.BaseEntityRF Invoking generator com.google.web.bindery.requestfactory.gwt.rebind.RequestFactoryGenerator [ERROR] Invalid Request parameterization T extends com.google.web.bindery.requestfactory.shared.BaseProxy [ERROR] Unable to create RequestFactoryModel model due to previous errors [ERROR] Errors in 'file:/C:/JAVA/workspace/Test/src/com/test/client/Main.java' [ERROR] Line 12: Failed to resolve 'com.test.shared.request.BaseEntityRF' via deferred binding Everything works fine if I don't use generics in RequestContext class. What I do wrong? My classes (Proof of Concept Project): public class Main implements EntryPoint { final private EventBus eventBus = new SimpleEventBus(); private BaseEntityRF rf = GWT.create(BaseEntityRF.class); @Override public void onModuleLoad() { rf.initialize(eventBus); BaseEntityRequestBaseEntityProxy reqBaseEntity = rf.baseRequest(); BaseEntityProxy baseEntity = reqBaseEntity.create(BaseEntityProxy.class); } } @ProxyFor(value = BaseEntity.class, locator = BaseEntityLocator.class) public interface BaseEntityProxy extends EntityProxy { EntityProxyIdBaseEntityProxy stableId(); Integer getVersion(); } @Service(value = DAOJPA10.class, locator = DaoServiceLocator.class) public interface BaseEntityRequestT extends BaseProxy extends RequestContext { RequestVoid insert(T instance); RequestT update(T instance); RequestVoid delete(T instance); } public interface BaseEntityRF extends RequestFactory { T extends BaseProxy BaseEntityRequestT baseRequest(); } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/JrrgPOlZ7IEJ. 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 ImageCell on click only on image not surrounding area in GWT cellTable
Check the coordinates of click event. See whether it is within the extent of your image. If yes, bring up your popup. J.Ganesan www.DataStoreGwt.com On Jul 27, 8:37 pm, vidhi jain vidhijain2...@gmail.com wrote: Hi All, I am new to GWT, I am using GWT CellTable to display 5 columns in which 4 are TextCell and one is Imagecell, On click on imagecell image I have to call one popup. cellTable is printing properly and pop up is also comming on ImageCell click. My problem is, I want to get popup only on image click , not surrounding area of image in ImageCell. Please let me know how i can restrict to call onBrowserEvent click event for surrounding image area. I need it urgently please help me , i tried many option but not get success. Thanks in advance. -- Thanks and Regards Vidhi Jain -- 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 ImageCell on click only on image not surrounding area in GWT cellTable
Thanks for your kind reply, I tried to get co-ordinate but no success. It would be greate if you can point me to some example. Still i am tring to do it. -Vidhi On Thu, Jul 28, 2011 at 10:45 AM, J.Ganesan j.gane...@datastoregwt.comwrote: Check the coordinates of click event. See whether it is within the extent of your image. If yes, bring up your popup. J.Ganesan www.DataStoreGwt.com http://www.datastoregwt.com/ On Jul 27, 8:37 pm, vidhi jain vidhijain2...@gmail.com wrote: Hi All, I am new to GWT, I am using GWT CellTable to display 5 columns in which 4 are TextCell and one is Imagecell, On click on imagecell image I have to call one popup. cellTable is printing properly and pop up is also comming on ImageCell click. My problem is, I want to get popup only on image click , not surrounding area of image in ImageCell. Please let me know how i can restrict to call onBrowserEvent click event for surrounding image area. I need it urgently please help me , i tried many option but not get success. Thanks in advance. -- Thanks and Regards Vidhi Jain -- 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. -- Thanks and Regards Vidhi Jain -- 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: Fixes a bug in AbstractPager where clearing the display and resetting it causes an NPE. (issue1500803)
http://gwt-code-reviews.appspot.com/1500803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixes a bug in AbstractPager where clearing the display and resetting it causes an NPE. (issue1500803)
http://gwt-code-reviews.appspot.com/1500803/diff/1/user/src/com/google/gwt/user/cellview/client/AbstractPager.java File user/src/com/google/gwt/user/cellview/client/AbstractPager.java (left): http://gwt-code-reviews.appspot.com/1500803/diff/1/user/src/com/google/gwt/user/cellview/client/AbstractPager.java#oldcode112 user/src/com/google/gwt/user/cellview/client/AbstractPager.java:112: rangeChangeHandler = null; On 2011/07/26 03:11:14, andycheng wrote: should remove this line Done. I re-added the line so I could verify that the test was working, then forgot to remove it. http://gwt-code-reviews.appspot.com/1500803/diff/1/user/test/com/google/gwt/user/cellview/client/AbstractPagerTest.java File user/test/com/google/gwt/user/cellview/client/AbstractPagerTest.java (right): http://gwt-code-reviews.appspot.com/1500803/diff/1/user/test/com/google/gwt/user/cellview/client/AbstractPagerTest.java#newcode250 user/test/com/google/gwt/user/cellview/client/AbstractPagerTest.java:250: assertNull(pager.getDisplay()); On 2011/07/26 03:11:14, andycheng wrote: this test does not seem to catch the original bug. should test rowCountChangeHandler == null as well The next time we set the display, we would get an error because we call rowCountChangeHandler.removeHandler() twice. 1. Set display: rowCountChangeHandler added 2. Set display to null: rowCountChangeHandler removed, but not null 3. Set display: rowCountChangeHandler removed again because it is not null. Results in an error. I made the test more explicit, testing that the fields are null and that the handlers are correctly removed from the display. http://gwt-code-reviews.appspot.com/1500803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r10465 committed - Ensure that class literals whose classes are pruned yield class names ...
Revision: 10465 Author: gwt.mirror...@gmail.com Date: Wed Jul 27 07:49:34 2011 Log: Ensure that class literals whose classes are pruned yield class names based on hashcode to maintain existing behavior for some legacy apps. http://code.google.com/p/google-web-toolkit/source/detail?r=10465 Modified: /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java /trunk/user/super/com/google/gwt/emul/java/lang/Class.java === --- /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java Mon Jul 18 14:28:50 2011 +++ /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java Wed Jul 27 07:49:34 2011 @@ -207,6 +207,9 @@ @Override public void endVisit(JSeedIdOf x, Context ctx) { + if (x.getNode() instanceof JClassType) { +endVisit((JNameOf) x, ctx); + } } @Override === --- /trunk/user/super/com/google/gwt/emul/java/lang/Class.java Mon Jul 18 14:28:50 2011 +++ /trunk/user/super/com/google/gwt/emul/java/lang/Class.java Wed Jul 27 07:49:34 2011 @@ -32,7 +32,7 @@ static native String asString(int number) /*-{ // for primitives, the seedId isn't a number, but a string like ' Z' -return typeof(number) == 'number' ? S + (number -1 ? -number : number): number; +return typeof(number) == 'number' ? S + (number 0 ? -number : number) : number; }-*/; /** @@ -44,7 +44,7 @@ int seedId, Class? componentType) { // Initialize here to avoid method inliner ClassT clazz = new ClassT(); -setName(clazz, packageName, className, seedId != -1 ? -seedId : -1); +setName(clazz, packageName, className, seedId != 0 ? -seedId : 0); clazz.modifiers = ARRAY; clazz.superclass = Object.class; clazz.componentType = componentType; @@ -91,7 +91,7 @@ static T ClassT createForInterface(String packageName, String className) { // Initialize here to avoid method inliner ClassT clazz = new ClassT(); -setName(clazz, packageName, className, -1); +setName(clazz, packageName, className, 0); clazz.modifiers = INTERFACE; return clazz; } @@ -125,12 +125,19 @@ } /** - * null or -1 implies lack of seed function / non-instantiable type + * null or 0 implies lack of seed function / non-instantiable type */ static native boolean isInstantiable(int seedId) /*-{ -return seedId != null typeof (seedId) == 'number' seedId -1; +return typeof (seedId) == 'number' seedId 0; }-*/; + /** + * null implies pruned. + */ + static native boolean isInstantiableOrPrimitive(int seedId) /*-{ +return seedId != null seedId != 0; + }-*/; + /** * Install class literal into seed.prototype.clazz field such that * Object.getClass() returning this.clazz returns the literal. Also stores @@ -145,7 +152,7 @@ if (seedId == 2) { proto = String.prototype } else { - if (seedId -1) { + if (seedId 0) { // Guarantees virtual method won't be pruned by using a JSNI ref // This is required because deRPC needs to call it. var seed = @java.lang.Class::getSeedFunction(Ljava/lang/Class;)(clazz); @@ -167,6 +174,13 @@ pro...@java.lang.Object::___clazz = clazz; }-*/; + /** + * The seedId parameter can take on the following values: + * 0 = type is instantiable class + * 0 = type is instantiable array + * null = type is not instantiable + * string = type is primitive + */ static void setName(Class? clazz, String packageName, String className, int seedId) { if (clazz.isClassMetadataEnabled()) { @@ -178,7 +192,7 @@ * during application start up, before class Integer has been initialized. */ clazz.typeName = Class$ - + (seedId != -1 ? asString(seedId) : asString(clazz.hashCode())); + + (isInstantiableOrPrimitive(seedId) ? asString(seedId) : + clazz.hashCode()); } if (isInstantiable(seedId)) { -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r10466 committed - Use Splitter and Joiner as suggested in review
Revision: 10466 Author: gwt.mirror...@gmail.com Date: Wed Jul 27 07:55:27 2011 Log: Use Splitter and Joiner as suggested in review http://code.google.com/p/google-web-toolkit/source/detail?r=10466 Modified: /trunk/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java === --- /trunk/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java Thu Jul 14 10:42:16 2011 +++ /trunk/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java Wed Jul 27 07:55:27 2011 @@ -36,9 +36,13 @@ import com.google.gwt.dev.js.JsToStringGenerationVisitor; import com.google.gwt.dev.util.DefaultTextOutput; import com.google.gwt.dev.util.TextOutput; +import com.google.gwt.thirdparty.guava.common.base.Joiner; +import com.google.gwt.thirdparty.guava.common.base.Splitter; import com.google.gwt.util.tools.Utility; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import java.util.SortedSet; /** @@ -517,15 +521,12 @@ // __MODULE_FUNC__.onScriptDownloaded out.append(context.getModuleFunctionName()); out.append(.onScriptDownloaded([); - String[] chunks = script.split(getScriptChunkSeparator(logger, context)); - boolean first = true; + IterableString chunks = Splitter.on(getScriptChunkSeparator(logger, context)).split(script); + ListString newChunks = new ArrayListString(); for (String chunk : chunks) { -if (!first) { - out.append(, ); -} -out.append(JsToStringGenerationVisitor.javaScriptString(chunk)); -first = false; - } +newChunks.add(JsToStringGenerationVisitor.javaScriptString(chunk)); + } + out.append(Joiner.on(, ).join(newChunks)); out.append(])); } else { out.append(script); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r10467 committed - Avoid building SafeHtmlBuilders over and over again for no good reason...
Revision: 10467 Author: gwt.mirror...@gmail.com Date: Thu Jul 21 09:08:18 2011 Log: Avoid building SafeHtmlBuilders over and over again for no good reason. Review at http://gwt-code-reviews.appspot.com/1500801 http://code.google.com/p/google-web-toolkit/source/detail?r=10467 Modified: /trunk/user/src/com/google/gwt/user/client/ui/Composite.java /trunk/user/src/com/google/gwt/user/client/ui/RenderablePanel.java === --- /trunk/user/src/com/google/gwt/user/client/ui/Composite.java Fri Jul 15 09:31:20 2011 +++ /trunk/user/src/com/google/gwt/user/client/ui/Composite.java Thu Jul 21 09:08:18 2011 @@ -90,9 +90,10 @@ if (renderable != null) { return renderable.render(stamper); } else { - SafeHtmlBuilder builder = new SafeHtmlBuilder(); - render(stamper, builder); - return builder.toSafeHtml(); + HtmlSpanBuilder spanBuilder = HtmlBuilderFactory.get() + .createSpanBuilder(); + stamper.stamp(spanBuilder).end(); + return spanBuilder.asSafeHtml(); } } @@ -101,10 +102,7 @@ if (renderable != null) { renderable.render(stamper, builder); } else { - HtmlSpanBuilder spanBuilder = HtmlBuilderFactory.get() - .createSpanBuilder(); - stamper.stamp(spanBuilder).end(); - builder.append(spanBuilder.asSafeHtml()); + builder.append(render(stamper)); } } === --- /trunk/user/src/com/google/gwt/user/client/ui/RenderablePanel.java Fri Jul 15 09:31:20 2011 +++ /trunk/user/src/com/google/gwt/user/client/ui/RenderablePanel.java Thu Jul 21 09:08:18 2011 @@ -177,13 +177,6 @@ @Override public SafeHtml render(RenderableStamper stamper) { -SafeHtmlBuilder builder = new SafeHtmlBuilder(); -render(stamper, builder); -return builder.toSafeHtml(); - } - - @Override - public void render(RenderableStamper stamper, SafeHtmlBuilder builder) { String styleName = getStyleName(); HtmlDivBuilder divBuilder = HtmlBuilderFactory.get() @@ -195,7 +188,12 @@ stamper.stamp(divBuilder); divBuilder.html(getInnerHtml()).end(); -builder.append(divBuilder.asSafeHtml()); +return divBuilder.asSafeHtml(); + } + + @Override + public void render(RenderableStamper stamper, SafeHtmlBuilder builder) { +builder.append(render(stamper)); } @Override -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r10468 committed - Public (f...@ubercode.de):...
Revision: 10468 Author: gwt.mirror...@gmail.com Date: Wed Jul 27 08:14:04 2011 Log: Public (f...@ubercode.de): This patch adds a dedicated error message for the case that a non-class type (e.g. an array) is passed to an UiHandler method. Review by rjrjr http://gwt-code-reviews.appspot.com/1382804/ Review by: robertvaw...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=10468 Modified: /trunk/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java === --- /trunk/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java Wed May 4 09:28:35 2011 +++ /trunk/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java Wed Jul 27 08:14:04 2011 @@ -128,6 +128,9 @@ boundMethod); } JClassType eventType = parameters[0].getType().isClass(); + if (eventType == null) { +logger.die(Parameter type is not a class.); + } JClassType handlerType = getHandlerForEvent(eventType); if (handlerType == null) { -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r10469 committed - Update XML doc to make it clearer that 'compiler.emulatedStack' should...
Revision: 10469 Author: gwt.mirror...@gmail.com Date: Wed Jul 27 08:18:07 2011 Log: Update XML doc to make it clearer that 'compiler.emulatedStack' should no longer be used. Review at http://gwt-code-reviews.appspot.com/1462804 Review by: robertvaw...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=10469 Modified: /trunk/user/src/com/google/gwt/core/EmulateJsStack.gwt.xml === --- /trunk/user/src/com/google/gwt/core/EmulateJsStack.gwt.xml Thu Dec 2 06:52:10 2010 +++ /trunk/user/src/com/google/gwt/core/EmulateJsStack.gwt.xml Wed Jul 27 08:18:07 2011 @@ -17,8 +17,7 @@ module inherits name=com.google.gwt.core.Core / - !-- Legacy property, use 'compiler.stackMode' instead -- - !-- If set to true, emulated stack frames will be emitted into the JS -- + !-- Legacy property. Do NOT use. See 'compiler.stackMode' instead. -- define-property name=compiler.emulatedStack values=true,false / set-property name=compiler.emulatedStack value=false / -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r10470 committed - Follow up to r10350. Allow collapse-all-properties in .gwt.xml module ...
Revision: 10470 Author: gwt.mirror...@gmail.com Date: Wed Jul 27 08:39:14 2011 Log: Follow up to r10350. Allow collapse-all-properties in .gwt.xml module files Fixes issues: 5694 Review at http://gwt-code-reviews.appspot.com/1463806 Review by: rj...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=10470 Modified: /trunk/distro-source/core/src/gwt-module.dtd === --- /trunk/distro-source/core/src/gwt-module.dtdFri Jun 17 10:22:42 2011 +++ /trunk/distro-source/core/src/gwt-module.dtdWed Jul 27 08:39:14 2011 @@ -19,7 +19,7 @@ define-property | extend-property | set-property | set-property-fallback | clear-configuration-property | define-configuration-property | extend-configuration-property | set-configuration-property | - property-provider | define-linker | add-linker)* + property-provider | define-linker | add-linker | collapse-all-properties)* !ATTLIST module rename-to CDATA #IMPLIED -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r10472 committed - Ensure RequestContext is propagated to newly-added HasRequestContext E...
Revision: 10472 Author: t.bro...@gmail.com Date: Wed Jul 27 04:15:35 2011 Log: Ensure RequestContext is propagated to newly-added HasRequestContext Editor instances. Issue 6081. http://gwt-code-reviews.appspot.com/1371801 Patch by: t.broyer Review by: bobv http://code.google.com/p/google-web-toolkit/source/detail?r=10472 Added: /trunk/user/src/com/google/web/bindery/requestfactory/gwt/client/impl/Initializer.java Modified: /trunk/user/src/com/google/gwt/editor/client/impl/AbstractEditorDelegate.java /trunk/user/src/com/google/gwt/editor/client/impl/BaseEditorDriver.java /trunk/user/src/com/google/gwt/editor/client/impl/Initializer.java /trunk/user/src/com/google/web/bindery/requestfactory/gwt/client/impl/AbstractRequestFactoryEditorDriver.java /trunk/user/src/com/google/web/bindery/requestfactory/gwt/client/impl/RequestFactoryEditorDelegate.java /trunk/user/test/com/google/web/bindery/requestfactory/gwt/client/ui/EditorTest.java === --- /dev/null +++ /trunk/user/src/com/google/web/bindery/requestfactory/gwt/client/impl/Initializer.java Wed Jul 27 04:15:35 2011 @@ -0,0 +1,49 @@ +/* + * Copyright 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.web.bindery.requestfactory.gwt.client.impl; + +import com.google.gwt.editor.client.Editor; +import com.google.gwt.editor.client.EditorContext; +import com.google.web.bindery.requestfactory.gwt.client.HasRequestContext; +import com.google.web.bindery.requestfactory.shared.RequestContext; + +/** + * Extension of standard Editor Initializer that provides the current + * RequestContext. + */ +class Initializer extends com.google.gwt.editor.client.impl.Initializer { + + private final RequestContext request; + + public Initializer(RequestContext request) { +this.request = request; + } + + @Override + public T boolean visit(EditorContextT ctx) { +RequestFactoryEditorDelegate?, ? delegate = +(RequestFactoryEditorDelegate?, ?) ctx.getEditorDelegate(); +if (delegate != null) { + delegate.setRequestContext(request); +} +EditorT editor = ctx.getEditor(); +if (editor instanceof HasRequestContext) { + ((HasRequestContextT) editor).setRequestContext(request); +} + +return super.visit(ctx); + } +} === --- /trunk/user/src/com/google/gwt/editor/client/impl/AbstractEditorDelegate.java Mon Apr 18 13:47:45 2011 +++ /trunk/user/src/com/google/gwt/editor/client/impl/AbstractEditorDelegate.java Wed Jul 27 04:15:35 2011 @@ -80,7 +80,7 @@ subDelegate.path = subPath; } subDelegate.setObject(ensureMutable(object)); - traverse(new Initializer(), subDelegate); + traverse(createInitializerVisitor(), subDelegate); } public void detach(S subEditor) { @@ -176,6 +176,10 @@ protected AbstractEditorDelegate?, ? createComposedDelegate() { throw new IllegalStateException(); } + + protected EditorVisitor createInitializerVisitor() { +return new Initializer(); + } protected Q Q ensureMutable(Q object) { return object; === --- /trunk/user/src/com/google/gwt/editor/client/impl/BaseEditorDriver.java Wed Feb 2 03:25:11 2011 +++ /trunk/user/src/com/google/gwt/editor/client/impl/BaseEditorDriver.java Wed Jul 27 04:15:35 2011 @@ -63,8 +63,7 @@ return c.isDirty() || !leafValueMap.equals(c.getLeafValues()); } - public boolean setConstraintViolations( - final IterableConstraintViolation? violations) { + public boolean setConstraintViolations(final IterableConstraintViolation? violations) { return doSetViolations(SimpleViolation.iterableFromConstrantViolations(violations)); } @@ -73,8 +72,7 @@ if (GWT.isProdMode()) { return super.toString(); } else { - return editor == null ? Uninitialized - : EditorHierarchyPrinter.toString(asEditorDriver()); + return editor == null ? Uninitialized : EditorHierarchyPrinter.toString(asEditorDriver()); } } @@ -84,12 +82,16 @@ protected abstract AbstractEditorDelegateT, E createDelegate(); + protected EditorVisitor createInitializerVisitor() { +return new Initializer(); + } + protected void doEdit(T object) { checkEditor(); object = delegate.ensureMutable(object); this.object = object; delegate.setObject(object); -accept(new
[gwt-contrib] [google-web-toolkit] r10473 committed - Adding API method Column#setDefaultSortOrder(boolean isAscending) to c...
Revision: 10473 Author: jlaba...@google.com Date: Wed Jul 27 04:19:13 2011 Log: Adding API method Column#setDefaultSortOrder(boolean isAscending) to control whether the column should be sorted in ascending or descending order the first time it is clicked. Currently, the first time a column is clicked, it is sorted in ascending order. Review at http://gwt-code-reviews.appspot.com/1498806 Review by: pengzhu...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=10473 Modified: /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellTable.java /trunk/user/src/com/google/gwt/user/cellview/client/Column.java /trunk/user/src/com/google/gwt/user/cellview/client/ColumnSortList.java /trunk/user/test/com/google/gwt/user/cellview/client/ColumnSortListTest.java === --- /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellTable.java Fri Jan 7 10:19:06 2011 +++ /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellTable.java Wed Jul 27 04:19:13 2011 @@ -278,6 +278,7 @@ } }; addressColumn.setSortable(true); +addressColumn.setDefaultSortAscending(false); sortHandler.setComparator(addressColumn, new ComparatorContactInfo() { public int compare(ContactInfo o1, ContactInfo o2) { return o1.getAddress().compareTo(o2.getAddress()); === --- /trunk/user/src/com/google/gwt/user/cellview/client/Column.java Thu Jun 9 09:55:08 2011 +++ /trunk/user/src/com/google/gwt/user/cellview/client/Column.java Wed Jul 27 04:19:13 2011 @@ -48,6 +48,7 @@ */ private FieldUpdaterT, C fieldUpdater; + private boolean isDefaultSortAscending = true; private boolean isSortable = false; private HorizontalAlignmentConstant hAlign = null; private VerticalAlignmentConstant vAlign = null; @@ -110,6 +111,15 @@ public VerticalAlignmentConstant getVerticalAlignment() { return vAlign; } + + /** + * Check if the default sort order of the column is ascending or descending. + * + * @return true if default sort is ascending, false if not + */ + public boolean isDefaultSortAscending() { +return isDefaultSortAscending; + } /** * Check if the column is sortable. @@ -164,6 +174,16 @@ public void setCellStyleNames(String styleNames) { this.cellStyleNames = styleNames; } + + /** + * Set whether or not the default sort order is ascending. + * + * @param isAscending true to set the default order to ascending, false for + * descending + */ + public void setDefaultSortAscending(boolean isAscending) { +this.isDefaultSortAscending = isAscending; + } /** * Set the {@link FieldUpdater} used for updating values in the column. === --- /trunk/user/src/com/google/gwt/user/cellview/client/ColumnSortList.java Wed Jan 5 04:42:33 2011 +++ /trunk/user/src/com/google/gwt/user/cellview/client/ColumnSortList.java Wed Jul 27 04:19:13 2011 @@ -82,8 +82,7 @@ @Override public int hashCode() { - return 31 * (column == null ? 0 : column.hashCode()) - + (ascending ? 1 : 0); + return 31 * (column == null ? 0 : column.hashCode()) + (ascending ? 1 : 0); } /** @@ -220,7 +219,7 @@ */ public ColumnSortInfo push(Column?, ? column) { // If the column matches the primary column, toggle the order. -boolean ascending = true; +boolean ascending = (column == null) ? true : column.isDefaultSortAscending(); if (size() 0 get(0).getColumn() == column) { ascending = !get(0).isAscending(); } === --- /trunk/user/test/com/google/gwt/user/cellview/client/ColumnSortListTest.java Wed Jan 5 04:42:33 2011 +++ /trunk/user/test/com/google/gwt/user/cellview/client/ColumnSortListTest.java Wed Jul 27 04:19:13 2011 @@ -63,8 +63,7 @@ // Compare with different items that equals each other. ColumnSortInfo info2a = createColumnSortInfo(); -ColumnSortInfo info2b = new ColumnSortInfo(info2a.getColumn(), -info2a.isAscending()); +ColumnSortInfo info2b = new ColumnSortInfo(info2a.getColumn(), info2a.isAscending()); list0.push(info2a); list1.push(info2b); assertTrue(list0.equals(list1)); @@ -177,6 +176,30 @@ assertEquals(col1, list.get(2).getColumn()); assertTrue(list.get(2).isAscending()); } + + /** + * Test pushing a column with a default sort order of descending. + */ + public void testPushColumnDescending() { +ColumnSortList list = new ColumnSortList(); +assertEquals(0, list.size()); + +// Push a column. +ColumnString, String col0 = new IdentityColumnString(new TextCell()); +col0.setDefaultSortAscending(false); +ColumnSortInfo item0 = list.push(col0); +assertEquals(1, list.size()); +
[gwt-contrib] [google-web-toolkit] r10474 committed - Cherry-pick r10472 into GWT 2.4 branch.
Revision: 10474 Author: b...@google.com Date: Wed Jul 27 06:08:54 2011 Log: Cherry-pick r10472 into GWT 2.4 branch. http://code.google.com/p/google-web-toolkit/source/detail?r=10474 Added: /releases/2.4/user/src/com/google/web/bindery/requestfactory/gwt/client/impl/Initializer.java Modified: /releases/2.4/user/src/com/google/gwt/editor/client/impl/AbstractEditorDelegate.java /releases/2.4/user/src/com/google/gwt/editor/client/impl/BaseEditorDriver.java /releases/2.4/user/src/com/google/gwt/editor/client/impl/Initializer.java /releases/2.4/user/src/com/google/web/bindery/requestfactory/gwt/client/impl/AbstractRequestFactoryEditorDriver.java /releases/2.4/user/src/com/google/web/bindery/requestfactory/gwt/client/impl/RequestFactoryEditorDelegate.java /releases/2.4/user/test/com/google/web/bindery/requestfactory/gwt/client/ui/EditorTest.java === --- /dev/null +++ /releases/2.4/user/src/com/google/web/bindery/requestfactory/gwt/client/impl/Initializer.java Wed Jul 27 06:08:54 2011 @@ -0,0 +1,49 @@ +/* + * Copyright 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.web.bindery.requestfactory.gwt.client.impl; + +import com.google.gwt.editor.client.Editor; +import com.google.gwt.editor.client.EditorContext; +import com.google.web.bindery.requestfactory.gwt.client.HasRequestContext; +import com.google.web.bindery.requestfactory.shared.RequestContext; + +/** + * Extension of standard Editor Initializer that provides the current + * RequestContext. + */ +class Initializer extends com.google.gwt.editor.client.impl.Initializer { + + private final RequestContext request; + + public Initializer(RequestContext request) { +this.request = request; + } + + @Override + public T boolean visit(EditorContextT ctx) { +RequestFactoryEditorDelegate?, ? delegate = +(RequestFactoryEditorDelegate?, ?) ctx.getEditorDelegate(); +if (delegate != null) { + delegate.setRequestContext(request); +} +EditorT editor = ctx.getEditor(); +if (editor instanceof HasRequestContext) { + ((HasRequestContextT) editor).setRequestContext(request); +} + +return super.visit(ctx); + } +} === --- /releases/2.4/user/src/com/google/gwt/editor/client/impl/AbstractEditorDelegate.java Mon Apr 18 13:47:45 2011 +++ /releases/2.4/user/src/com/google/gwt/editor/client/impl/AbstractEditorDelegate.java Wed Jul 27 06:08:54 2011 @@ -80,7 +80,7 @@ subDelegate.path = subPath; } subDelegate.setObject(ensureMutable(object)); - traverse(new Initializer(), subDelegate); + traverse(createInitializerVisitor(), subDelegate); } public void detach(S subEditor) { @@ -176,6 +176,10 @@ protected AbstractEditorDelegate?, ? createComposedDelegate() { throw new IllegalStateException(); } + + protected EditorVisitor createInitializerVisitor() { +return new Initializer(); + } protected Q Q ensureMutable(Q object) { return object; === --- /releases/2.4/user/src/com/google/gwt/editor/client/impl/BaseEditorDriver.java Wed Feb 2 03:25:11 2011 +++ /releases/2.4/user/src/com/google/gwt/editor/client/impl/BaseEditorDriver.java Wed Jul 27 06:08:54 2011 @@ -63,8 +63,7 @@ return c.isDirty() || !leafValueMap.equals(c.getLeafValues()); } - public boolean setConstraintViolations( - final IterableConstraintViolation? violations) { + public boolean setConstraintViolations(final IterableConstraintViolation? violations) { return doSetViolations(SimpleViolation.iterableFromConstrantViolations(violations)); } @@ -73,8 +72,7 @@ if (GWT.isProdMode()) { return super.toString(); } else { - return editor == null ? Uninitialized - : EditorHierarchyPrinter.toString(asEditorDriver()); + return editor == null ? Uninitialized : EditorHierarchyPrinter.toString(asEditorDriver()); } } @@ -84,12 +82,16 @@ protected abstract AbstractEditorDelegateT, E createDelegate(); + protected EditorVisitor createInitializerVisitor() { +return new Initializer(); + } + protected void doEdit(T object) { checkEditor(); object = delegate.ensureMutable(object); this.object = object; delegate.setObject(object); -accept(new Initializer()); +accept(createInitializerVisitor());
[gwt-contrib] Re: Adding API method Column#setDefaultSortOrder(boolean isAscending) to control whether the column ... (issue1498806)
committed as r10473 http://gwt-code-reviews.appspot.com/1498806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Improve error message when a RequestFactory 2.3 request is received. (issue1503803)
Reviewers: rjrjr, Description: Improve error message when a RequestFactory 2.3 request is received. Issue 6628. Patch by: bobv Review by: rjrjr Please review this at http://gwt-code-reviews.appspot.com/1503803/ Affected files: M user/src/com/google/web/bindery/requestfactory/server/SimpleRequestProcessor.java M user/test/com/google/web/bindery/requestfactory/gwt/client/RequestFactoryTest.java Index: user/src/com/google/web/bindery/requestfactory/server/SimpleRequestProcessor.java === --- user/src/com/google/web/bindery/requestfactory/server/SimpleRequestProcessor.java (revision 10252) +++ user/src/com/google/web/bindery/requestfactory/server/SimpleRequestProcessor.java (working copy) @@ -126,7 +126,6 @@ try { process(req, responseBean.as()); } catch (ReportableException e) { - e.printStackTrace(); // Create a new response envelope, since the state is unknown responseBean = FACTORY.response(); responseBean.as().setGeneralFailure(createFailureMessage(e).as()); @@ -200,7 +199,12 @@ final RequestState source = new RequestState(service); // Make sure the RequestFactory is valid -service.resolveRequestFactory(req.getRequestFactory()); +String requestFactoryToken = req.getRequestFactory(); +if (requestFactoryToken == null) { + // Tell old clients to go away + throw new ReportableException(The client payload version is out of sync with the server); +} +service.resolveRequestFactory(requestFactoryToken); // Apply operations processOperationMessages(source, req); Index: user/test/com/google/web/bindery/requestfactory/gwt/client/RequestFactoryTest.java === --- user/test/com/google/web/bindery/requestfactory/gwt/client/RequestFactoryTest.java (revision 10252) +++ user/test/com/google/web/bindery/requestfactory/gwt/client/RequestFactoryTest.java (working copy) @@ -15,6 +15,7 @@ */ package com.google.web.bindery.requestfactory.gwt.client; +import com.google.web.bindery.autobean.shared.AutoBeanCodex; import com.google.web.bindery.requestfactory.shared.EntityProxy; import com.google.web.bindery.requestfactory.shared.EntityProxyChange; import com.google.web.bindery.requestfactory.shared.EntityProxyId; @@ -23,6 +24,8 @@ import com.google.web.bindery.requestfactory.shared.Receiver; import com.google.web.bindery.requestfactory.shared.Request; import com.google.web.bindery.requestfactory.shared.RequestContext; +import com.google.web.bindery.requestfactory.shared.RequestTransport; +import com.google.web.bindery.requestfactory.shared.RequestTransport.TransportReceiver; import com.google.web.bindery.requestfactory.shared.ServerFailure; import com.google.web.bindery.requestfactory.shared.SimpleBarProxy; import com.google.web.bindery.requestfactory.shared.SimpleBarRequest; @@ -31,7 +34,10 @@ import com.google.web.bindery.requestfactory.shared.SimpleFooRequest; import com.google.web.bindery.requestfactory.shared.SimpleValueContext; import com.google.web.bindery.requestfactory.shared.SimpleValueProxy; +import com.google.web.bindery.requestfactory.shared.impl.MessageFactoryHolder; import com.google.web.bindery.requestfactory.shared.impl.SimpleEntityProxyId; +import com.google.web.bindery.requestfactory.shared.messages.ResponseMessage; +import com.google.web.bindery.requestfactory.shared.messages.ServerFailureMessage; import java.math.BigDecimal; import java.math.BigInteger; @@ -565,6 +571,49 @@ } /** + * Tests the server behavior when an empty JSON object is sent. + */ + public void testEmptyRequestBlankObject() { +delayTestFinish(DELAY_TEST_FINISH); +RequestTransport transport = req.getRequestTransport(); +transport.send({}, new TransportReceiver() { + @Override + public void onTransportFailure(ServerFailure failure) { +fail(); + } + + @Override + public void onTransportSuccess(String payload) { +ResponseMessage resp = +AutoBeanCodex.decode(MessageFactoryHolder.FACTORY, ResponseMessage.class, payload).as(); +ServerFailureMessage failure = resp.getGeneralFailure(); +assertNotNull(failure); +finishTestAndReset(); + } +}); + } + + /** + * Tests the server behavior when a zero-length payload is sent. + */ + public void testEmptyRequestZeroLength() { +delayTestFinish(DELAY_TEST_FINISH); +RequestTransport transport = req.getRequestTransport(); +transport.send(, new TransportReceiver() { + @Override + public void onTransportFailure(ServerFailure failure) { +// Expect a 500 since the payload is malformed +finishTestAndReset(); + } + + @Override + public void onTransportSuccess(String payload) { +fail(Should not have succeeded); + } +}); + } + + /** * Tests