Problem handling exceptions in client side
Hi. I am trying to send a personal exception from server to client side, following the steps described in this thread http://groups.google.com/group/google-web-toolkit/browse_thread/thread/c03fc4cf1efbc849/c5c297bfe8d99922?lnk=gst&q=exception#c5c297bfe8d99922 but is not working for me. Let me show you my code: Server side service: public void saveFiscalYear(FiscalYear newFiscalyear, FiscalYear oldFiscalYear) throws Exception,DuplicateFiscalYearException { } -- 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 handling exceptions in client side
Hi. I am trying to send a personal exception from server to client side, following the steps described in this thread http://groups.google.com/group/google-web-toolkit/browse_thread/thread/c03fc4cf1efbc849/c5c297bfe8d99922?lnk=gst&q=exception#c5c297bfe8d99922 but is not working for me. Whatever i do, I allways get the same error in client side, "com.google.gwt.user.client.rpc.StatusCodeException: The call failed on the server; see server log for details" Let me show you my code: Server side service: public void saveFiscalYear(FiscalYear newFiscalyear) throws Exception,DuplicateFiscalYearException { // Some code to verify if the fiscal year exists in the database try { fiscalYearManager.save(newFiscalyear); } catch (Exception e) { if (e instanceof DuplicateFiscalYearException) { DuplicateFiscalYearException personalException = new DuplicateFiscalYearException(); throw personalException; } throw new Exception("exception", e); } My personal exception code: public class DuplicateFiscalYearException extends SerializationException implements IsSerializable{ public DuplicateFiscalYearException() { super(); } public DuplicateFiscalYearException(String msg, Throwable cause) { super(msg, cause); } public DuplicateFiscalYearException(String msg) { super(msg); } public EjercicioDuplicadoException(Throwable cause) { super(cause); } } And my client side code: service.saveFiscalYear(fiscalYear, new AsyncCallback() { public void onFailure(Throwable caught) { Exception capture=(Exception)caught; if(capture instanceof DuplicateFiscalYearException){ box.close(); MessageBox.alert(localiced.titleError(), "Duplicated fiscal year", null); } else { box.close(); MessageBox.alert(localiced.titleError(), "Error while creating fiscal year", null); } } Can anybody help me? Thank you in advance. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT + Mapserver
Hello, i´m new with gwt..I know only a little about this technology, so i need some help...my problem is referent to mapserver, i want use openlayers and mapserver to generate a map image ..for that, i use the wrapper gwt-openlayers..then i do it something like this(see the code), but it´s not working, the program don´t has error, but the image don´t showplease someone help me.. CODE: package org.yournamehere.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import org.gwtopenmaps.openlayers.client.Bounds; import org.gwtopenmaps.openlayers.client.Icon; import org.gwtopenmaps.openlayers.client.LonLat; import org.gwtopenmaps.openlayers.client.Map; import org.gwtopenmaps.openlayers.client.MapOptions; import org.gwtopenmaps.openlayers.client.MapWidget; import org.gwtopenmaps.openlayers.client.Marker; import org.gwtopenmaps.openlayers.client.Pixel; import org.gwtopenmaps.openlayers.client.Size; import org.gwtopenmaps.openlayers.client.control.LayerSwitcher; import org.gwtopenmaps.openlayers.client.control.MousePosition; import org.gwtopenmaps.openlayers.client.control.MouseToolbar; import org.gwtopenmaps.openlayers.client.control.PanZoomBar; import org.gwtopenmaps.openlayers.client.control.Scale; import org.gwtopenmaps.openlayers.client.event.EventHandler; import org.gwtopenmaps.openlayers.client.layer.Layer; import org.gwtopenmaps.openlayers.client.layer.Markers; import org.gwtopenmaps.openlayers.client.layer.WMS; import org.gwtopenmaps.openlayers.client.layer.WMSParams; import org.gwtopenmaps.openlayers.client.popup.AnchoredBubble; import org.gwtopenmaps.openlayers.client.popup.Popup; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.ui.DockPanel; import com.google.gwt.user.client.ui.RootPanel; import org.gwtopenmaps.openlayers.client.util.JObjectArray; import org.gwtopenmaps.openlayers.client.util.JSObject; public class MainEntryPoint implements EntryPoint { private MapWidget mapWidget; private Map map; private WMS wmsLayer; private Markers markers; private Popup popup; private WMS layer1; private WMS layer2; public MainEntryPoint() { } public void onModuleLoad() { MapOptions mapOptions = new MapOptions(); mapOptions.setControls(new JObjectArray(new JSObject[]{})); mapOptions.setNumZoomLevels(16); mapOptions.setProjection("EPSG:4326"); mapWidget = new MapWidget("800px", "475px", mapOptions); map = mapWidget.getMap(); markers = new Markers("marker layer"); WMSParams wmsParams = new WMSParams(); wmsParams.setFormat("image/png"); wmsParams.setLayers("tiger-ny"); wmsParams.setStyles(""); wmsParams.setMaxExtent(new Bounds(-79, 0, -61, 12)); wmsLayer = new WMS("estados", "http://localhost:8080/ cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/WebApplication2/src/Mapa/ Venezuela.map", wmsParams); layer1 = new WMS("municipios", "http://localhost:8080/ cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/WebApplication2/src/Mapa/ Venezuela.map", wmsParams); layer2 = new WMS("parroquias", "http://localhost:8080/ cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/WebApplication2/src/Mapa/ Venezuela.map", wmsParams); map.addLayers(new Layer[] {wmsLayer,layer1,layer2, markers}); map.addControl(new PanZoomBar(RootPanel.get("nav").getElement())); map.addControl(new MousePosition(RootPanel.get("position").getElement())); map.addControl(new Scale(RootPanel.get("scale").getElement())); map.addControl(new MouseToolbar()); map.addControl(new LayerSwitcher()); LonLat center = new LonLat(679600, 18); map.setCenter(center, 13); Size size = new Size(32,32); Pixel offset = new Pixel(-5, -17); Icon icon = new Icon("img/marker.png", size, offset); Marker marker = new Marker(center, icon); markers.addMarker(marker); DockPanel dockPanel = new DockPanel(); dockPanel.add(mapWidget, DockPanel.CENTER); dockPanel.setBorderWidth(1); RootPanel.get("map").add(dockPanel); } } 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-
Re: GWT 2.0 Eclipse Breakpoint Not Working
Hello, In our project I have specified a different output directory for the javascript to be compatible with our previous project structure. Everything works fine except debug mode because breakpoint are not hit. I have tried the suggestions above and nothing worked. Do you think this is related to not have js output in war directory but in a different place? On Dec 10 2009, 4:38 pm, Rajeev Dayal wrote: > Glad you got it working. Usually, this problem stems from two areas: > > 1) Not deleting the generated files in your war directory when you switch > SDKs. This is really something that we need to fix in the Google Plugin for > Eclipse or GWT itself, as developers should not be expected to do this when > they switch SDKs. > > 2) The browser storing a cached version of hosted.html. This may also be a > GWT bug in terms of how we have the caching rules set up for the built-in > servlet that we provide. Holding down SHIFT and hitting RELOAD will cause > all pages to be re-fetched, regardless of whether or not they've been > cached. > > > > On Thu, Dec 10, 2009 at 10:36 AM, Nick Powers wrote: > > I ran across that fun problem a while back, and fixed it. This, however, > > was due to upgrading to GWT 2.0 and the switch between hosted mode and dev > > mode. > > -Nick > > > On Thu, Dec 10, 2009 at 9:29 AM, Paul Robinson wrote: > > >> Failing to stop at breakpoints was a bug in one of the JVM releases > >> (1.6.0_14 IIRC). Make sure you're using the latest JVM. > > >> Nick wrote: > >> > I just updated my Eclipse plugin from GWT 1.7 to GWT 2.0. I got my > >> > application to run in a separate browser, however, it does not ask me > >> > to install a plugin, nor does it stop on breakpoints. > > >> > Can anyone help me convert my 1.7 Eclipse GWT/App Engine project to > >> > GWT 2.0? > > >> > What I've done: > >> > -Updated my Eclipse Plugin > >> > -Changed my GWT version to 2.0 > >> > -Changed my App Engine version to 1.2.8 > >> > -Deleted by current launch configurations > >> > -I launch by Right Click-->Debug As-->Web Application (the one with > >> > the 'G' on it). > >> > -I copy the URL give in the Development Mode tab in Eclipse and paste > >> > that into Chrome (I've tried FF and IE 7 as well). > >> > -My App appears and seems to work properly, but no question to install > >> > a plugin nor does it pay attention to breakpoints. > > >> > If I can avoid creating a new project and copying it into that, I'd > >> > prefer it. > > >> > I appreciate any help. > > >> > -Nick > > >> -- > > >> You received this message because you are subscribed to the Google Groups > >> "Google Web Toolkit" group. > >> To post to this group, send email to google-web-tool...@googlegroups.com. > >> To unsubscribe from this group, send email to > >> google-web-toolkit+unsubscr...@googlegroups.com >> cr...@googlegroups.com> > >> . > >> For more options, visit this group at > >>http://groups.google.com/group/google-web-toolkit?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Web Toolkit" group. > > To post to this group, send email to google-web-tool...@googlegroups.com. > > To unsubscribe from this group, send email to > > google-web-toolkit+unsubscr...@googlegroups.com > cr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Button Focus on mac
Hi! I have a vertical panel with one textbox and 4 buttons and I want to be able to use the tab key to change from one button to the other. I tried btnName.setTabIndex(n); with n from 2 to 5 for the button (textbox indextab=1). It doesn't work. I tried it in the hosted browser, safari 4.0.1 and firefox 3.0.13. The focus is not set to any button, and if I set it by clicking on one of them, when I press tab the focus goes to the browser navigation elements and then to the textbox , never to the buttons. I'm using gwt 1.7 with Mac X 10.5.7 Is this a Mac problem? are there any know solutions? 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 -~--~~~~--~~--~--~---