日期:2014-05-18  浏览次数:20686 次

请教一个spring:bind的问题
这是JSP页面

<%@   include   file= "/WEB-INF/jsp/include.jsp "   %>
<%@   taglib   prefix= "spring "   uri= "/spring "   %>

<html>
<head> <title> <fmt:message   key= "title "/> </title> </head>
<body>
<h1> <fmt:message   key= "postbookmark.heading "/> </h1>
<form   method= "post "   action= "postbookmark.htm ">
            <spring:bind   path= "bookmarkCommand.url ">
                  <input   type= "text "   name= "url "   value= "${status.value} "   />
                 
                  <c:if   test= "${status.error} "> <p> There   was   an   error   with   your   previous   input. </p> </c:if>
            </spring:bind>
           
            <spring:bind   path= "bookmarkCommand.name ">
                  <input   type= "text "   name= "name "   value= "${status.value} "   />
                 
                  <c:if   test= "${status.error} "> <p> There   was   an   error   with   your   previous   input. </p> </c:if>
            </spring:bind>
           
            <spring:bind   path= "bookmarkCommand.owner ">
                  <input   type= "text "   name= "owner "   value= "${status.value} "   />
                 
                  <c:if   test= "${status.error} "> <p> There   was   an   error   with   your   previous   input. </p> </c:if>
            </spring:bind>
           
            <spring:hasBindErrors   name= "bookmarkCommand ">
                  <p> There   were   ${errors.errorCount}   error(s)   in   total: </p>
                  <ul>
                        <c:forEach   var= "errMsgObj "   items= "${errors.allErrors} ">
                              <li>
                                    <spring:message   code= &q