JQueryで以下のFormデータの List<PrintBo> resultItemListの
全ての要素のcreateDtの値の日付書式を変換して、
変換後の値をcreateDtにSETし直すような処理がやりたいのですが。
JQueryでFormデータ内のList<OBJ>を繰り返し処理する為に、
どのように記述すればよいか判らない為、ご教示いただけないでしょうか?
Java
1public class PrintForm implements Serializable { 2 3 private String fromDt; 4 5 private String toDt; 6 7 private List<PrintBo> resultItemList; 8 9 …(略)… 10}
Java
1public class PrintBo implements Serializable { 2 3 private Date createDt; 4 5 …(略)… 6}
HTML
1<jsp:root 2 xmlns:jsp="http://java.sun.com/JSP/Page" 3 xmlns:c="http://java.sun.com/jsp/jstl/core" 4 xmlns:fn="http://java.sun.com/jsp/jstl/functions" 5 xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" 6 xmlns:form="http://www.springframework.org/tags/form" 7 xmlns:spring="http://www.springframework.org/tags" 8 version="2.1"> 9 <jsp:directive.page 10 language="java" 11 contentType="text/html; charset=utf-8" 12 /> 13 <jsp:body> 14 <form:form id="form" method="post" name="PrintForm " modelAttribute="PrintForm " action="${outputUrl}" > 15 <table style="width:100%;"> 16 <tbody> 17 <tr> 18 <th>検索日付</th> 19 <td class="errorMessageArea"> 20 <form:input id="fromDt" path="fromDt" size="12" class="date clear_value" maxlength="8" /> 21 ~ 22 <form:input id="toDt" path="toDt" size="12" class="date clear_value" maxlength="8" /> 23 </td> 24 </tr> 25 </tbody> 26 </table> 27 28 <div class="submitArea"> 29 <form:button id="searchButton" value="検索" url="${searchUrl}" /> 30 <jsp:element name="input"> 31 <jsp:attribute name="type">button</jsp:attribute> 32 <jsp:attribute name="class">clear_button</jsp:attribute> 33 <jsp:attribute name="value">クリア</jsp:attribute> 34 </jsp:element> 35 </div> 36 37 <c:if test="${PrintForm.resultItemList != null}"> 38 <h2>検索結果</h2> 39 <div class="searchResult"> 40 <table id="centerAndOutputResultHeader"> 41 <thead> 42 <tr class="col1"> 43 <th class="createDate" rowspan="2">作成日付</th> 44 …略… 45 </tr> 46 </thead> 47 <tbody> 48 <c:forEach items="${PrintForm.resultItemList}" var="item" varStatus="status"> 49 <jsp:body> 50 <form:hidden path="resultItemList[${status.index}].createDt" /> 51 …略… 52 </jsp:body> 53 </c:forEach> 54 </tbody> 55 </table> 56 </div> 57 <div class="submitArea2"> 58 <form:button id="outputButton" value="出力" url="${outputUrl}" /> 59 </div> 60 </c:if> 61 </form:form> 62 </jsp:body> 63</jsp:root> 64 65
回答1件
あなたの回答
tips
プレビュー