【发布时间】:2014-01-03 04:01:09
【问题描述】:
我有我的 struts.xml:
<s:textfield id="thresholdParameter_1"
name="gmathreshold.distinctBnumberRatio">
</s:textfield></td>
其中 gmathreshold 是一个以 distinctBnumberRatio 作为成员变量的 bean。在我的 bean 中,它是 BigDecimal。那么我怎样才能将它设置在我的 Bean 中。我的意思是如何在 struts2 中从 String 转换为 BigDecimal??
【问题讨论】:
-
你问的是Struts2 OOB提供的,如果你需要定义自定义类型转换器,你需要在S2中编写和配置。看看struts.apache.org/release/2.3.x/docs/type-conversion.html
标签: java javascript jsp jakarta-ee struts2