我正在构建一个旅游应用程序。我有预订指向旅行模式但我在使用JSLT添加新预订时无法分配书籍模式。 这是我的JSP代码:
<c:forEach items="${modalities}" var="modality">
<form:form method="POST" action="/book_tour" modelAttribute="booking">
<p>${modality.name}</p>
<jsp:setProperty name="booking" property="tourModality" value="${modality}"></jsp:setProperty>
<input name="modality" type="hidden" value="${modality}">
<div class="form-group">
<form:label path="calendarDate">Escoja una fecha</form:label>
<div class='input-group date' id='datetimepicker'>
<form:input path="calendarDate" type='text' class="form-control"/>
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
<div class="input-group">
<form:label path="calendarDate">Hora: </form:label>
<form:select path="calendarDate">
<c:forEach items="${modality.tourHours}" var="tourHour">
<option>${tourHour.timeSlot}</option>
</c:forEach>
</form:select>
</div>
</div>
<input type="submit" class="btn btn-success" value="Reservar"/>
</form:form>