my model class is like this:
Manager.java
Emp.javaCode:class Manager { int mgrId; String name; Set<Emp> employees; // getter-setter methods }
my jsp page is like this:Code:class Emp { int empId; String name; String department; // getter-setter methods }
create_manager.jsp
how to initialize Set<Emp> employees object in the above jsp view? what shall be the bindings. please help.Code:<form:form modelAttribute="manager"> Manager Name: <form:input path="${manager.name}" maxlength="32" /> <table> <tr> <th>Emp Name</th> <th>Salary</th> <th>Department</th> <th> </th> </tr> <tr> <td><form:input path="${what shall i write here?}" /></input></td> <td><form:input path="${what shall i write here?}" /></input></td> <td><form:input path="${what shall i write here?}" /></input></td> <td><input type="button" value="Add New Employee" /> </tr> </table> </form:form>


Reply With Quote