In JSP setProperty useBean how do we populate Lists

309 Views Asked by At

My source code is:

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="*"/>

Now, what name should I give to my form element so that minAgeInclusive is automatically populated on ContestForm ? I tried

subContests[0].minAgeInclusive

but this is not working !

0

There are 0 best solutions below