1
public class Parent {
private Integer Id;
private String name;
private String age;
private List<Childrens> childrens;
// getters and setters
}
我的JSP班組長:如何顯示在Spring MVC的形式列出的表
<spring:bind path="parent.*">
<c:if test="${not empty status.errorMessages}">
<div class="error">
<c:forEach var="error" items="${status.errorMessages}">
<img src="<c:url value="/images/iconWarning.gif"/>"
alt="<fmt:message key="icon.warning"/>" class="icon" />
<c:out value="${error}" escapeXml="false" />
<br />
</c:forEach>
</div>
</c:if>
<form:form commandName="parent" method="post"
action="parent .html" onsubmit="return onFormSubmit(this)"
id="parentForm">
<appfuse:label styleClass="desc" key="name" />
<form:errors path="name" cssClass="fieldError" />
<form:input path="name" id="name" cssClass="text medium"
readonly="true" cssErrorClass="text medium error" />
<appfuse:label styleClass="desc" key="age" />
<form:errors path="age" cssClass="fieldError" />
<form:input path="age" id="cage" cssClass="text medium"
readonly="true" cssErrorClass="text medium error" />
我想表明的Children
的名單爲表。我該怎麼做?表單頁面中的列表。