Re: getting java.sql.Connection error
phamtranquocviet schrieb: > public boolean isDuplicateSsn(String ssn) throws SQLException You can't throw a SQLException from a method of a RemoteServiceServlet. To be able to transport this exception to the client (where it is passed as argument to the onFailure-method of the AsyncCallback, it's necessary to extend it from SerializableException which SQLException clearly isn't. I solved it that way, that I throw a RemoteServiceException where I add the stacktrace of the causing exception as String, allowing to show the error in a usual way (if you want to show that much information to an user) without the need to create many many different exceptions. Regards, Lothar --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Fwd: Invoking ActionScript method from GWT
I also hava same problem with gwt-FABridge My code from example demo as follow: the demo is right. but I change the code swfWidget = new SWFABridgeWidget("app.swf",400,400,"PlayFLV"); as swfWidget = new SWFABridgeWidget("PlayFLV.swf",400,400,"PlayFLV"); at BridgeObject object =swfWidget.root() occur the exception: [ERROR] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (TypeError): $wnd.FABridge[bridgeName] has no properties fileName: jar:file:/root/gwt-flex/gwt-fabridge/gwt-fabridge.jar!/org/ argunet/gwt/fabridge/client/SWFABridgeWidget.java lineNumber: 99 stack: ()@jar:file:/root/gwt-flex/gwt-fabridge/gwt-fabridge.jar!/org/ argunet/gwt/fabridge/client/SWFABridgeWidget.java:99 static void com.google.gwt.user.client.DOM.dispatchEvent (com.google.gwt.user.client.Event,com.google.gwt.user.client.Element,com.google.gwt.user.client.EventListener) ([object Event],[object HTMLButtonElement],[object gwt_nativewrapper_class])@:0 ([object Event])@jar:file:/usr/eclipse/gwt-linux-1.5.2/gwt-user.jar!/ com/google/gwt/user/client/impl/DOMImplStandard.java:197 @:0 at org.argunet.gwt.fabridge.client.SWFABridgeWidget.getBridgeRoot (Native Method) at org.argunet.gwt.fabridge.client.SWFABridgeWidget.root (SWFABridgeWidget.java:87) at com.google.client.HelloGWT$2.onClick(HelloGWT.java:24) at com.google.gwt.user.client.ui.ClickListenerCollection.fireClick (ClickListenerCollection.java:34) at com.google.gwt.user.client.ui.FocusWidget.onBrowserEvent (FocusWidget.java:102) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1308) at com.google.gwt.user.client.DOM.dispatchEventAndCatch(DOM.java: 1287) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1255) I don't know where is wrong? == package com.google.client; import org.argunet.gwt.fabridge.client.SWFABridgeWidget; import org.argunet.gwt.fabridge.client.bridge.BridgeObject; import org.argunet.gwt.fabridge.client.events.IInitializationListener; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.*; public class HelloGWT implements EntryPoint , IInitializationListener { private final Button addNewSwf = new Button("Add new SWF"); private final Button setCheckBox = new Button("Set Checkbox property"); private SWFABridgeWidget swfWidget; public void onModuleLoad() { RootPanel.get().add(addNewSwf); RootPanel.get().add(setCheckBox); addNewSwf.addClickListener(new ClickListener() { public void onClick(Widget arg0) { swfWidget = new SWFABridgeWidget("app.swf",400,400,"PlayFLV"); swfWidget.addInitializationListener(HelloGWT.this); RootPanel.get().add(swfWidget); } }); setCheckBox.addClickListener(new ClickListener() { public void onClick(Widget arg0) { BridgeObject object =swfWidget.root(); Window.alert("getObject"); } }); } public void onInitialization() { Window.alert("hello"); } } On Oct 24 2008, 3:37 pm, "mark morreny" wrote: > Hi, > > I traced the code and found that GWT hangs when executing: > BridgeObject flexApp = swfWidget.root(); > I have checked that swfWidget is not null and here is the way I created > swfWidget: > SWFParams params = new SWFParams("MyTest.swf", new Integer(400), > new Integer(400)); > params.addVar("bridgeName", "audio"); > swfWidget = new SWFABridgeWidget(params); > BridgeObject flexApp2 = swfWidget.root(); > Does anyone know why? > > The error I am getting is : > > [ERROR] Uncaught exception escaped > com.google.gwt.core.client.JavaScriptException: (TypeError): > '$wnd.FABridge[...]' is null or not an object > number: -2146823281 > description: '$wnd.FABridge[...]' is null or not an object > at org.argunet.gwt.fabridge.client.SWFABridgeWidget.getBridgeRoot(Native > Method) > at > org.argunet.gwt.fabridge.client.SWFABridgeWidget.root(SWFABridgeWidget.java:79) > at > com.yht.ui.gwt.client.widget.util.AudioRecorder.init(AudioRecorder.java:69) > at > com.yht.ui.gwt.client.widget.util.AudioRecorder.(AudioRecorder.java:39) > at com.yht.ui.gwt.client.widget.MainPanel.getData(MainPanel.java:194) > at com.yht.ui.gwt.client.widget.util.BasePanel.getStore(BasePanel.java:288) > at > com.yht.ui.gwt.client.widget.util.BasePanel.getAccordionNav(BasePanel.java:156) > at com.yht.ui.gwt.client.widget.util.BasePanel.init(BasePanel.java:83) > at com.yht.ui.gwt.client.widget.MainPanel.(MainPanel.java:118) > at com.yht.ui.gwt.client.Application$1.onSuccess(Application.java:50) > at com.yht.ui.gwt.client.Application$1.onSuccess(Application.java:1)
Re: how can we append Text to a TextArea widget
Sanjith Chungath schrieb: > I want to write an async method to retrieve some String from the > server. onSuccess I want to append the reruned string to a TextArea. is > it possible. i can see only setText() method for this class.basically I > want to monitor the stdout/stderr of a server process and update it on > the client using async method (with a timer). My use will be in intranet > not in internet. Adam was answering that already but one more point. I was having the same necessity and was ending with a VerticalPanel (inside a Scrollpanel) where I added HTML-instances for every new entry being added. That gave me the ability to e.g. deactivate scrolling allowing the reading of the content (if you do a setText, the browser will jump to the beginning of the text again) and you can delete old entries from the beginning of the list to avoid that the browser will run out of memory if the (let's call it) logmonitor is running for a longer period of time. If you look for log-monitor there even might be a ready to use widget somewhere waiting to be downloaded. Regards, Lothar --~--~-~--~~~---~--~~ 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 debug serialization issues?
rlaferla schrieb: > How do you guys go about debugging serialization issues? I am using > GWT 1.5.3 and my GWT client is sending a DTO to the server. If I do a > Log.debug() just prior to the call to the server, I see all of my data > in my DTO. However, when I do a log.debug() on my DTO in the GWT-RPC > service, some of my data is missing. I have read through forum posts, > etc... but I feel I don't have the necessary tools to debug the > problem. The data that appears to not be serialized is a > Set (implementation is a HashSet) off of my DTO. Both > the DTO and CustomClass are marked Serializable, I use generics for > the Set. Something like this: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/921ed97efac028c1/6d9e6202715cabee Do you use additional libraries to the standard GWT jars? I had a similar problem (see above) where data-objects were losing data (just vice versa when being transported from the server to the client. The reason was that I used the DateChooser from the Rocket GWT library. Something inside the Rocket-compiler.jar was leading to this kind of effect. After throwing out the library and using another Date Picker everything worked again. Regards, Lothar --~--~-~--~~~---~--~~ 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: Programmatically Generating Physical Key
Thanks Sumit for getting back on this ! My scenario is something like this - On pressing Ctrl+z/Ctrl+y, browser performs Undo/Redo in RichTextArea, I want to support this functionality in Buttons, So my intention was rather than capturing onBrowserEvents(EventPreviews) just generate ctrl +z/ctrl+y programmatically on clicking on buttons and let them browser to handle. This will remove javascript quirks too. And I didn't find any undo/redo implemenations in RichTextArea. _Anurag On Jan 7, 1:11 pm, Reinier Zwitserloot wrote: > I assume you meant faking the pressing of a key on the keyboard. > > You can't do that directly, no, but you can sort-of call the > keylisteners on any particular object. > > For example, let's say you have a TextBox instance called 'textBox', > and you want to simulate pressing the 'X' button. > > You'll need to do two things: > > 1) Simulate the effect of the X button on the textBox itself, which > means updating the text inside by inserting an X at the current cursor > position. > > 2) Call all keyboardlisteners on textBox. > > #2 can be done with some technically nonsupported hackery - each > implementation of SourcesKeyboardEvents in GWT at least has an > internal private object of type 'KeyboardListeners', called > 'keyboardListeners'. While its private, you can still get at it via > JSNI (look that up) which doesn't know about 'private' and thus allows > it. Once you have the keyboardListeners, which is really just an > ArrayList, you can loop through them and fire the appropriate call > (e.g. onKeyPress) on all of them. > > The reason GWT doesn't support this directly is because javascript > doesn't support it either. GWT isn't magic; it cannot make things that > are impossible on the target platform possible. > > On Jan 2, 2:26 pm, Anurag Tripathi wrote: > > > Can we programmatically generate physical keys in GWT ? > > > Scenario : I want to generate some key on clicking in Button ! > > > If anyone has any idea on this, please let me know - > > > _Anurag --~--~-~--~~~---~--~~ 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: Named anchors
I'm guessing this is impossible to do with gwt? On Jan 6, 10:50 pm, Michael wrote: > Hello, > > I have some existing HTML that are pretty large documents with named > anchors. Suppose that I display the HTML in a HTMLPanel, how can I > specify an anchor for it to display? > > Thanks for any input. --~--~-~--~~~---~--~~ 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 rendering differently when compared to compiled build.
I have a very simply app that just has a StackPanel. When I look at it in the hosted mode the font is huge. When I compile and put it on a server the font renders smaller. I have checked the server version with Chrome, IE7, and Firefox 3. All 3 of these display it the same way -- which is the actual way that I would like it. How do I get the hosted version to work? In case it matters, I should mention that I use a large monitor. 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: Printing Gchart
Couple of more remarks on printing GCharts that may be helpful. The graphical part of a GChart (unless you are using the optional bolt- on canvas line curve capability) is simply a bunch of images absolutely positioned within a box (via AbsolutePanel). So it seems reasonable that this collection of images should act very similarly to a single image chart on the page from the point of view of printing. Thus there is no logical reason you should not be able to print a page containing a GChart just as easily as you could print a page containing an image-based chart. In theory. Now, under normal circumstances, all those images are the same single 1x1 px blank gif. and the background and border and size are manipulated to produce the rectangles of the chart's parts. If this use of image backgrounds is a problem during printing, GChart has methods that allow you to specify a non-blank default image, plus a different image for each curve. These methods are setBlankImageURL and setImageURL, respectively. and could be used to effectively replace the background color with a real image color (assuming the use of image background colors presented a problem during printing, as it can in FF2). Here are the javadoc links for these two methods, for reference: http://gchart.googlecode.com/svn/trunk/doc/com/googlecode/gchart/client/GChart.html#setBlankImageURL%28java.lang.String%29 http://gchart.googlecode.com/svn/trunk/doc/com/googlecode/gchart/client/GChart.Symbol.html#setImageURL%28java.lang.String%29 For example, the "dropped axis lines during printing" you mentioned might be corrected by passing a 1x1 px black GIF to setBlankImageURL and various 1x1px colored images to setImageURL to define each curve's "inside" color instead of the usual use of setBackgroundColor (I've not actually tried this, but it should work). The other part of a GChart is the text. These are placed within single- celled tables (for alignment purposes) and those tables are absolutely positioned on the same box. Again, I don't see why this should be significantly different than printing an image-based chart, either (the alignment techniques are--over a reasonable range--font-size independent). HTML and widget-based annotations and such are the wild-cards, opening it up to just about anything. But, presumably, if you built the HTML/ Widget and wanted to print it, you'd be responsible for that (the same table-based aligned positioning used for text is used for HTML/ widgets, so they should stay in appropriate positions on the chart). Unfortunately, I have zero practical experience building printable web pages so all this is just educated guess work; if anyone has real experience with printable pages and is willing to share that experience to help improve GChart's "printability", I'd appreciate that. John On Jan 7, 12:13 am, John Gunther wrote: > In Firefox 2, if you select File, Print Preview, then Page Setup, then > Format&Options, and make sure that "Print Background (color and > images)" is checked, I see the live demo page more or less correctly > in Print Preview with this checked. But lots of stuff is missing > (including axis lines) if this is unchecked (note: default setting is > unchecked). > > GChartuses backgrounds of blank images for much of what it does, > which is why you need to check this to get everything to print that > shows on the screen in Firefox 2. > > I don't testGChartfor how well the chart's can be printed in the > various browsers (I've never had much luck printing out web pages, > period). In the end it is HTML in the browser, so it should be > printable to the degree that HTML is, in theory, but it was looking > pretty ugly in print preview when I tried to print the live demo page > from IE7 just now. FF2 (with the setting above) seemed to do much > better. > > HTH, > > John C. Guntherhttp://gchart.googlecode.com > > On Jan 2, 10:57 am, ArunDhaJ wrote: > > > Hi, > > I'm not able to see the axis lines on printing the chart. In my Bar > > chart, bars are printing fine, but not able to print lines... Plz help > > me whether I'm missing any thing.. > > > Thanks > > ArunDhaJwww.arundhaj.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 -~--~~~~--~~--~--~---
How to wait until the response from the server?
Hi, I am using GWT forms to do file uploads. In one of my cases i want to validate the name given in the Textbox of the form. To validate the name i have to request the server for the names available already. To validate this inside the FormHandlers OnSubmit method i request the server and on invalid name i cancel the form submit. But before the response is received, the form handlers completes and submits the form. How this can be resolved? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
getting java.sql.Connection error
Hi, I am getting this error: [ERROR] Line 11: No source code is available for type java.sql.SQLException; did you forget to inherit a required module? when trying to check if an entered SSN is a duplicate via RPC. Here is my RPC implementation: package com.cadao.server; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import com.cadao.client.RegistrationService; import com.google.gwt.user.server.rpc.RemoteServiceServlet; public class RegistrationServiceImpl extends RemoteServiceServlet implements RegistrationService { private static final long serialVersionUID = 1L; public boolean isDuplicateSsn(String ssn) throws SQLException { String sql = "SELECT Ssn " + "FROM User U JOIN Mem M ON U.UserId = M.UserId " + "WHERE Ssn = '" + ssn + "'"; CadaoDb cadaoDb = new CadaoDb(); Connection connection = cadaoDb.getConnection(); Statement select = connection.createStatement(); ResultSet resultSet = select.executeQuery(sql); resultSet.last(); if(resultSet.getRow() > 0) return true; return false; } } package com.cadao.server; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; public abstract class Db { private String driver = "com.mysql.jdbc.Driver"; /** * Constructor */ public Db() { } protected abstract String getUrl(); protected abstract String getDb(); protected abstract String getUser(); protected abstract String getPassword(); public final Connection getConnection() { String url = getUrl(); String db = getDb(); String user = getUser(); String password = getPassword(); Connection connection = null; try { Class.forName(driver).newInstance(); connection = DriverManager.getConnection(url + db, user, password); } catch(Exception e) { System.err.println("Mysql Connection Error: "); e.printStackTrace(); } return connection; } protected static int getResultSetSize(ResultSet resultSet) { int size = -1; try { resultSet.last(); size = resultSet.getRow(); resultSet.beforeFirst(); } catch(SQLException e) { return size; } return size; } } == I got this code from here: http://gwt-examples.googlecode.com/svn/trunk/gwt-test-MySQLConn/src/com/tribling/gwt/test/mysqlconn/server/ Could somebody help me see what's missing? 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: Restoring focus to the element after closing dialog box
The thing is that the show/center method of the DialogBox is called from many places in the application. And, I do not wish to make changes in these many places (for implementing the solution mentioned above) . So, I thought if we could figure out the element on whose event the dialog box's show was invoked, it would be nice. Sounds a bit far-fetched, but if there is some other way to accomplish this, please suggest. --~--~-~--~~~---~--~~ 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-ext similar
Well, there's Ext-GWT (also referred to as GXT). The plus is that it is written entirely in Java. GWT-EXT are JSNI wrappers for Ext-JS. The negative is that there is near-zero documentation (and mostly insufficient code-comments) for it. Basically you learn it by looking at source code for the demos or you pay the one developer thousands of dollars to come teach you. This is very unfortunate because in addition to the GUI components there's fairly neat and robust MVC framework. But you'll spend a lot of time trying to figure it out if you don't pay them to come teach you about the framework. It's a bit buggy, but if you post a bug in the support forums, they tend to get fixed very promptly but you can only get the fix quickly if you pay for support/license. But maintenance releases seem to come out very frequently (like every 4-5 weeks or so.) The component library reasonably robust, but chances are you'll find something you want missing. Summary: Except for the gaping absence of documentation, it's pretty good. But you have to take that into account as you'll either pay thousands to learn it or spend hours doing what is essentially "reverse engineering" it. On Jan 5, 8:24 am, asianCoolz wrote: > can anyone list any similar tool like gwt-ext ? from what i know this > tool is not free. i found another call smartclient. how about > others.. ? which one should i use? seem to me smartclient is free --~--~-~--~~~---~--~~ 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: Use a FormPanel without submitting to a URL?
Got it. Thanks! On Jan 6, 7:15 pm, Chi H wrote: > Yes, if you are not submiting a form, you won't really need a > FormPanel at all, you can just put a TextBox/ListBox/CheckBox/etc > objects into a panel of your choosing. > > Then, you can create a Button or link or anything which reads from the > input objects using TextBox.getText()/ ListBox.getSelectedIndex() / > CheckBox.isChecked() / etc > > If you want to send that data through a server, you can just do a RPC > call from that point, or alternatively you can use the data entirely > on the client side. > > On Jan 6, 2:27 pm,hortitude wrote: > > > Is it possible to use a FormPanel with a submit button, but instead of > > having the values sent to a server, simply process the result within > > my GWT app? > > > Here's what I am doing: > > > I have a Form that is generated dynamically (the user can add rows to > > the form through the UI). > > I want to be able to look at those values within my application. > > > I figured a FormPanel would be the easiest -- as I could easily take > > advantage of it gathering data from each of the elements and creating > > name/value pairs for the data. > > > Can anyone help? > > 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 -~--~~~~--~~--~--~---
app renders in different sizes on different computers
I have created an application that renders fine on my laptop. However, when I build this application on my desktop computer everything comes out much larger. I think the problem is that the fonts are larger on the desktop. This has impact on my layout -- for instance it forces some text boxes to be 2 lines, instead of 1. If I compile on the laptop and then put that on a server to host, it renders correctly on the desktop. Why is this? How do I fix it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
GWT RadioButton Style issue
The GWT radio buttton seems to have different style in IE and firefox . The one in IE has border by default ,I tried removing it by add 'border : none' in Css for .gwt-radiobutton but still seems to be there .I dont see the border in firefox.Please help me fix this problem . I have attached the radiobutton in IE below: http://tinypic.com"; target="_blank"> --~--~-~--~~~---~--~~ 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 opinion on design idea
I am thinking about a charting app that will use jfreechart on the server side (I need PDFs and other server side output anyway) and GWT + Canvas on the client so that users can do fancy things like curve fit in the browser. That means that when the client asks the server to render a chart, the client needs to get back a png and also some data (like scaling info, etc). I can of course do 2 rounds trips but I am thinking of combining it into one rt. The idea is that the server response is an image/png but also sets a nonpersistent cookie in the header that encodes the data I need. The gwt app disassembles the cookie value (perhaps it is even json). If the cookie would be too big (unlikely), the cookie value becomes a message to the client that it needs a dedicated rt. Does anyone see a problem with this? Any thoughts are appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Integrating other frameworks into hosted mode
Hi Joe, Alternatively, you can use hosted mode with the -noserver option to use your own backend to produce and serve your HTML files. GWT hosted mode will still work to debug your GWT client-side code as well. Using hosted mode with the -noserver option: http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=FAQ_HostedModeNoServer Cheers, -Sumit Chandel On Thu, Jan 1, 2009 at 3:03 AM, Joe Cole wrote: > > I have run into this problem a few times, so thought it may be worth > posting for others. > We wanted to be able to produce the html files via a framework like > freemarker, jsp, wicket etc in hosted mode. It turned out to be > trivial. > > public class CustomShellServlet extends GWTShellServlet { > >IRoutes routes; > >@Override protected void doGet(final HttpServletRequest request, > final HttpServletResponse response) throws ServletException, > IOException { >if (routes.hasExplicitRouteFor(request.getRequestURI())) { >router.service(request, response); >return; >} >super.doGet(request, response); >} > } > > All you need to do is override the requests for the html files > themselves. In my example it uses an internal class we use, but can > easily work with freemarker templates or other view technologies. > > The only configuration change was replacing gwtshellservlet in the > tomcat/webapps/ROOT/WEB-INF/web.xml to: > > >shell > > com.your.packagename.CustomShellServlet class> > > > > > --~--~-~--~~~---~--~~ 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: Compiling a single Java class to a plain JavaScript file
On Jan 7, 12:20 am, Reinier Zwitserloot wrote: > What you want can't really be done. Java isn't javascript. Take your > example just to illustrate the problem here: How would that even > translate to javascript? Javascript doesn't have classes. It has > prototype based inheritance. Here are your fundamental problems: Reinier, thanks for the info. Actually, a class isn't the thing I'm after. What I really want to create are objects. So I thought it could translate something like this: ... ... var hello = new Hello(); hello.talk // returns "hello" ... What am I missing? > 1. Javascript's namespacing and object model is so different, that > GWT internally generates completely different and unwieldy names for > objects and classes. These names are then mangled to unrecognizable > shortcodes to reduce the size of the output JS. So, your public void > hello method is either going to be called: "com.mypackage.Hello::talk > ()" (yes, including closing parentheses to indicate that this version > takes no parameters; unlike javascript, in java two methods with the > same name but different parameter lists are completely separate, in > javascript you can't do that), or it's going to be called something > small and effectively random, so something like 'xYq' or some such. > There's no code to pick a sane name for interaction, so nothing there > that would even think to generate just a function called "hello". I thought it was possible to turn off the mangling by setting compiler flags. I've also read about JSNI in this context. Wouldn't one or both of these help? > 2. There's a base set of functions that all GWT projects start out > with. The GWT compiler assumes this basis is there. That wouldn't be a problem for me. > 3. GWT does something called platform targeting. That's why it > generates a number of JS files - one for each target platform. Out of > the box, there are already multiple platforms (1 for each major > supported browser, so there's an Opera, an IE, a Gecko, and a Webkit). > I'm not entirely sure but I believe the base, talked about in #2, is > already written specifically for each target browser platform. Also not a problem. > If you are in the market to build such a tool, The GWT sources are a > great place to start, but unless you're willing to dig in for a few > weeks and do a lot of dev work, I don't think GWT can do what you > want. Sounds way above my head. I have to say, though - I'm very surprised this hasn't been done already. It seems like such an obvious use of GWT. > NB: I'm not an expert on the GWT internals so I might have made a few > mistakes, but I'm fairly sure the above is true. #1 is certainly true, > and already a big deal for you. > > On Jan 7, 7:20 am, rapodaca wrote: > > > On Jan 6, 5:58 pm, Ziyod wrote: > > > > Use GWTCompiler it's part of the com.google.gwt.dev.GWTCompiler > > > package > > > Create a gwtCompiler.cmd file and insert this command: > > > @java -cp "%~dp0\gwt-user.jar;%~dp0\gwt-dev-windows.jar" > > > com.google.gwt.dev.GWTCompiler %* > > > Hello Ziyod, > > > Thanks for the information. I'm on Linux, but my best guess for > > translation is (creating file GWT_INSTALL/gwtCompiler): > > > java -cp $HOMEDIR/gwt-user.jar:$HOMEDIR/gwt-dev-linux.jar > > com.google.gwt.dev.GWTCompiler "$@"; > > > This is based on the projectCreator script provided in the > > installation. > > > I notice that HOMEDIR is not set so I go: > > > $ export HOMEDIR=~/tmp/gwt-linux-1.5.3 > > > Then I try: > > > $ ./gwtCompiler com.example.Test > > Loading module 'com.example.Test' > > [ERROR] Unable to find 'com/example/Test.gwt.xml' on your > > classpath; could be a typo, or maybe you forgot to include a classpath > > entry for source? > > [ERROR] Build failed > > > I'm not sure what happened or what the com/example/Test.gwt.xml file > > refers to. Any ideas of how to generate it and where to save it? > > > > Find out more:http://www.screaming-penguin.com/GWTDocs > > > That's a good command summary, but unfortunately, I don't see any > > example usage. > > --~--~-~--~~~---~--~~ 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: New entry to GWT world
no off-topic. On Jan 7, 7:46 am, "ravikumar.parigad...@gmail.com" wrote: > Hello everyone --~--~-~--~~~---~--~~ 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-contrib] Call for critical 1.6 bugs
Well, my own wishlist includes Issue #1032, http://code.google.com/p/google-web-toolkit/issues/detail?id=1032. It only effects Maven users, and is somewhat mitigated by the GWT maven plugin, but it is an annoyance because GWT unit tests cannot run inside of the standard maven test harness, which impacts down-the-chain tools like CI servers, report generators, etc. For example, we use TeamCity as our CI build server, which keeps historical timeseries for each unit test, and provides graphs, even performance regression data, but because of #1032, we have to mock out alot of GWT and use TestCase instead of GwtTestCase. I don't know if this will be mitigated by OOPHM or Jetty inclusion. Java 1.6 support on OSX would be nice as well, but I assume this is pending OOPHM and the jettisoning of SWT. -Ray On Wed, Jan 7, 2009 at 2:48 PM, Scott Blum wrote: > Hi all, > We've narrowed down the set of bugs we'd like to fix for GWT 1.6. Our plan > is for a very short release cycle this time, which forces us to fix only a > small set of bugs. Of course, we don't want to miss anything critical. > > Here is the current set of Critical 1.6 bugs we intend to fix: > http://code.google.com/p/google-web-toolkit/issues/list?can=2&q=milestone:1_6_RC+-status:FixedNotReleased+priority:Critical > > If you know of some burning issue that we've missed, please use this thread > to suggest bugs to add to this list, and explain why it's critically > important. The kinds of issues we consider to be critical include bugs that > affect a large number of users, possible security issues, or bugs that > cannot be worked around easily (such as GWT compiler crashes). > Please DO NOT use this thread to debate whether any particular issue should > be in our out. We just want to collect a list of critical issues, and we > will consider each suggestion individually. > Thanks! > Scott > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Has anyone used Google streetview in GWT?
Hi folks, I am currently using the Mapitz GWT Google Maps bindings (http:// sourceforge.net/tracker/?group_id=169331), because I'm still on GWT1.4 (yeah, I know, I know). When we upgrade to 1.5, I plan to use the Maps API provided by Google: http://code.google.com/docreader/#p=gwt-google-apis&s=gwt-google-apis&t=MapsGettingStarted But I noticed that that even the Google Maps API doesn't support the Maps Streetview: http://code.google.com/apis/maps/documentation/services.html#Streetview I submitted a request to the issue tracker: http://code.google.com/p/gwt-google-apis/issues/detail?id=228 But I was wondering if anyone had had any luck in integrating streetview into a GWT application? It looks simple enough to do plain old JSNI, but I thought it was worth asking. I looked on both the maps and gwt google groups for any reference to streetview and GWT and found nothing. Thanks, Dan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
complex widgets in scroll table cells
I want to display 2 widgets (for example, HTML and a button) in a single cell of the ScrollTable (in the gwt incubator). I enclosed the 2 widgets in a HorizontalPanel and then added the panel to the ScrollTable using setWidget(row, column, widget). This displays what look like partial borders (but are not) -- thin gray lines on the bottom and right of both the HTML and the button. Is there a better way to do this? ScrollTable table; HorizontalPanel p = new HorizontalPanel(); p.add(new HTML("foo")); p.add(new Button("press here")); table.setWidget(1, 2, p); --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Using Window Alert inside of Asynch GWTTestCase
Related threads here due to dumb 60 day rule: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/7be51fdddafa219b/ http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/2c182159532c4aa4/ I've found some weirdness when running an Asynch Test using GWTTestCase inside of eclipse. Essentially, one of my classes under test makes a call to Window.alert(as a response to the Asynch response), which was actually getting shown on my system -- but often shown behind the eclipse window so I would see it. As such, a lot of my tests timed out. As an aside, I also wasn't calling timer.schedule with enough time for my server side services to start, so that caused test assertion failures. When I finally commented out the call to Window alert and got the timing right on my timer.schedule(...) and delayFinishTest(...) the test ran fine. Of course, I had to come up with a different way to test my response. In the first thread above, some suggests are made to get around this. My thought is just to find some other modal popup and use that instead of Window.alert. Anyone else with thoughts? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Unable to run GWT + Flash on 64bit Linux
Hi there, I'm running GWT on my 64bit Ubuntu 8.10 dev box with a 32bit jvm installed and it works just fine. But all this changes when I want to use (the recently released Google Visualizations for gwt[1], as some of its charts require Flash (applies for all other flash components as well). So I went along and installed the Adobe Flash player. This works fine when I compile and deploy my app but it does NOT work at all in the hosted mode. The hosted mode browser still thinks that Flsah is NOT installed. I think it's because the 32bit hosted browser does not work with the 64bit flash. Do you have any ideas how I can get this setup running? thanks for all suggestions! Dennis [1] http://google-code-updates.blogspot.com/2008/12/google-visualization-api-library-now.html --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Can't reply to GWT Discussion thread
Apparently posts older than 60 days cannot be replied to using the web interface to the GWT discussion forums. It's apparently a Google Groups wide issue, so it's not specific to our group. See: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/755d9eb32cddd4af/ http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/297d26341bf83b78/ ( ^^ nasty workaround near bottom of this thread) *** I'm not a fan. To have similar knowledge scattered about in tens of threads is ridiculous and inefficient. *** It's 1/7/09. You now have 60 days to disagree with me. ;-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Call for critical 1.6 bugs
Hi all, We've narrowed down the set of bugs we'd like to fix for GWT 1.6. Our plan is for a very short release cycle this time, which forces us to fix only a small set of bugs. Of course, we don't want to miss anything critical. Here is the current set of Critical 1.6 bugs we intend to fix: http://code.google.com/p/google-web-toolkit/issues/list?can=2&q=milestone:1_6_RC+-status:FixedNotReleased+priority:Critical If you know of some burning issue that we've missed, please use this thread to suggest bugs to add to this list, and explain why it's critically important. The kinds of issues we consider to be critical include bugs that affect a large number of users, possible security issues, or bugs that cannot be worked around easily (such as GWT compiler crashes). Please DO NOT use this thread to debate whether any particular issue should be in our out. We just want to collect a list of critical issues, and we will consider each suggestion individually. Thanks! Scott --~--~-~--~~~---~--~~ 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: Compiling a single Java class to a plain JavaScript file
Hi Rich, Reinier is right about the GWTCompiler. I thought you were trying to get human-readable javascript. I run this command in Windows(notice -style DETAILED argument): @java -Xmx256M -cp "%~dp0\src;%~dp0\bin;%~dp0\../../gwt-user.jar; %~dp0\../../gwt-dev-windows.jar" com.google.gwt.dev.GWTCompiler -out "%~dp0\www" -style DETAILED %* com.google.gwt.sample.hello.Hello On Jan 7, 12:20 am, Reinier Zwitserloot wrote: > rapodaca: The GWTCompiler is simply what drives the myProject-compile > command; it does the same thing (translates a whole bunch of things > into a single JS file), so I doubt its what you're looking for. > > What you want can't really be done. Java isn't javascript. Take your > example just to illustrate the problem here: How would that even > translate to javascript? Javascript doesn't have classes. It has > prototype based inheritance. Here are your fundamental problems: > > 1. Javascript's namespacing and object model is so different, that > GWT internally generates completely different and unwieldy names for > objects and classes. These names are then mangled to unrecognizable > shortcodes to reduce the size of the output JS. So, your public void > hello method is either going to be called: "com.mypackage.Hello::talk > ()" (yes, including closing parentheses to indicate that this version > takes no parameters; unlike javascript, in java two methods with the > same name but different parameter lists are completely separate, in > javascript you can't do that), or it's going to be called something > small and effectively random, so something like 'xYq' or some such. > There's no code to pick a sane name for interaction, so nothing there > that would even think to generate just a function called "hello". > > 2. There's a base set of functions that all GWT projects start out > with. The GWT compiler assumes this basis is there. > > 3. GWT does something called platform targeting. That's why it > generates a number of JS files - one for each target platform. Out of > the box, there are already multiple platforms (1 for each major > supported browser, so there's an Opera, an IE, a Gecko, and a Webkit). > I'm not entirely sure but I believe the base, talked about in #2, is > already written specifically for each target browser platform. > > If you are in the market to build such a tool, The GWT sources are a > great place to start, but unless you're willing to dig in for a few > weeks and do a lot of dev work, I don't think GWT can do what you > want. > > NB: I'm not an expert on the GWT internals so I might have made a few > mistakes, but I'm fairly sure the above is true. #1 is certainly true, > and already a big deal for you. > > On Jan 7, 7:20 am, rapodaca wrote: > > > On Jan 6, 5:58 pm, Ziyod wrote: > > > > Use GWTCompiler it's part of the com.google.gwt.dev.GWTCompiler > > > package > > > Create a gwtCompiler.cmd file and insert this command: > > > @java -cp "%~dp0\gwt-user.jar;%~dp0\gwt-dev-windows.jar" > > > com.google.gwt.dev.GWTCompiler %* > > > Hello Ziyod, > > > Thanks for the information. I'm on Linux, but my best guess for > > translation is (creating file GWT_INSTALL/gwtCompiler): > > > java -cp $HOMEDIR/gwt-user.jar:$HOMEDIR/gwt-dev-linux.jar > > com.google.gwt.dev.GWTCompiler "$@"; > > > This is based on the projectCreator script provided in the > > installation. > > > I notice that HOMEDIR is not set so I go: > > > $ export HOMEDIR=~/tmp/gwt-linux-1.5.3 > > > Then I try: > > > $ ./gwtCompiler com.example.Test > > Loading module 'com.example.Test' > > [ERROR] Unable to find 'com/example/Test.gwt.xml' on your > > classpath; could be a typo, or maybe you forgot to include a classpath > > entry for source? > > [ERROR] Build failed > > > I'm not sure what happened or what the com/example/Test.gwt.xml file > > refers to. Any ideas of how to generate it and where to save it? > > > > Find out more:http://www.screaming-penguin.com/GWTDocs > > > That's a good command summary, but unfortunately, I don't see any > > example usage. > > --~--~-~--~~~---~--~~ 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: generator for Nokia S60 webkit browser
Hi Peter, As far as I know, if the mobile browsers are built from Mozilla and/or WebKit builds, your GWT application should work on them. However, you may want to reconsider the style and positioning of your application, or perhaps even create a lighter version of your application, based on the browser you're running on and the resources available. I would also double-check the following two points: 1) Which phone are planning to support in specific? Which build is it using? Check if the build is in the list of supported browsers (link below). GWT Supported Browsers: http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=FAQ_CurrentlySupportBrowsers 2) Test your application on the mobile browser thoroughly. There may be slight differences in the mobile browser that could break certain UI widget implementations, especially if it's using a custom build, in which case you can create your own specialized widget and plug it in via a deferred binding rule. Hope that helps, -Sumit Chandel On Fri, Jan 2, 2009 at 10:49 AM, Peter Ondruška wrote: > > Dear All, > > as mobile phone browsers are getting better and better (faster with > more memory, etc.) I am wondering if there is any way to have pages > generated for those browsers found in Nokia S60 mobile phones. It is > "Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaE71-1/100.07.76; > Profile/MIDP-2.0 Configuration/CLDC-1.1) AppleWebKit/413 (KHTML, like > Gecko) Safari/413". I do not expect mobile phone browsers to handle > big applications like Gmail but simple applications could work I > guess. Am I wrong? > > Peter > > > > --~--~-~--~~~---~--~~ 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: Ibatis + GWT: No source code is available for type com.ibatis.dao.client.DaoManager; did you forget to inherit a required module?
Thanks for you reply!!! So is that means in order to retreieve data from database via ibatis, I have to creat a RPC? or can i call the object/classes from com..dmt.admin.server.persistence?? This maybe a stupid question... THanks!! On Jan 7, 2:49 pm, "todd.sei...@gmail.com" wrote: > The client portion of your code can only use objects which GWT > emulates (http://code.google.com/docreader/#p=google-web-toolkit- > doc-1-5&s=google-web-toolkit-doc-1-5&t=RefJreEmulation) and objects > which are in your client package. > > You probably want to move this to your com...server package instead. > > On Jan 7, 2:18 pm, Keven Chan wrote: > > > Hi all, > > > I'm new to GWT and I'm playing around with GWT for a month. > > > I tried to insert some ibatisDAO code to GWT, when I compile with > > shell-hosted , i have the following error: > > > [TRACE] Removing units with errors > > [ERROR] Errors in 'file://src/java/com//dmt/admin/ > > client/persistence/DaoConfig.java' > > No source code is available for type com.ibatis.dao.client.DaoManager; > > did you forget to inherit a required module? > > [ERROR] Line 46: No source code is available for type > > java.util.Properties; did you forget to inherit a required module? > > [ERROR] Line 48: No source code is available for type java.io.Reader; > > did you forget to inherit a required module? > > [ERROR] Line 48: No source code is available for type > > com.ibatis.common.resources.Resources; did you forget to inherit a > > required module? > > [ERROR] Line 49: No source code is available for type > > com.ibatis.dao.client.DaoManagerBuilder; did you forget to inherit a > > required module? > > > Where com..dmt.admin.client.persistence.DaoConfig.java is: > > - > > package com..dmt.admin.client.persistence; > > > import com.ibatis.common.resources.Resources; > > import com.ibatis.dao.client.DaoManager; > > import com.ibatis.dao.client.DaoManagerBuilder; > > > import java.io.Reader; > > import java.util.Properties; > > > public class DaoConfig { > > > private static final String resource = "com//dmt/admin/ > > persistence/dao.xml"; > > private static final DaoManager daoManager; > > > static { > > try { > > daoManager = newDaoManager(null); > > } catch (Exception e) { > > throw new RuntimeException("Description. Cause: " + e, > > e); > > } > > > } > > > public static DaoManager getDaoManager() { > > return daoManager; > > } > > > public static DaoManager newDaoManager(Properties props) { > > try { > > Reader reader = Resources.getResourceAsReader(resource); > > return DaoManagerBuilder.buildDaoManager(reader, props); > > } catch (Exception e) { > > throw new RuntimeException("Could not initialize > > DaoConfig. Cause: " + e, e); > > } > > }} > > > - > > > Please help me find out why gwt compiler can't recognize the import - > > import com.ibatis.common.resources.Resources; > > import com.ibatis.dao.client.DaoManager; > > import com.ibatis.dao.client.DaoManagerBuilder; > > > Thankss in advance!! > > Keven --~--~-~--~~~---~--~~ 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 debug serialization issues?
I override onBeforeRequestDeserialized and onAfterResponseSerialized in my servlets to view the raw data being passed in RPC. I have also used HashSet with generics and do not generally have problems. Once, I think it was in an earlier version of GWT, I needed to add any objects that I used generically to a fake method in one of my services. So if the was Set and Set I would add workaround (Foo arg0, Bar arg1) to any of my remote services. This got around the problem. On Jan 7, 1:46 pm, rlaferla wrote: > How do you guys go about debugging serialization issues? I am using > GWT 1.5.3 and my GWT client is sending a DTO to the server. If I do a > Log.debug() just prior to the call to the server, I see all of my data > in my DTO. However, when I do a log.debug() on my DTO in the GWT-RPC > service, some of my data is missing. I have read through forum posts, > etc... but I feel I don't have the necessary tools to debug the > problem. The data that appears to not be serialized is a > Set (implementation is a HashSet) off of my DTO. Both > the DTO and CustomClass are marked Serializable, I use generics for > the Set. --~--~-~--~~~---~--~~ 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: Ibatis + GWT: No source code is available for type com.ibatis.dao.client.DaoManager; did you forget to inherit a required module?
The client portion of your code can only use objects which GWT emulates (http://code.google.com/docreader/#p=google-web-toolkit- doc-1-5&s=google-web-toolkit-doc-1-5&t=RefJreEmulation) and objects which are in your client package. You probably want to move this to your com...server package instead. On Jan 7, 2:18 pm, Keven Chan wrote: > Hi all, > > I'm new to GWT and I'm playing around with GWT for a month. > > I tried to insert some ibatisDAO code to GWT, when I compile with > shell-hosted , i have the following error: > > [TRACE] Removing units with errors > [ERROR] Errors in 'file://src/java/com//dmt/admin/ > client/persistence/DaoConfig.java' > No source code is available for type com.ibatis.dao.client.DaoManager; > did you forget to inherit a required module? > [ERROR] Line 46: No source code is available for type > java.util.Properties; did you forget to inherit a required module? > [ERROR] Line 48: No source code is available for type java.io.Reader; > did you forget to inherit a required module? > [ERROR] Line 48: No source code is available for type > com.ibatis.common.resources.Resources; did you forget to inherit a > required module? > [ERROR] Line 49: No source code is available for type > com.ibatis.dao.client.DaoManagerBuilder; did you forget to inherit a > required module? > > Where com..dmt.admin.client.persistence.DaoConfig.java is: > - > package com..dmt.admin.client.persistence; > > import com.ibatis.common.resources.Resources; > import com.ibatis.dao.client.DaoManager; > import com.ibatis.dao.client.DaoManagerBuilder; > > import java.io.Reader; > import java.util.Properties; > > public class DaoConfig { > > private static final String resource = "com//dmt/admin/ > persistence/dao.xml"; > private static final DaoManager daoManager; > > static { > try { > daoManager = newDaoManager(null); > } catch (Exception e) { > throw new RuntimeException("Description. Cause: " + e, > e); > } > > } > > public static DaoManager getDaoManager() { > return daoManager; > } > > public static DaoManager newDaoManager(Properties props) { > try { > Reader reader = Resources.getResourceAsReader(resource); > return DaoManagerBuilder.buildDaoManager(reader, props); > } catch (Exception e) { > throw new RuntimeException("Could not initialize > DaoConfig. Cause: " + e, e); > } > }} > > - > > Please help me find out why gwt compiler can't recognize the import - > import com.ibatis.common.resources.Resources; > import com.ibatis.dao.client.DaoManager; > import com.ibatis.dao.client.DaoManagerBuilder; > > Thankss in advance!! > Keven --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Ibatis + GWT: No source code is available for type com.ibatis.dao.client.DaoManager; did you forget to inherit a required module?
Hi all, I'm new to GWT and I'm playing around with GWT for a month. I tried to insert some ibatisDAO code to GWT, when I compile with shell-hosted , i have the following error: [TRACE] Removing units with errors [ERROR] Errors in 'file://src/java/com//dmt/admin/ client/persistence/DaoConfig.java' No source code is available for type com.ibatis.dao.client.DaoManager; did you forget to inherit a required module? [ERROR] Line 46: No source code is available for type java.util.Properties; did you forget to inherit a required module? [ERROR] Line 48: No source code is available for type java.io.Reader; did you forget to inherit a required module? [ERROR] Line 48: No source code is available for type com.ibatis.common.resources.Resources; did you forget to inherit a required module? [ERROR] Line 49: No source code is available for type com.ibatis.dao.client.DaoManagerBuilder; did you forget to inherit a required module? Where com..dmt.admin.client.persistence.DaoConfig.java is: - package com..dmt.admin.client.persistence; import com.ibatis.common.resources.Resources; import com.ibatis.dao.client.DaoManager; import com.ibatis.dao.client.DaoManagerBuilder; import java.io.Reader; import java.util.Properties; public class DaoConfig { private static final String resource = "com//dmt/admin/ persistence/dao.xml"; private static final DaoManager daoManager; static { try { daoManager = newDaoManager(null); } catch (Exception e) { throw new RuntimeException("Description. Cause: " + e, e); } } public static DaoManager getDaoManager() { return daoManager; } public static DaoManager newDaoManager(Properties props) { try { Reader reader = Resources.getResourceAsReader(resource); return DaoManagerBuilder.buildDaoManager(reader, props); } catch (Exception e) { throw new RuntimeException("Could not initialize DaoConfig. Cause: " + e, e); } } } - Please help me find out why gwt compiler can't recognize the import - import com.ibatis.common.resources.Resources; import com.ibatis.dao.client.DaoManager; import com.ibatis.dao.client.DaoManagerBuilder; Thankss in advance!! Keven --~--~-~--~~~---~--~~ 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 project creation indefinetly creates folder recursively
I experienced this same problem using the latest GWT (1.5.3) for windows and Eclipse Ganymede. I also followed the GWT instructions for creating a brand new GWT project using Eclipse. The project name used in both the projectCreator and applicationCreator scripts was the same. After attempting the import of the new project into Eclipse, I found the infinitely recursive folder chain with projectName \projectName\projectName\projectName\... inside of the Eclipse workspace. Hopefully someone knows the solution to this problem. It is very frustrating... BTW, the too-long filename fix is to go down into the projectName folders and share a folder way down in the path with full permissions. Then map a drive to that folder. This will shorten the path so that you can work with it. You may have to do this more than once. You can also rename the folders to a single letter to shorten the path. I was able to manually delete it using the above methods. On Jan 5, 12:37 pm, TBirch wrote: > I have had this happen to me twice lately trying to import an existing > project into eclipse. On the first machine, it ran till the machine > ran out of memory. Then, vista could not delete the files as the path > was too long. I had to restore the system. The second time on another > machine I noticed it was happening and I canceled the import before it > that far along. I am very hesitant to import at this point. > > On Jan 5, 9:47 am, "Isaac Truett" wrote: > > > Raj, > > > What version of GWT are you using? Also, can you describe what you > > mean by "unlimited recursive files" in your project? > > > Thanks, > > Isaac > > > On Sat, Jan 3, 2009 at 3:09 AM, Raj wrote: > > > > Hi, > > > > I'm trying to setup GWT in my machine and followed the steps given in > > > the instruction and created an eclipse project using projectCreator, I > > > was little amazed to see the project size of more than 500MB while > > > importing it into eclipse but only to find the script has created > > > unlimited recursive files inside MyProject folder, the worst part is > > > its getting created again automatically after deleting it and even > > > after restarting the machine. How to stop this script from executing? > > > Did anyone got this error before? > > > > Any help would be appreciated. > > > > Thanks. > > > --Raj --~--~-~--~~~---~--~~ 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 can we append Text to a TextArea widget
perhaps use textArea.setText(textArea.getText()+newText)? On 7 Jan, 19:46, "Sanjith Chungath" wrote: > Hi, > I want to write an async method to retrieve some String from the > server. onSuccess I want to append the reruned string to a TextArea. is it > possible. i can see only setText() method for this class.basically I want to > monitor the stdout/stderr of a server process and update it on the client > using async method (with a timer). My use will be in intranet not in > internet. --~--~-~--~~~---~--~~ 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 we append Text to a TextArea widget
Hi, I want to write an async method to retrieve some String from the server. onSuccess I want to append the reruned string to a TextArea. is it possible. i can see only setText() method for this class.basically I want to monitor the stdout/stderr of a server process and update it on the client using async method (with a timer). My use will be in intranet not in internet. --~--~-~--~~~---~--~~ 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 debug serialization issues?
How do you guys go about debugging serialization issues? I am using GWT 1.5.3 and my GWT client is sending a DTO to the server. If I do a Log.debug() just prior to the call to the server, I see all of my data in my DTO. However, when I do a log.debug() on my DTO in the GWT-RPC service, some of my data is missing. I have read through forum posts, etc... but I feel I don't have the necessary tools to debug the problem. The data that appears to not be serialized is a Set (implementation is a HashSet) off of my DTO. Both the DTO and CustomClass are marked Serializable, I use generics for the Set. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Problem building GWT with JPA annotations using Ant
Hi, My application builds and works fine in hosted mode, but I am having trouble getting my application to compile using Ant. Im using GWT with hibernate4gwt and JPA annotations, so my gwt xml inherits the following: In my domain classes I have many JPA annotations e.g: import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import net.sf.hibernate4gwt.pojo.java5.LazyPojo; //I am using GXT also, these are to do with that import com.extjs.gxt.ui.client.data.BeanModelMarker; import com.extjs.gxt.ui.client.data.BeanModelMarker.BEAN; @Entity @Table(name="Contact") public class Contact extends LazyPojo { ... } In my build.xml i have included the following in my class path: When i try to build, the gwt compiler complains that it cannot find the JPA annotations classes: [echo] [echo] GWT Compiling : com. [echo] [java] Processing types in compilation unit: file:/C:// domain/Contact.java [java] Found type 'Contact' [java] Resolving annotation '@Entity' [java] [ERROR] [java] java.lang.ClassNotFoundException: javax.persistence.Entity So I am thinking its a class path error, but I am not sure what I need to add in to make it build properly. Can anyone help? Thanks Chris --~--~-~--~~~---~--~~ 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: Who's Using GWT?
It was missing a security certificate bundle...fixed it...thx -- pady On Jan 7, 10:32 am, "ajay jetti" wrote: > firefox 3... > > it gives some security warning and stops --~--~-~--~~~---~--~~ 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: Help with the connection
Hello, Ziyod. I am in the location of GWT, then /samples, then, whatever file I double click(mail-shell, showcase-shell, hello-shell), it's just the same, nothing is lauched but that error message. Thank you for your help = ) On 7 jan, 04:41, Ziyod wrote: > Hi Jully, > > Can you be more specific on steps you took? > Once you have installed GWT you should be able to go to /samples > folder and pick any of the examples. > For example, navigate to GWT_HOME/samples/Showcase (where GWT_HOME = > location of gwt) folder and double click on Showcase-shell.cmd file > that should launch a showcase sample in hosted mode. > I hope that helps to get you started > > On Jan 6, 11:28 am, Jully wrote: > > > Hi! > > I'm starting GWT today and it was just a problem to install it. I got > > it, but whenever I open a sample file it shows an error message that > > "the requested URL could not be retrieved" and it fails to connect to > > 127.0.0.1 I have no idea about the settings or how to fix this, > > then any help is worth ;) > > > Thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Tutorial for web application using GWT,Spring,hibernate
Google for gwt spring hibernate. Second link: http://www.ongwt.com/post/2008/02/14/Three-parts-tutorial-:-Spring-Hibernate-and-GWT Very well done. Later, Shaffer On Jan 6, 10:14 pm, "pallavi gole" wrote: > Hi, > > I am new to GWT. > > I want develop web application using GWT,Spring,Hibernate. > > I want tutorial which describe step by step how to develop web application > using GWT,Spring,Hibernate. > > from where I will get this Tutorial . > > Thanks , > Asmita --~--~-~--~~~---~--~~ 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 entry to GWT world
Hello everyone --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Tutorial for web application using GWT,Spring,hibernate
Hi, I am new to GWT. I want develop web application using GWT,Spring,Hibernate. I want tutorial which describe step by step how to develop web application using GWT,Spring,Hibernate. from where I will get this Tutorial . Thanks , Asmita --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Named anchors
Hello, I have some existing HTML that are pretty large documents with named anchors. Suppose that I display the HTML in a HTMLPanel, how can I specify an anchor for it to display? Thanks for any input. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Can u use Google Visualization API offline without connecting to Google servers?
It seems like when using the google Visualization API, you need to add something like this in the JavaScript code: http://www.google.com/jsapi";> Does this mean that you have to send your data to the Google Server? Is there a way to use this API without conneting to Google servers? Thanks, Paul --~--~-~--~~~---~--~~ 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: Get file from server with GWT-RPC
Gregor wrote "if you want to create a directory somewhere else on the host machine disk (i.e. not part of the Tomcat set up) to store the images you need to do more work. " You can add your external directory to tomcat's path. So basically D: \images could be pathed to localhost:8080/YourApp/images Then you can access them very easily using GWT by creating an Image object and calling setURL("images/mycat.jpg"); Look at this to set up your path: http://whatwouldnickdo.com/wordpress/157/tomcat-images-directory/ On Jan 6, 12:06 pm, gregor wrote: > I think the public part is assumed. If yourimagesare located in > public/category then they should be accessible via the URL: > > String imageURL = GWT.getModuleBaseURL() + "category/" + fileName; > > if you want to create adirectorysomewhere else on the host machine > disk (i.e. not part of theTomcatset up) to store theimagesyou need > to do more work. You could use an ordinary HttpServlet (not a GWT RPC > servet) to do it, something like: > > // assume you have passed "category" and "imageFileName" as > parameters to the servlet. > // in HttpServlet.doGet(..) > FileInputStream in = new FileInputStream(new File(UPLOAD_DIRECTORY/ > + category/ + ImageFileName)) > response.setContentType("image/jpeg"); // or gif,png etc > OutputStream out = response.getOutputStream(); > try { > byte[] buffer = new byte[1024]; > int len; > while ((len = in.read(buf)) > 0) { > out.write(buffer, 0, len); > } > in.close(); > out.close(); > } catch (IOException e) { > // do something > } > > The effect of that it to make the browser believe it's just getting an > image from a URL. You can't use GWT RPC because it won't deal with > binary data (e.g. an image file). Look up "HttpServlet image download" > on Google for examples. > > On Jan 6, 4:00 pm, Daniele wrote: > > > I put category folder under public/ folder. > > Same problem. > > I do set UPLOAD_DIRECTORY with > > ./src/com/webphotogallery/public/category because only public/category > > doesn't work. > > > I try to create a tempdirectoryon /home/dany/TESI/project and we'll > > put indirectoryimagesthat I use in my application > > > Daniele > > > 2009/1/4, gregor : > > > > Hi Daniele, > > > > Your problem is that: > > > > private static String UPLOAD_DIRECTORY = > > > "./src/com/webphotogallery/server/category/"; > > > > does not exist under the temporary GWT dev shellTomcatinstance > > > created when you run hosted mode, whatever your development > > > environment. To sort this out you will have to think through where in > > > a production environment the photos would actually be stored. > > > > To do this quick and get it to work in hosted mode, I think if you put > > > them under the /publicdirectoryrather than /server, it might do the > > > trick. > > > > regards > > > gregor > > > > On Jan 4, 1:13 pm, Daniele wrote: > > >> It's doesn't work. > > >> My projectdirectorystructure is: > > > >> /home/dany/TESI/projects/WebPhotoGallery/ > > >> -- build/ > > >> -- src > > >> -- com > > >> -- webphotogallery > > >> -- server > > >> -- category > > >> -- [...] > > >> -- client > > >> -- public > > >> --tomcat > > >> -- WebConten > > > >> (I use Eclipse with Cypal studio plugin) > > > >> On servlet, the code for create categorydirectoryis: > > > >> private static String UPLOAD_DIRECTORY = > > >> "./src/com/webphotogallery/server/category/"; > > >> [...] > > > >> if((it.getFieldName().equals("categoryBox"))){ > > >> String categoryFolder = it.getString(); > > > >> UPLOAD_DIRECTORY = UPLOAD_DIRECTORY + > > >> categoryFolder; > > >> [...] > > >> where categoryFolder is passed by client with a form. > > >> But when I call setURL() method on client, what URL I > > >> put??http://localhost:/com.webphotogallery.WebPhotoGallery/category/ca... > > >> not works. > > > >> I'm totally disoriented. > > > >> Thanks. > > > >> Daniele. > > > >> 2008/12/28 Daniele : > > > >> > Sorry, but I'm newbie of servlet & GWT...I'm here for learning GWT and > > >> > servlet :) > > >> > I try. > > >> > Thanks. > > > >> > Daniele. > > > >> > 2008/12/28 rakesh wagh : > > > >> >> Cannot comment on what you are doing wrong without looking into the > > >> >> code. However I see no need for setUrl on server side. You should have > > >> >> a "Servlet" that will parse the parameters, read the appropriate image > > >> >> file(either file system or db or any doc mgmt system for that matter), > > >> >> set a proper content type and just spit out the byte stream. > > > >> >> From the client just call this servlet with appropriate params for it > > >> >> to retrieve the image. In essence: > > >> >> Image img = new Image(); > > >> >> img.setUrl("/servlet?photoId=39934&width=5
Re: same-origin security restriction
The light bulb finally lit for me. There's browser security rules in place that only allow Ajax to communicate with the same server as the main page. If GWT hosted mode allowed it then in the future when you deployed to production your app wouldn't work. I'm going to change my implementation to have the external data sources route through the server, but may need to add load balancing because of the extra load now on the server. Nothings ever to easy. On Jan 6, 1:10 pm, Scooter wrote: > Please allow this to either be a configurable option or a prompt when > accessing external URL. I test against a variety of complex data > sources for our web server where duplicating on my development machine > is almost impossible. It is also an issue when we get a bug report in > production that I can point to the appropriate web server and debug > the problem. I can't upgrade to the latest 1.5 and really want to > avoid the proxy overhead. --~--~-~--~~~---~--~~ 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 to add App configuration properties
Gregor, I was able to get around it by what Joe Cole mentioned above by just overwriting the GWT applications generated web.xml. It works fine. I even created a subdirectory called lib under WEB-INF and put my third party server side JARs there. The seems the way to go if you need to start up singletons when tomcat starts or need env properties in the web.xml Scott On Jan 6, 9:49 pm, Joe Cole wrote: > Hi Gregor, > > We don't hack the web.xml in the jar file, but that's a good idea! > Obviously the only pitfall is when gwt versions change or you checkout > on another computer and gwt overwrites the web.xml - you just have to > remember to update it. Our structure of the tomcat/webapps/ROOT/WEB- > INF directory is: > web.xml > web.xml.custom > readme.txt > > readme.txt is: > The web.xml here _must not be directly changed_. Instead, change > web.xml.custom > and put the contents of that in web.xml. Then mark web.xml readonly, > and commit > everything. If you don't do this, GWT will overwrite web.xml, > everything will > break, and it'll get committed, and it's a pain to track down the > cause. > > The reason for the .custom is so that when this happens, there is an > up-to-date > source of what the file should contain handy. > > :) > > Joe > > On Jan 7, 2:58 pm, gregor wrote: > > > Oh, I see now what Joe's done. Hack the web.xml in the gwt-dev-xxx > > jar. Make sure to do it again when you upgrade GWT versions. That's a > > cool way to get round it. > > > On Jan 7, 1:36 am, gregor wrote: > > > > Hi Scott, > > > > If you want to use features like this kicked off from web.xml then you > > > probably need to run hosted mode with the -noserver option. You cannot > > > access and modify web.xml for hosted mode embedded Tomcat. To run > > > using -noserver efectively you just need an Ant build file you can > > > easily run from your IDE to deploy your RPC servlets etc to your own > > > Tomcat instance when you change them, and then set a remote debugging > > > session on it so you can debug them if needed. > > > > Another way to get round this problem it is to instantiate all your > > > start up stuff from a static method in some class that when deployed > > > that gets called from a simple startup servlet instead of using > > > web.xml tags. Now that won't get called in GWT hosted mode (because > > > you can't edit web.xml to add a startup servlet...). But if you add a > > > static boolean to that start up class which gets set when its static > > > config method is run, then you can test for this in an init() method > > > of the first RPC servlet your application calls (or you can add a new > > > RPC service that specifically calls it using an if (!GWT.isScript()) > > > clause in onModuleLoad() which will be ignored in deployed mode). It > > > will then pick this up in hosted mode and call the config method, but > > > ignore it in deployed mode. It's a crude workaround, but it does work. > > > > Basically, if you want to use web.xml based conveniences they won't > > > work in normal GWT hosted mode. I don't think there are any plans to > > > change that, I guess because doing so would complicate things for > > > normal hosted mode operation and require a lot of work to do. > > > > regards > > > gregor > > > > On Jan 7, 12:42 am, "sjn...@gmail.com" > > > wrote: > > > > > It's great we got this figured out, but how come GWT hosted mode > > > > doesnt work with exisitng web.xml files so we dont have to code > > > > special configuration for development and production deployment? > > > > > Scott > > > > > On Dec 12 2008, 4:26 pm, Joe Cole > > > > wrote: > > > > > > Oh, and in your web.xml's that you ship to your production environment > > > > > you would have a different listener setup. > > > > > > > > > > > > > > > > com.yourcompany.ProductionConfiguration > > > > > > > > > > > On Dec 13, 11:00 am, Joe Cole wrote: > > > > > > > Here is our way: > > > > > > > In: > > > > > > tomcat/webapps/ROOT/WEB-INF/web.xml > > > > > > > > > > > > > jdbc/dbsource > > > > > > javax.sql.DataSource > > > > > > Container > > > > > > > > > > > > > > > > > > > > > > > > com.yourcompany.LocalConfiguration > > > > > > class> > > > > > > > > > > > > > The only gotcha with this is that when you upgrade gwt it changes > > > > > > the > > > > > > web.xml - we just revert it from version control and all works well. > > > > > > > That listener sets up the entire servlet side, including properties > > > > > > & > > > > > > guice bindings: > > > > > > > public class LocalConfiguration extends AbstractConfiguration { > > > > > > protected IPropertyManager createPropertyManager( > > > > > > final ServletContext context) { > > > > > > return new LocalPropertyManager(); > > > > > > } > > > > > > public IBindings getBindings() { > > > > > > return new LocalBindings(); > > > > > >
Re: Who's Using GWT?
firefox 3... it gives some security warning and stops --~--~-~--~~~---~--~~ 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 get the list box value in gwt
Hi All, How to get the selected list box value.I have to display field is username and value is email. when username is selected I need to get value as email id . Please help me on this regard. Regards, Rajasekhar --~--~-~--~~~---~--~~ 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: Who's Using GWT?
I tested it on IE 7 and Firefox 3 and it seems to work. Can you tell me your browser/version ? Thanks -- pady --~--~-~--~~~---~--~~ 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: Who's Using GWT?
cant seem to view your application --~--~-~--~~~---~--~~ 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 display one by one panel in borderlayout panel
Hi All, how to display one by one panel in borderlayout panel,In my case borderlayout panel is divided into north,west,center,east,south panels.First I need to display north panel after displaying north ,need to display west ,center,east,south panels . Right now the entire panel is displaying at a time.Please help me on this regard. Thanks & Regards, Ravindra --~--~-~--~~~---~--~~ 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: gwt1.5 + ejb3 crud example
check out toools ... http://toools.org On Jan 4, 1:11 pm, asianCoolz wrote: > is there any real example of this using annotation? --~--~-~--~~~---~--~~ 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: Who's Using GWT?
I have a gwt app ( to develop other simple apps - you can copy an existing app another user created or develop your own using a (almost) wyswyg builder ) - it is still a work in progress...i do it in my free time... http://www.geazy.com/gwf/GWFMain.html Thx -- pady --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
firefox bookmark gwt app not happenning...
I have a gwt app the link to which I would like to place in firefox bookmarks toolbar. I add it as a bookmark and it shows up fine. Then when i restart firefox it is gone. Do I have to add something in the default gwt html to make it bookmark'able ? Thx -- pady --~--~-~--~~~---~--~~ 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: I need help please
On Jan 6, 8:54 pm, Loryto wrote: > So sorry my e-mail is : angel_ver2...@hotmail.com > > I appreciate your help These questions, or similar ones, have been answered many times in this discussion list. Have you tried searching through the archives. GWT has been implemented in many enterprise environments and many people have posted their experience. GWT Instantiations, the providers of the eclipse plugin have also collated much information on the use and benefits of using GWT instead of other frameworks. --~--~-~--~~~---~--~~ 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: Pbm with PushButton and Images
In fact this problem appears when I run the code in hosted mode. I've just notice that the same code once compiled and deployed on a tomcat works fine. Is there a known bug with hosted mode ? On 6 jan, 18:13, Mogoye wrote: > Hello all, > > I want to use PushButton with an image to define the look of the > button. > So my idea was to use the following code : > > Image img = _imgBundle.getImage("my_image.gif"); > PushButton button = new PushButton(img); > panel.add(button); > > I don't understand why but in some buttons, the image is well > displayed, but sometimes > image is adjusted to bigger or smaller size and the result is not > really nice. > > My 1th question is : > Does any one know why the image is some time adjusted and how can I do > to be sure my image > will be displayed without any change. > > I've an other question on the same topic : > If the button is inserted in a Grid, the button is adjusted to fit the > cell causing to have a large button with a small image inside and a > lot of blank space. > How can I do to be sure that button's size will be the size of the > image ? > > Thanks for reading. --~--~-~--~~~---~--~~ 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: Compiling a single Java class to a plain JavaScript file
rapodaca: The GWTCompiler is simply what drives the myProject-compile command; it does the same thing (translates a whole bunch of things into a single JS file), so I doubt its what you're looking for. What you want can't really be done. Java isn't javascript. Take your example just to illustrate the problem here: How would that even translate to javascript? Javascript doesn't have classes. It has prototype based inheritance. Here are your fundamental problems: 1. Javascript's namespacing and object model is so different, that GWT internally generates completely different and unwieldy names for objects and classes. These names are then mangled to unrecognizable shortcodes to reduce the size of the output JS. So, your public void hello method is either going to be called: "com.mypackage.Hello::talk ()" (yes, including closing parentheses to indicate that this version takes no parameters; unlike javascript, in java two methods with the same name but different parameter lists are completely separate, in javascript you can't do that), or it's going to be called something small and effectively random, so something like 'xYq' or some such. There's no code to pick a sane name for interaction, so nothing there that would even think to generate just a function called "hello". 2. There's a base set of functions that all GWT projects start out with. The GWT compiler assumes this basis is there. 3. GWT does something called platform targeting. That's why it generates a number of JS files - one for each target platform. Out of the box, there are already multiple platforms (1 for each major supported browser, so there's an Opera, an IE, a Gecko, and a Webkit). I'm not entirely sure but I believe the base, talked about in #2, is already written specifically for each target browser platform. If you are in the market to build such a tool, The GWT sources are a great place to start, but unless you're willing to dig in for a few weeks and do a lot of dev work, I don't think GWT can do what you want. NB: I'm not an expert on the GWT internals so I might have made a few mistakes, but I'm fairly sure the above is true. #1 is certainly true, and already a big deal for you. On Jan 7, 7:20 am, rapodaca wrote: > On Jan 6, 5:58 pm, Ziyod wrote: > > > Use GWTCompiler it's part of the com.google.gwt.dev.GWTCompiler > > package > > Create a gwtCompiler.cmd file and insert this command: > > @java -cp "%~dp0\gwt-user.jar;%~dp0\gwt-dev-windows.jar" > > com.google.gwt.dev.GWTCompiler %* > > Hello Ziyod, > > Thanks for the information. I'm on Linux, but my best guess for > translation is (creating file GWT_INSTALL/gwtCompiler): > > java -cp $HOMEDIR/gwt-user.jar:$HOMEDIR/gwt-dev-linux.jar > com.google.gwt.dev.GWTCompiler "$@"; > > This is based on the projectCreator script provided in the > installation. > > I notice that HOMEDIR is not set so I go: > > $ export HOMEDIR=~/tmp/gwt-linux-1.5.3 > > Then I try: > > $ ./gwtCompiler com.example.Test > Loading module 'com.example.Test' > [ERROR] Unable to find 'com/example/Test.gwt.xml' on your > classpath; could be a typo, or maybe you forgot to include a classpath > entry for source? > [ERROR] Build failed > > I'm not sure what happened or what the com/example/Test.gwt.xml file > refers to. Any ideas of how to generate it and where to save it? > > > Find out more:http://www.screaming-penguin.com/GWTDocs > > That's a good command summary, but unfortunately, I don't see any > example usage. --~--~-~--~~~---~--~~ 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: Programmatically Generating Physical Key
I assume you meant faking the pressing of a key on the keyboard. You can't do that directly, no, but you can sort-of call the keylisteners on any particular object. For example, let's say you have a TextBox instance called 'textBox', and you want to simulate pressing the 'X' button. You'll need to do two things: 1) Simulate the effect of the X button on the textBox itself, which means updating the text inside by inserting an X at the current cursor position. 2) Call all keyboardlisteners on textBox. #2 can be done with some technically nonsupported hackery - each implementation of SourcesKeyboardEvents in GWT at least has an internal private object of type 'KeyboardListeners', called 'keyboardListeners'. While its private, you can still get at it via JSNI (look that up) which doesn't know about 'private' and thus allows it. Once you have the keyboardListeners, which is really just an ArrayList, you can loop through them and fire the appropriate call (e.g. onKeyPress) on all of them. The reason GWT doesn't support this directly is because javascript doesn't support it either. GWT isn't magic; it cannot make things that are impossible on the target platform possible. On Jan 2, 2:26 pm, Anurag Tripathi wrote: > Can we programmatically generate physical keys in GWT ? > > Scenario : I want to generate some key on clicking in Button ! > > If anyone has any idea on this, please let me know - > > _Anurag --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---