主题 : 投* |
级别: 举人
![]() |
23# 发表于:2017-11-09 14:38:07 IP:61.21.*.*
回复第22楼 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [JeeCmsFront] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalArgumentException: id to load is required for loading] with root cause java.lang.IllegalArgumentException: id to load is required for loading 看看这个问题,别急着开车。 |
||
---|---|---|---|
级别: 总版主
![]() |
24# 发表于:2017-11-09 14:42:48 IP:115.79.*.*
是不是有默认模型的必填没保存? |
||
---|---|---|---|
级别: 举人
![]() |
25# 发表于:2017-11-09 14:54:00 IP:61.21.*.*
回复第24楼 <form id="guestbookForm" action="${base}/guestbook.jspx" method="post">
<table class="message_inf" style="" > <tr> <td colspan="2" style="text-align:center;">类别:</td> [@cms_guestbook_ctg_list siteId=site.id] [#list tag_list as ctg] [#if ctg.id== 21 ] <td>#${ctg.name}#</td> <td><input type="hidden" value="${ctg.id}"</td> [/#if] [/#list] [/@cms_guestbook_ctg_list] </td> </tr> <tr> <td colspan="2" style="text-align:center;">留言:</td> <td colspan="3"> <textarea name="content" cols="10" rows="6" ></textarea> </td> </tr> <tr> <td colspan="2" style="text-align:center;">验证码:</td> <td style="padding-top:37px"> <input name="captcha"/> <img id="guestbookCaptcha" src="${base}/captcha.svl" onclick="this.src='${base}/captcha.svl?d='+new Date()" style=""/> </td> <td><input type="hidden" name="sessionId" id="sessionId" /></td> </tr> <tr><td colspan="5" style="text-align:center;"><input type="submit" id="submit" class="message_btn" value="发表留言" /></td></tr> </table> </form> <script src="/${res}/js/jquery.cookie.js" type="text/javascript"></script> <script type="text/javascript"> $(function() { $("#sessionId").val($.cookie("JSESSIONID")); $("#submit").click(function () { var phone = $("input[name='phone']").val(); var email= $("input[name='email']").val(); var title = $("input[name='title']").val(); var qq= $("input[name='qq']").val(); var content= $("textarea").val(); var phonenum = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0,5-9]))\\d{8}$";//电话号码的正则 var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/; // 邮箱的正则 if(phone!=""&&content!=""&&email!=""&&title!=""){ var options = { url: '/guestbook.jspx', type: 'post', dataType: 'json', data: $("#guestbookForm").serialize(), success: function (data) { if(data.status==0) { alert("留言成功"); location.href=location.href; } else if(data.status==1) { alert("验证码错误"); $("#guestbookCaptcha").click(); } }, error:function(data){ alert("留言成功!"); location.href=location.href; } }; }else{ alert("请将未填写的内容填写完整") $("#guestbookCaptcha").click(); } $.ajax(options); return false; }); }); </script> |
||
---|---|---|---|
级别: 举人
![]() |
27# 发表于:2017-11-09 15:09:52 IP:61.21.*.*
回复第26楼 给个默认的不行吗? input type="hidden" value="${ctg.id}"/> 像这样传不可以吗?
|
||
---|---|---|---|
级别: 举人
![]() |
29# 发表于:2017-11-09 15:29:09 IP:61.21.*.*
回复第28楼 问下,$().cookie未定义是什么问题,上次遇到过,但是忘记了。
|
||
---|---|---|---|