简单的Ajax使用GWT ......我不需要的部件我不、部件、简单、GWT

由网友(浅色夏沫)分享简介:可GWT将只用于简单的AJAX?我不想要的部件,我只是想避免编码javascipt的。我需要的是简单的Ajax,比如点击一个链接和更新一个div的内容,用那种从服务器获取数据,或事物。可以GWT用于该purpouse?如果是这样,我在哪里可以得到一些帮助?所有我发现在网络上是根​​据各地的小工具。Can GWT be...

可GWT将只用于简单的AJAX?我不想要的部件,我只是想避免编码javascipt的。我需要的是简单的Ajax,比如点击一个链接和更新一个div的内容,用那种从服务器获取数据,或事物。可以GWT用于该purpouse?如果是这样,我在哪里可以得到一些帮助?所有我发现在网络上是根​​据各地的小工具。

Can GWT be used just for simple AJAX? I dont want the widgets, I just want to avoid coding javascipt. What I need is simple ajax, like clicking on a link and updating the contents of a div with data retrieved from the server, or things like that. Can GWT be used for that purpouse? if so, where can I get some help? All I find on the web is based around the widgets.

推荐答案

是的的确是完全可能的。窗口小部件是故事的一部分。 您可以使用RPC或RequestBuilder处理使用RPC或JSON或XML服务器调用。 您也可以使用DOM类和元素类直接操作的div块。

Yes indeed that is perfectly possible. The Widgets are only part of the story. You can use the RPC or RequestBuilder to handle server calls using RPC or JSON or XML. You can also use the DOM class and Element classes to manipulate the div blocks directly.

您获得的Java(Eclipse中)的生产力工具,你也可以得到最优化的Javascript code中的利益应该在所有支持的浏览器。

You gain the productivity tools of Java (Eclipse) and you also get the benefit of optimized Javascript code that should work on all supported browsers.

至于文档,你可以找到所有你需要的javadoc: 的http://google-web-toolkit.google$c$c.com/svn/javadoc/1.6/index.html?overview-summary.html

As for documentation you can find all you need in the javadocs: http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/index.html?overview-summary.html

相关的软件包:

com.google.gwt.dom.client (Document is what you need for DOM manipulations)
com.google.gwt.http.client if you want to send GETs/POSTs.
com.google.gwt.user.client which contains the Window class
com.google.gwt.json.client for sending/receiving json payloads to/from the server
com.google.gwt.xml.client in case you want to send/receive XML data and parse it on the client side.

大卫

阅读全文

相关推荐

最新文章