Undefined expected int exception when using SVG in a custom DataGrid cell
I want to include an SVG in a cell of a datagrid table. I created a test class which shows a blue square. The square displays just fine but when I click on it an exception shows up in eclipse (see below). If I change the svg to be a string, a span or an img, clicking on that works without error. Could someone tell me what am i doing wrong? In the debugger the target of the click event shows as [object SVGRectElement] whereas when I flip the comments to, say, show an image instead of svg, the target is 'img src='foo.png'. - private class CustomCell extends AbstractCellString { @Override public void render(Cell.Context context, String value, SafeHtmlBuilder sb) { if (value == null) return; //sb.append(SafeHtmlUtils.fromTrustedString(value.toString())); //sb.append(SafeHtmlUtils.fromTrustedString(span)); //sb.appendEscaped(value); //sb.append(SafeHtmlUtils.fromTrustedString(/span)); //sb.append(SafeHtmlUtils.fromTrustedString(img src=\foo.png\/)); sb.append(SafeHtmlUtils.fromTrustedString(svgrect height='8px' width='8px' fill='blue'/)); } } - 21:40:45.436 [ERROR] [... Uncaught exception escaped com.google.gwt.dev.shell.HostedModeException: Something other than an int was returned from JSNI method '@com.google.gwt.dom.client.DOMImpl::getTabIndex(Lcom/google/gwt/dom/client/Element;)': JS value of type undefined, expected int at com.google.gwt.dev.shell.JsValueGlue.getIntRange(JsValueGlue.java:266) at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:144) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeInt(ModuleSpace.java:262) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeInt(JavaScriptHost.java:75) at com.google.gwt.dom.client.DOMImpl.getTabIndex(DOMImpl.java) at com.google.gwt.dom.client.Element$.getTabIndex$(Element.java:474) at com.google.gwt.user.cellview.client.CellBasedWidgetImpl.isFocusable(CellBasedWidgetImpl.java:74) at com.google.gwt.user.cellview.client.AbstractHasData.onBrowserEvent(AbstractHasData.java:731) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1467) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1406) at com.google.gwt.user.client.impl.DOMImplStandard.dispatchEvent(DOMImplStandard.java:256) at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:613) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:324) at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:613) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:780) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
How to add MouseOver handler to a VectorFeature in GWT-Openlayers
Hello, I want to show a custom tooltip (popup) when user hovers over a Vector Feature on the GWT-openlayers map. I know that SelectFeature.setHover() will allow me to do this but that will also select the feature which i dont want to have. it is like, when the user hovers, tooltip must be shown and when he clicks on the feature, then selection muse happen. how can this be achieved? Regards Jatin -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: GWT DevMode latest version (1.25 ?) crashes FireFox 24 ESR
I updated to version 24.2.0 and the plugin still not works. If I install the latest plugin (1.26) my Firefox crashes and cannot start. After removing the latest plugin my Firefox starts again. Am Montag, 4. November 2013 11:52:25 UTC+1 schrieb stuckagain: Hi, I am trying to run devmode on FireFox 24 ESR release, Plugin version says 1.25. When FireFox starts it crashes, when I delete the GWT DevMode plugin FireFox works again. I can not upgrade to a newer version of FireFox since this is the version that our customers will use and so I want to debug in this version. David -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Undefined expected int exception when using SVG in a custom DataGrid cell
Each and every HTML element has a tabIndex property that's always a integer (defaults to 0 or -1 depending on whether the element is naturally focusable or not). Foreign elements in an HTML document (SVG, MathML) aren't HTML elements, and thus don't have that tabIndex property. …and GWT was designed to work with HTML elements only (because foreign elements are a relatively new thing, and GWT hasn't been updated – yet?) so it assumes tabIndex always exists. In the stacktrace, you can see that GWT is trying to get tabIndex on your SVG element, which is 'undefined' as the property doesn't exist there, hence the error JS value of type undefined, expected int. The fix should be easy, so feel free to send in patches: http://www.gwtproject.org/makinggwtbetter.html (note: it's too late for GWT 2.6 I'm afraid, you'd have to wait for the next release or run from 'master') On Monday, December 16, 2013 4:21:56 AM UTC+1, xxxyyy wrote: I want to include an SVG in a cell of a datagrid table. I created a test class which shows a blue square. The square displays just fine but when I click on it an exception shows up in eclipse (see below). If I change the svg to be a string, a span or an img, clicking on that works without error. Could someone tell me what am i doing wrong? In the debugger the target of the click event shows as [object SVGRectElement] whereas when I flip the comments to, say, show an image instead of svg, the target is 'img src='foo.png'. - private class CustomCell extends AbstractCellString { @Override public void render(Cell.Context context, String value, SafeHtmlBuilder sb) { if (value == null) return; //sb.append(SafeHtmlUtils.fromTrustedString(value.toString())); //sb.append(SafeHtmlUtils.fromTrustedString(span)); //sb.appendEscaped(value); //sb.append(SafeHtmlUtils.fromTrustedString(/span)); //sb.append(SafeHtmlUtils.fromTrustedString(img src=\foo.png\/)); sb.append(SafeHtmlUtils.fromTrustedString(svgrect height='8px' width='8px' fill='blue'/)); } } - 21:40:45.436 [ERROR] [... Uncaught exception escaped com.google.gwt.dev.shell.HostedModeException: Something other than an int was returned from JSNI method '@com.google.gwt.dom.client.DOMImpl::getTabIndex(Lcom/google/gwt/dom/client/Element;)': JS value of type undefined, expected int at com.google.gwt.dev.shell.JsValueGlue.getIntRange(JsValueGlue.java:266) at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:144) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeInt(ModuleSpace.java:262) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeInt(JavaScriptHost.java:75) at com.google.gwt.dom.client.DOMImpl.getTabIndex(DOMImpl.java) at com.google.gwt.dom.client.Element$.getTabIndex$(Element.java:474) at com.google.gwt.user.cellview.client.CellBasedWidgetImpl.isFocusable(CellBasedWidgetImpl.java:74) at com.google.gwt.user.cellview.client.AbstractHasData.onBrowserEvent(AbstractHasData.java:731) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1467) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1406) at com.google.gwt.user.client.impl.DOMImplStandard.dispatchEvent(DOMImplStandard.java:256) at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:613) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:324) at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:613) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at
Re: [ERROR] Resource xyz.jpg not found when running codeserver - works without codeserver (gwt2.51)
How are you launching the codeserver? (which classpath, which arguments) On Monday, December 16, 2013 8:49:23 AM UTC+1, Olaf Raether wrote: I want to compile my project with codeserver. But when I do so I get the follow errors: Computing all possible rebind results for 'de.epro.m3builder.client.ProductImages' Rebinding de.epro.m3builder.client.ProductImages Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator Preparing method a600010Int135px Finding resources [ERROR] Resource de/epro/gwt/resources/images/products/A6000_10_int_135px.jpg not found. Is the name specified as ClassLoader.getResource() would expect? Preparing method a600020Int135px Finding resources [ERROR] Resource de/epro/gwt/resources/images/products/A6000_20_int_135px.jpg not found. Is the name specified as ClassLoader.getResource() would expect? But the images are at that path and it works fine without codeserver and within the code everything looks fine. public interface ProductImages extends ClientBundle { @Source(de/epro/gwt/resources/images/products/A6000_10_int_135px.jpg) ImageResource a600010Int135px(); ... } So how can I go ahead with that ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: GWT DevMode latest version (1.25 ?) crashes FireFox 24 ESR
On Monday, December 16, 2013 10:16:22 AM UTC+1, MCMicS wrote: I updated to version 24.2.0 and the plugin still not works. If I install the latest plugin (1.26) my Firefox crashes and cannot start. After removing the latest plugin my Firefox starts again. See https://code.google.com/p/google-web-toolkit/issues/detail?id=8464#c12 It's not going to work until Mozilla gives us what we need to make it work. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Create ImageResource from URL derived from DB?
I think Nolan wants to use APIs such as http://www.gwtproject.org/javadoc/latest/com/google/gwt/cell/client/ButtonCellBase.html#setIcon(com.google.gwt.resources.client.ImageResource)that expect an ImageResource. On Monday, December 16, 2013 8:31:55 AM UTC+1, Benjamin Possolo wrote: This is not what ImageResource was designed for. ImageResource is part of ClientBundle and is intended for bundling images into a single sprite map to reduce the number of network requests between the user's browser and your server. The artifacts are generated at compile time. If you want to define the background image of your GWT Button widget (which is just a button or input element), use the DOM api and CSS to set the background to the desired image url. String urlToImage = http://www.foo.com/your-image.png;; Button b = new Button(); b.getElement().getStyle().setProperty(background, url(' + urlToImage + ') no-repeat); Here is a stackoverflow post that talks about setting background images on input elements http://stackoverflow.com/questions/2738920/background-image-for-input-type-button On Saturday, December 7, 2013 9:18:06 AM UTC-8, Nolan Brassard wrote: Is there a way to create an ImageResource from a URL? I have a scenario where I'd like to allow the user to give me a URL to an image that will then be used as the Icon of a certain button later on. The only way I know how to create an ImageResource is via a client bundle and setting @Source. Is there another way to do this? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ERROR] Resource xyz.jpg not found when running codeserver - works without codeserver (gwt2.51)
I´m starting codeserver from eclipse. This is standalone project. So there no additional classpath entries except the ones needed for gwt and codeserver. The arguments look like this -src ${workspace_loc:GwtProject}/src -src ${workspace_loc:DependentProject}/src de.project.mymodule -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ERROR] Resource xyz.jpg not found when running codeserver - works without codeserver (gwt2.51)
Try adding the src folder to the classpath (like you'd do for DevMode or the Compiler) instead of passing it as a -src. On Monday, December 16, 2013 11:19:45 AM UTC+1, Olaf Raether wrote: I´m starting codeserver from eclipse. This is standalone project. So there no additional classpath entries except the ones needed for gwt and codeserver. The arguments look like this -src ${workspace_loc:GwtProject}/src -src ${workspace_loc:DependentProject}/src de.project.mymodule -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ERROR] Resource xyz.jpg not found when running codeserver - works without codeserver (gwt2.51)
Thanks, your hint brought me back on the track. I added the related projects to the buildpath and the errors went away. Now everything is fine, except that I only get a list of files when i click on module after opening the codeserver url. But this is a different story. I will open up a new post for this. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Why a variable inside a private inner class can't get value of a private variable that has value from AsynCallback method in Gwt?
I found this very weird behavior in Gwt. Ok, I have a simple TestPresenter.java that have 2 buttons. Button 1 get data from DB and return value via Asyncallback method. Button 2 is to retrive that value from a private inner class. private String test1;private String test2;private AsyncCallbackGetArticleResult getArticleCallback=new AsyncCallbackGetArticleResult(){@Override public void onFailure(Throwable caught) { // TODO Auto-generated method stub loadingPresenter.hide(); } @Override public void onSuccess(GetArticleResult result) { test1=result.getVal(); test2=123; }};private class InlineHTMLContextMenuHandler implements ContextMenuHandler { @Override public void onContextMenu(ContextMenuEvent event) { System.out.println(test1); System.out.println(test2); }} Now, i click the Button 1 first it get Data from DB ok, then I click the button 2. Then i get the output:test1=Null; test2=123; when debugging the test1 show real value, not null. For test1 variable, If i access it from a method normally then it will be fine but if accessing it from private inner class then I can't get its value. What wrong? this so weird? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: GWT project structure to reduce compile time
Are all your modules actually producing JavaScript you are going to run? If not then you don't need to GWT compile those? To do the clever optimisation GWT does it looks at the source for all the client code. So I don't think you would save a lot re-structuring (if you really need to produce JavaScript each time). On Wednesday, December 11, 2013 4:00:36 PM UTC, Beatriz Nombela wrote: Hi! I'm trying to reduce the compile time of a GWT project on jenkins. My project structure can be summarized to the following one: - module_1: jar and GWT module - module_2: multimodule maven project, each submodule is a jar, and each one contains a GWT module. Each GWT module inherits from module_1 - module_3: war, contains a GWT module that inherits from module_2 The problem with this structure is the moment when everything is compiled on jenkins: - module_1 compiles - module_2 compiles, and accordingly module_1 is compiled again - module_3 compiles, and accordingly each submodule in module_2 is compiled, and at the same time module_1 is compiled again some more times My goal is to avoid recompiling some of the modules so many times. I'd like to know whether the GWT modules are well structured or not, so I could focus on restructuring GWT modules or in Jenkins side. Thanks in advance! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ERROR] Resource xyz.jpg not found when running codeserver - works without codeserver (gwt2.51)
On Monday, December 16, 2013 2:09:06 PM UTC+1, Olaf Raether wrote: Thanks, your hint brought me back on the track. I added the related projects to the buildpath and the errors went away. Now everything is fine, except that I only get a list of files when i click on module after opening the codeserver url. See http://stackoverflow.com/a/18333050/116472 for a step-by-step explanation how to use superdevmode. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Some advice to argue for GWT vs JSF
So it would have been totally safe to bet the farm on EJB2.1 because that is here for good? CORBA inside JSE! On Friday, December 13, 2013 1:35:27 AM UTC, Willie Slepecki wrote: My team just wrapped up an evaluation comparing gwt to jsf to be used in a new series of applications we are planning. My team chose pure gwt over jsf and vaadin for a variety of reasons. Our problem is two of the primary decision makers are convinced that gwt is going to dilute and within 7 to 10 years be irrelevant and ended as a product. Where did they get this idea? A blog. Post obviously. On the other hand, since jsf is part of jee, it's going to be alive and vibrant forever. I'm not asking to argue the validity of their claims I already know why they say that and it's political, not technological. What I'm asking is, can you help me come up with an idea to impress upon the other members of the selection committee that this idea is unfounded and gwt would be a safe choice?I already. Have the vaadin report they generate, but that I fear isn't going to hold much weight. Maybe some records from red hat saying how many developers are dedicated to the project, estimated annual budget senscia is spending on gwt core development, stung like that is what these guys will care about. Any ideas? Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ERROR] Resource xyz.jpg not found when running codeserver - works without codeserver (gwt2.51)
thanks again, i found this - good sample too: http://lumpofcode.blogspot.com/2012/11/configuring-gwt-codeserver-and.html now everything is working fine. The only thing that is a little bit disappointing is, that I codeserver can´t handle script src=/script within module files -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Layout with nested SplitLayoutPanel
Hi Patrick, nothing happens. What am I doing wrong? Magnus - public class PortalPanel extends Composite implements RequiresResize { private static PortalPanelUiBinder uiBinder = GWT.create (PortalPanelUiBinder.class); @UiField SplitLayoutPanel slp_Outer; @UiField SplitLayoutPanel slp_North; interface PortalPanelUiBinder extends UiBinderWidget, PortalPanel { } public PortalPanel() { initWidget (uiBinder.createAndBindUi (this)); } public void resetSplitters () { int pys = this.getOffsetHeight (); int ys = pys / 2; // Window.alert (ys: + ys); // it's a non zero height when called from within onResize slp_North.setHeight (ys + px); } @Override public void onResize() { resetSplitters (); } } - !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui ui:style /ui:style g:SplitLayoutPanel ui:field=slp_Outer g:north size='150' unit='PX' g:SplitLayoutPanel ui:field=slp_North g:west size='150' unit='PX' g:FlowPanel g:Label text=west / /g:FlowPanel /g:west g:center g:FlowPanel g:Label text=center / /g:FlowPanel /g:center /g:SplitLayoutPanel /g:north g:center g:FlowPanel g:Label text=main / /g:FlowPanel /g:center /g:SplitLayoutPanel /ui:UiBinder -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Layout with nested SplitLayoutPanel
Try add a docklayoutPanel outside. 2013/12/16 Magnus alpineblas...@gmail.com Hi Patrick, nothing happens. What am I doing wrong? Magnus - public class PortalPanel extends Composite implements RequiresResize { private static PortalPanelUiBinder uiBinder = GWT.create (PortalPanelUiBinder.class); @UiField SplitLayoutPanel slp_Outer; @UiField SplitLayoutPanel slp_North; interface PortalPanelUiBinder extends UiBinderWidget, PortalPanel { } public PortalPanel() { initWidget (uiBinder.createAndBindUi (this)); } public void resetSplitters () { int pys = this.getOffsetHeight (); int ys = pys / 2; // Window.alert (ys: + ys); // it's a non zero height when called from within onResize slp_North.setHeight (ys + px); } @Override public void onResize() { resetSplitters (); } } - !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui ui:style /ui:style g:SplitLayoutPanel ui:field=slp_Outer g:north size='150' unit='PX' g:SplitLayoutPanel ui:field=slp_North g:west size='150' unit='PX' g:FlowPanel g:Label text=west / /g:FlowPanel /g:west g:center g:FlowPanel g:Label text=center / /g:FlowPanel /g:center /g:SplitLayoutPanel /g:north g:center g:FlowPanel g:Label text=main / /g:FlowPanel /g:center /g:SplitLayoutPanel /ui:UiBinder -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: GWT project structure to reduce compile time
Yep, all modules produce the javascript code that I'm going to run. In that case I'll keep the current structure I have. Thanks! El lunes, 16 de diciembre de 2013 15:00:17 UTC+1, salk31 escribió: Are all your modules actually producing JavaScript you are going to run? If not then you don't need to GWT compile those? To do the clever optimisation GWT does it looks at the source for all the client code. So I don't think you would save a lot re-structuring (if you really need to produce JavaScript each time). On Wednesday, December 11, 2013 4:00:36 PM UTC, Beatriz Nombela wrote: Hi! I'm trying to reduce the compile time of a GWT project on jenkins. My project structure can be summarized to the following one: - module_1: jar and GWT module - module_2: multimodule maven project, each submodule is a jar, and each one contains a GWT module. Each GWT module inherits from module_1 - module_3: war, contains a GWT module that inherits from module_2 The problem with this structure is the moment when everything is compiled on jenkins: - module_1 compiles - module_2 compiles, and accordingly module_1 is compiled again - module_3 compiles, and accordingly each submodule in module_2 is compiled, and at the same time module_1 is compiled again some more times My goal is to avoid recompiling some of the modules so many times. I'd like to know whether the GWT modules are well structured or not, so I could focus on restructuring GWT modules or in Jenkins side. Thanks in advance! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Layout with nested SplitLayoutPanel
I'm pretty sure your problem is above PortalPanel. I will try to put all of the pieces together tonight. On Monday, December 16, 2013 11:49:50 AM UTC-5, Magnus wrote: Hi Patrick, nothing happens. What am I doing wrong? Magnus - public class PortalPanel extends Composite implements RequiresResize { private static PortalPanelUiBinder uiBinder = GWT.create (PortalPanelUiBinder.class); @UiField SplitLayoutPanel slp_Outer; @UiField SplitLayoutPanel slp_North; interface PortalPanelUiBinder extends UiBinderWidget, PortalPanel { } public PortalPanel() { initWidget (uiBinder.createAndBindUi (this)); } public void resetSplitters () { int pys = this.getOffsetHeight (); int ys = pys / 2; // Window.alert (ys: + ys); // it's a non zero height when called from within onResize slp_North.setHeight (ys + px); } @Override public void onResize() { resetSplitters (); } } - !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui ui:style /ui:style g:SplitLayoutPanel ui:field=slp_Outer g:north size='150' unit='PX' g:SplitLayoutPanel ui:field=slp_North g:west size='150' unit='PX' g:FlowPanel g:Label text=west / /g:FlowPanel /g:west g:center g:FlowPanel g:Label text=center / /g:FlowPanel /g:center /g:SplitLayoutPanel /g:north g:center g:FlowPanel g:Label text=main / /g:FlowPanel /g:center /g:SplitLayoutPanel /ui:UiBinder -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Super Dev Mode - Mac 10.9, Eclipse (Kepler), Oracle JDK 1.7.0_45
I'm trying to connect Eclipse (Kepler) running on my Mac (OSX 10.9) using super dev mode. When I try to launch my debug configuration, I get the following: workDir: /var/folders/rm/5_qww_6j2d734y94k758fh50gn/T/gwt-codeserver-7672352643087966792.tmp Module setup completed in 766 ms java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V at org.eclipse.jetty.util.log.JettyAwareLogger.log(JettyAwareLogger.java:607 ) at org.eclipse.jetty.util.log.JettyAwareLogger.warn( JettyAwareLogger.java:431) at org.eclipse.jetty.util.log.Slf4jLog.warn(Slf4jLog.java:69) at org.eclipse.jetty.util.component.AbstractLifeCycle.setFailed( AbstractLifeCycle.java:204) at org.eclipse.jetty.util.component.AbstractLifeCycle.start( AbstractLifeCycle.java:74) at com.google.gwt.dev.codeserver.WebServer.start(WebServer.java:131) at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:101) at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:71) at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:49) and the Jetty based super dev mode web server (within Eclipse) fails to start. I've got an equivalent setup on Linux (openSuSE 13.1 64bit, Eclipse (Kepler), Oracle JDK 1.7.0_45 64bit, same source code, same debug configuration) that starts and debugs fine. Questions: 1) Is there anything special I need to do on a Mac to get super dev mode to work? 2) Which Java Application launcher should Eclipse be using? On Linux, it doesn't give me a choice in the debug configuration dialog. When I look in Eclipse - Preferences - Run/Debug - Launching - Default Launchers in Linux, the only options there are for JUnit. On my Mac, I see Java Application options and the one selected is Eclipse JDT Launcher. Is that correct? Any other ideas to what to look for here? I've compared the project class paths, line by line, and they're identical, other than the differences in the JDKs. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Super Dev Mode - Mac 10.9, Eclipse (Kepler), Oracle JDK 1.7.0_45
I would guess your classpath is different as it looks like you have either no or a wrong version of SLF4J on classpath. Or you have two versions of SLF4J on classpath and on your linux host the ordering was different. Keep in mind that you can only debug SuperDevMode itself in your IDE but not your GWT app. You app is always compiled to JS when using SuperDevMode and you have to debug it inside your browsers Dev tools. So if you do not want to debug SuperDevMode itself you don't need to use a Debug run configuration. I never configured anything in Eclipse - Preferences - Run/Debug - Launching - Default Launchers. In fact in my Eclipse this Default Launchers view is empty. You need to go to Run - Run Configurations... and then create a run configuration of type Java Application. http://stackoverflow.com/questions/18330001/super-dev-mode-in-gwt/18333050#18333050 http://lumpofcode.blogspot.de/2012/11/configuring-gwt-codeserver-and.html -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Suggestions for transferring a GWT project to javascript?
I have a pretty large project that's over 7 years old that has used GWT from the very early days and is nearly 100% GWT (i.e., there's very little manually written javascript). However, we'd like to transition the client to be written in javascript, but if possible, we'd like to retain the GWT services (i.e., the serialization). Basically, we'd like to keep all of the RemoteService, RemoteServiceAsync, and RemoteServiceServlet (and the accompanying object serialization) but write the client / visualization portions manually in javascript. Is there any way to divorce the data serialization from the visualization without the messiness of JSNI? Note that we don't have any problem with GWT, it's actually been great in most every way, but at this point we have many more javascript developers that are uncomfortable with java and it's hard to get the level of contribution we need to the project in its current state. Thanks! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Suggestions for transferring a GWT project to javascript?
gwt-exporter might help you to export an API that your JS developers can use. For example you could export the model and services to JS. https://code.google.com/p/gwt-exporter/ -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Textbox width according to the characters present in the textbox.
Hi, I need to set the size of the text box according to the length of the text inside that box, it may contain localized characters like Chinese. Is any we can calculate the length in pixels for this? Thank you, Parag -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] GWT,jsni() implemented as rebinding method
This morning I read the Goktug's slides and was surprised by the GWT.jsni() method. It is a nice use case for rebinding methods. I just added a version of GWT.jsni() to HelloRebinding sample, implementing it as a rebinding method (no compiler mods). It took me just 30 minutes of coding to add an extension to support this: JsniUtil.jsni($wnd.alert(#), message); - Usage: https://github.com/andrestesti/gwt-rebindingmethods/blob/master/samples/hellorebinding/src/com/google/gwt/sample/hellorebinding/client/MainWidget.java#L65 - Definition:https://github.com/andrestesti/gwt-rebindingmethods/blob/master/samples/hellorebinding/src/com/google/gwt/sample/hellorebinding/client/util/JsniUtil.java#L38 - Generator: https://github.com/andrestesti/gwt-rebindingmethods/blob/master/samples/hellorebinding/src/com/google/gwt/sample/hellorebinding/rebind/JsniSnippetGenerator.java#L32 Regards. - Andrés Testi -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [gwt-contrib] GWT,jsni() implemented as rebinding method
I actually implemented with simple eval for demonstration purposes but probably yours is preferable :) Yes, GWT.jsni is one of the use cases for method rebinding; that was something I was discussing as part of the original discussion. In reality GWT.jsni is better to be implementable without native method definitions so we could eventually take native methods out of the compiler. There are also other use cases like String.format, GWT.debugger and GWT.create itself. The ideal solution should cover all to avoid redundant features in the SDK. On Mon, Dec 16, 2013 at 10:00 AM, Andrés Testi andres.a.te...@gmail.comwrote: This morning I read the Goktug's slides and was surprised by the GWT.jsni() method. It is a nice use case for rebinding methods. I just added a version of GWT.jsni() to HelloRebinding sample, implementing it as a rebinding method (no compiler mods). It took me just 30 minutes of coding to add an extension to support this: JsniUtil.jsni($wnd.alert(#), message); - Usage: https://github.com/andrestesti/gwt-rebindingmethods/blob/master/samples/hellorebinding/src/com/google/gwt/sample/hellorebinding/client/MainWidget.java#L65 - Definition:https://github.com/andrestesti/gwt-rebindingmethods/blob/master/samples/hellorebinding/src/com/google/gwt/sample/hellorebinding/client/util/JsniUtil.java#L38 - Generator: https://github.com/andrestesti/gwt-rebindingmethods/blob/master/samples/hellorebinding/src/com/google/gwt/sample/hellorebinding/rebind/JsniSnippetGenerator.java#L32 Regards. - Andrés Testi -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [gwt-contrib] GWT,jsni() implemented as rebinding method
On Mon, Dec 16, 2013 at 12:14 PM, Andrés Testi andres.a.te...@gmail.comwrote: Well, there is a sample for String.format() in the prototype: https://github.com/andrestesti/gwt-rebindingmethods/blob/master/samples/hellorebinding/src/com/google/gwt/sample/hellorebinding/client/util/Strings.java#L39 I agree, method rebinding should eliminate the need of magic methods and simplify the compiler. GWT.debugger() is a controvesial case because Java doesn't has a semantically equivalent for it.. Yes, that is also true for the GWT.jsni case. I think at the end there should be 2 types of rewriters; one for java and one for javascript and they should do real method replacement. Developer can choose either one. It looks like you are really interested in this. Can you also improve your proposal with real method rewriting? - Andrés Testi El lunes, 16 de diciembre de 2013 16:48:52 UTC-3, Goktug Gokdogan escribió: I actually implemented with simple eval for demonstration purposes but probably yours is preferable :) Yes, GWT.jsni is one of the use cases for method rebinding; that was something I was discussing as part of the original discussion. In reality GWT.jsni is better to be implementable without native method definitions so we could eventually take native methods out of the compiler. There are also other use cases like String.format, GWT.debugger and GWT.create itself. The ideal solution should cover all to avoid redundant features in the SDK. On Mon, Dec 16, 2013 at 10:00 AM, Andrés Testi andres@gmail.comwrote: This morning I read the Goktug's slides and was surprised by the GWT.jsni() method. It is a nice use case for rebinding methods. I just added a version of GWT.jsni() to HelloRebinding sample, implementing it as a rebinding method (no compiler mods). It took me just 30 minutes of coding to add an extension to support this: JsniUtil.jsni($wnd.alert(#), message); - Usage: https://github.com/andrestesti/gwt- rebindingmethods/blob/master/samples/hellorebinding/src/ com/google/gwt/sample/hellorebinding/client/MainWidget.java#L65 - Definition: https://github.com/andrestesti/gwt- rebindingmethods/blob/master/samples/hellorebinding/src/ com/google/gwt/sample/hellorebinding/client/util/JsniUtil.java#L38 - Generator: https://github.com/andrestesti/gwt- rebindingmethods/blob/master/samples/hellorebinding/src/ com/google/gwt/sample/hellorebinding/rebind/ JsniSnippetGenerator.java#L32 Regards. - Andrés Testi -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com . For more options, visit https://groups.google.com/groups/opt_out. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.