English 中文(简体)
我如何能够从一个自由标识模板中获取数据。
原标题:How can I get data from a Freemarker template into GWT code?

我有一个使用加沙地带和自由标识的网络应用程序;其中一部分是Im,也配上了某些GWT的帽子,而Im试图将信息从actionBean获取到GWT的最好方式。 目前,我在模板中这样做:

<script>
  var params = {
    nick : "${actionBean.nick}",
    logout: "${actionBean.logout}"
  }
</script>

然后,我就进入《全球WT》模块问题使用<条码>。 它工作得很好,但我感到,我会做得更好。 建议

问题回答

GWT-policy的“把一切都归为静态的堡垒”,不允许改变 j。 它允许——使用强有力的名称技术——在浏览器中扣押所有《维也纳条约法公约》。

因此,如果任何动态数据都必须在《维也纳条约法公约》内获得,那么它必须来自外部。 你们的get子必须去做。 因此,宣布这名理论家似乎是这样做的正确方式(我在工作中这样做)。

一种选择是,将产生一种有利于 Java本的惠物,即惠肉出口者(我指的是,有可读的阶级和方法名称的 Java字类)。 之后,你的 j夫可以注入价值观本身,使格朗西夫不知其背景。 类似:

var x = new MyExportedWidget();
x.addTo(somePanel);
x.setProperty(value);

但它似乎过于熟练......





相关问题
Export to pdf on the client or server side?

My client side application is using jqgrid that requests the server side, which in its turn queries MySQL and sends back the resultSet in XML format. I m willing to add the export to PDF ...

Image generator

I d like to be able to generate an image with overlaying text (that is inputted by the user) such as how it is done on www.depressiondog.info. Can someone show/link me to some code that will do that. ...

Where should I put this configuration setting?

I m designing a fairly small web application which will run on a Sun application server (v9.1). It only has a few pages, no database of its own, and will retrieve/update data via web services. There s ...

服务器面与用户对用户的MVC在网络信号中

我最近找到了一种与《伙伴关系协定》有关的有趣的替代办法。 NET MVC,我目前做的是:静态超文本,配有先进的 Java本式服务电话(大多数例子使用开放式雷达)。 例如,见此或......。

MySQL Users and All Privileges

Ok, I m trying to add a user to a MySQL database. This user should be able to add other users to the database it has privileges for. So I did this: GRANT ALL privileges ON thedbname.* TO topuser @ % ...

Doesn t get into Debug Mode

When I Press F5 on my VS2005 to debug the application, it launches the web app window but it is coming out of debug mode. When I tried to trace the Error in the EventViewer, this was the error: ...

热门标签