简体   繁体   English

春天的form:form和sf:form有什么区别?

[英]What’s the difference between form:form and sf:form in spring?

What's the difference between form:form and sf:form in spring , I don't understand the difference bewteen <%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %> and <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> ,is the difference just prefix or something else? Spring的form:form和sf:form有什么区别,我不理解<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>的区别和<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> ,区别仅仅是前缀还是其他?

for example 例如

<sf:form method="post" action="form/submit" commandName="user">
    <sf:input path="ID"></sf:input>
    <sf:input path="name"></sf:input>
    <input type="submit" value="Submit">
</sf:form>

<form:form method="post" action="form/submit" modelAttribute="user">
    <form:input path="ID"></form:input>
    <form:input path="name"></form:input>
    <input type="submit" value="Submit">
</form:form>

Nothing. 没有。 It's just the prefix that you give to the uri: 这只是您给uri加上的前缀:

<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>

You can write anything in the prefix and use it: 您可以在前缀中写任何东西并使用它:

<%@ taglib prefix="foo" uri="http://www.springframework.org/tags/form" %>

<foo:form method="post" action="form/submit" commandName="user">
    <foo:input path="ID"></foo:input>
    <foo:input path="name"></foo:input>
    <input type="submit" value="Submit">
</foo:form>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 spring:bind和form:errors有什么区别? - What is the difference between spring:bind and form:errors? 表单之间有什么区别:select和form:options - What's the difference between form:select and form:options Wicket表单中的getModel()和getDefaultModel()有什么区别? - What is the difference between getModel() and getDefaultModel() in a Wicket Form? 使用form:input为Spring MVC编写表单的正确方法是什么 - What's the correct way to write a form for Spring MVC with form:input Normalizer.normalize(s, Normalizer.Form.NFD) 和 StringUtils.stripAccents(s) 之间的实际区别是什么? - What is the actual difference between Normalizer.normalize(s, Normalizer.Form.NFD) and StringUtils.stripAccents(s)? 绑定单个sf:带有多个bean属性的输入spring form标签 - binding single sf:input spring form tag with multiple bean attribute Spring术语中的命令,表单,业务和实体对象之间的区别? - Difference between command, form, business, and entity objects in Spring terms? multipart / form-data和application-x-www-form-urlencoded有什么区别? - What is the difference between multipart/form-data and application-x-www-form-urlencoded? 不同表单动作属性之间的区别 - Difference between different form action attribute 我什么时候应该使用 html 的<form>当春天的时候<form:form>在 Spring MVC Web 应用程序中? - When should I use html's <form> and when spring's <form:form> in Spring MVC web app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM