gwt

Image in GWT menubar instead of text

泪湿孤枕 提交于 2020-01-05 05:10:11
问题 I am using MenuBar from GWT showcase. I want to add text in the menubar. Can you please let me know that in which way I can get it ? 回答1: You can try this one also. Its given in MenuBar Docs API public MenuItem addItem(java.lang.String text, boolean asHTML, MenuBar popup) So, In your case, final String image = "<img src='"+GWT.getModuleBaseURL() + "/images/down-arrow.png' height='25px' width='25px'/>"; HomeMenu.addItem(new MenuItem(image,true,mainMenu)); 回答2: The best approach is not to hack

GWT and storing a session key

萝らか妹 提交于 2020-01-05 04:59:08
问题 My app logs into an external service & needs to store the sessionKey (the sessionKey needs to be added to the HTTP header for future RPC calls). What alternatives do I have for storing the sessionKey ? I've read about a scenario where the sessionKey is saved into a DIV tag on the page. 回答1: There is no need for the client side to have this information. Session management should be transparent to the client side. The only acceptable way is to use cookies and manage this on the server side.

GWT development with Eclipse

↘锁芯ラ 提交于 2020-01-05 04:49:18
问题 I am developing a GWT app using eclipse and I was wondering if there is a way to hot swap client code changes I make without having to do a full Google Compile each time. Currently when I modify my code, I do a Google compile and then click the Reload server button, then I refresh my browser to pick up the changes. This is starting to get a bit painful as it takes 10 - 20 sec to do a full compile when I may have only modified a UI string so was wondered is there a quicker way. 回答1: If you

Dealing with RPC when doing multiple GWT modules

旧城冷巷雨未停 提交于 2020-01-05 04:42:12
问题 I did some refactoring of my gwt application, and make it multiple modules (i.e. multiple *.gwt.xml and EntryPoint) Everything seems to work fine, except for the RPC. Since I refactored the application, from a single mygwtapp.gwt.xml into multiple gwt.xml files: main.gwt.xml user.gwt.xml login.gwt.xml and so on... I had to change the servlet mapping URL-pattern from: /mygwtapp/someRPC into /main/someRPC to make sure that RPC's will work for the main module. It works for the main module but

GWT History Problem

孤街醉人 提交于 2020-01-05 04:36:32
问题 when i am adding a new history item like this History.newItem("Register"); the url correcly changes to http://127.0.0.1:8888/BiddingSystem.html?gwt.codesvr=127.0.0.1:9997#Register and loads the register form but then the url automatically rechanges to http://127.0.0.1:8888/BiddingSystem.html?gwt.codesvr=127.0.0.1:9997# why?? because I want to remain as http://127.0.0.1:8888/BiddingSystem.html?gwt.codesvr=127.0.0.1:9997#Register so that user can reload 回答1: The problem is that I was using an

Building RSS with GWT on client side

China☆狼群 提交于 2020-01-05 02:49:27
问题 I use com.google.gwt.xml.client.*. I need to create title elements in the beginning of XML and inside the item blocks. But when I select createElement("title") and appendChild(title), I get only one Element title in the end. private void formXMLToSend(){ Document doc = XMLParser.createDocument(); Element root = doc.createElement("rss"); root.setAttribute("version", "2.0"); doc.appendChild(root); Element chl = doc.createElement("channel"); root.appendChild(chl); Element title = doc

LibGDX GwtApplication Exception (TypeError) in HTML Deployment

╄→尐↘猪︶ㄣ 提交于 2020-01-05 02:47:18
问题 I try to deploy my libgdx game in HTML. In desktop and Android it works well. When I do ./gradlew html:dist , it compile fine and I have a dist folder which is created in html folder. I succeeded to launch the game on a browser: However, when I click on any button which will change the screen, the game crash: The error is : GwtApplication: exception: (TypeError) : a.g[a.b] is undefined (TypeError) : a.g[a.b] is undefined and in the console, I have: Error: java.lang.RuntimeException: com

Convert html+css+js to PDF

这一生的挚爱 提交于 2020-01-05 02:44:06
问题 I want to create something like this (code is here): in pdf format. I'm using google charts and regarding to this forum converting chart to pdf is impossible. I've already tryied iText+XMLWorker, but there is some problem with css and any js supporting at all, I think. So, the questions are: How can I convert html+css+js to .pdf file? Or, may be, the issue have other variants? 回答1: As promised in the comment, I've asked Raf. This was his answer: One way to use XML Worker for HTML+CSS+JS is to

Installing Google Web Toolkit Developer Plugin

僤鯓⒐⒋嵵緔 提交于 2020-01-05 00:47:08
问题 As i am working through the google app engine, i am trying to set up my first "Hello World" app running in my Chrome browser When (for the first time), i navigate to URL http://127.0.0.1:8888/MyTest.html?gwt.codesvr=127.0.0.1:9997 I non surprisingly get Ok, so i should get the plugin from the Chrome Web Store. I don't see anything remotely looking like "Google Web Toolkit Developer Plugin" Same deal for "gwt chrome" search.enter link description here What am i missing please? How can i

GWT : JSON Parsing in client side and server side with same api

倾然丶 夕夏残阳落幕 提交于 2020-01-04 14:08:28
问题 We use org.json api to parse json on server side and GWT JsonParser to parse JSON on client side. Is there a api that we can use that can be used on both the client side and server side? 回答1: You are looking for GWT AutoBean: http://code.google.com/p/google-web-toolkit/wiki/AutoBean With AutoBeans you juset define the structure of your JSON and the GWT Compiler handles the rest. 回答2: I am writing this in comparison to using autobeans or GWT-RCP - if you are using Java on the server.