gwt

GWT JSNI javascript to Java not working

不羁的心 提交于 2019-12-30 10:59:18
问题 I am trying to invoke a Java Method from my Javascript code. This is for a Windows Phone 7 app using Phonegap. I have the following in my javascript code. document.addEventListener("backbutton", onBackKeyDown, false); function onBackKeyDown(){ } And in my Java code I have the following. public static native void exportStaticMethod() /*-{ $wnd.onBackKeyDown = $entry(this.@com.mycompany.myapp.client.MyApp::hideSettingsWidgets()); }-*/; Then in the on onModuleLoad() I am calling it like so:

GWT Wizards are not showing in the eclipse Wizards menu

穿精又带淫゛_ 提交于 2019-12-30 10:51:00
问题 The google documentation http://code.google.com/webtoolkit/tools/gwtdesigner/wizards/gwt/uibinder_dialogbox.html shows GWT wizards in eclipse, however, on my system this is not displayed. How do I get them to show? Google docs My System I definitely have GWT installed in eclipse and can run GWT projects Here are my updated sites from the Help menu Eclipse 3.7 WindowBuilder Repo http://download.eclipse.org/windowbuilder/WB/integration/3.7 Enabled GWT Framework http://dl.google.com/eclipse

Objectify queries: filter by date

会有一股神秘感。 提交于 2019-12-30 10:48:14
问题 I am using GAE and I need to write an Objectify query that asks for the elements created after September 1st. The dateCreated field is Java.util.Date and it is stored in this format 2012-11-29 16:03:59.494000. This request is NOT working: public List<MyElement> listAllFromUser(String userId) { Objectify ofy = ObjectifyService.begin(); Query<MyElement> q=ofy.query(MyElement.class).filter("dateCreated >", "2013-09-01 00:00:00"); List<MyElement> results = q.list(); return results; } 回答1: Your

Enable CORS for tomcat applications with credentials support

和自甴很熟 提交于 2019-12-30 09:59:10
问题 I have a simple GWT application running from IIS on my server. I am trying to test HTTP requests to tomcat running on the same server. However, since both the application servers are running on different ports, my browser (chrome and firefox) treats the requests as a CORS request. To enable tomcat to accept CORS request, I updated it to Tomcat 7.0.52 and enabled the CORS filter in the global web.xml configuration. I tested this simple setup and it seems to work. Here is the code in GWT:

GWT Cell tree, how to use?

房东的猫 提交于 2019-12-30 09:59:07
问题 Can somebody explains how to use the GWT cell tree. I am trying to google it but not finding any valuable tutorial?? Thanks 回答1: Try; Google Example 1 includes onModuleLoad method. :) 回答2: For those who don't like the google showcase example like me can use this example; http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/cellview/client/CellTree.html you can just copy paste it and it works. " Trivial example public class CellTreeExample implements EntryPoint { /** *

Use ClientBundle in a large Enterprise Application?

巧了我就是萌 提交于 2019-12-30 08:33:23
问题 We're building a large enterprise application (dozens of modules) with GWT and need to decide whether to use ClientBundle or not. I was curious what pros/cons the StackOverflow GWT community view as deal makers and deal breakers for such a use case. As far as we see it currently: Pros All images/css files that take up server resources to download are eliminated Client loads faster because of the above (i.e. inlined image urls) CSS names are obfuscated, so namespace collisions are eliminated

GWT - What to put in the shared folder?

感情迁移 提交于 2019-12-30 07:01:26
问题 I'm still unsure on what to put into the shared folder. If I'm doing RPC requests, and sending Pojos from the client to the server and vice versa, do I have to put them into the shared folder (because they are used by both - client and server). EDIT Maybe I've used the wrong term but when I said Pojo I actually meant DTO . 回答1: You don't have to put the RPC POJOs in a shared folder but if you keep them in the client folder, the server would be dependent on the client package because the Pojos

GWT CellTable - set column width

╄→гoц情女王★ 提交于 2019-12-30 05:44:04
问题 Is it possible to set the column width of CellTable in GWT? 回答1: EDIT: As of GWT 2.2 table.setWidth and table.setColumnWidth are supported table.setWidth("100%", true); table.setColumnWidth(nameColumn, 35.0, Unit.PCT); table.setColumnWidth(addressColumn, 65.0, Unit.PCT); I was able to extend the CellTable with a method that sets the widths programmatically. It's a bit of a hack since all the real methods that should do this are private to CellTable and it seems like GWT should provide this

How to limit the available Date ranges with the com.google.gwt.user.datepicker.client.DateBox

一个人想着一个人 提交于 2019-12-30 04:44:06
问题 I need to limit what Dates a user can pick from the com.google.gwt.user.datepicker.client.DateBox . I can't seem to figure out how to limit the min Date so they can't pick past dates. If I can't do this with com.google.gwt.user.datepicker.client.DateBox is there an alternative DateBox widget that will allow me this kind of flexibility? 回答1: Based on the suggestions I received, here is what I came up with that works on limiting the selectable dates to only the current day and after. This works

Eclipse - How to fix error “No persistence.xml file found in project” JPA issue

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-30 04:00:09
问题 Error "No persistence.xml file found in project" in Eclipse. Aim: Create a new project GWT+App engine+Maven Steps to create this: Google eclipse plugin: select "New Web Application Project". set the name etc. right-click on the project > Configure > Convert to Maven... Fix jdoconfig.xml file: xsi has the wrong value. see Validating jdoconfig with incorrect url Then I get the above error. The file exists at scr/META-INF/persistence.xml and also war/WEB-INF/classes/META-INF/persistence.xml But