GWT performance
Hello All, i am a newbie that want to try to build a web application using GWT, but i heard from some of my colleague that GWT has some issue with its performance (reliability, load slowly). So, is there anyone can enlighten me? 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: GWT plugin: Problem when project name is changed
What about if we rename the hosted page?Should the plugin update the reference in the launch configuration too? On Mon, Aug 31, 2009 at 10:20 PM, Isaac Truett itru...@gmail.com wrote: I'm not sure that it should change the name of the launch configuration and hosted page however. I'm willing to take the next step and say I'm sure it shouldn't. :) - Isaac 2009/8/31 Miguel Méndez mmen...@google.com: On Sun, Aug 30, 2009 at 2:05 PM, hezjing hezj...@gmail.com wrote: Hi I have a GWT project named X created by Google plugin. Then later I want to change the name to Y, so I right clicked Project X - Refactor - Rename ... - New name: Y When run, it will complaint the working directory does not exist: /X/war It seems that launch configuration is still referring to the old name. Would it be possible for the plugin to rename the launch configuration, hosted page and etc? The rename should update references to the project's name in the launch configuration. I'm not sure that it should change the name of the launch configuration and hosted page however. Could you add a feature request here for this? -- Hez -- Miguel -- Hez --~--~-~--~~~---~--~~ 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 performance
This is not really a GWT-problem. If you're using IE (all versions) ... the Javascript-Engine is the breakman. With all real browsers in actual versions (Firefox, Safari, Chrome, Opera) performance is OK. On Sep 2, 6:32 am, kristian kristian.wij...@gmail.com wrote: Hello All, i am a newbie that want to try to build a web application using GWT, but i heard from some of my colleague that GWT has some issue with its performance (reliability, load slowly). So, is there anyone can enlighten me? 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 from a novice in GWT
Ok but how can achieve this? On Aug 17, 4:21 pm, Chad chad...@gmail.com wrote: Well, you could still use the method I outlined by using a Frame (iFrame) and load your site in it. So, you would have a GWT shell. HTH, Chad On Aug 17, 12:42 am, nyankov nikola.yan...@gmail.com wrote: Well my page is regular HTML page, and till now doesn't use GWT. Now I want to place a toolbar in it which I want to write with GWT. On 16 Авг, 22:40, Chad chad...@gmail.com wrote: Well, you could use a VerticalPanel added to the RootPanel. Put a ScrollPanel into the VerticalPanel, then put your toolbar into the VerticalPanel. Allow the VerticalPanel to take up the full size of the browser and adjust itself on browser resizing. Set the toolbar to the height you need and set the ScrollPanel to take up the rest of the space. Put the rest of your application in the ScrollPanel. This way, your toolbar wouldn't move when scrolling the application. You could also turn off the browser scroll bars if you needed to just to make sure they never appear as you'd never want them to appear. HTH, Chad On Aug 16, 11:40 am, nyankov nikola.yan...@gmail.com wrote: sure. position: fixed but this doesn't work well enough I red about frame (iframe) simulation somehow. I looked and in gmail (there opened chat popup is fixed to window bottom right). I saw that there are several iframes - but I didn't investigate in depth. On Aug 16, 7:15 pm, tolga ozdemir tka...@gmail.com wrote: Hmm, maybe you think this before.. Have you ever tried CSS? On Aug 16, 3:58 pm, nyankov nikola.yan...@gmail.com wrote: With other words I want to do workaround of position: fixed On Aug 15, 11:01 pm, nyankov nikola.yan...@gmail.com wrote: Hello, I am wondering. What is the way to implement toolbar in browser window. I want the toolbar to be fixed on window bottom always (even on scrolling and resize). Also I want the toolbar to be just a widget. Here what I already did, but on scrolling the panal flickering package com.mycompany.project.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.event.logical.shared.ResizeEvent; import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.Window.ScrollEvent; import com.google.gwt.user.client.Window.ScrollHandler; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.AbsolutePanel; public class GwtTest implements EntryPoint { public void onModuleLoad() { RootPanel rootPanel = RootPanel.get(); final AbsolutePanel absolutePanel = new AbsolutePanel(); rootPanel.add(absolutePanel, 0, 244); absolutePanel.setSize(100%, 51px); Button button1 = new Button(New button); Button button2 = new Button(New button); Button button3 = new Button(New button); absolutePanel.add(button1); absolutePanel.add(button2); absolutePanel.add(button3); com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight()-51)+px); Window.addWindowScrollHandler(new ScrollHandler() { @Override public void onWindowScroll(ScrollEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (Window.getClientHeight() +event.getScrollTop()-51)+px); } }); Window.addResizeHandler(new ResizeHandler() { @Override public void onResize(ResizeEvent event) { com.google.gwt.user.client.Element h = absolutePanel.getElement(); DOM.setStyleAttribute(h, top, (event.getHeight()-51)+px); } }); } } Thank you in advance- Hide quoted text - - Show quoted text -- Скриване на цитирания текст - - Показване на цитирания текст -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the
Re: Focus Left
My bad. I do not know where I was looking when I saw only the FocusHandler part of the deprecated message. Thank you all for your time and help. On Aug 31, 2:39 pm, Thomas Broyer t.bro...@gmail.com wrote: On 31 août, 14:02, monkeyboy dilbert.elbo...@gmail.com wrote: On Aug 31, 1:59 pm, Ian Bambury ianbamb...@gmail.com wrote: Add a blur handler Thanks a lot Ian. I will try that. ...and note that this is is quite clearly documented:http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/g...)http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/g...) (pointing this out for the next time you'll search the equivalent handler for a given listener ;-) ) --~--~-~--~~~---~--~~ 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: Catching Hyperlinks before they are executed.
On 2 sep, 04:26, Chris Bailey xcom...@gmail.com wrote: OK here is the soluction I came up with: Event.addNativePreviewHandler(new Event.NativePreviewHandler() { @Override public void onPreviewNativeEvent(NativePreviewEvent event) { if (event.getTypeInt() == Event.ONCLICK) { // do something with the keycode // doSomething(event.getNativeEvent().getKeyCode()); if(com.google.gwt.dom.client.Element.is(event.getNativeEvent ().getEventTarget())){ Element targetElement = (Element) Element.as(event.getNativeEvent ().getEventTarget()); if(a.equalsIgnoreCase(getTagName(targetElement))) { //String hostURL = GWT.getHostPageBaseURL(); String href = DOM.getElementAttribute ((com.google.gwt.user.client.Element) targetElement, href); How about: EventTarget eventTarget = event.getNativeEvent().getEventTarget(); if (AnchorElement.is(eventTarget)) { AnchorElement targetElement = eventTarget.cast(); String href = targetElement.getHref(); ... I'd also wrap the whole thing within an if (!event.isCancelled()) { ... } check href against hostURL to see if the link is realitive or absolute then do whatever you want. Oh, so you meant relative! I thought you meant something related to real (like, links to something real, i.e. make a request and see if it returns an error) --~--~-~--~~~---~--~~ 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?
On 2 sep, 00:39, charlie charlie.f...@gmail.com wrote: None of the test methods get called, I'm sysout'ing everywhere and stepping it through a debugger, it isn't being run at all. And I notice the output never says it gets run, only compiled. Your test class is in a .server. package, so unless your module (com.charlie.MP3Player) has a source path=client / in it, your class isn't treated as client code and won't be run as a GWT unit test. Can you give me an example of one of your GWTTestCase's ? Apart from the package issue, your class looks OK. Just a small nit: GWTTestCase is a JUnit 3 test case, so you don't need the JUnit 4 @Test annotation on your test methods (instead, you must name them testXXX) --~--~-~--~~~---~--~~ 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: linux servers
bcw wrote: [...] I have the thought that a FireFox plug-in might allow access. I'll want to learn about the security issues along the way. Sure, but don't forget that you will need a *different* plugin for every platform and browser combination. So you'll need one for Firefox on ix32 Windows, Firefox on ix64 Windows, Firefox on ix32 Linux, Firefox on ix64 Linux, Firefox on ARM Linux, Firefox on ix32 OSX, Firefox on ix64 OSX, Firefox on PowerPC OSX, Chrome on ix32 Windows... etc ad nauseam. The same applies to writing a native app, but at least then you don't need to worry about what web browser you're using, so the number of different versions drops dramatically. Using a private web server suffers from the same problem as it's still native code. [...] Ultimately, I'm writing a PIM (Personal Information Manager) that leverages all the online applications, since we're living our lives on- line. But I also want to be able to access selected local computing resources that a user may have invested in. Some people want to drag- and-drop statistical analysis streams their colleagues have published into their own PIM - and have them passed through their locally- assembled analysis tools for processing. I have vague memories that the Google Wave demo featured drag-and-dropping from the desktop into a Wave, but the Wave sandbox doesn't support it and I can't think how it would be done anway. Web browsers should forbid that sort of thing. Yes, it can be done unsafely. Can it be done safely? How do I do that? Ultimately, no. Accessing local resources from an untrusted web page is fundamentally insecure. For this to work, you'll need to bypass all the security systems, which means that somehow you need to persuade the user to run local native code. Something I didn't think of in my original reply is that you may be able to invert the problem --- you could write a standalone app in something portable like Java that simply wraps an embedded web browser. Then you implement your app logic in GWT running in that web browser, which calls out to extra functionality injected into the browser environment by your wrapper app. This avoids all the security issues because you now have control of the web browser itself and so can do whatever you like. Since any sane web browser widget will be using the native web browser to implement its functionality, you should still get a nice light footprint for your wrapper app. You should, ideally, be able to use the same app wrapper for any number of trusted-local-GWT applications --- it might make a nice project... -- ┌─── dg@cowlark.com ─ http://www.cowlark.com ─ │ │ They laughed at Newton. They laughed at Einstein. Of course, they │ also laughed at Bozo the Clown. --- Carl Sagan --~--~-~--~~~---~--~~ 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 serialisation too slow
Morning David, I've found that GWT serialization is pretty decent. 500-600 does seem like a lot of objects to be processing in one hit if performance on a low end server is a concern, but then again 20 seconds seems like an awfully long time too. What's the performance like in your dev environment? Are your JVM settings the same as those on your target server? What exactly do you mean by low end server in terms of CPU and RAM? Are you able to attach VisualVM that comes with the Sun JDK? This will quickly give you some clues as whether the process is limited by CPU or memory. You can also add a simple filter before the GWT servlet to give you a very coarse request timing - you can at least then rule out latencies and bandwidth to your server. How large are your serialized objects prior to compression? I think you can quickly test this by disabling gzip compression in FireFox: http://forgetmenotes.blogspot.com/2009/05/how-to-disable-gzip-compression-in.html If the uncompressed size is particularly large then memory and compression time may be the limiting factor. Finally, what kind of objects are you serialising? Are you attempting to send something like Hibernate objects over the wire (or some other kind of proxied objects) which are causing unexpected database hits? Cheers, Chris. On Sep 1, 10:19 pm, David Given d...@cowlark.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I've got an app intended to run on a fairly low-end server, so I've been optimising it as hard as possible. Right now I've got it to the stage where the biggest bottleneck is the GWT server-side serialisation, as it's squirting a large database sync over to the client. My app is taking about 300ms to run the business logic, 2000ms to construct the delta... and a staggering 20 *seconds* to serialise it before sending it to the client. (Numbers approximate as I can't insert any instrumentation into the GWT backend.) The packet's not very big; 20kB compressed on the wire, as far as I can tell, and about 500-600 objects. Does anyone have any suggestions as to how I can speed this up? Right now the time it takes is unacceptable. Can any alternative serialisation system be plugged in, for example? - -- ┌─── dg@cowlark.com ─http://www.cowlark.com─ │ │ People who think they know everything really annoy those of us who │ know we don't. --- Bjarne Stroustrup -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/ iD8DBQFKnY/pf9E0noFvlzgRAgZhAKCzYv2e7uWBtkzhB++walOQMK1xSACgnSIN uKhpOfVQ+1k6XfSDFnogeSc= =f4nY -END PGP SIGNATURE- --~--~-~--~~~---~--~~ 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 application does not run ie7
Yes, a link might be useful. Ian http://examples.roughian.com 2009/9/1 aftershock ante...@gmail.com It is Internet explorer 7.00.6000.16386 . I could not see any error. Internet explorer printed a message done in statusbar. I could not see any triangle. I could see the html part of page but not gwt application embedded. The code is not so small. It would not fit here. I can send you zipped. Basically, it uses one or two native javascripts functions, the rest generates the interface: checkboxes,textboxes, one abspanel, one notebook. I could link the application , it is online. --~--~-~--~~~---~--~~ 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 from a novice in GWT
Why not just add your toolbar and use a window resize handler to put it at the bottom of the page? Ian http://examples.roughian.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: GWT performance
Kristian, Do GMail or the GWT showcase application work well enough for you in your intended browser? If so, then in all likelihood your GWT application will perform adequately. I'm not aware of any reliability issues as such. The only thing that springs to mind is that GWT compiles for specific browsers that it knows about at compile time. Like many other web application technologies, if a new browser comes out then they can break compatibility. Recent examples of this are with IE8 and FF 3.5, however Google have always endeavoured to roll out compiler updates to rectify these issues. Loading times can be a problem and it boils down to a couple of things: 1. I believe IE's JavaScript parser gets disproportionately slower the larger your GWT application is (other browsers do not suffer with this); 2. a compressed GWT application can still be fairly large, say 150k to 200k, which can be an issue if your target audience are all on dial up connections. Remember though that this download is a one-off and the browser will cache that version of the app forever so all subsequent app launches are significantly quicker. Also, GWT 2.0 has a number of things in the pipeline to address these issues (like code splitting). Cheers, Chris. On Sep 2, 5:32 am, kristian kristian.wij...@gmail.com wrote: Hello All, i am a newbie that want to try to build a web application using GWT, but i heard from some of my colleague that GWT has some issue with its performance (reliability, load slowly). So, is there anyone can enlighten me? 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: DOM.getElementById() vs $doc.getElementById()
I'm using the approach of wrapping the form in a FormPanel FormPanel form = FormPanel.wrap(element, false); Style style = element.getStyle(); style.setProperty(display, block);//Statically set to display:none parentPanel.add(form);//Moves the form in the DOM Element formElement = form.getElement(); NodeListElement inputs = formElement.getElementsByTagName(input); int ln = inputs.getLength(); for (int i = 0; i ln; i++) { Element element = inputs.getItem(i); InputElement inelement = (InputElement)element; String name = inelement.getName(); String value = inelement.getValue(); //Modify values here. } I've gotten username/password autofill working in Firefox, Chrome, Opera, Safari, but not IE; still trying to figure that out. Bob --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
javax.persistence package
Hi guys, Can you enlighten me wheather we could use javax.persistence.* in our serialized DTO objects for the sake of RPC?? can I use @Table, @Id or other annotations? Regards, Tolga --~--~-~--~~~---~--~~ 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 serialisation too slow
Chris Lowe wrote: [...] 500-600 does seem like a lot of objects to be processing in one hit if performance on a low end server is a concern, but then again 20 seconds seems like an awfully long time too. Actually, thinking about it, it's more than that --- probably around 1500 objects (500 large objects, but each one contains references to a few small just-data objects). What's the performance like in your dev environment? Are your JVM settings the same as those on your target server? [...] You can also add a simple filter before the GWT servlet to give you a very coarse request timing - you can at least then rule out latencies and bandwidth to your server. I wish. The target server is a solid-state ARM box -- a SheevaPlug (1.2GHz processor, 512MB RAM). Alas, there is no decent JIT for ARM yet, so it's running the interpreted JDK. I'll check out VisualVM, but I suspect that it's not up to running it. Annoyingly the machine is perfectly capable of running the actual *application*. The actual logic takes a tiny fraction of the time of the serialisation. My development machine is a traditional ix32 box and serialisation takes a trivial amount of time. I'll try the trick with the filter to get some actual figures. [...] How large are your serialized objects prior to compression? I think you can quickly test this by disabling gzip compression in FireFox: http://forgetmenotes.blogspot.com/2009/05/how-to-disable-gzip-compression-in.html This just causes the page to turn into garbage --- probably a server misconfiguration on my end. If the uncompressed size is particularly large then memory and compression time may be the limiting factor. Looking at the server stats its VM size doesn't appear to change during the first serialisation process, indicating that it doesn't want to allocate more memory. I have a feeling that memory's not the problem. Finally, what kind of objects are you serialising? Are you attempting to send something like Hibernate objects over the wire (or some other kind of proxied objects) which are causing unexpected database hits? Nope. The entire DB is being held in-memory. In fact, the way my app works is that the server logic calculates the delta needed to be sent to the client, constructs a packet of client objects from this, and then returns that packet as the result from the RPC call, so the stuff being serialised doesn't actually content to the objects in the DB at all. (My 400-object delta, the result of the initial DB sync, takes about 4s to generate.) The delta generation uses reflection and annotations to query the DB objects for properties that need to be copied into the delta. (The client is only allowed to see information from the DB that the user is allowed to have.) Simply by adding a cache for Field objects I managed to reduce the time taken for the delta generation by a factor of ten, so I suspect that reflection is dog slow with this JVM. What does the GWT serialisation system use? If it uses reflection, is there any way of persuading it to use byte-code generation instead? -- ┌─── dg@cowlark.com ─ http://www.cowlark.com ─ │ │ They laughed at Newton. They laughed at Einstein. Of course, they │ also laughed at Bozo the Clown. --- Carl Sagan --~--~-~--~~~---~--~~ 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: javax.persistence package
tolga ozdemir wrote: [...] Can you enlighten me wheather we could use javax.persistence.* in our serialized DTO objects for the sake of RPC?? can I use @Table, @Id or other annotations? The GWT runtime ignores annotations --- they're not kept at runtime on the client. So you can pass annotated objects perfectly happily over the link and they'll work fine. I've had good experiences using Berkeley DB JE and GWT. It's possible to query an object on the server, have Berkeley DB instantiate it for me, and then just return it directly to the client for display. So I'd imagine you could use something similar with javax.persistence. The only thing you probably need to be concerned with is that if you instantiate an object on the server, pass it to the client, then pass it back to the server, you're getting a different physical object than the one you originally instantiated so the persistence layer might get its cacheing confused. (Berkeley DB doesn't seem to be bothered by this.) -- ┌─── dg@cowlark.com ─ http://www.cowlark.com ─ │ │ They laughed at Newton. They laughed at Einstein. Of course, they │ also laughed at Bozo the Clown. --- Carl Sagan --~--~-~--~~~---~--~~ 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: javax.persistence package
oh..it does mean we cannot use ejb3 yet.. right? On Wed, Sep 2, 2009 at 2:13 PM, David Given d...@cowlark.com wrote: tolga ozdemir wrote: [...] Can you enlighten me wheather we could use javax.persistence.* in our serialized DTO objects for the sake of RPC?? can I use @Table, @Id or other annotations? The GWT runtime ignores annotations --- they're not kept at runtime on the client. So you can pass annotated objects perfectly happily over the link and they'll work fine. I've had good experiences using Berkeley DB JE and GWT. It's possible to query an object on the server, have Berkeley DB instantiate it for me, and then just return it directly to the client for display. So I'd imagine you could use something similar with javax.persistence. The only thing you probably need to be concerned with is that if you instantiate an object on the server, pass it to the client, then pass it back to the server, you're getting a different physical object than the one you originally instantiated so the persistence layer might get its cacheing confused. (Berkeley DB doesn't seem to be bothered by this.) -- ┌─── dg@cowlark.com ─ http://www.cowlark.com ─ │ │ They laughed at Newton. They laughed at Einstein. Of course, they │ also laughed at Bozo the Clown. --- Carl Sagan -- Tolga Özdemir Mobile 0 536 963 7890 MSN ozde...@hotmail.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: Catching Hyperlinks before they are executed.
wow, that looks better and so much shorter On Sep 2, 5:23 am, Thomas Broyer t.bro...@gmail.com wrote: On 2 sep, 04:26, Chris Bailey xcom...@gmail.com wrote: OK here is the soluction I came up with: Event.addNativePreviewHandler(new Event.NativePreviewHandler() { @Override public void onPreviewNativeEvent(NativePreviewEvent event) { if (event.getTypeInt() == Event.ONCLICK) { // do something with the keycode // doSomething(event.getNativeEvent().getKeyCode()); if(com.google.gwt.dom.client.Element.is(event.getNativeEvent ().getEventTarget())){ Element targetElement = (Element) Element.as(event.getNativeEvent ().getEventTarget()); if(a.equalsIgnoreCase(getTagName(targetElement))) { //String hostURL = GWT.getHostPageBaseURL(); String href = DOM.getElementAttribute ((com.google.gwt.user.client.Element) targetElement, href); How about: EventTarget eventTarget = event.getNativeEvent().getEventTarget(); if (AnchorElement.is(eventTarget)) { AnchorElement targetElement = eventTarget.cast(); String href = targetElement.getHref(); ... I'd also wrap the whole thing within an if (!event.isCancelled()) { ... } check href against hostURL to see if the link is realitive or absolute then do whatever you want. Oh, so you meant relative! I thought you meant something related to real (like, links to something real, i.e. make a request and see if it returns an error)- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: javax.persistence package
hmm.. you mean your EJB classes - your DTOs - are in serverside and by using dozer.. you automatically translate them and use in client side, right? On Wed, Sep 2, 2009 at 3:03 PM, Dalla dalla_man...@hotmail.com wrote: Correct, not on the client side anyway. GWT does not emulate javax.persistence.*, importing that package on the client side would cause errors when compiling. However you COULD use EJB3, if you keep the mappings in a separate file. But´s that´s not very flexible. I use EJB3 myself on the server side, and then use Dozer to convert the EJBs to POJOs before sending them to the client. Once the objects is sent back, you convert it back to an EJB, Works like a charm so far. On 2 Sep, 13:26, Tolga Özdemir tka...@gmail.com wrote: oh..it does mean we cannot use ejb3 yet.. right? On Wed, Sep 2, 2009 at 2:13 PM, David Given d...@cowlark.com wrote: tolga ozdemir wrote: [...] Can you enlighten me wheather we could use javax.persistence.* in our serialized DTO objects for the sake of RPC?? can I use @Table, @Id or other annotations? The GWT runtime ignores annotations --- they're not kept at runtime on the client. So you can pass annotated objects perfectly happily over the link and they'll work fine. I've had good experiences using Berkeley DB JE and GWT. It's possible to query an object on the server, have Berkeley DB instantiate it for me, and then just return it directly to the client for display. So I'd imagine you could use something similar with javax.persistence. The only thing you probably need to be concerned with is that if you instantiate an object on the server, pass it to the client, then pass it back to the server, you're getting a different physical object than the one you originally instantiated so the persistence layer might get its cacheing confused. (Berkeley DB doesn't seem to be bothered by this.) -- ┌─── dg@cowlark.com ─http://www.cowlark.com─ │ │ They laughed at Newton. They laughed at Einstein. Of course, they │ also laughed at Bozo the Clown. --- Carl Sagan -- Tolga Özdemir Mobile 0 536 963 7890 MSN ozde...@hotmail.com- Dölj citerad text - - Visa citerad text - -- Tolga Özdemir Mobile 0 536 963 7890 MSN ozde...@hotmail.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: javax.persistence package
Correct, not on the client side anyway. GWT does not emulate javax.persistence.*, importing that package on the client side would cause errors when compiling. However you COULD use EJB3, if you keep the mappings in a separate file. But´s that´s not very flexible. I use EJB3 myself on the server side, and then use Dozer to convert the EJBs to POJOs before sending them to the client. Once the objects is sent back, you convert it back to an EJB, Works like a charm so far. On 2 Sep, 13:26, Tolga Özdemir tka...@gmail.com wrote: oh..it does mean we cannot use ejb3 yet.. right? On Wed, Sep 2, 2009 at 2:13 PM, David Given d...@cowlark.com wrote: tolga ozdemir wrote: [...] Can you enlighten me wheather we could use javax.persistence.* in our serialized DTO objects for the sake of RPC?? can I use @Table, @Id or other annotations? The GWT runtime ignores annotations --- they're not kept at runtime on the client. So you can pass annotated objects perfectly happily over the link and they'll work fine. I've had good experiences using Berkeley DB JE and GWT. It's possible to query an object on the server, have Berkeley DB instantiate it for me, and then just return it directly to the client for display. So I'd imagine you could use something similar with javax.persistence. The only thing you probably need to be concerned with is that if you instantiate an object on the server, pass it to the client, then pass it back to the server, you're getting a different physical object than the one you originally instantiated so the persistence layer might get its cacheing confused. (Berkeley DB doesn't seem to be bothered by this.) -- ┌─── dg@cowlark.com ─http://www.cowlark.com─ │ │ They laughed at Newton. They laughed at Einstein. Of course, they │ also laughed at Bozo the Clown. --- Carl Sagan -- Tolga Özdemir Mobile 0 536 963 7890 MSN ozde...@hotmail.com- Dölj citerad text - - Visa citerad text - --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
How to determine space available to RootPanel.get('some_div')?
Greetings, I'm writing a simple client-side-only photo gallery and want to determine the space available in the host page. The app is added inside a div element in the host page and I know I can get the top and left offsets for that div, but I cannot for the life of me work out how to get the bottom and right offsets too. I can make assumptions about what they /might/ be based on top and left, but in practise this doesn't work well. Is there a best practise for getting the space available to an app? Anyone got any good ideas? Examples? Should I RTFM? --~--~-~--~~~---~--~~ 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: @RemoteServiceRelativePath
I have the following tag: servlet path=/MyService class=com.google.tabs.server.MyServiceImpl / On Sep 1, 1:43 pm, Thad thad.humphr...@gmail.com wrote: Do you have the proper servlet and servlet-mapping tags in your web.xml? On Sep 1, 10:31 am, Aximilli302 aximilli...@gmail.com wrote: Me again, I have another quick question for the general comunity. What goes into the @RemoteServiceRelativePath tag? Is it the name of the class it is in? for example, package com.google.tabs.client; import com.google.gwt.user.client.rpc.RemoteService; import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; @RemoteServiceRelativePath(MyService) public interface MyService extends RemoteService{ public String myMethod(String s, String username); } I put that in, and the server call fails. I get a warning: Sep 1, 2009 9:24:28 AM com.google.appengine.tools.development.LocalResourceFileServlet doGet WARNING: No file found for: /tabs/MyService Does anyone know how to make this work?- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: @RemoteServiceRelativePath
I have this tag: servlet path=/serve class=com.google.tabs.server.MyServiceImpl / On Sep 1, 1:43 pm, Thad thad.humphr...@gmail.com wrote: Do you have the proper servlet and servlet-mapping tags in your web.xml? On Sep 1, 10:31 am, Aximilli302 aximilli...@gmail.com wrote: Me again, I have another quick question for the general comunity. What goes into the @RemoteServiceRelativePath tag? Is it the name of the class it is in? for example, package com.google.tabs.client; import com.google.gwt.user.client.rpc.RemoteService; import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; @RemoteServiceRelativePath(MyService) public interface MyService extends RemoteService{ public String myMethod(String s, String username); } I put that in, and the server call fails. I get a warning: Sep 1, 2009 9:24:28 AM com.google.appengine.tools.development.LocalResourceFileServlet doGet WARNING: No file found for: /tabs/MyService Does anyone know how to make this work?- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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?
Ahh! That's it. Thanks! On Wed, Sep 2, 2009 at 4:32 AM, Thomas Broyer t.bro...@gmail.com wrote: On 2 sep, 00:39, charlie charlie.f...@gmail.com wrote: None of the test methods get called, I'm sysout'ing everywhere and stepping it through a debugger, it isn't being run at all. And I notice the output never says it gets run, only compiled. Your test class is in a .server. package, so unless your module (com.charlie.MP3Player) has a source path=client / in it, your class isn't treated as client code and won't be run as a GWT unit test. Can you give me an example of one of your GWTTestCase's ? Apart from the package issue, your class looks OK. Just a small nit: GWTTestCase is a JUnit 3 test case, so you don't need the JUnit 4 @Test annotation on your test methods (instead, you must name them testXXX) --~--~-~--~~~---~--~~ 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: Download file
Hi chandrahas, thanks for the answer I've been out from work last week. Now I have to create a way to the user of my application make a download of a file that is in the server. I know the exactly location of the file and its name. But I don't understand how to create a link (would be a GWT Hyperlink) that point to my file. I think this way is easier than to create a servlet. Could anybody give me a little help about? thank you guys again 2009/8/25 chandrahas koyari koy...@gmail.com There are two general methods to achieve it 1. Create a link which directly point to that resource (file) 2. Point to a Servlet which respond with a file (by using getResourceAsFile() ) On Aug 25, 2:50 am, Alexei Telles alexeitel...@gmail.com wrote: Hi... I need to create a link in my web application where the user will download a file that is in my server. I was searching for something in the web, but I could not find something about. Is there any GWT tool that allow me to develop a link in my application to make a download from the server to the client? Or another way that you guys use to do? Thanks again --~--~-~--~~~---~--~~ 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 application does not run ie7
Works fine for me in IE7 - well, I say 'fine' - you obviously need to level your css and build it up as you want it and I haven't played around with it, but I see everything in IE7 that I see in Chrome. Ian http://examples.roughian.com 2009/9/2 Ian Bambury ianbamb...@gmail.com Yes, a link might be useful. Ian http://examples.roughian.com 2009/9/1 aftershock ante...@gmail.com It is Internet explorer 7.00.6000.16386 . I could not see any error. Internet explorer printed a message done in statusbar. I could not see any triangle. I could see the html part of page but not gwt application embedded. The code is not so small. It would not fit here. I can send you zipped. Basically, it uses one or two native javascripts functions, the rest generates the interface: checkboxes,textboxes, one abspanel, one notebook. I could link the application , it is online. --~--~-~--~~~---~--~~ 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 determine space available to RootPanel.get('some_div')?
getOffsetHeight/Width It is in the FM :-) Ian http://examples.roughian.com 2009/9/2 jahboite jahbo...@gmail.com Greetings, I'm writing a simple client-side-only photo gallery and want to determine the space available in the host page. The app is added inside a div element in the host page and I know I can get the top and left offsets for that div, but I cannot for the life of me work out how to get the bottom and right offsets too. I can make assumptions about what they /might/ be based on top and left, but in practise this doesn't work well. Is there a best practise for getting the space available to an app? Anyone got any good ideas? Examples? Should I RTFM? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
new project - ImageBundleMap's - look up image by name
http://code.google.com/p/asmodaiosgwt/ My first project, but many people have asked How do I look up an image by a name ( String ) from an ImageBundle. Generally, it's kind of a mess to try to do that, so I thought I would make it simpler. --~--~-~--~~~---~--~~ 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: @RemoteServiceRelativePath
On 2 sep, 15:02, Aximilli302 aximilli...@gmail.com wrote: I have the following tag: servlet path=/MyService class=com.google.tabs.server.MyServiceImpl / This is no longer used in HostedMode (vs. GWTShell; i.e. since GWT 1.6), and it should have warned you about it. You have to configure your war/WEB-INF/web.xml just like with any Java webapp. --~--~-~--~~~---~--~~ 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: javax.persistence package
Yes, exactly. This is pretty much it: DozerBeanMapper mapper = new DozerBeanMapper(); //This is a mapping from EJB to POJO //SimpleHeader is my POJO, purchaseOrderHeader is an instance of the corresponding EJB. SimpleHeader header = (SimpleHeader) mapper.map(purchaseOrderHeader, SimpleHeader.class); //Mapping from POJO back to EJB looks exactly the same //Here, Arrivals is the EJB, arrivaldata is an instance of the corresponding POJO Arrivals arrivals = (Arrivals) mapper.map(arrivaldata, Arrivals.class); So if you already have EJBs and want to use Dozer, all you have to do is basically make a copy of your EJB, remove all annotations and imports of javax.* packages, create a default no argument constructor, and make the new POJO implement IsSerializable. On 2 Sep, 14:19, Tolga Özdemir tka...@gmail.com wrote: hmm.. you mean your EJB classes - your DTOs - are in serverside and by using dozer.. you automatically translate them and use in client side, right? On Wed, Sep 2, 2009 at 3:03 PM, Dalla dalla_man...@hotmail.com wrote: Correct, not on the client side anyway. GWT does not emulate javax.persistence.*, importing that package on the client side would cause errors when compiling. However you COULD use EJB3, if you keep the mappings in a separate file. But´s that´s not very flexible. I use EJB3 myself on the server side, and then use Dozer to convert the EJBs to POJOs before sending them to the client. Once the objects is sent back, you convert it back to an EJB, Works like a charm so far. On 2 Sep, 13:26, Tolga Özdemir tka...@gmail.com wrote: oh..it does mean we cannot use ejb3 yet.. right? On Wed, Sep 2, 2009 at 2:13 PM, David Given d...@cowlark.com wrote: tolga ozdemir wrote: [...] Can you enlighten me wheather we could use javax.persistence.* in our serialized DTO objects for the sake of RPC?? can I use @Table, @Id or other annotations? The GWT runtime ignores annotations --- they're not kept at runtime on the client. So you can pass annotated objects perfectly happily over the link and they'll work fine. I've had good experiences using Berkeley DB JE and GWT. It's possible to query an object on the server, have Berkeley DB instantiate it for me, and then just return it directly to the client for display. So I'd imagine you could use something similar with javax.persistence. The only thing you probably need to be concerned with is that if you instantiate an object on the server, pass it to the client, then pass it back to the server, you're getting a different physical object than the one you originally instantiated so the persistence layer might get its cacheing confused. (Berkeley DB doesn't seem to be bothered by this.) -- ┌─── dg@cowlark.com ─http://www.cowlark.com─ │ │ They laughed at Newton. They laughed at Einstein. Of course, they │ also laughed at Bozo the Clown. --- Carl Sagan -- Tolga Özdemir Mobile 0 536 963 7890 MSN ozde...@hotmail.com- Dölj citerad text - - Visa citerad text - -- Tolga Özdemir Mobile 0 536 963 7890 MSN ozde...@hotmail.com- Dölj citerad text - - Visa citerad text - --~--~-~--~~~---~--~~ 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: GWTCanvas and IE...
Umm... for anyone trying to see what I mean, I broke the app last night, and I hope to have it running soon again this morning. On Sep 1, 1:45 pm, Xlorep DarkHelm ch...@darkhelm.org wrote: Ok I'm hitting a roadblock here, and I'm hoping that it is just something obvious that I'm unable to see. My situation is this -- I'm working on a simple web app, using GWT and the GWTCanvas widget from gwt-incubator. With the canvas, I am trying to draw little black squares, which represent values at a specific position in an array. To me, it is pretty straight-forward, I have a method: - public void draw(int row, int col, int color) { canvas.setFillStyle(Settings.colors[color]); canvas.fillRect(col * Settings.PIXEL_SIZE, row * Settings.PIXEL_SIZE, Settings.PIXEL_SIZE, Settings.PIXEL_SIZE); } - in my class that wraps the canvas. On every major browser other than IE (and I can only test with IE8... which might make a difference, I dunno...), this works exactly as I'd expect. In IE... it never draws anything. Like... at all. I see that my code is running (I have some text which gets updated outside the canvas), but IE isn't drawing, well... anything. This somewhat leaves my little app as pretty useless for people who visit using IE. Like I said... I'm hoping that it is something I'm just plain missing here. The address to my app is: http://showsort.appspot.com I'm not really trying anything elaborate with the canvas in this... just drawing some squares on it. Any help would be most appreciated. I can provide other code if it helps... --~--~-~--~~~---~--~~ 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: DOM.getElementById() vs $doc.getElementById()
On 2 sep, 12:51, Bob Rozelle broze...@eatlocalfood.com wrote: I'm using the approach of wrapping the form in a FormPanel FormPanel form = FormPanel.wrap(element, false); Style style = element.getStyle(); style.setProperty(display, block);//Statically set to display:none FYI, I'm using UIObject.setVisible(element, true) with the same effect but a bit more readable IMO ;-) I've gotten username/password autofill working in Firefox, Chrome, Opera, Safari, but not IE; still trying to figure that out. That's most probably because of the following line: parentPanel.add(form);//Moves the form in the DOM Try keeping the form where it originally lives in the markup and see if it changes something (I bet it does!) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
errors with google plugin for eclipse
hi, I moved from GWT1.5.3 to GWT1.6/1.7. I installed google plguin in eclipse (Europa) and I did the changes in the directory structure. When I try to compile the app. with the pguing (red suitcase) I get thsi error: Loading module 'GemmaModule' [ERROR] Failure while parsing XML org.xml.sax.SAXNotRecognizedException: http://apache.org/xml/features/nonvalidating/load-external-dtd at oracle.xml.jaxp.JXSAXParserFactory.setFeature (JXSAXParserFactory.java:128) at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse (ReflectiveParser.java:307) at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100 (ReflectiveParser.java:48) at com.google.gwt.dev.util.xml.ReflectiveParser.parse (ReflectiveParser.java:385) at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad (ModuleDefLoader.java:243) at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java: 155) at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule (ModuleDefLoader.java:269) at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath (ModuleDefLoader.java:127) at com.google.gwt.dev.Compiler.run(Compiler.java:156) at com.google.gwt.dev.Compiler$1.run(Compiler.java:124) at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java: 88) at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger (CompileTaskRunner.java:82) at com.google.gwt.dev.Compiler.main(Compiler.java:131) In a post, I read that someone has put xercesImpl.jar inside jdk/jre/ lib/ext. Then error disappear and compilation is ok. The problem then is that when I deploy the application (EAR) in my application server, when I start the server I get an error caused by xercesImpl.jar inside jdk/jre/lib/ext. Apart from this, if I start the emulated host, without the xerces lib I get this error: * Unable to process 'file:/D:/branch_eclipse3.3_view/sources/GemmaWeb/ war/WEB-INF/web.xml' for servlet validation [DEBUG] Bootstrap link for command-line module 'GemmaModule' [TRACE] Loading module 'GemmaModule' Failure while parsing XML with this error: [ERROR] Failure while parsing XML org.xml.sax.SAXNotRecognizedException: http://apache.org/xml/features/nonvalidating/load-external-dtd at oracle.xml.jaxp.JXSAXParserFactory.setFeature (JXSAXParserFactory.java:128) at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse (ReflectiveParser.java:307) at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100 (ReflectiveParser.java:48) at com.google.gwt.dev.util.xml.ReflectiveParser.parse (ReflectiveParser.java:385) at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad (ModuleDefLoader.java:243) at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java: 155) at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule (ModuleDefLoader.java:269) at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath (ModuleDefLoader.java:127) at com.google.gwt.dev.HostedModeBase.loadModule(HostedModeBase.java: 536) at com.google.gwt.dev.HostedMode.loadModule(HostedMode.java:426) at com.google.gwt.dev.HostedMode.doStartup(HostedMode.java:351) at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:585) at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397) at com.google.gwt.dev.HostedMode.main(HostedMode.java:232) * Placing the xerces lib in jdk/jre/lib/ext I go a bit further away: * Unable to process 'file:/D:/branch_eclipse3.3_view/sources/GemmaWeb/ war/WEB-INF/web.xml' for servlet validation [DEBUG] Bootstrap link for command-line module 'GemmaModule' Validating servlet tags for module 'GemmaModule' More info: file:/C:/eclipse/configuration/eclipse/plugins/ com.google.gwt.eclipse.sdkbundle.win32_1.7.0.v200907131018/gwt- windows-1.7.0/doc/helpInfo/servletMappings.html Module declares 17 servlet declaration(s), but a valid 'web.xml' was not found at 'D:\branch_eclipse3.3_view\sources\GemmaWeb\war\WEB- INF\web.xml' More info: file:/C:/eclipse/configuration/eclipse/plugins/ com.google.gwt.eclipse.sdkbundle.win32_1.7.0.v200907131018/gwt- windows-1.7.0/doc/helpInfo/servletMappings.html Module declares 17 servlet declaration(s), but a valid 'web.xml' was not found at 'D:\branch_eclipse3.3_view\sources\GemmaWeb\war\WEB-INF \web.xml' The browser widget class could not be instantiated -- and the error shown is: [ERROR] The browser widget class could not be instantiated java.lang.RuntimeException: Unable to snatch field 'site' from class org.eclipse.swt.browser.Browser at
Re: gwt application does not run ie7
What is your IE7 version? What do you mean by leveling css? --~--~-~--~~~---~--~~ 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: rpc serialization problem
Hallo, i have the same problem. List (GWT) can not be used in DataNuceleus. Can every one help pleas! THX On 5 Aug., 04:52, mike m...@introspect.com wrote: I have a simple one-to-many betwen two entities. The parent entity uses List to contain the child entities. I am able to persist these entities in the datastore without problems. However, when reading a root entity at the server, I get: rpc.SerializationException: Type 'org.datanucleus.sco.backed.List' was not included in the set of types which can be serialized... The entities are successfully read from the datastore, but something in Datanucleus doesn't build the List correctly. Has anyone found a workaround for this serialization problem. Thanks GWT 1.7 GAE 1.2.2 --~--~-~--~~~---~--~~ 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 from a novice in GWT
@nyankov: Simple, really. Leave your current (non-GWT) site intact. Then, create a separate application (GWT) with a vertical panel containing a frame and the toolbar. Disable the window scroll bars. Add a window resize handler to keep your vertical panel sized full page (or maybe just set the vertical panel height and width to 100%). Make sure the toolbar height is set absolutely. Set the url of your frame to that of your original site (relative path should work being on the same server). The frame will have scroll bars if needed. That should do it, I think. If you don't like that idea, you could always use frame sets (yuck) and create two frames (vertically). Just put your current site in the top frame and your GWT site (toolbar) in the bottom frame. Assuming you want to change pages via the toolbar, you'd be better off with the solution above over frame set. @Ian: I think that's what the OP was doing originally, but was unhappy with the jumpiness on scrolling and resizing. On Sep 2, 5:08 am, Ian Bambury ianbamb...@gmail.com wrote: Why not just add your toolbar and use a window resize handler to put it at the bottom of the page? Ian http://examples.roughian.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: blank page and other weirdness after upgrade, 1.5 to 1.7
Dave, make sure you have published your application to the server correctly. Copy the contents of this folder: .\workspace\GWT Test Project 1\war To your webapps folder: \webapps\gwt_test_project_1 webapps/gwt_test_project should look like this: gwt_test_project WEB-INF GWT_Test_Project_1.css GWT_Test_Project_1.html Good luck! On Aug 25, 4:20 pm, Dave dfdumar...@gmail.com wrote: Thanks Rajeev. I understand where the 304s are coming from (basically, cache indications). I can clear these while running in hosted mode, (on windows) by running delete files in Internet Tools. So the main problem is the blank page. What I've discovered is that using the module name ('mmcclient') as a dom identifier in the index file, seems to cause the server to stop processing the entry point code, and thus give me essentially a blank page. Maybe this is a no-no, that I missed in the docs/readme. However, in case it's a new issue I'll describe what I'm doing: What I did is create a sample gwt project, which runs fine and lets me enter my user name. Next I added div id=mmcclient/div after the h1 header line, h1Web Application Starter Project/h1 so now the index file looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head meta http-equiv=content-type content=text/html; charset=UTF-8 link type=text/css rel=stylesheet href=Bcc_mmcclient_gwt_test1.css titleWeb Application Starter Project/title script type=text/javascript language=javascript src=mmcclient/mmcclient.nocache.js/script /head body h1Web Application Starter Project/h1 div id=mmcclient/div table align=center tr td colspan=2 style=font-weight:bold;Please enter your name:/td /tr tr td id=nameFieldContainer/td td id=sendButtonContainer/td /tr /table /body /html I also inserted a trace statement in the entry point method: System.out.println(in entry point); so now the MMCClient class looks like: public class MMCClient implements EntryPoint { private static final String SERVER_ERROR = An error occurred while + attempting to contact the server. Please check your network + connection and try again.; private final GreetingServiceAsync greetingService = GWT .create(GreetingService.class); public void onModuleLoad() { System.out.println(in entry point); final Button sendButton = new Button(Send); final TextBox nameField = new TextBox(); nameField.setText(GWT User); ... } After clean and build, and gwt compile, when I run the gwt launcher, I only see Web Application Starter Project Please enter your name: There is no input field or send button and the host browser status line says 'Done' Now, if I change the div id to xmmcclient, as div id=xmmcclient/ div, and run it again, everything works. So my conclusion is not to use the module name as a DOM ID... Am I onto something? - sorry if this is already documented somewhere obvious - Thanks, Dave On Aug 25, 9:20 am, Rajeev Dayal rda...@google.com wrote: Hey Dave, A couple things to try: -Blow away the mmclient subdirectory located under your war directory -Clear your FF3 cache Try that out and see if that helps. If not, post back here and we'll dig deeper. Rajeev On Mon, Aug 24, 2009 at 2:36 PM, Dave dfdumar...@gmail.com wrote: Hi all, I'm getting several problems after upgrading to 1.7. In hosted mode: - all the http status codes are 304 (Not Modified) - I only see a blank page - when I Compile/Browse, FF3 tells me GWT Module needs to be (re) compiled, (I've tried refreshing first - same thing) - if I change the module name to something bogus in my host html file, and refresh, things seem to work. For example, when I change from div id=mmcclient/div to div id=x_mmcclient/div, I still get 304s, but I also get [ERROR] Unable to load module entry point ... com.google.gwt.core.client.JavaScriptException: (Error): Invalid argument. number: -2147024809 description: Invalid argument. [ERROR] Failure to load module 'mmcclient' with the line number of my entry point class where I call RootPanel.get(mmcclient).add(containerLayout); But then the module is loaded and my app is fine. No blank page! - finally, one of my css resource directories (sc) must be copied into the public root, otherwise it will not be found. Some further info, the war directory structure looks like this (my module name is mmcclient), - war - conf - images - mmcclient - sc - WEB-INF - MMCClient.css - MMCClient.html The module is loaded from the host html as: script type=text/javascript language=javascript
Re: RAD 7.5 with GWT 1.7
hi my name dinesh working for CTS bangalore so u want know how to deploy the project to WAS server 7.0 how to make webservice call right do give call.k call me on friday i will explain u k my contact number is 9986625114 if want a help for me u call me. On Tue, Sep 1, 2009 at 8:05 PM, Deepa deepamurali7...@gmail.com wrote: Hi All, Currently we are designing a web application using GWT 1.7 with RAD 7.5. I am very new to GWT I want to know if you can please help me with following: how to deploy the project to WAS server 7.0 how to make webservice call Intially we were able to deploy the project through tomcat builtin with GWT. but when tried accessing webservice it was givig a 404 error. Asking to publish the webservice. Can anybody please help with it. 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 -~--~~~~--~~--~--~---
Need Help in setting up GWT
Hello All, My need is to develop a web application with rich UI and deploy onto externat server, so i decided to use GWT. Can you let me understand in setting up dynamic web project in eclipse? I tried setting up project using WebAppCreator.cmd from gwt distribution but i cannot deploy that onto eclipse-integrated-tomcat- server. I created dynamic web project from eclipse but that does not run on hosted mode. I also created project by using google plugin, but no success on running on integrated-tomcat, but i can run this as GoogleWebApplication . How do I create a project in eclipse and proceed? Regards, Satya --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Upload PDF and Parse it
Good Morning, I have just stumbled across the google web toolkit and am going to utilise it for a college project. I see a company Scenechronize has used the toolkit to build they site and I am particularly interested in the upload PDF / Parse PDF functionality. Is there functionality to perform this task in GWT as I am looking to do something similar with PDF file upload / read / parse I would really appreciate any advice. Sara --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Hosted-mode - how to set the Jetty URL?
I am trying to work through the getting started tutorial. I am on a mac with Atempo live-update that is already running on and as a result the hosted mode jetty server can't start properly. How do I configure the hosted mode to use a different port? --~--~-~--~~~---~--~~ 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: Pls, help to parse ASP.NET JSON Date format.
On 2 sep, 17:17, Mike Chaliy m...@chaliy.name wrote: Hi everyone, ASP.NET JSON serialize DateTime into the following format \/Date (1251877601000)\/. Pls, help parse this string into the java(GWT) Date object. At this time the solution I came with is native javascript parsing with regex, extract long.. but then I cannot push long through JSNI. I hope to find something better. Let's try something: String dateStr = /Date(1251877601000)/; // start by extracting the timestamp dateStr = dateStr.substring(6, dateStr.length() - 2); // we could have used dateStr.replace(/Date(, ).replace()/, ) too // now convert this to a long long timestamp = Long.parseLong(dateStr); // then to a date: Date d = new Date(timestamp); --~--~-~--~~~---~--~~ 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: Hosted-mode - how to set the Jetty URL?
On 2 sep, 11:26, tedlief...@gmail.com tedlief...@gmail.com wrote: I am trying to work through the getting started tutorial. I am on a mac with Atempo live-update that is already running on and as a result the hosted mode jetty server can't start properly. How do I configure the hosted mode to use a different port? -port 8080 ? --~--~-~--~~~---~--~~ 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: Upload PDF and Parse it
After you initiate the file upload, you're going to want to do all the parsing on the server side, using some existing PDF reading library that has nothing to do with GWT. On Wed, Sep 2, 2009 at 3:35 AM, Sara Brodericksarabroderick1...@gmail.com wrote: Good Morning, I have just stumbled across the google web toolkit and am going to utilise it for a college project. I see a company Scenechronize has used the toolkit to build they site and I am particularly interested in the upload PDF / Parse PDF functionality. Is there functionality to perform this task in GWT as I am looking to do something similar with PDF file upload / read / parse I would really appreciate any advice. Sara --~--~-~--~~~---~--~~ 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: gin + Javascript Overlay types
Hi Jeff, I haven't used the GIN library extensively enough to know how it would handle binding JSO types offhand, but you might have better luck getting a useful reply on the google-gin discussion group if you haven't posted there already. Google GIN Discussion Group: http://groups.google.com/group/google-gin http://groups.google.com/group/google-ginCheers, -Sumit Chandel On Sat, Aug 29, 2009 at 6:01 PM, Jeff Chimene jchim...@gmail.com wrote: Hi, Is it expected that the following binding to a JSO type would fail? bind(Jsot.class).in(Singleton.class) The issue is: Deferred binding failed for 'com.google.gwt.core.client.JavaScriptObject The get() method in the JSO type is public final native Jsot get() /*-{ return this; }-*/; However, if I create the following binding: bind(Jsot.class).toProvider(JsotProvider.class) that has the following get() method private Jsot jsot; public Jsot get() { return jsot; } everything is copacetic. Thomas Broyer and I were talking earlier about using Provider methods with JSO types. He mentioned the @Provides annotation, but I cannot get that to work 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: How to determine space available to RootPanel.get('some_div')?
On 02/09/2009 17:56, Ian Bambury wrote: What exactly is it you are trying to get the space of? The total browser window, or some element of the html? Ian http://examples.roughian.com 2009/9/2 jahcasa jahbo...@gmail.com mailto:jahbo...@gmail.com Thanks Ian. I've tried using getOffsetHeight/Width and whilst it seems to work OK in Hosted mode, it doesn't in Firefox. Specifically, getOffsetWidth returns the correct width, but getOffsetHeight returns zero, presumably because at that time, the div is empty and has a height of zero. Just want to be clear that I'm trying to get the available space, before adding anything to rootPanel, such that the content to be added will fit inside the browser and inside the allotted div element and will all be visible without the need to scroll. I'm thinking that I may need to add rows to the Grid one at a time and back-off when Window getClientHeight or getScrollTop increases. I'm not sure how I'll do that at the moment, I'll have to experiment. Does it sound like a feasible solution? jah Oops, forgot to reply to the list. I'm trying to get the dimensions of the RootPanel which will be bound to an html div element in the host page. The app can be added to any webpage (as long as it's got the required div) and those webpages may well have headers, footers and sidebars so I want to determine what space is available to the div - taking into account any surrounding elements. jah --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
wide linebreak after html code before embedded gwt application
Hi, I noticed there is at least two line linebreak after top html code before embedded gwt application in case of IE6/7/8, For other browser, this cannot be seen. E.g. html code body mymenu div id=gwtapplication/div /body There will be two lines after mymenu and gwt application. Note the application uses absolute panel which may be relevant. There is no problem if there is no mymenu like html code. A very simple text already produces this effect. Moving up the gwt application by repositioning the absolute y coordinate does not help because then the top of the application is hidden by the white horizontal wide line. Any ideas? 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: Gwt Portlets and Fries on the side
Hi Shannon You can use GWT Portlets with whatever widget libraries you like. It provides a portal server like environment and programming model. Your portlets can be built using any set of GWT Widgets including ExtGwt. We are planning to add some more demos to GWT Portlets using different widget libraries (e.g. the pageable grid from the incubator project). Cheers David On Aug 21, 4:53 pm, Shannon Sumner shannonsum...@gmail.com wrote: Hello all, I need your advice. I've really fallen in love withGwtfor my web projects - especially ExtGwt. I've been using the tool to create very attractive apps for my company intranet. My boss would like me to assemble these apps within a portal structure. I've read a lot about doing this and I'm not certain JSR-168 portal is right forGwt. I've read some articles about OpenSocial and am leaning in that direction. I'm not sure if OpenSocial containers handle authentication and saving widget states. I'm also a bit concerned that Apache Shindig (OpenSocial Container) is still in the incubator. I'm sure the Apache Shindig container is lightweight enough where I could skin it to make it look like a Ext Js Portal. Has anyone else attempted this? Would you recommend a more traditional portal environment like JBoss or LifeRay? I noticed an article on OnGwt.com about GwtPortlets (http:// code.google.com/p/gwtportlets/). It looks like what I'm after but I would have to supply all the widgets myself. OpenSocial and JSR-168 Portals have tons ofportlets/widgets available from day one. I really don't know where to turn. I'm reaching out to theGwt community and asking for your advice. Please let me know what you think. Shannon P.S. Can I HaveFrieswith That? --~--~-~--~~~---~--~~ 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: javax.persistence package
Hi, hmm it sounds good.. I downloaded a sample gwt project with dozer (the music store)..When I look at the file structure, I noticed that this sample contains all mapping files and DTOs.. Including I have to write a dozer map file.. In my own sample project I did the same putting my DTOs into the client side directly without dozer map but it still works... I wonder what dozer gives me as an advantage - it seems it does not guarantee writing less config files? is it a security issue that we do not to put DTOs in client side in dozer project? Thanks, Tolga On Wed, Sep 2, 2009 at 4:54 PM, Dalla dalla_man...@hotmail.com wrote: Yes, exactly. This is pretty much it: DozerBeanMapper mapper = new DozerBeanMapper(); //This is a mapping from EJB to POJO //SimpleHeader is my POJO, purchaseOrderHeader is an instance of the corresponding EJB. SimpleHeader header = (SimpleHeader) mapper.map(purchaseOrderHeader, SimpleHeader.class); //Mapping from POJO back to EJB looks exactly the same //Here, Arrivals is the EJB, arrivaldata is an instance of the corresponding POJO Arrivals arrivals = (Arrivals) mapper.map(arrivaldata, Arrivals.class); So if you already have EJBs and want to use Dozer, all you have to do is basically make a copy of your EJB, remove all annotations and imports of javax.* packages, create a default no argument constructor, and make the new POJO implement IsSerializable. On 2 Sep, 14:19, Tolga Özdemir tka...@gmail.com wrote: hmm.. you mean your EJB classes - your DTOs - are in serverside and by using dozer.. you automatically translate them and use in client side, right? On Wed, Sep 2, 2009 at 3:03 PM, Dalla dalla_man...@hotmail.com wrote: Correct, not on the client side anyway. GWT does not emulate javax.persistence.*, importing that package on the client side would cause errors when compiling. However you COULD use EJB3, if you keep the mappings in a separate file. But´s that´s not very flexible. I use EJB3 myself on the server side, and then use Dozer to convert the EJBs to POJOs before sending them to the client. Once the objects is sent back, you convert it back to an EJB, Works like a charm so far. On 2 Sep, 13:26, Tolga Özdemir tka...@gmail.com wrote: oh..it does mean we cannot use ejb3 yet.. right? On Wed, Sep 2, 2009 at 2:13 PM, David Given d...@cowlark.com wrote: tolga ozdemir wrote: [...] Can you enlighten me wheather we could use javax.persistence.* in our serialized DTO objects for the sake of RPC?? can I use @Table, @Id or other annotations? The GWT runtime ignores annotations --- they're not kept at runtime on the client. So you can pass annotated objects perfectly happily over the link and they'll work fine. I've had good experiences using Berkeley DB JE and GWT. It's possible to query an object on the server, have Berkeley DB instantiate it for me, and then just return it directly to the client for display. So I'd imagine you could use something similar with javax.persistence. The only thing you probably need to be concerned with is that if you instantiate an object on the server, pass it to the client, then pass it back to the server, you're getting a different physical object than the one you originally instantiated so the persistence layer might get its cacheing confused. (Berkeley DB doesn't seem to be bothered by this.) -- ┌─── dg@cowlark.com ─http://www.cowlark.com─ │ │ They laughed at Newton. They laughed at Einstein. Of course, they │ also laughed at Bozo the Clown. --- Carl Sagan -- Tolga Özdemir Mobile 0 536 963 7890 MSN ozde...@hotmail.com- Dölj citerad text - - Visa citerad text - -- Tolga Özdemir Mobile 0 536 963 7890 MSN ozde...@hotmail.com- Dölj citerad text - - Visa citerad text - -- Tolga Özdemir Mobile 0 536 963 7890 MSN ozde...@hotmail.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: gwt application does not run ie7
7.0.6001.18000 Setting all css tags to the same for all browsers. E.g. body tags have varying amounts of margin/padding etc depending on the browser. So set them all to 0 and then build it all up again to what *you* want it to be. Ian http://examples.roughian.com 2009/9/2 aftershock ante...@gmail.com What is your IE7 version? What do you mean by leveling css? --~--~-~--~~~---~--~~ 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: gin + Javascript Overlay types
On 09/02/2009 10:37 AM, Sumit Chandel wrote: Hi Jeff, I haven't used the GIN library extensively enough to know how it would handle binding JSO types offhand, but you might have better luck getting a useful reply on the google-gin discussion group if you haven't posted there already. Google GIN Discussion Group: http://groups.google.com/group/google-gin http://groups.google.com/group/google-ginCheers, -Sumit Chandel Hi Sumit: I haven't used Gin extensively enough to realize there is a Gin list ... /me sighs Thanks for the pointer! --~--~-~--~~~---~--~~ 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 use multiple servers in a single client
Hi Ganesh, You can also consider using the JSONP technique, which allows you to mash up services from various origins in a single application. Dan Morrill wrote an excellent article treating this subject on the GWT Articles page. I recommend checking it out if JSONP sounds like a viable solution in your case. Using GWT for JSON Mashups: http://code.google.com/webtoolkit/articles/using_gwt_for_json_mashups.html http://code.google.com/webtoolkit/articles/using_gwt_for_json_mashups.htmlHope that helps, -Sumit Chandel On Fri, Aug 28, 2009 at 6:11 AM, Ganesh ganesh.ban...@gmail.com wrote: Hi I am working on a GWT application. In this, what my client needs is I send calls to different servers on basis of request types. Suppose there are 4 request types SELECT/INSERT/UPDATE/DELETE on basis of operation to be performed on server. If request type is SELECT, we need to send request to SERVER_1 and if request type is INSERT, UPDATE OR DELETE, we need to send request to SERVER_2. Now my question is how to send call to 2 different servers through same client window. Please help Ganesh Bansal --~--~-~--~~~---~--~~ 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: Pls, help to parse ASP.NET JSON Date format.
Huh... Seems I need some sleep... Thank you very much! On 2 Вер, 19:35, Thomas Broyer t.bro...@gmail.com wrote: On 2 sep, 17:17, Mike Chaliy m...@chaliy.name wrote: Hi everyone, ASP.NET JSON serialize DateTime into the following format \/Date (1251877601000)\/. Pls, help parse this string into the java(GWT) Date object. At this time the solution I came with is native javascript parsing with regex, extract long.. but then I cannot push long through JSNI. I hope to find something better. Let's try something: String dateStr = /Date(1251877601000)/; // start by extracting the timestamp dateStr = dateStr.substring(6, dateStr.length() - 2); // we could have used dateStr.replace(/Date(, ).replace()/, ) too // now convert this to a long long timestamp = Long.parseLong(dateStr); // then to a date: Date d = new Date(timestamp); --~--~-~--~~~---~--~~ 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: DOM.getElementById() vs $doc.getElementById()
FYI, I'm using UIObject.setVisible(element, true) with the same effect but a bit more readable IMO ;-) Thanks, there are a lot of ways to skin a cat, but 1 line for 3 is a nice trade off. I've gotten username/password autofill working in Firefox, Chrome, Opera, Safari, but not IE; still trying to figure that out. That's most probably because of the following line: parentPanel.add(form);//Moves the form in the DOM Try keeping the form where it originally lives in the markup and see if it changes something (I bet it does!) I know its because of that line, but I want the form to show up there. I guess, if IE requires that, I'll try a Z-axis and position move to get it sitting over where I want it to be without adding to my panel. Regards, Bob --~--~-~--~~~---~--~~ 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: semaphores in gwt
Hi Jaap, I would also consider restructuring your code to only require one RPC call, where the data you needed to get from both individual calls can be returned in that one single call. This would be ideal if the payload would still be of a reasonable size as you would avoid extra HTTP roundtrips and sidestep the hit in execution speed when starting up your application using nested calls or waiting on a flag. Hope that helps, -Sumit Chandel On Sat, Aug 29, 2009 at 5:20 PM, Jaap jaap.hait...@gmail.com wrote: Hi, When starting my webapp I do two RPC calls. I need the data of both of them in order to display something. If you work with threads with a native program you just use semaphores to achieve this. What's the way to do this in GWT? Thanks Jaap --~--~-~--~~~---~--~~ 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: Using javascript widget in a GWT widget
Hi Yossi, You can wrap accesses to the external widget that you want to include using JavaScript Native Interface (JSNI) methods from the widget class that you want to use as the container. Check out the documentation on using JSNI below and let us know if that solves your problem. JavaScript Native Interface methods: http://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#DevGuideJavaScriptNativeInterface Hope that helps, -Sumit Chandel On Sun, Aug 30, 2009 at 3:19 PM, Yossi ykah...@gmail.com wrote: Hi All, I found a widget on the web that I want to use in my GWT application. I want to be able to add it inside a widget and to wrap it with some java methods (like setting the height, width, getting value and more...) Can someone post a simple example of how this is done or link an article about this. I searched the web for it and found nothing. Thanks, Yossi --~--~-~--~~~---~--~~ 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: GWTCanvas and IE...
IE does not support canvas well. You may use wrapper libraries, which dispatch output to canvas if possible, and for IE try to emulate it with VML. Here's blog posting about this: http://lexaux.blogspot.com/2009/08/gwt-canvas-widget-drawing-in-browser.html You can select among several libraries; make sure you create some prototypes before making a decision. I succeeded with GWT-Widgets canvas proof of concept widget. On Sep 2, 10:39 am, Xlorep DarkHelm ch...@darkhelm.org wrote: Umm... for anyone trying to see what I mean, I broke the app last night, and I hope to have it running soon again this morning. On Sep 1, 1:45 pm, Xlorep DarkHelm ch...@darkhelm.org wrote: Ok I'm hitting a roadblock here, and I'm hoping that it is just something obvious that I'm unable to see. My situation is this -- I'm working on a simple web app, using GWT and the GWTCanvas widget from gwt-incubator. With the canvas, I am trying to draw little black squares, which represent values at a specific position in an array. To me, it is pretty straight-forward, I have a method: - public void draw(int row, int col, int color) { canvas.setFillStyle(Settings.colors[color]); canvas.fillRect(col * Settings.PIXEL_SIZE, row * Settings.PIXEL_SIZE, Settings.PIXEL_SIZE, Settings.PIXEL_SIZE); } - in my class that wraps the canvas. On every major browser other than IE (and I can only test with IE8... which might make a difference, I dunno...), this works exactly as I'd expect. In IE... it never draws anything. Like... at all. I see that my code is running (I have some text which gets updated outside the canvas), but IE isn't drawing, well... anything. This somewhat leaves my little app as pretty useless for people who visit using IE. Like I said... I'm hoping that it is something I'm just plain missing here. The address to my app is: http://showsort.appspot.com I'm not really trying anything elaborate with the canvas in this... just drawing some squares on it. Any help would be most appreciated. I can provide other code if it helps... --~--~-~--~~~---~--~~ 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, MVP, and nested widgets
Hi all, I have a question for the GWT-MVP experts out there. If there is a more suitable forum, please let me know. I have a menu panel which contains a flowpanel for menu items, and another flowpanel where the required page will display itself when the associated menu item is clicked. The MenuPanel presenter is creating menu items and sending the MenuItem views to the MenuPanel view to be added. The problem is this: If there are a number of possible MenuPanel views, then the MenuPanel presenter can't know which MenuItem view it should create (blue, green, red, text-based, image-based, therefore presumably each MenuPanel view should decide. The MenuPanel view can't be the creator of the MenuItems because it doesn't know which menu items should be created (for example, you might be allowed to see admin menu items or not - this kind of logic should not be in the view). So my current solution is to get the MenuPanel presenter to fetch the MenuItem view from the MenuPanel view. Now, if you are still following me, is this what I should be doing? Or have I completely lost the plot somewhere along the line? Although there are endless (generally slightly contradictory) explanations of MVP (and please note that I don't think I need another explanation of that), there isn't anything I can find that explains how to nail together the various self-contained MVP widgets - at least, not in a way that allows an event bus to operate. Ian http://examples.roughian.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: blank page and other weirdness after upgrade, 1.5 to 1.7
Thanks ddsnelle, but I'm fairly certain that I've got the app deployed correctly. Regards, Dave. On Sep 2, 8:05 am, ddsnelle ddsne...@gmail.com wrote: Dave, make sure you have published your application to the server correctly. Copy the contents of this folder: .\workspace\GWT Test Project 1\war To your webapps folder: \webapps\gwt_test_project_1 webapps/gwt_test_project should look like this: gwt_test_project WEB-INF GWT_Test_Project_1.css GWT_Test_Project_1.html Good luck! On Aug 25, 4:20 pm, Dave dfdumar...@gmail.com wrote: Thanks Rajeev. I understand where the 304s are coming from (basically, cache indications). I can clear these while running in hosted mode, (on windows) by running delete files in Internet Tools. So the main problem is the blank page. What I've discovered is that using the module name ('mmcclient') as a dom identifier in the index file, seems to cause the server to stop processing the entry point code, and thus give me essentially a blank page. Maybe this is a no-no, that I missed in the docs/readme. However, in case it's a new issue I'll describe what I'm doing: What I did is create a sample gwt project, which runs fine and lets me enter my user name. Next I added div id=mmcclient/div after the h1 header line, h1Web Application Starter Project/h1 so now the index file looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head meta http-equiv=content-type content=text/html; charset=UTF-8 link type=text/css rel=stylesheet href=Bcc_mmcclient_gwt_test1.css titleWeb Application Starter Project/title script type=text/javascript language=javascript src=mmcclient/mmcclient.nocache.js/script /head body h1Web Application Starter Project/h1 div id=mmcclient/div table align=center tr td colspan=2 style=font-weight:bold;Please enter your name:/td /tr tr td id=nameFieldContainer/td td id=sendButtonContainer/td /tr /table /body /html I also inserted a trace statement in the entry point method: System.out.println(in entry point); so now the MMCClient class looks like: public class MMCClient implements EntryPoint { private static final String SERVER_ERROR = An error occurred while + attempting to contact the server. Please check your network + connection and try again.; private final GreetingServiceAsync greetingService = GWT .create(GreetingService.class); public void onModuleLoad() { System.out.println(in entry point); final Button sendButton = new Button(Send); final TextBox nameField = new TextBox(); nameField.setText(GWT User); ... } After clean and build, and gwt compile, when I run the gwt launcher, I only see Web Application Starter Project Please enter your name: There is no input field or send button and the host browser status line says 'Done' Now, if I change the div id to xmmcclient, as div id=xmmcclient/ div, and run it again, everything works. So my conclusion is not to use the module name as a DOM ID... Am I onto something? - sorry if this is already documented somewhere obvious - Thanks, Dave On Aug 25, 9:20 am, Rajeev Dayal rda...@google.com wrote: Hey Dave, A couple things to try: -Blow away the mmclient subdirectory located under your war directory -Clear your FF3 cache Try that out and see if that helps. If not, post back here and we'll dig deeper. Rajeev On Mon, Aug 24, 2009 at 2:36 PM, Dave dfdumar...@gmail.com wrote: Hi all, I'm getting several problems after upgrading to 1.7. In hosted mode: - all the http status codes are 304 (Not Modified) - I only see a blank page - when I Compile/Browse, FF3 tells me GWT Module needs to be (re) compiled, (I've tried refreshing first - same thing) - if I change the module name to something bogus in my host html file, and refresh, things seem to work. For example, when I change from div id=mmcclient/div to div id=x_mmcclient/div, I still get 304s, but I also get [ERROR] Unable to load module entry point ... com.google.gwt.core.client.JavaScriptException: (Error): Invalid argument. number: -2147024809 description: Invalid argument. [ERROR] Failure to load module 'mmcclient' with the line number of my entry point class where I call RootPanel.get(mmcclient).add(containerLayout); But then the module is loaded and my app is fine. No blank page! - finally, one of my css resource directories (sc) must be copied into the public root, otherwise it will not be found. Some further info, the war directory structure looks like this (my
Re: Thank you google!
I second that. We're making rapid progress porting a Swing front end to GWT. The Google/GWT engineers have done some really impressive work here. On Sep 2, 12:17 pm, charlie charlie.f...@gmail.com wrote: Err, haven't :). On Wed, Sep 2, 2009 at 2:16 PM, charlie charlie.f...@gmail.com wrote: For making programming fun again. I really have been this excited about a technology in a decade and wanted to express my appreciation for all that you guys are doing. So 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 -~--~~~~--~~--~--~---
What are people using for ServerPush?
I've seen a few gwt projects, but just wanted to get some input on what people are using, how well it works, any pitfalls you've come across. 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: Creating a plugin framework with GWT
Hi Dave The GWT Portlets framework (http://code.google.com/p/gwtportlets/) will do most of what you want. Developers will have to recompile your application to add new 'plugins' (Portlets) but all your other requirements are covered (and more). Cheers David On Aug 24, 12:23 pm, Dave davej2...@gmail.com wrote: Cheers Nathan, That's a useful response. I didn't feel happy trying to send the UI classes across RPC, for the reasons you stated. I'm still looking at ways, where I will let developers 'produce' plugins that consist of a back and frontend. So the frontend widget/java script can easily be loaded, although I like your HTML suggestion. On Aug 22, 9:06 pm, Nathan Wells nwwe...@gmail.com wrote: Dave, the first thing need to know is that you're attempting to break some core rules. Widgets can only be created on the client-side. There are numerous reasons for this, but essentially it boils down to this: RPC calls should be about the model... data transfer, not UI component transfer. That's not to say that what you're talking about is impossible, it's just not going to be as pretty as you would like it to be. You can make it so that your TreeItem contains an HTML widget. Then you would probably provide some hook on the server-side for someone to specify what that html is. Again, this breaks the rules, though On Aug 21, 4:56 am, Dave davej2...@gmail.com wrote: Hi, I am trying to figure out how to create a pluginframeworkwithGWT, let me explain I have created an application that has a menu on the left side and a form on the right site of the screen. The menu is a tree and the form is a vertical panel (think of the example mail application). I have created a new class called CustomTreeItem that extends TreeItem. My custom class contains a member variable which is a vertical panel. When a user click on a instance of CustomTreeItem in the menu the vertical panel is displayed on the right site of the screen. I would like to extend this by allowing developers to produce custom forms. i.e allow developers to add in there own CustomTreeItems, without having to recompile with my code. My inital plan was to have a directory in the classpath, so at runtime a class loader on the server side would look for any classes that were derived from my CustomTreeItem in that folder and load them. The client would make an RPC request for the tree items, so it could build up the Tree. I quickly discovered that VerticalPanel couldn't be serialized (I assume because this is translated to javascript), so this wouldn't work. Is it possible for developers to create a vertical panel, and then translate it to js (storing it somewhere on the server) Then within my application if I know the name of the js/verticalpanel instance, load in and construct the panel? Any info/ideas/suggestions would be appreciated Cheers --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Thank you google!
For making programming fun again. I really have been this excited about a technology in a decade and wanted to express my appreciation for all that you guys are doing. So 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: Thank you google!
Err, haven't :). On Wed, Sep 2, 2009 at 2:16 PM, charlie charlie.f...@gmail.com wrote: For making programming fun again. I really have been this excited about a technology in a decade and wanted to express my appreciation for all that you guys are doing. So 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 -~--~~~~--~~--~--~---
PORTINGO : GWT + GoogleMAPs
There is any kind of porting of Advanced MarkerClusterer in GoogleMap library for GWT develpers --~--~-~--~~~---~--~~ 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: Need Help in setting up GWT
Hi Satya, Here are some tutorials which tell you step by step how to work with GWT http://code.google.com/webtoolkit/tutorials/1.6/create.html also you would also like this, these are some basic tutorials abt gwt http://examples.roughian.com/#Home On Sep 2, 4:10 am, Satya satya@gmail.com wrote: Hello All, My need is to develop a web application with rich UI and deploy onto externat server, so i decided to use GWT. Can you let me understand in setting up dynamic web project in eclipse? I tried setting up project using WebAppCreator.cmd from gwt distribution but i cannot deploy that onto eclipse-integrated-tomcat- server. I created dynamic web project from eclipse but that does not run on hosted mode. I also created project by using google plugin, but no success on running on integrated-tomcat, but i can run this as GoogleWebApplication . How do I create a project in eclipse and proceed? Regards, Satya --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
translate DateTimeFormat output
Hi guys, sorry if this question looks stupid, but I didn't find an answer for it. How could I translate the DateTimeFormat.getFormat().format() output? ie.: DateTimeFormat.getFormat( ).format(dateobject); from: October 2009 to Outubro 2009 Tnx in advance. Best regards, PH --~--~-~--~~~---~--~~ 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: GWTCanvas and IE...
That is why I explained I was using GWTCanvas from the gwt-incubator project. Supposedly, it works with IE, at least, for what I need, I've even been able to see it work in IE8 with their demo (of GWTCanvas working in the gwt-incubator project). But for the life of me, I can't get it to work myself in my own code... On Sep 2, 11:49 am, Alexander Cherednichenko lex...@gmail.com wrote: IE does not support canvas well. You may use wrapper libraries, which dispatch output to canvas if possible, and for IE try to emulate it with VML. Here's blog posting about this:http://lexaux.blogspot.com/2009/08/gwt-canvas-widget-drawing-in-brows... You can select among several libraries; make sure you create some prototypes before making a decision. I succeeded with GWT-Widgets canvas proof of concept widget. On Sep 2, 10:39 am, Xlorep DarkHelm ch...@darkhelm.org wrote: Umm... for anyone trying to see what I mean, I broke the app last night, and I hope to have it running soon again this morning. On Sep 1, 1:45 pm, Xlorep DarkHelm ch...@darkhelm.org wrote: Ok I'm hitting a roadblock here, and I'm hoping that it is just something obvious that I'm unable to see. My situation is this -- I'm working on a simple web app, using GWT and the GWTCanvas widget from gwt-incubator. With the canvas, I am trying to draw little black squares, which represent values at a specific position in an array. To me, it is pretty straight-forward, I have a method: - public void draw(int row, int col, int color) { canvas.setFillStyle(Settings.colors[color]); canvas.fillRect(col * Settings.PIXEL_SIZE, row * Settings.PIXEL_SIZE, Settings.PIXEL_SIZE, Settings.PIXEL_SIZE); } - in my class that wraps the canvas. On every major browser other than IE (and I can only test with IE8... which might make a difference, I dunno...), this works exactly as I'd expect. In IE... it never draws anything. Like... at all. I see that my code is running (I have some text which gets updated outside the canvas), but IE isn't drawing, well... anything. This somewhat leaves my little app as pretty useless for people who visit using IE. Like I said... I'm hoping that it is something I'm just plain missing here. The address to my app is: http://showsort.appspot.com I'm not really trying anything elaborate with the canvas in this... just drawing some squares on it. Any help would be most appreciated. I can provide other code if it helps... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
hosted mode trouble
I want to call a php file on my server to provide a weather service. When I'm running in hosted mode, response.getStatusCode() gives 0 (zero). Is there a way to make this work in hosted mode? public class IMFPanelWeather extends Composite { private VerticalPanel table = new VerticalPanel(); private HTML mIcon = new HTML(); private HTML mConditions = new HTML(); private HTML mTemperature = new HTML(); private HTML mHumidity = new HTML(); private HTML mClouds = new HTML(); public IMFPanelWeather() { callServerPage(); table.add(mIcon); table.add(mConditions); table.add(mTemperature); table.add(mHumidity); table.add(mClouds); initWidget(table); } private void callServerPage() { RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(http://www.myserver.com/weather.php5;)); try { builder.sendRequest(null , new RequestCallback() { public void onError(Request request, Throwable exception) { requestFailed((RequestException)exception); } public void onResponseReceived(Request request, Response response) { if (200 == response.getStatusCode()) { try { // The response was successful JSONValue jsonValue = JSONParser.parse(response.getText()); JSONArray jsonArray = jsonValue.isArray(); if (jsonArray != null) { updateTable(jsonArray); } else { throw new JSONException(); } } catch (Exception e) { // There has been a problem on the server. mConditions.setHTML(No data); } } } }); }catch(RequestException e) { requestFailed(e); } } private void requestFailed(RequestException pException) { mConditions.setHTML(Request failed); System.out.println(Weather request failed.); } } --~--~-~--~~~---~--~~ 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: hosted mode trouble
On 09/02/2009 02:44 PM, sidkdbl07 wrote: I want to call a php file on my server to provide a weather service. When I'm running in hosted mode, response.getStatusCode() gives 0 (zero). Is there a way to make this work in hosted mode? Are you using hosted mode -noserver? The embedded Jetty server doesn't know what to do w/ your php code. public class IMFPanelWeather extends Composite { private VerticalPanel table = new VerticalPanel(); private HTML mIcon = new HTML(); private HTML mConditions = new HTML(); private HTML mTemperature = new HTML(); private HTML mHumidity = new HTML(); private HTML mClouds = new HTML(); public IMFPanelWeather() { callServerPage(); table.add(mIcon); table.add(mConditions); table.add(mTemperature); table.add(mHumidity); table.add(mClouds); initWidget(table); } private void callServerPage() { RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(http://www.myserver.com/weather.php5;)); try { builder.sendRequest(null , new RequestCallback() { public void onError(Request request, Throwable exception) { requestFailed((RequestException)exception); } public void onResponseReceived(Request request, Response response) { if (200 == response.getStatusCode()) { try { // The response was successful JSONValue jsonValue = JSONParser.parse(response.getText()); JSONArray jsonArray = jsonValue.isArray(); if (jsonArray != null) { updateTable(jsonArray); } else { throw new JSONException(); } } catch (Exception e) { // There has been a problem on the server. mConditions.setHTML(No data); } } } }); }catch(RequestException e) { requestFailed(e); } } private void requestFailed(RequestException pException) { mConditions.setHTML(Request failed); System.out.println(Weather request failed.); } } --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Best way for storing a static list of strings?
Hello What is the best way in GWT to store static list of strings? I need to provide list of countries, so creating a Constants interface does not seem to be the best solution. I supposed I could store the list in properties-file (countryCode: countryName) and then iterate over its keys. But I failed to accomplish that as I am yet to find out how to access such files in GWT-environment. I have only seen one video about Linkers and Generators in GWT (http:// www.youtube.com/watch?v=cyfVHNAM80E), could they be the answer... somehow... ? --~--~-~--~~~---~--~~ 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: Best way for storing a static list of strings?
I mean I need to provide like 100+ strings that I know at compile- time. But I had this feeling that writing all of them directly into code is not the proper way. (But I am far from thinking of myself like of expert. :) On Sep 3, 1:34 am, Daniel Jue teamp...@gmail.com wrote: Is the static list editable? If not: static final String or enum Note that enums can be more complex than just named elements. 2009/9/2 Jaroslav Záruba jaroslav.zar...@gmail.com: Hello What is the best way in GWT to store static list of strings? I need to provide list of countries, so creating a Constants interface does not seem to be the best solution. I supposed I could store the list in properties-file (countryCode: countryName) and then iterate over its keys. But I failed to accomplish that as I am yet to find out how to access such files in GWT-environment. I have only seen one video about Linkers and Generators in GWT (http:// www.youtube.com/watch?v=cyfVHNAM80E), could they be the answer... somehow... ? --~--~-~--~~~---~--~~ 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: hosted mode trouble
The output of my php is a JSON object (see below). Shouldn't I be able to just call the php file? Here is my php code: ?php header('Content-Type: text/javascript'); header('Cache-Control: no-cache'); header('Pragma: no-cache'); include('Services/Weather.php'); $metar = Services_Weather::service(METAR, array(debug == 0)); if(Services_Weather::isError($metar)) { die(Error: .$metar-getMessage().\n); } $data = $metar-getWeather(CYBW, Metric); $icon = $metar-getWeatherIcon($data['condition'], $data['clouds'], $data['wind'], $data['temperature'],51.083,-114.083); $fmt = 1; function chgFmt($flag) { $flag = (($flag==0)?1:0); return $flag; } $value{Weather}{0}{Icon} = $icon; $value{Weather}{0}{Condition} = ucfirst($data['condition']); $value{Weather}{0}{Temperature} = $data['temperature'].deg;C; $value{Weather}{0}{Humidity} = $data['humidity'].%; $value{Weather}{0}{Wind} = $data['wind']. kph; $value{Weather}{0}{Clouds} = $data['clouds'][0]['amount']; $output = json_encode($value); print($output); ? The output is some variant of this... {Weather:[{Icon: 34,Condition:,Temperature:13deg;C,Humidity:76.7%,Wind:0 kph,Clouds:few}] --~--~-~--~~~---~--~~ 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: Iframe = multithreading ???
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ben fenster wrote: i was wondering that if by opening another module in an iframe tag the code of that module runs in another thread ?? Nope. There is no way of getting access to multiple Javascript threads from a web browser, unless you use some sort of extension like Google Gears or HTML5 web workers. Every part of the Javascript VM that your code can see is part of the same event loop. more over is the limit of 2 open http request apply on 2 diffrent modules running in diffrent iframes ?? Don't know about this one. - -- ┌─── dg@cowlark.com ─ http://www.cowlark.com ─ │ │ People who think they know everything really annoy those of us who │ know we don't. --- Bjarne Stroustrup -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFKnxH6f9E0noFvlzgRApqiAKC/xF4z1x0t7s+8kAsTVoSxYFRFmQCfaUcx 7F+QaH0Fdc9baW9Wcgl3swM= =ukVk -END PGP SIGNATURE- --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
MySQL Connection
Hi Guys, Was wondering if anyone could answer a small question? I have created a class called DBFlow (Code below) which connects to a MySQL DB and retrieve the number of rows in a DB. I am new at this could anyone throw some light on the subject. Error Message [ERROR] Line 51: The method forName(String) is undefined for the type Class Code to Call Class DBFlow TestTheDB = new DBFlow(); TestTheDB.main(); Class Code import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.lang.Class; import com.google.gwt.user.client.Window; public class DBFlow { public void onModuleLoad() { //sdsd } public DBFlow() { //sdsd } public void main() { Connection conn = null; try { conn = getConnection(); String tableName = family; Window.alert(tableName= + tableName); Window.alert(conn= + conn); Window.alert(rowCount= + countRows(conn, tableName)); } catch (Exception e) { Window.alert(No Connect); e.printStackTrace(); //System.exit(1); // Edit out as it is an erro } finally { // release database resources try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } public Connection getConnection() throws Exception { String driver = com.mysql.jdbc.Driver; String url = jdbc:mysql://localhost:3306/dogs; String username = root; String password = mypass; Class.forName(driver); // load MySQL driver ***Error here apprantly Connection conn = DriverManager.getConnection(url, username, password); return conn; } public int countRows(Connection conn, String tableName) throws SQLException { // select the number of rows in the table Statement stmt = null; ResultSet rs = null; int rowCount = -1; try { stmt = conn.createStatement(); rs = stmt.executeQuery(SELECT COUNT(*) FROM + tableName); // get the number of rows from the result set rs.next(); rowCount = rs.getInt(1); } finally { rs.close(); stmt.close(); } return rowCount; } } --~--~-~--~~~---~--~~ 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, MVP, and nested widgets
Ian, When you mention your current solution fetches the MenuItem view from the MenuPanel view, do you mean the MenuItem view(s) are already in the MenuPanel view or do you mean the MenuPanel view acts as a factory for MenuItem views? I have been experimenting a bit with the former, though I imagine the latter would work. One approach I've also tried for list based structures that might work for your list of Menu Items is to make a function on the display interface to add the data elements to build the MenuItem view from primitives: interface MenuIPanelView { void addMenuItem( Object i ); } This presents a similar mapping problem to managing DTOs if the data your are representing in the view changes or the underlying model object populating that data changes, but it is an option (especially if the individual MenuItem's events could be bubbled up to the MenuPanel and reduce code size). The above are more what I've thought about or tried, and I don't claim to be any expert. I've been trying to figure if there is some magic approach that makes composition work, however I haven't seen a clear winner yet. I hope we'll get from Ray Ryan's sample code when he's able to put it together. Most non-GWT examples I've looked at seem to imply that you don't directly instantiate the presenter, but that the presenter is created when the view is constructed (and the view is passed as an argument to the presenter at that time). For some reason, this just feels wrong to me, though I can't put my finger on why this bidirectional coupling would be an issue since the view is already tightly coupled to the presenter. I don't know how well such an approach would work with dependency injection or UI binder (my gut feel is it wouldn't really). I'll be interested to see anyone else's thoughts. -Jason On Sep 2, 1:22 pm, Ian Bambury ianbamb...@gmail.com wrote: Hi all, I have a question for the GWT-MVP experts out there. If there is a more suitable forum, please let me know. I have a menu panel which contains a flowpanel for menu items, and another flowpanel where the required page will display itself when the associated menu item is clicked. The MenuPanel presenter is creating menu items and sending the MenuItem views to the MenuPanel view to be added. The problem is this: If there are a number of possible MenuPanel views, then the MenuPanel presenter can't know which MenuItem view it should create (blue, green, red, text-based, image-based, therefore presumably each MenuPanel view should decide. The MenuPanel view can't be the creator of the MenuItems because it doesn't know which menu items should be created (for example, you might be allowed to see admin menu items or not - this kind of logic should not be in the view). So my current solution is to get the MenuPanel presenter to fetch the MenuItem view from the MenuPanel view. Now, if you are still following me, is this what I should be doing? Or have I completely lost the plot somewhere along the line? Although there are endless (generally slightly contradictory) explanations of MVP (and please note that I don't think I need another explanation of that), there isn't anything I can find that explains how to nail together the various self-contained MVP widgets - at least, not in a way that allows an event bus to operate. Ian http://examples.roughian.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 -~--~~~~--~~--~--~---
Iframe = multithreading ???
i was wondering that if by opening another module in an iframe tag the code of that module runs in another thread ?? more over is the limit of 2 open http request apply on 2 diffrent modules running in diffrent iframes ?? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Is Google Web Toolkit for me?
Hey, I'm looking to make a webapp, and right now I'm really intrigued by what the Google Web Toolkit offers. I'm familiar with PHP, MySQL, HTML, and CSS from a few years ago, and I've taken a few Java classes a few years back. Right now I'm trying to make a Web App that is very similar to a calendar that is going to manipulate dates and times and what not. I was going to use AJAX to connect with the server, and PHP to manipulate the dates etc. Anyways, I read some articles, such as this: http://www.ryandoherty.net/2007/04/29/why-google-web-toolkit-rots-your-brain/ and was wondering what you guys have experienced with this. I LOVE google products, so I figured this couldn't be bad, but I thought I'd get a second oppinion before I started devoting large amounts of time learning to do something to just find that I'd have been better off sticking with PHP, JS, CSS. By the way, I'm going to need to integrate with a web database. The obvious one for me was MySQL, but that was mainly because PHP integrates so easily with it. What kind of options do I have with this while using GWT? I'd rather not have to have GWT integrate with PHP, and then MySQL, or some other ridiculous thing. What options do I have here? 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: Best way for storing a static list of strings?
Is the static list editable? If not: static final String or enum Note that enums can be more complex than just named elements. 2009/9/2 Jaroslav Záruba jaroslav.zar...@gmail.com: Hello What is the best way in GWT to store static list of strings? I need to provide list of countries, so creating a Constants interface does not seem to be the best solution. I supposed I could store the list in properties-file (countryCode: countryName) and then iterate over its keys. But I failed to accomplish that as I am yet to find out how to access such files in GWT-environment. I have only seen one video about Linkers and Generators in GWT (http:// www.youtube.com/watch?v=cyfVHNAM80E), could they be the answer... somehow... ? --~--~-~--~~~---~--~~ 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, MVP, and nested widgets
On 09/02/2009 11:22 AM, Ian Bambury wrote: Hi all, I have a question for the GWT-MVP experts out there. If there is a more suitable forum, please let me know. I have a menu panel which contains a flowpanel for menu items, and another flowpanel where the required page will display itself when the associated menu item is clicked. The MenuPanel presenter is creating menu items and sending the MenuItem views to the MenuPanel view to be added. The problem is this: If there are a number of possible MenuPanel views, then the MenuPanel presenter can't know which MenuItem view it should create (blue, green, red, text-based, image-based, therefore presumably each MenuPanel view should decide. The MenuPanel view can't be the creator of the MenuItems because it doesn't know which menu items should be created (for example, you might be allowed to see admin menu items or not - this kind of logic should not be in the view). So my current solution is to get the MenuPanel presenter to fetch the MenuItem view from the MenuPanel view. Now, if you are still following me, is this what I should be doing? Or have I completely lost the plot somewhere along the line? Although there are endless (generally slightly contradictory) explanations of MVP (and please note that I don't think I need another explanation of that), there isn't anything I can find that explains how to nail together the various self-contained MVP widgets - at least, not in a way that allows an event bus to operate. Are you sure you need the event bus for this? Perhaps it's time to add a HasMenuItem interface in your Display interface, implement it in the View, call it from the Presenter. --~--~-~--~~~---~--~~ 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: Iframe = multithreading ???
another thing about the http request limitation most browsers rejects more then 2 simultinus requests to a spacific url and i wondered i its aplays to 2 diffrent browser windows (diffrent process in new browsers) and if iframe acts as new web page maybe the limitation grows by 2 for each iframe On Sep 2, 5:05 pm, ben fenster fenster@gmail.com wrote: your answear is based on your knolage in js but i need an answear based on actual in depth knowlage in how browser work since each iframe act as an independed wep page and loaded sepertly then the containing page made me wonder about how its being done without a diffrent thread ? and if another thread is envolved in loading then maybe the new thread is also responsible on running the js code contained in the page of the iframe ? On Sep 2, 5:46 pm, David Given d...@cowlark.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ben fenster wrote: i was wondering that if by opening another module in an iframe tag the code of that module runs in another thread ?? Nope. There is no way of getting access to multiple Javascript threads from a web browser, unless you use some sort of extension like Google Gears or HTML5 web workers. Every part of the Javascript VM that your code can see is part of the same event loop. more over is the limit of 2 open http request apply on 2 diffrent modules running in diffrent iframes ?? Don't know about this one. - -- ┌─── dg@cowlark.com ─http://www.cowlark.com─ │ │ People who think they know everything really annoy those of us who │ know we don't. --- Bjarne Stroustrup -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/ iD8DBQFKnxH6f9E0noFvlzgRApqiAKC/xF4z1x0t7s+8kAsTVoSxYFRFmQCfaUcx 7F+QaH0Fdc9baW9Wcgl3swM= =ukVk -END PGP SIGNATURE- --~--~-~--~~~---~--~~ 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, MVP, and nested widgets
Hi Jason, Thanks for the reply and suggestions. My idea was to have the MenuPanelView have a factory method for MenuItemViews. The MenuPanel presenter has to determine what menu items are required depending on whether the user privileges. I don't really understand how your addMenuItem( Object i ); method would work. I can't really have each view just create its own presenter (as a general principle) as far as I can see. What I want to end up with is a menu item which fires a PlaceChange event when it is clicked - for this it needs a token, for example GWT/Panels/SimplePanel (where GWT is an item in the top-level menu, Panels is an item in the GWT menu, and SimplePanel is a final page of information to be displayed). Each menu would set itself up if required by listening for a PlaceChange event, and if a page recognised it was needed, it would display itself. This, though, means that the MenuPanel needs to do a bit of setting up for the menu items and associated pages. It isn't actually quite the mess it probably sounds. All the hard work is done in a hierarchy of a few abstract classes, so to create a new menu, all you really need to is specify the menu text and the page it refers to, But I do get the feeling I'm stretching the MVP pattern well out of shape in order to get it all to work. Ian http://examples.roughian.com 2009/9/3 Jason A. Beranek jason.bera...@gmail.com Ian, When you mention your current solution fetches the MenuItem view from the MenuPanel view, do you mean the MenuItem view(s) are already in the MenuPanel view or do you mean the MenuPanel view acts as a factory for MenuItem views? I have been experimenting a bit with the former, though I imagine the latter would work. One approach I've also tried for list based structures that might work for your list of Menu Items is to make a function on the display interface to add the data elements to build the MenuItem view from primitives: interface MenuIPanelView { void addMenuItem( Object i ); } This presents a similar mapping problem to managing DTOs if the data your are representing in the view changes or the underlying model object populating that data changes, but it is an option (especially if the individual MenuItem's events could be bubbled up to the MenuPanel and reduce code size). The above are more what I've thought about or tried, and I don't claim to be any expert. I've been trying to figure if there is some magic approach that makes composition work, however I haven't seen a clear winner yet. I hope we'll get from Ray Ryan's sample code when he's able to put it together. Most non-GWT examples I've looked at seem to imply that you don't directly instantiate the presenter, but that the presenter is created when the view is constructed (and the view is passed as an argument to the presenter at that time). For some reason, this just feels wrong to me, though I can't put my finger on why this bidirectional coupling would be an issue since the view is already tightly coupled to the presenter. I don't know how well such an approach would work with dependency injection or UI binder (my gut feel is it wouldn't really). I'll be interested to see anyone else's thoughts. -Jason On Sep 2, 1:22 pm, Ian Bambury ianbamb...@gmail.com wrote: Hi all, I have a question for the GWT-MVP experts out there. If there is a more suitable forum, please let me know. I have a menu panel which contains a flowpanel for menu items, and another flowpanel where the required page will display itself when the associated menu item is clicked. The MenuPanel presenter is creating menu items and sending the MenuItem views to the MenuPanel view to be added. The problem is this: If there are a number of possible MenuPanel views, then the MenuPanel presenter can't know which MenuItem view it should create (blue, green, red, text-based, image-based, therefore presumably each MenuPanel view should decide. The MenuPanel view can't be the creator of the MenuItems because it doesn't know which menu items should be created (for example, you might be allowed to see admin menu items or not - this kind of logic should not be in the view). So my current solution is to get the MenuPanel presenter to fetch the MenuItem view from the MenuPanel view. Now, if you are still following me, is this what I should be doing? Or have I completely lost the plot somewhere along the line? Although there are endless (generally slightly contradictory) explanations of MVP (and please note that I don't think I need another explanation of that), there isn't anything I can find that explains how to nail together the various self-contained MVP widgets - at least, not in a way that allows an event bus to operate. Ian http://examples.roughian.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google
Re: How to determine space available to RootPanel.get('some_div')?
Well I've spent the day experimenting with trying to get the available height and I'm giving it up as a bad job! I'll modify the app ( http://code.google.com/p/picavue/ ) and not bother about paginating the gallery of thumbnails. I can get the width OK so I can set Grid columns to fit the available space, but trying to show an optimum number of rows is just too damn hard - I'll just show all the thumbs. Ah well. jah --~--~-~--~~~---~--~~ 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: Thank you google!
i also want to thanks, good job google buzz On Thu, Sep 3, 2009 at 2:39 AM, Jim Douglas jdoug...@basis.com wrote: I second that. We're making rapid progress porting a Swing front end to GWT. The Google/GWT engineers have done some really impressive work here. On Sep 2, 12:17 pm, charlie charlie.f...@gmail.com wrote: Err, haven't :). On Wed, Sep 2, 2009 at 2:16 PM, charlie charlie.f...@gmail.com wrote: For making programming fun again. I really have been this excited about a technology in a decade and wanted to express my appreciation for all that you guys are doing. So 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: Best way for storing a static list of strings?
I think enums serve just that purpose. For now, put it in code. If it becomes a problem later, you can copy and paste that date elsewhere. I know the feeling of wanting to do things right the first time, but premature optimization turns out to be pretty harmful. Best of all, you can probably just find someone's existing enum on google code search. Plug and play! On Wed, Sep 2, 2009 at 7:45 PM, Jardajaroslav.zar...@gmail.com wrote: I mean I need to provide like 100+ strings that I know at compile- time. But I had this feeling that writing all of them directly into code is not the proper way. (But I am far from thinking of myself like of expert. :) On Sep 3, 1:34 am, Daniel Jue teamp...@gmail.com wrote: Is the static list editable? If not: static final String or enum Note that enums can be more complex than just named elements. 2009/9/2 Jaroslav Záruba jaroslav.zar...@gmail.com: Hello What is the best way in GWT to store static list of strings? I need to provide list of countries, so creating a Constants interface does not seem to be the best solution. I supposed I could store the list in properties-file (countryCode: countryName) and then iterate over its keys. But I failed to accomplish that as I am yet to find out how to access such files in GWT-environment. I have only seen one video about Linkers and Generators in GWT (http:// www.youtube.com/watch?v=cyfVHNAM80E), could they be the answer... somehow... ? --~--~-~--~~~---~--~~ 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: Is Google Web Toolkit for me?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 spierce7 wrote: [...] By the way, I'm going to need to integrate with a web database. The obvious one for me was MySQL, but that was mainly because PHP integrates so easily with it. What kind of options do I have with this while using GWT? I'd rather not have to have GWT integrate with PHP, and then MySQL, or some other ridiculous thing. What options do I have here? Thanks in advance! I'm using Berkeley DB JE for one of my apps; it's a pure-Java reimplementation of the old classic Berkeley DB non-relational database. It's got some really nice Java reflection glue that combines well with GWT's RPC glue. I can pull an object out of the database on the server and pass it directly to the client in about three lines of code, and GWT and Berkeley DB take care of all the plumbing. And because it's pure Java, there's no extra dependencies on the server --- you just drop the jarfile in WEB-INF/lib and it Just Works(tm). A server-side RPC implementation can be as literally trivial as this: DataObject getFromDB(int key) { try { return _index.get(key); } catch (DatabaseException e) { return null; } } - -- ┌─── dg@cowlark.com ─ http://www.cowlark.com ─ │ │ People who think they know everything really annoy those of us who │ know we don't. --- Bjarne Stroustrup -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFKnxPQf9E0noFvlzgRAhmbAJ9VSY0eSfTjCoUUwNyJtf32UyYNcgCghhbe Qe2VV/Tvae3wndsEBQJvyKo= =4rPN -END PGP SIGNATURE- --~--~-~--~~~---~--~~ 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 determine space available to RootPanel.get('some_div')?
I asked before what exactly you are trying to get the space of because getting the available height of the browser window is easy, but if you want to get the height of an individual element of your HTML, then you will need to supply some code. If it's the former, then try something like html, body { margin : 0; height : 100%; } in your css. Ian http://examples.roughian.com 2009/9/3 jah jahbo...@gmail.com Well I've spent the day experimenting with trying to get the available height and I'm giving it up as a bad job! I'll modify the app ( http://code.google.com/p/picavue/ ) and not bother about paginating the gallery of thumbnails. I can get the width OK so I can set Grid columns to fit the available space, but trying to show an optimum number of rows is just too damn hard - I'll just show all the thumbs. Ah well. jah --~--~-~--~~~---~--~~ 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, MVP, and nested widgets
Hi Jeff, No I don't need the event bus to set all this up, but I do need to set it all up to use an event bus. I don't need a HasMenuItem method because I don't (the way I have it now) need to get hold of menu items, I just need to tell the menu panel to add a menu item. Menu items fire an event if clicked, and other parts of the system react if they decide they need to. Ian http://examples.roughian.com 2009/9/2 Jeff Chimene jchim...@gmail.com On 09/02/2009 11:22 AM, Ian Bambury wrote: Hi all, I have a question for the GWT-MVP experts out there. If there is a more suitable forum, please let me know. I have a menu panel which contains a flowpanel for menu items, and another flowpanel where the required page will display itself when the associated menu item is clicked. The MenuPanel presenter is creating menu items and sending the MenuItem views to the MenuPanel view to be added. The problem is this: If there are a number of possible MenuPanel views, then the MenuPanel presenter can't know which MenuItem view it should create (blue, green, red, text-based, image-based, therefore presumably each MenuPanel view should decide. The MenuPanel view can't be the creator of the MenuItems because it doesn't know which menu items should be created (for example, you might be allowed to see admin menu items or not - this kind of logic should not be in the view). So my current solution is to get the MenuPanel presenter to fetch the MenuItem view from the MenuPanel view. Now, if you are still following me, is this what I should be doing? Or have I completely lost the plot somewhere along the line? Although there are endless (generally slightly contradictory) explanations of MVP (and please note that I don't think I need another explanation of that), there isn't anything I can find that explains how to nail together the various self-contained MVP widgets - at least, not in a way that allows an event bus to operate. Are you sure you need the event bus for this? Perhaps it's time to add a HasMenuItem interface in your Display interface, implement it in the View, call it from the Presenter. --~--~-~--~~~---~--~~ 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: Iframe = multithreading ???
your answear is based on your knolage in js but i need an answear based on actual in depth knowlage in how browser work since each iframe act as an independed wep page and loaded sepertly then the containing page made me wonder about how its being done without a diffrent thread ? and if another thread is envolved in loading then maybe the new thread is also responsible on running the js code contained in the page of the iframe ? On Sep 2, 5:46 pm, David Given d...@cowlark.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ben fenster wrote: i was wondering that if by opening another module in an iframe tag the code of that module runs in another thread ?? Nope. There is no way of getting access to multiple Javascript threads from a web browser, unless you use some sort of extension like Google Gears or HTML5 web workers. Every part of the Javascript VM that your code can see is part of the same event loop. more over is the limit of 2 open http request apply on 2 diffrent modules running in diffrent iframes ?? Don't know about this one. - -- ┌─── dg@cowlark.com ─http://www.cowlark.com─ │ │ People who think they know everything really annoy those of us who │ know we don't. --- Bjarne Stroustrup -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/ iD8DBQFKnxH6f9E0noFvlzgRApqiAKC/xF4z1x0t7s+8kAsTVoSxYFRFmQCfaUcx 7F+QaH0Fdc9baW9Wcgl3swM= =ukVk -END PGP SIGNATURE- --~--~-~--~~~---~--~~ 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: MySQL Connection
You forgot .newInstance() after forname(string). There's a lot of documentation here : http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-basic.html#connector-j-examples-connection-drivermanager Christian On Wed, Sep 2, 2009 at 7:21 PM, GumbyGWTBeginner stephan.gump...@gmail.comwrote: Hi Guys, Was wondering if anyone could answer a small question? I have created a class called DBFlow (Code below) which connects to a MySQL DB and retrieve the number of rows in a DB. I am new at this could anyone throw some light on the subject. Error Message [ERROR] Line 51: The method forName(String) is undefined for the type Class Code to Call Class DBFlow TestTheDB = new DBFlow(); TestTheDB.main(); Class Code import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.lang.Class; import com.google.gwt.user.client.Window; public class DBFlow { public void onModuleLoad() { //sdsd } public DBFlow() { //sdsd } public void main() { Connection conn = null; try { conn = getConnection(); String tableName = family; Window.alert(tableName= + tableName); Window.alert(conn= + conn); Window.alert(rowCount= + countRows(conn, tableName)); } catch (Exception e) { Window.alert(No Connect); e.printStackTrace(); //System.exit(1); // Edit out as it is an erro } finally { // release database resources try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } public Connection getConnection() throws Exception { String driver = com.mysql.jdbc.Driver; String url = jdbc:mysql://localhost:3306/dogs; String username = root; String password = mypass; Class.forName(driver); // load MySQL driver ***Error here apprantly Connection conn = DriverManager.getConnection(url, username, password); return conn; } public int countRows(Connection conn, String tableName) throws SQLException { // select the number of rows in the table Statement stmt = null; ResultSet rs = null; int rowCount = -1; try { stmt = conn.createStatement(); rs = stmt.executeQuery(SELECT COUNT(*) FROM + tableName); // get the number of rows from the result set rs.next(); rowCount = rs.getInt(1); } finally { rs.close(); stmt.close(); } return rowCount; } } --~--~-~--~~~---~--~~ 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: MySQL Connection
Hi, The problem is that you're trying to mix GWT and java.sql. That's not going to work. JS in the browser can't connect to your database. The cause of your specific error is that Class.forName() is not a part of the JRE that GWT emulates. See also: http://code.google.com/webtoolkit/doc/1.6/RefJreEmulation.html - Isaac On Wed, Sep 2, 2009 at 7:21 PM, GumbyGWTBeginnerstephan.gump...@gmail.com wrote: Hi Guys, Was wondering if anyone could answer a small question? I have created a class called DBFlow (Code below) which connects to a MySQL DB and retrieve the number of rows in a DB. I am new at this could anyone throw some light on the subject. Error Message [ERROR] Line 51: The method forName(String) is undefined for the type Class Code to Call Class DBFlow TestTheDB = new DBFlow(); TestTheDB.main(); Class Code import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.lang.Class; import com.google.gwt.user.client.Window; public class DBFlow { public void onModuleLoad() { //sdsd } public DBFlow() { //sdsd } public void main() { Connection conn = null; try { conn = getConnection(); String tableName = family; Window.alert(tableName= + tableName); Window.alert(conn= + conn); Window.alert(rowCount= + countRows(conn, tableName)); } catch (Exception e) { Window.alert(No Connect); e.printStackTrace(); //System.exit(1); // Edit out as it is an erro } finally { // release database resources try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } public Connection getConnection() throws Exception { String driver = com.mysql.jdbc.Driver; String url = jdbc:mysql://localhost:3306/dogs; String username = root; String password = mypass; Class.forName(driver); // load MySQL driver ***Error here apprantly Connection conn = DriverManager.getConnection(url, username, password); return conn; } public int countRows(Connection conn, String tableName) throws SQLException { // select the number of rows in the table Statement stmt = null; ResultSet rs = null; int rowCount = -1; try { stmt = conn.createStatement(); rs = stmt.executeQuery(SELECT COUNT(*) FROM + tableName); // get the number of rows from the result set rs.next(); rowCount = rs.getInt(1); } finally { rs.close(); stmt.close(); } return rowCount; } } --~--~-~--~~~---~--~~ 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: hosted mode trouble
My php file is on a web server configured with PHP5. The address of the weather.php5 file is http://www.myserver.com/weather.php5. I'm debugging my GWT files in Eclipse. The GWT class (see above) makes a call to the weather.php5 page with the following line... RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(http://www.myserver.com/weather.php5;)); Honestly, I don't know if I'm using the Jetty server. How do I tell? I have no app engine configured in Eclipse. When I debug my GWT project in Eclipse response.getStatusCode() comes back as 0 (zero) When I add -noserver to the run configuration, the GWT hosted mode browser doesn't display my page... it seems to just sit there empty. I hope this clears up what I'm trying to accomplish. --~--~-~--~~~---~--~~ 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: hosted mode trouble
On 09/02/2009 03:42 PM, sidkdbl07 wrote: The output of my php is a JSON object (see below). Shouldn't I be able to just call the php file? Are you using the builtin Jetty server? It doesn't have a php engine. --~--~-~--~~~---~--~~ 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: Best way for storing a static list of strings?
OK. I'm pretty familiar with Enums so I will just use them. Thanks a lot, sir! :) Best regards Jarda On Sep 3, 1:53 am, Daniel Jue teamp...@gmail.com wrote: I think enums serve just that purpose. For now, put it in code. If it becomes a problem later, you can copy and paste that date elsewhere. I know the feeling of wanting to do things right the first time, but premature optimization turns out to be pretty harmful. Best of all, you can probably just find someone's existing enum on google code search. Plug and play! On Wed, Sep 2, 2009 at 7:45 PM, Jardajaroslav.zar...@gmail.com wrote: I mean I need to provide like 100+ strings that I know at compile- time. But I had this feeling that writing all of them directly into code is not the proper way. (But I am far from thinking of myself like of expert. :) On Sep 3, 1:34 am, Daniel Jue teamp...@gmail.com wrote: Is the static list editable? If not: static final String or enum Note that enums can be more complex than just named elements. 2009/9/2 Jaroslav Záruba jaroslav.zar...@gmail.com: Hello What is the best way in GWT to store static list of strings? I need to provide list of countries, so creating a Constants interface does not seem to be the best solution. I supposed I could store the list in properties-file (countryCode: countryName) and then iterate over its keys. But I failed to accomplish that as I am yet to find out how to access such files in GWT-environment. I have only seen one video about Linkers and Generators in GWT (http:// www.youtube.com/watch?v=cyfVHNAM80E), could they be the answer... somehow... ? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
How can I center arbitrary content on a fixed-size button?
I'm getting hung up on something that seems like it ought to be trivial. I've got a fixed-size GWT Button and I need to render it (preferably using just static CSS rules) such that any arbitrary text or HTML content a user throws at it is centered both horizontally (that part's easy) and vertically (that part is driving me around the bend). In Java, AbstractButton.setVerticalAlignment(CENTER) just happens; you don't have to think about it. But I can't seem to find any way to achieve this same effect on a GWT Button. Horizontal alignment is trivial: text-align: center. But I've spent a couple of days trying increasingly bizarre strategies (http:// www.google.com/search?q=css+vertical+align) trying to achieve vertical alignment, with no success to speak of. Has anyone else struggled with this problem (or solved it)? Regards, Jim. --~--~-~--~~~---~--~~ 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: MySQL Connection
Can you guys point in the direction of either a concept on how I would do this or a sample project for Ecllipse / GWT that I can go thru. Keeping in mind I am new at this too. I can figure most things out with sample code. My Secario: I have installed MySQL Database on my PC Trying to make a GWT application to interact with this Database In the hope to Base this on the same senario but on a web based system. i.e. MySQL on a website and the GWT app interacting with this. Any help would greatly appricated. Thanks for the help thus far. Stephan On Sep 3, 9:44 am, Isaac Truett itru...@gmail.com wrote: Hi, The problem is that you're trying to mix GWT and java.sql. That's not going to work. JS in the browser can't connect to your database. The cause of your specific error is that Class.forName() is not a part of the JRE that GWT emulates. See also:http://code.google.com/webtoolkit/doc/1.6/RefJreEmulation.html - Isaac On Wed, Sep 2, 2009 at 7:21 PM, GumbyGWTBeginnerstephan.gump...@gmail.com wrote: Hi Guys, Was wondering if anyone could answer a small question? I have created a class called DBFlow (Code below) which connects to a MySQL DB and retrieve the number of rows in a DB. I am new at this could anyone throw some light on the subject. Error Message [ERROR] Line 51: The method forName(String) is undefined for the type Class Code to Call Class DBFlow TestTheDB = new DBFlow(); TestTheDB.main(); Class Code import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.lang.Class; import com.google.gwt.user.client.Window; public class DBFlow { public void onModuleLoad() { //sdsd } public DBFlow() { //sdsd } public void main() { Connection conn = null; try { conn = getConnection(); String tableName = family; Window.alert(tableName= + tableName); Window.alert(conn= + conn); Window.alert(rowCount= + countRows(conn, tableName)); } catch (Exception e) { Window.alert(No Connect); e.printStackTrace(); //System.exit(1); // Edit out as it is an erro } finally { // release database resources try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } public Connection getConnection() throws Exception { String driver = com.mysql.jdbc.Driver; String url = jdbc:mysql://localhost:3306/dogs; String username = root; String password = mypass; Class.forName(driver); // load MySQL driver ***Error here apprantly Connection conn = DriverManager.getConnection(url, username, password); return conn; } public int countRows(Connection conn, String tableName) throws SQLException { // select the number of rows in the table Statement stmt = null; ResultSet rs = null; int rowCount = -1; try { stmt = conn.createStatement(); rs = stmt.executeQuery(SELECT COUNT(*) FROM + tableName); // get the number of rows from the result set rs.next(); rowCount = rs.getInt(1); } finally { rs.close(); stmt.close(); } return rowCount; } }- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 performance
Dear All, Thanks for the explanation. Now i have no more doubt to start using GWT. On Sep 2, 5:27 pm, Chris Lowe chris.lowe...@gmail.com wrote: Kristian, Do GMail or the GWT showcase application work well enough for you in your intended browser? If so, then in all likelihood your GWT application will perform adequately. I'm not aware of any reliability issues as such. The only thing that springs to mind is that GWT compiles for specific browsers that it knows about at compile time. Like many other web application technologies, if a new browser comes out then they can break compatibility. Recent examples of this are with IE8 and FF 3.5, however Google have always endeavoured to roll out compiler updates to rectify these issues. Loading times can be a problem and it boils down to a couple of things: 1. I believe IE's JavaScript parser gets disproportionately slower the larger your GWT application is (other browsers do not suffer with this); 2. a compressed GWT application can still be fairly large, say 150k to 200k, which can be an issue if your target audience are all on dial up connections. Remember though that this download is a one-off and the browser will cache that version of the app forever so all subsequent app launches are significantly quicker. Also, GWT 2.0 has a number of things in the pipeline to address these issues (like code splitting). Cheers, Chris. On Sep 2, 5:32 am, kristian kristian.wij...@gmail.com wrote: Hello All, i am a newbie that want to try to build a web application using GWT, but i heard from some of my colleague that GWT has some issue with its performance (reliability, load slowly). So, is there anyone can enlighten me? 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: MySQL Connection
Will this (what is documented on that link) work if I runn on my local PC? or Do I have actually host the MySQL DB on a webserver? Stephan On Sep 3, 10:36 am, Isaac Truett itru...@gmail.com wrote: Stephan, You need to make a request to the server for the data. The server can connect to the database and return the results to the browser. If your server is running Java, then GWT RPC is a good method. For non-Java servers, JSON could work for you. See:http://code.google.com/webtoolkit/doc/1.6/DevGuideServerCommunication... Hope that helps. - Isaac On Wed, Sep 2, 2009 at 10:24 PM, GumbyGWTBeginnerstephan.gump...@gmail.com wrote: Can you guys point in the direction of either a concept on how I would do this or a sample project for Ecllipse / GWT that I can go thru. Keeping in mind I am new at this too. I can figure most things out with sample code. My Secario: I have installed MySQL Database on my PC Trying to make a GWT application to interact with this Database In the hope to Base this on the same senario but on a web based system. i.e. MySQL on a website and the GWT app interacting with this. Any help would greatly appricated. Thanks for the help thus far. Stephan On Sep 3, 9:44 am, Isaac Truett itru...@gmail.com wrote: Hi, The problem is that you're trying to mix GWT and java.sql. That's not going to work. JS in the browser can't connect to your database. The cause of your specific error is that Class.forName() is not a part of the JRE that GWT emulates. See also:http://code.google.com/webtoolkit/doc/1.6/RefJreEmulation.html - Isaac On Wed, Sep 2, 2009 at 7:21 PM, GumbyGWTBeginnerstephan.gump...@gmail.com wrote: Hi Guys, Was wondering if anyone could answer a small question? I have created a class called DBFlow (Code below) which connects to a MySQL DB and retrieve the number of rows in a DB. I am new at this could anyone throw some light on the subject. Error Message [ERROR] Line 51: The method forName(String) is undefined for the type Class Code to Call Class DBFlow TestTheDB = new DBFlow(); TestTheDB.main(); Class Code import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.lang.Class; import com.google.gwt.user.client.Window; public class DBFlow { public void onModuleLoad() { //sdsd } public DBFlow() { //sdsd } public void main() { Connection conn = null; try { conn = getConnection(); String tableName = family; Window.alert(tableName= + tableName); Window.alert(conn= + conn); Window.alert(rowCount= + countRows(conn, tableName)); } catch (Exception e) { Window.alert(No Connect); e.printStackTrace(); //System.exit(1); // Edit out as it is an erro } finally { // release database resources try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } public Connection getConnection() throws Exception { String driver = com.mysql.jdbc.Driver; String url = jdbc:mysql://localhost:3306/dogs; String username = root; String password = mypass; Class.forName(driver); // load MySQL driver ***Error here apprantly Connection conn = DriverManager.getConnection(url, username, password); return conn; } public int countRows(Connection conn, String tableName) throws SQLException { // select the number of rows in the table Statement stmt = null; ResultSet rs = null; int rowCount = -1; try { stmt = conn.createStatement(); rs = stmt.executeQuery(SELECT COUNT(*) FROM + tableName); // get the number of rows from the result set rs.next(); rowCount = rs.getInt(1); } finally { rs.close(); stmt.close(); } return rowCount; } }- Hide quoted text -
Re: Help using comet in tomcat
Hi, Sorry that I am replying this late. But try to import the catalina.jar file into your project. U can find that in the lib folder within your tomcat folder. Once you do that, this error would disappear. HTH, Abhiram On Aug 1, 4:35 pm, Nathan Wells nwwe...@gmail.com wrote: When do you see this problem? when you are in hosted mode or when you deploy to tomcat? what version of tomcat are you using? On Jul 31, 5:51 am, BarefootSanders mgold...@gmail.com wrote: Sorry about the confusion. Ive been to that page numerous times in my search to fix my problem. My problem specifically is that I dont have either of those classes (CommetEvent and CometProcessor). When i try to include them it says they dont exist. I thought exactly what you stated - I thought they were internal to the Tomcat server and should have been included in my install but apparently not. Hope that clears up your confusion. But that leave me where I was before. Any suggestions? Do I need to configure/install anything in order to get access to those classes? Thanks. On Jul 31, 6:49 am, Nathan Wells nwwe...@gmail.com wrote: I don't fully know the answer to your question, but this might help: http://tomcat.apache.org/tomcat-6.0-doc/aio.html You probably already knew this, but catalina is an internal name for Apache's Tomcat server. It is likely that you may need to do some additional configuration before you can doComet-like stuff in hosted mode. HTH Nathan On Jul 30, 9:45 am, BarefootSanders mgold...@gmail.com wrote: Hi all. I'm trying to reproduce the application here: http://gwtapps.com/?page_id=31 Its a simple instant messenger which usescometfor events. It imports these two classes: import org.apache.catalina.CometEvent; import org.apache.catalina.CometProcessor; But I guess I dont have them on my comp because it cant find them. I'm new to usingcometso as a more general question, does anyone know where I can get these two classes? If not, is there an implementation ofCometonGWTthat I can use instead of this? Any other feedback would be much appreciated. Thanks.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: update logging to provide performance metrics
On Wed, Sep 2, 2009 at 2:21 AM, fabb...@google.com wrote: Also, each TreeLogger branch is automatically timed, from start to when we can figure the branch is dead (i.e. to first log emission NOT on the branch, a slightly too exapansive definition.) That isn't going to work in general -- frequently a branch is created, more stuff is logged to the main log, and then later things are logged to the branch. OOPHM already keeps timestamps on every log message, so you get the timing to the second, but you might need to add some task completed log messages. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---