Struts (1.38) noob,我收到以下错误:对于名称为 hsForm 的 bean,没有可用于属性 hs.hasRelationshipToTeam 的 getter 方法。有人告诉我在 HSDivForm 中创建一个 getHs 和 setHs 方法,但这就是问题所在吗?或者我该怎么做呢?
我的豆子:
public class HS extends Entry implements Serializable,Cloneable {
private Boolean hasRelationshipToTeam = false;
public boolean isHasRelationshipToTeam()
{ return hasRelationshipToTeam; }
public void setHasRelationshipToTeam(boolean hasRelationshipToTeam)
{ this.hasRelationshipToTeam = hasRelationshipToTeam; }
}
我的表格:
import my.bean.HS;
public class HSForm extends ActionForm
{
private HS hs = new HS();
public HSForm()
{ super(); }
}
我的jsp:
<html:form styleId="HSDivForm" action="/disclosure/hsAction" >
<table>
<tr id = "q-rel">
<td colspan="2" align="center">
<br />
Is there a team relationship?
<br />
Yes<html:radio property="hs.hasRelationshipToTeam" value="yes" />
No<html:radio property="hs.hasRelationshipToTeam" value="no" />
</td>
</tr>
</table>
</html>