gwt

calling servlet on submiting formpanel in gwt

我的梦境 提交于 2020-01-01 16:53:07
问题 I am trying to call a servlet when submitting the FormPanel in GWT.I am setting the url on form.setAction("myurl") and also done mapping on the web.xml but while on the form suvmit the servlet is not called.Here is the code: public class MainEntryPoint implements EntryPoint { public void onModuleLoad() { AbsolutePanel panel=new AbsolutePanel(); FileUpload upload = new FileUpload(); upload.setName("file"); final FormPanel form = new FormPanel(); form.setWidget(panel); form.setMethod(FormPanel

GWT Listbox Multi Select

一个人想着一个人 提交于 2020-01-01 16:45:55
问题 I need to add a listbox / combobox which allows the user to choose several values. I know there is one already available in the GWT API ListBox with isMultipleSelect() set to true. But I am not getting any direct way to get all selected reocrds from list box. Some tutorials on google are sugeesting implement ChangeHandler 's onChange method. I think there should be some other way. Any pointers would be appreciated. 回答1: Create your own small subclass of ListBox offering a method like public

Gwt: Run as desktop application

谁说胖子不能爱 提交于 2020-01-01 16:41:27
问题 We decided to write client side application using Ext GWT it is good and powerful framework, but currently client wants to create desktop application, So, my question is Are there any solutions to start GWT application as Desktop? P.S I've found one project calls gwt-in-the-air but want opinion of professionals :) Thanks. 回答1: Depending on your needs, you should be able to package a GWT app as an Adobe AIR or Appcelerator Titanium Desktop application without any modification. IIRC, there's

Gwt: Run as desktop application

不羁岁月 提交于 2020-01-01 16:41:08
问题 We decided to write client side application using Ext GWT it is good and powerful framework, but currently client wants to create desktop application, So, my question is Are there any solutions to start GWT application as Desktop? P.S I've found one project calls gwt-in-the-air but want opinion of professionals :) Thanks. 回答1: Depending on your needs, you should be able to package a GWT app as an Adobe AIR or Appcelerator Titanium Desktop application without any modification. IIRC, there's

GWT call to DOM.getElementById not causing a NullPointerException when it should

断了今生、忘了曾经 提交于 2020-01-01 12:13:34
问题 There is a part of our application that does this... int x = DOM.getElementById("x").getPropertyInt("value"); int y = DOM.getElementById("y").getPropertyInt("value"); int w = DOM.getElementById("w").getPropertyInt("value"); int h = DOM.getElementById("h").getPropertyInt("value"); Every call to DOM.getElemendById("something") returns null (which I expect as I removed them) but calling .getPropertyInt("value") on that return value of null is not causing a NullPointerException. In dev mode I am

How to scroll a GWT TextArea?

北城以北 提交于 2020-01-01 12:11:16
问题 I am calling com.google.gwt.user.client.ui.TextArea.setText(myText) to set the content. After that I call setCursorPosition(myText.length()) to get the cursor to the end. This works well. When myText has more lines then the text area can display at once, it shows a scroll bar. But it does not scroll to the cursor position. Even worse - it scrolls to the top. How can I scroll the GWT TextArea to the cursor position? I realy need the cursor position, not the bottom of the TextArea. A JSNI

How to scroll a GWT TextArea?

拜拜、爱过 提交于 2020-01-01 12:10:47
问题 I am calling com.google.gwt.user.client.ui.TextArea.setText(myText) to set the content. After that I call setCursorPosition(myText.length()) to get the cursor to the end. This works well. When myText has more lines then the text area can display at once, it shows a scroll bar. But it does not scroll to the cursor position. Even worse - it scrolls to the top. How can I scroll the GWT TextArea to the cursor position? I realy need the cursor position, not the bottom of the TextArea. A JSNI

Debugging GWT applications outside of dev mode?

醉酒当歌 提交于 2020-01-01 12:09:12
问题 I seem to recall seeing someone attach a Java debugger to a compiled / deployed GWT application in a screencast. Is this possible? I'm finding some sparse mentions of configuring a special "debug module" that extends your regular one, but details are thin. Thanks! 回答1: You can use dev mode to debug deployed application BUT you will debug using your current code (from eclipse) instead of the deployed one. How? Just like with debugging on localhost, change url and it's done: http://your-test-or

GWT - What's the shortest way of simply sharing strings and number constants between Java code and UiBinder files?

社会主义新天地 提交于 2020-01-01 12:05:25
问题 Can someone post an example of the shortest way of sharing a (preferably static final) string or number constant between Java code and UiBinder XML, where I can use the constant either in an attribute: <g:TextArea width="...px"/> or in a value: <g:Label>...</g:Label> I can't seem to find an example of this, only text from a file, which I don't want. 回答1: static fields (and enum constants) can be used with a simple <ui:import> : <ui:import field="com.example.Pojo.CONSTANT" /> or <ui:import

GWT - What's the shortest way of simply sharing strings and number constants between Java code and UiBinder files?

删除回忆录丶 提交于 2020-01-01 12:05:02
问题 Can someone post an example of the shortest way of sharing a (preferably static final) string or number constant between Java code and UiBinder XML, where I can use the constant either in an attribute: <g:TextArea width="...px"/> or in a value: <g:Label>...</g:Label> I can't seem to find an example of this, only text from a file, which I don't want. 回答1: static fields (and enum constants) can be used with a simple <ui:import> : <ui:import field="com.example.Pojo.CONSTANT" /> or <ui:import