gwt

GXT (Ext-GWT): Layout problems with ContentPanel

牧云@^-^@ 提交于 2019-12-22 05:17:16
问题 I have a ContentPanel that fits the entire window. It has a topComponent, a widget in the center, and a bottomComponent. I'm getting layout problems, when I try to add widgets to the topComponent after the ContentPanel has been rendered once: public void onModuleLoad() { final Viewport viewport = new Viewport(); viewport.setLayout(new FitLayout()); final ContentPanel contentPanel = new ContentPanel(new FitLayout()); contentPanel.setHeaderVisible(false); final LayoutContainer topContainer =

How to register Custom HTML Element as widget in GWT

那年仲夏 提交于 2019-12-22 05:05:04
问题 Hi folks Did someone have any idea how to register custom html element as GWT widget uiBinder and use them directly in place of using in HTMLPanel. For e.g. if I'm using Google Polymer in my mgwt project I'm using custom html element as <g:HTMLPanel > <paper-shadow class="{style.card}"> <mgwt:touch.TouchPanel ui:field="touchPanel"> <mgwt:panel.flex.FlexPanel orientation="VERTICAL" alignment="CENTER"> <g:Image url="{global.getDirection.getSafeUri.asString}" /> <g:HTMLPanel>Take me to Deal</g

Validating GWT components takes forever

☆樱花仙子☆ 提交于 2019-12-22 04:44:14
问题 Validating GWT components process in Eclipse takes ages, almost impossible to do productive work. I have selected from my Eclipse->Window->Preferences->Validators : selected Supend all validators still Eclipse validates GWT components which is painfully slow. How can I fix this? It's very hard when eclipse just validates the whole application every time I save. 回答1: We had the same phenomenon. Upgrading to Eclipse Juno/4.2 fixed the problem for us. Another possible solution is described here.

Which is the difference between $doc.getElementById(“id”) and document.getElementById(“id”) in JSNI

笑着哭i 提交于 2019-12-22 04:42:48
问题 I'm working in a native function inside a GWT application and I've tried this two methods: document.getElementById("id") returns null but $doc.getElementById() returns a valid element. Which is the difference (conceptually) between this methods? Thanks in advance. 回答1: The code of your GWT app runs in a (hidden) iframe, so document references that iframe's document (and window the iframe's browsing context). GWT thus initializes the variables $doc and $wnd to let you easily reference the

How to download a file using GWT client?

做~自己de王妃 提交于 2019-12-22 04:16:23
问题 What is the best way to download a pdf file using GWT client ? Should I invoke a normal servlet to do that ? or is there a different preferred approach to handle this problem ? I am new to GWT, so if some sample code would be of great help. Thanks Deep 回答1: Try it with GET... Window.open(GWT.getHostPageBaseURL() + "FileRepository/doDownload?docId=" + dokument.getId(), "", ""); 回答2: You can implement a Servlet download the file OR you can do that using Data URIs: Make your GWT RPC method

how to get locale information on a GWT application

…衆ロ難τιáo~ 提交于 2019-12-22 04:12:28
问题 In GWT I have to specify what locales are supported in my application. The code get compiled in various files, one for each locale (beside other versions), but I have to give my clients one only URL. This URL is supposed to be a page that should be displayed according to the locale preferred by the browser. I dont't want to have an HTTP parameter for the locale since I want to forse the locale preferred by the browser. How can this be coded in GWT? Should I try to to this using apache rewrite

GWT - How to layout components horizontally in a FlowPanel?

两盒软妹~` 提交于 2019-12-22 03:55:30
问题 The GWT documentation recommends using a FlowPanel (float: left set on its children) as a replacement for the HorizontalPanel to layout components. But how to do this? 回答1: Says so right in the docs: and to use the float: left; CSS property on its children. How to set a style on GWT widget: widget.getElement().getStyle().setProperty("float", "left"); 回答2: To avoid using HorizontalPanel I use the following code where possible: FlowPanel panel = new FlowPanel() { @Override public void add

Spring Boot + GWT embedded configuraiton

♀尐吖头ヾ 提交于 2019-12-22 03:22:18
问题 I want to configure Spring Boot Embedded Servlet Container + GWT. The way I want is either create a jar/war file that just contains the compiled gwt files & static resources. I want to load jars from lib/* and config files from classpath. I couldn't find any working example. There is one actually, https://github.com/Ekito/spring-boot-gwt, but all the dependencies and configs are still in the war. Can someone suggest a solution ? 回答1: After long search & test, here is the solution that I come

Spring Boot + GWT embedded configuraiton

扶醉桌前 提交于 2019-12-22 03:22:12
问题 I want to configure Spring Boot Embedded Servlet Container + GWT. The way I want is either create a jar/war file that just contains the compiled gwt files & static resources. I want to load jars from lib/* and config files from classpath. I couldn't find any working example. There is one actually, https://github.com/Ekito/spring-boot-gwt, but all the dependencies and configs are still in the war. Can someone suggest a solution ? 回答1: After long search & test, here is the solution that I come

GWT link button

你说的曾经没有我的故事 提交于 2019-12-22 01:58:37
问题 How to I make a hyperlink that functions as a button? Or how do I make a button that looks like a hyperlink? 回答1: One easy way is to use the Label class. Just create a new label and add a ClickHandler to it. You can then style it however you want using CSS: Label lbl = new Label("Hello"); lbl.addClickHandler(...); lbl.setStyleName("hyperlink_style_label"); 回答2: As of GWT 1.5, there is an Anchor widget that should do what you want. 回答3: I also found you can use the anchor class. add a click