Re: server push example with GWT?
https://github.com/realityforge/gwt-websockets Also works very well. On Monday, June 1, 2015 at 7:14:54 PM UTC+1, Edward Montgomery wrote: > > Can anyone point me to a tutorial or example of how to implement server > push with a GWT application? > > Is this typically done by somehow matching a JavaScript socket on one end > to a Java socket on the other? > > Thanks. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: @GWTCompatible
Do I assume that nothing came from this? We currently have to pre-parse all our source to handle what is and isn't compatible because our base project it too big to add @GwtIncompatible to everything. On Monday, 22 June 2009 23:44:24 UTC+1, Tom Sorgie wrote: > > > > Hey guys, > > Ever since I first looked at the @GWTCompatible annotation packaged in > the google-collections rc1 library, I've been thinking about the ways > that that could be used to enable controlled code reuse in a semi- > automated manner. To date i haven't seen any conversation on the > subject, so i wanted to see if I could get a little insight into the > planned direction (if any) for the GWTCompatible annotation support in > GWT. > > In my wildest dreams (regarding gwt), I could envision a new "source" > type declaration in the module.gwt.xml file like super-source. It > would be called something like "compatible-only-source". Java files > found on this path would be passed over a pre-processor (like the jsni- > rewriter), that would only include classes marked with the > @GWTCompatible annotation, and only methods within not marked > @GWTIncompatible. > > This would enable reuse of core utility libraries (where compatible), > or at least interfaces (where emulation is the preferred compatibility > approach). > > Is this close to the direction you guys are thinking for the @gwtc > annotation? Do you have something else in mind? The other approach > i've thought of, would be to generate a valid gwt-module by > preprocessing a source tree that was marked up with compatible and > incompatible annotations. Doesn't seem quite as useable (since you'd > need to run a preprocessor over your whole source base) as the first > one, but might have less complexity. > > > tom. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Material Design with GWT(Polymer wrapper)
Thanks for sharing your great work. Would be very useful to see the polymer core-list integrated. On Thursday, February 26, 2015 at 11:58:07 AM UTC, Blaze wrote: > > Tnx for the good words. > We see what singular will bring out when it becomes production candidate, > and then I can do something. > > This one is pretty much tested, we use it in one of our inhouse projects > with almost no problems at all. > > On Sun, Feb 22, 2015 at 2:02 PM, Alexander Zbiek < > stronga...@googlemail.com > wrote: > >> Great work ! Always thought somebody might have done that. >> >> Keep up your good work. Perhaps it could be combined with gwt singular? >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Google Web Toolkit" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/google-web-toolkit/zVGA9fs_XxY/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> google-web-toolkit+unsubscr...@googlegroups.com . >> To post to this group, send email to google-we...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/google-web-toolkit. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Limiting compilation to just for the hosted browser on windows
Values are defined in com.google.gwt.user.UserAgent.gwt.xml in gwt-user.jar. The values for GWT 1.7.x are: ie6,ie8,gecko,gecko1_8,safari,opera gecko1_8 is Firefox 1.5 and later. ie6 is IE6 and IE7. As of GWT 1.6 you can set the "user.agent" to property to multiple comma-separated values. Note that if you run the hosted shell you need to include it's value (iex on Win, safari on Mac) or "interesting" things will happen. This is a handy setting if you need to run the hosted shell on Win and occasionally compile to debug layouts in Firebug: -- Mat Gessel http://www.asquare.net On Fri, Nov 13, 2009 at 11:27 AM, Open eSignForms wrote: > Where can I see a list of user.agent values I can choose from for set- > property? I'd like to do IE8 (I believe it's "ie8") and FF 3.5 for my > base testing before building for a 6 combos that seem to be build by > default. -- 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-tool...@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=.
Re: How can I get GWT 2.0
Build instructions can be found here: http://code.google.com/webtoolkit/makinggwtbetter.html#checkingout On Sun, Sep 6, 2009 at 5:14 PM, Richard Vowles wrote: > > Check it out and build it - it isn't "released" yet... > > On Sep 7, 11:11 am, Karan Sardana wrote: >> I am using a commercial library - EXT GWT 2.0, and for that I need GWT >> 2.0; where can I get that from? --~--~-~--~~~---~--~~ 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: onKeyDownPreview to onPreviewNativeEvent
What, you want to read properties from the Event? Absurd! // (disclaimer: hand written in Gmail) HanderRegistration reg = Event.addNativePreviewHandler(new NativePreviewHandler() { public void onPreviewNativeEvent(NativePreviewEvent event) { Event event0 = Event.as(event.getNativeEvent()); if (event0.getTypeInt() == Event.ONKEYDOWN) { int keyCode = event0.getKeyCode(); if (condition) // optional { event.cancel(); } } } }); -- Mat Gessel http://www.asquare.net On Mon, Aug 31, 2009 at 6:29 AM, monkeyboy wrote: > > In my code I am using onKeyDownPreview to hide a popup when the escape > key is hit. > public boolean onKeyDownPreview(char key, int modifiers) { > switch (key) { > case KeyCodes.KEY_ESCAPE: > hide(); > break; > return true; > } > But the onKeyDownPreview is deprecated and I was wandering how would a > version with onPreviewNativeEvent (the new way of handling events) > would look like? Any suggestions? Am I the only one to think that the > Google documentation about this is too terse? --~--~-~--~~~---~--~~ 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 not running?
Which method never gets called? I would put breakpoints/asserts/System.out() in the following locations to see how far it proceeds: 1. start of test 2. start of timer run() method 3. SiteService.getPagedSongModelDataByUserId() Also, while you can use delayTestFinish() to test client/service interaction, I find it much easier to debug--and faster to run--if I test them separately. The async service is an interface which you can easily mock. The following approach allows you to run the client code synchronously. // testing client code SiteService service = new MockServiceImpl(); service.getPagedSongModelDataByUserId(...); // typically you would call a client method which then calls the service... service.getLastRequest(); // assert something w /this service.respond(...); To test the service you just use a regular TestCase and call the RPC method directly. -= Mat On Mon, Aug 31, 2009 at 7:08 PM, charlie wrote: > Hi all, I have a unit test shown here http://pastebin.com/m4e4596b1 . > > When using eclipse and Run as GWT Unit Test ( hosted mode ), the only output > I get is > > Starting HTTP on port 0 > HTTP listening on port 58504 > Compiling module com.charlie.MP3Player.JUnit > Compiling 1 permutations > Permutation compile succeeded > Linking into www-test > Link succeeded > Compilation succeeded -- 10.163s > > I have a very obvious assertFalse(true); for every condition but it looks > like it's never getting run ? Debugging it shows that my method never gets > called either. --~--~-~--~~~---~--~~ 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: setHTML is not working in Mozilla and Chrome
Hi Simon, The overall idea looks correct. Is this copied from the original code? The span tag is left open; that may be the cause of you troubles. -= Mat On Mon, Jul 20, 2009 at 7:54 PM, Simon wrote: > > Hi all, i faced a problem with the following code, > > == > output += ""; > > Iterator itr = hm.keySet().iterator(); > > NumberFormat changeFormat = NumberFormat.getFormat("#,##0.00"); > > while(itr.hasNext()){ > > String key = (String) itr.next(); > > String value = hm.get(key); > > double size = hi.get(key); > > size = size / totalSize * 100; > > String sizeTemp = changeFormat.format(size); > > output += ""+value+": td>"+sizeTemp+"%"; > > } > > output +=""; > > > > h.setHTML(output); > > output=""; > > return h; > === > > Initially, i am testing in hosted mode, everything is working > properly, but when i switched to Mozilla and Chrome, the browser is > not responded, but IE is working properly. The return value h will be > added into a VerticalPanel, homePanel.add(h). I am not sure whether it > is a correct way to display in a panel. So perhaps someone can give me > some guideline. Thanks 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 -~--~~~~--~~--~--~---
Re: Hooking a GWT event onto an element in an external iframe
Hi Tin, There is a potential for memory leaks via event listeners due to cyclical references between DOM and JS. To avoid this, GWT manages the event listeners via the Widget lifecycle. When the widget is attached to the DOM (i.e. it or it's ancestor is attached to a RootPanel) the widget's event listener is initialized. When the widget is detached (or the page is unloaded) the event listener is cleaned up. You can see the code in Widget.onAttach() and Widget.onDetach(). I'd say it is erroneous to use Widget outside of the normal Widget containment hierarchy. Instead, we can set an event listener directly: DOM.setEventListener(buttonElement, new EventListener() { // you will only get the events you sink void onBrowserEvent(Event event) { // references in this method can result in a memory leak Window.alert("GWT-hacky-clicked!"); } }); // connect the foreign element to the GWT event dispatcher DOM.sinkEvents(buttonElement, Event.ONCLICK); Also consider adding a Window CloseHandler to prevent the memory leak. Window.addCloseHandler(new CloseHandler() { public void onClose(CloseEvent event) { DOM.setEventListener(buttonElement, null); } }); You can also look at HandlerManager and DomEvent.fireNativeEvent() to see how to translate Event into a ClickEvent, but IMO that is overkill. -= Mat On Thu, Jul 16, 2009 at 4:27 PM, tin wrote: > I am writing a GWT app that involves interacting with an external > document in an iframe. As a proof of concept, I am trying to attach a > click handler to a button. > > The following works in javascript > > var iframe = document.getElementById("rawJSIFrame"); > var doc = iframe.contentDocument; > var body = doc.body; > var button = doc.getElementsByTagName("input").namedItem("submit"); > button.onclick = function() { > alert("Clicked!"); > }; > > Trying to do the equivalent in GWT, I did the following: > > public void addClickHandlerToSubmitButton(String buttonElementName, > ClickHandler clickHandler) { > IFrameElement iframe = IFrameElement.as(frame.getElement()); > Document frameDocument = getIFrameDocument(iframe); > if (frameDocument != null) { > Element buttonElement = finder(frameDocument).tag("input").name > (buttonElementName).findOne(); > ElementWrapper wrapper = new ElementWrapper(buttonElement); > HandlerRegistration handlerRegistration = > wrapper.addClickHandler(clickHandler); > } > } > > private native Document getIFrameDocument(IFrameElement iframe)/*-{ > return iframe.contentDocument; > }-*/; > > > The following is the ElementWrapper class: > > public class ElementWrapper extends Widget implements HasClickHandlers > { > > public ElementWrapper(Element theElement) { > setElement(theElement); > } > > public HandlerRegistration addClickHandler(ClickHandler handler) { > return addDomHandler(handler, ClickEvent.getType()); > } > > > } > > The code to find the button works fine but the actual click event > handler is not getting invoked. Has anybody had a similar issue > before, and how did you resolve it? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Add DOM Object to an Event Handler
Hi, I am using a StringBuilder to dynamically generate a HTML Table for performance reasons (its much faster than using FlexTables). The problem is that the Table will contain input widgets and will require Event Handlers. i.e each table row will contain Input Text and on change of these each input text boxes it will update a corresponding Object. Does anyone know anyway how I can attached Dom elements that are created using the above way to Event Listeners created in GWT Java code? I dont want to have to add "" to my HTML. Thanks, Mat --~--~-~--~~~---~--~~ 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: Where is have PagingScrollTable's tourist
The demos are on the "GWT Incubator" project wiki: http://code.google.com/p/google-web-toolkit-incubator/w/list Here is the demo for PagingScrollTable. http://google-web-toolkit-incubator.googlecode.com/svn/trunk/demo/PagingScrollTable/index.html I don't know if this is for the current version or the "PagingScrollTableOld" version. Best Regards, -= Mat On Sat, Nov 29, 2008 at 9:44 PM, DANNY <[EMAIL PROTECTED]> wrote: > Where is have PagingScrollTable's tourist ? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Clearing Browser cache for upadated deployments
Hi, What I usually do is append a random querystring (for each new version) to the javascript include on the HTML page. e.g http://www.google.com/MyScript.js? version=20081101"> The browser sees this as a different URL to "http://www.google.com/ MyScript.js". Mathew --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Cast Element to Widget
Hi, I have created a Html table using a String builder (which i chose over using FlexTable / Grid because of performance reasons). Now, the problem is that I want to add a TableListener for this table. Is there a way to cast a DOM element into a Widget so I can add Event Handlers? Many Thanks, Mathew --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
GWT Grid / FlexTable Performance
Hi, I need to create a table of up to 7 columns x 300 rows. The content within each cell gets dynamically updated. >From past experience, its faster to use javascript to concatenate HTML to recreate the table every time the content is updated. Has anyone tried to use GWT's Grid or FlexTable widget to do something similiar? How well does it perform? Many Thanks, Mathew --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Enumerating Javascript Overlay Types
Hi Thomas, Thanks for your reply. However, I don't fully understand what you mean by "Use the same code within a JSNI method". I have a Overlay Type and I want to iterate through all the properties in the Javascript object. If I put my code inside a JNSI method, what is the point of having Overlay Types? Thanks, Mathew On Oct 27, 1:56 am, Thomas Broyer <[EMAIL PROTECTED]> wrote: > On 26 oct, 16:08, mat <[EMAIL PROTECTED]> wrote: > > > > > In Javascript its possible to enumerate Javascript Objects: > > > e.g: > > > var my obj = {"key1": "value 1","key2":"value 2", "key3","value3"}; > > > for (var key in obj) > > { > > var currentValue = obj[key]; > > > }; > > > I would like to know how to do this with Javascript Overlay Types in > > GWT. > > Use the same code within a JSNI method. > > Eventually you could instanciate a JSONObject to wrap your overlay, > but it has a cost. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Enumerating Javascript Overlay Types
Hi, In Javascript its possible to enumerate Javascript Objects: e.g: var my obj = {"key1": "value 1","key2":"value 2", "key3","value3"}; for (var key in obj) { var currentValue = obj[key]; }; I would like to know how to do this with Javascript Overlay Types in GWT. Thanks in advance! Thanks, Mathew --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Help: Calling a Java Function with String Array parameter from JSNI
Hi, I am having trouble calling a static function written in Java with a String array as the paramter: In my Java code I have the following: public static String[] AppendIndex(String[] names) { String[] namesWithIndex = new String[names.length]; for(int i = 0; i < names.length; i++) { namesWithIndex[i] = Integer.toString(i) + ". " + names[i]; } return namesWithIndex; } I have exported this static function so its accessible via JSNI using the following code. public static native void exportStaticMethod() /*-{ $wnd.AppendIndex= @Utilities::AppendIndex([Ljava/lang/String;); }-*/; In my Javascript I have: var names = ["Fat","Cat","Bat"]; var namesWithIndex = AppendIndex(names); However, I get the following error: java.lang.ClassCastException at java.lang.Class.cast(Unknown Source) at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:128) at com.google.gwt.dev.shell.ie.SwtOleGlue.convertVariantsToObjects(SwtOleGlue.java: 57) at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java: 119) at com.google.gwt.dev.shell.ie.MethodDispatch.invoke(MethodDispatch.java: 97) at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java: 294) at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java: 194) at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java: 117) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966) at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720) at com.google.gwt.dev.GWTShell.run(GWTShell.java:593) at com.google.gwt.dev.GWTShell.main(GWTShell.java:357) Does anyone know what I am doing wrong? Thanks in advance, Mat --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---