我的源代码是:
public class ContestForm
{
List<SubContestForm> subContests;
}
public class SubContestForm
{
int minAgeInclusive;
}
<jsp:useBean id="cont" class="com.kids.forms.ContestForm" scope="session"/>
<jsp:setProperty name="cont" property="*"/>
现在,我应该给表单元素取什么名字,以便 minAgeInclusive 自动填充到 ContestForm 上?我试过了
subContests[0].minAgeInclusive
但这不起作用!