【问题标题】:How to set value to Java bean from FTL in Jive如何从 Jive 中的 FTL 为 Java bean 设置值
【发布时间】:2015-10-18 22:41:16
【问题描述】:

我是 jive 和 freemarker 的新手

我尝试了像在 Struts 中一样的方法

<input size=40 name="bvProperties.fileBasedQueueLocation" 
            type="text" value="${badgeVilleProperties.fileBasedQueueLocation!''}" style="float: right;"/>

需要设置fileBasedQueueLocation 变量的值在bvProperties bean 中可用。

我还为bvProperties 创建了setter 和getter 方法。

【问题讨论】:

  • 什么版本的 Struts?

标签: java struts2 struts freemarker jive


【解决方案1】:

你应该尝试的语法:

<input size=40 name="bvProperties.fileBasedQueueLocation" 
            type="text" value="${(badgeVilleProperties.fileBasedQueueLocation)!}" style="float: right;"/>

【讨论】:

  • 是的,这是正确的,我们需要使用该语法,但这里我们将值设置为 ftl 页面,但我需要在 java bean 中设置值....
  • 你能显示生成了什么以及使用了哪个工具吗?
猜你喜欢
  • 1970-01-01
  • 2020-04-26
  • 1970-01-01
  • 2011-06-03
  • 2017-09-07
  • 2013-11-20
  • 2019-04-25
  • 2012-09-05
  • 2013-02-03
相关资源
最近更新 更多