gwt

How to correctly implement a DAO in a GWT web app?

做~自己de王妃 提交于 2019-12-24 08:10:13
问题 I have a couple of questions to be answered relating DAOs and GWT. I'm implementing a DAO class in the GWT project and I want to use it when a button is pressed, like this: (inside the .java GWT class) lookUpButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { lookup(); } }); ... ... ... private void lookup() { PersonDao dao = new PersonDao(); Person m = dao.getPerson(3); //hard-coded the pk of the person resultsFlexTable.setText(1, 0, m.toString()); I get two

RestyGWT Polymorphic Encode/Decode issues when using an interface instead of an abstract class

扶醉桌前 提交于 2019-12-24 07:29:46
问题 According to RestyGWT documentation one must use an abstract super class for this to work, for instance, given: @JsonSubTypes(@Type(value=PersonImpl.class, name="PersonImpl")) @JsonTypeInfo(use=Id.NAME, include=As.PROPERTY, property="@class") public abstract class Person{ public abstract String getName(); public abstract void setName(String name); } @JsonTypeName("PersonImpl") public class PersonImpl extends Person{ private String name; @Override public final String getName() { return name; }

Remove URL parameters in GWT

China☆狼群 提交于 2019-12-24 06:58:11
问题 My landing page (HTML) communicates with a GWT app via URL with one parameter login , so depending on the button you press on the landing page it will redirect to http://myapp.appspot.com?login=1 (or 2 or 3). In the GWT app I process that parameter but I need to remove it from URL without reloading the webpage. Is there a way to do this? If not, can I pass this parameter in a different way to my GWT app? Thanks 回答1: I think that you cannot change the parameter without reloading. But your GWT

SVG using CSS3 animations in GWT

非 Y 不嫁゛ 提交于 2019-12-24 06:44:27
问题 I have an SVG image inside my GWT application. For this I'm using lib-gwt-svg. I can target elements by ids, add styles to them, no problem with that. But I tried to animate using "skewX" and that is, what went wrong. I have a barrier, that I want to open using that skewX property. I add the style, it animates to open. It also closes without problem. But when I change the presenter, and then return back to the SVG image, the barrier moves to different position. It can be fixed by closing and

Integrate gzip with GWT

五迷三道 提交于 2019-12-24 05:59:19
问题 I want to use gzip with GWT Please suggest how do i compress my GWT nocache.js,cache.html and gwt.rpc files using gzip Please help me Thanks 回答1: Generally, gzip is enabled on the server that your files are being hosted on, and you can do it for all files on your site rather than just those 3. This site helps you test whether gzip is enabled on your site: http://www.whatsmyip.org/http_compression/ Here's how to turn gzip on with the Apache web server: http://httpd.apache.org/docs/2.0/mod/mod

Non-Rectangular Image GWT Button

强颜欢笑 提交于 2019-12-24 05:53:05
问题 I am trying to create a custom GWT Button based on an image. I have an image that is not rectangular, something like this: Now, I want the click-able area to only work inside the visible parts of the image (non-transparent areas). This would mean that it's possible for someone using the button to click in the transparent corners of the image (Button) and not trigger the click event on the Button. Is this possible without having to create a custom widget (and the HTML to go with it)? I would

Gwt TextInputCell doesn't show changed value

两盒软妹~` 提交于 2019-12-24 05:31:22
问题 I have a CellTable with a column of TextInputCells. When i set the value through the UI, manually, the bean is modified. But, then, when i set the value directly into the bean, i can't make the Table to show the modification. It will always keep what i assigned manually. Here's my column : FieldUpdater<MyBean, String> myFu = new FieldUpdater<MyBean, String>() { @Override public void update(int index, MyBean object, String value) { object.setValue(value); } }; Column<MyBean, String> myCol =

GWT DeckLayoutPanel animation goes into infinite loop on Chrome

狂风中的少年 提交于 2019-12-24 05:25:34
问题 Following code results in the infinite animation on the latest (24.0.1312.52) version of Chrome. Same code runs well with FF/IE. public class Test implements EntryPoint { @Override public void onModuleLoad() { DeckLayoutPanel deck = new DeckLayoutPanel(); deck.setWidth("100%"); deck.setHeight("100px"); deck.setAnimationDuration(3000); deck.setWidget(new Label("Hello world")); RootLayoutPanel.get().add(deck); } } Has anyone else encountered this problem as well? 回答1: This is a bug in GWT 2.4

Eclipse hangs while opening workspace after upgrading to GWT 2.0/Google app engine 1.2.8

和自甴很熟 提交于 2019-12-24 05:12:14
问题 After upgrading to the newest GWT/Google app engine I have problems opening my workspace in Eclipse. On startup, Eclipse hangs almost immediately and needs to be closed. This happens only in the workspace where I use GWT with app engine, and I weren't able to consistently reproduce it - sometimes it starts normally, and sometimes I need to kill the proces and restart it. There is nothing in Eclipse error log. Eclipse version is Galileo, running on Windows 7 RC. Anyone else had similar

prevent bakspace event in web browser

十年热恋 提交于 2019-12-24 05:10:12
问题 When I press Backspace, Web-browser will go to previous page. How can I disable it only for this issue but backspace must work for text box .this problem in firefox 28 please give answer in gwt or java script 回答1: I got this example try this: pure javascript: function suppressBackspace(evt) { evt = evt || window.event; var target = evt.target || evt.srcElement; if (evt.keyCode == 8 && !/input|textarea/i.test(target.nodeName)) { return false; } } document.onkeydown = suppressBackspace;