我对 struts 很陌生,而且我特别卡在与单选按钮有关的 struts 代码区域。无论我做什么,除了以下错误值外,我什么也得不到:(CostForm)
<td align="left" width="200px" colspan="2">
<html:radio property="responsableBool" value="false"/>No
<html:radio property="responsableBool" value="true"/>Yes
</td>
然后从这段代码初始化它:
CostForm costform = (CostForm) form;
Cost cost = new Cost();
costform.populateModel(cost);
而 populateModel 只是有:PropertyUtils.copyProperties(cost,this);
我唯一能想到的是struts不允许单选按钮引用具有不同值的相同属性。