`
未雨绸缪
  • 浏览: 215703 次
  • 性别: Icon_minigender_1
  • 来自: 陕西
社区版块
存档分类
最新评论

Puzzle between modelAttribute and commandName in Spring FormTag

 
阅读更多
    平常用的时候form tag都是用commandName来设定form的对象上下文。
    看Spring例子的时候又发现了个modelAttribute,有着一样的功能。在国外的网站查了查,有如此的解释


 
/**
 * Set the name of the form attribute in the model.
 * May be a runtime expression.
 * @see #setModelAttribute
 */
public void setCommandName(String commandName) {
	this.modelAttribute = commandName;
}


发现modelAttribute取代了commandName属性

<form:form modelAttribute="user">
  <table>
    <tr>
      <td>First Name:</td>
      <td>
        <input path="firstName"/>
      </td>
    </tr>
    <tr>
      <td>Last Name:</td>
      <td>
        <input path="lastName"/>
      </td>
    </tr>
    <tr>
      <td colspan="2">
        <input type="submit" value="Save Changes"/>
      </td>
    </tr>
  </table>
</form:form>
分享到:
评论

相关推荐

    Puzzle Kit 3 in 拼图插件

    《Puzzle Kit 3 in 拼图插件:解锁创新拼图制作的无限可能》 拼图游戏自诞生以来,一直是人们休闲娱乐、锻炼思维的优选。随着数字技术的发展,拼图游戏也逐渐从实体走向虚拟,各种拼图插件应运而生。其中,“Puzzle...

    3D.Printing.Designs.The.Sun.Puzzle.1785888897

    As technology progressed, so did Joe's dabbling, eventually taking him to 3D modeling while in high school and college, and he momentarily pursued a degree in computer animation. He abandoned that ...

    The Puzzle of Thought Experiments in Conceptual

    ### 思维实验之谜在概念隐喻研究中的解析 #### 概述 思维实验作为一种哲学探讨工具,在过去二十年间逐渐成为了科学哲学领域中的一个重要话题。思维实验之所以引人注目,是因为它引发了一个被称为“思维实验之谜”...

    NPuzzle求解研究报告.docx

    N-Puzzle 论文研究报告 NPuzzle 问题是一种经典的搜索问题,旨在找到从初始状态到目标状态的最短路径。在该论文研究报告中,我们将深入探讨 NPuzzle 问题的解决方法和算法。 NPuzzle 问题定义 NPuzzle 问题是...

    Learning Algorithms Through Programming and Puzzle Solving-Leanpub (2018).pdf

    Since the launch of our online courses in 2016, hundreds of thousands students tried to solve many programming challenges and algorithmic puzzles described in this book. We invite you to join them!

    n_puzzle_state

    在本文中,我们将深入探讨如何使用A*搜索算法来解决15-puzzle问题,这是一个典型的人工智能领域的问题。A*算法是一种启发式搜索方法,它结合了Dijkstra算法的最短路径查找与最佳优先搜索的特性,通过评估每个节点的...

    Learning Algorithms through Pprogramming and Puzzle (2018)

    Our goal is to develop an Intelligent Tutoring System for learning algorithms through programming that can compete with the best professors in a traditional classroom.

    Java PUZZLE Java 解惑

    Java PUZZLE Java 解惑 Java PUZZLE Java 解惑 Java PUZZLE Java 解惑Java PUZZLE Java 解惑 Java PUZZLE Java 解惑 Java PUZZLE Java 解惑

    8-Puzzle-Game_Python8puzzle_puzzle游戏_8puzzlePython_ai_8puzzlesol

    8-Puzzle 游戏是一种经典的逻辑谜题,它由一个3x3的格子组成,其中8个格子上标有数字1到8,而最后一个格子为空。玩家的目标是通过移动空格来重新排列数字,使其从初始状态变为预设的解决方案。在这个Python程序中,...

    Jigsaw Puzzle Pack 5 - 拼图游戏模板 Unity3D

    Requires Unity 4.2.0 or higher. Jigsaw Puzzle Pack is a scripted ... Just drag a JigsawPuzzle script on a scaled cube primitive, configure puzzle script settings in editor and you are ready to go.

    Java™ Puzzlers: Traps, Pitfalls, and Corner Cases.chm

    Java™ Puzzlers: Traps, Pitfalls, and Corner Cases.chm,英文版本,chm 格式,大小 1 Mb,作者:Joshua Bloch、Neal Gafter。 内容预览: Chapter 1. Introduction Chapter 2. Expressive Puzzlers Puzzle 1: ...

    用Qt(C++)编写的15puzzle与8puzzle游戏.zip

    用Qt(C++)编写的15puzzle与8puzzle游戏.zip用Qt(C++)编写的15puzzle与8puzzle游戏.zip用Qt(C++)编写的15puzzle与8puzzle游戏.zip用Qt(C++)编写的15puzzle与8puzzle游戏.zip用Qt(C++)编写的15puzzle与8...

    Practical Quantum Computing for Developers

    Write algorithms and program in the new field of quantum computing. This book covers major topics such as the physical components of a quantum computer: qubits, entanglement, logic gates, circuits, ...

    8puzzle & a* pathfinder

    《8 Puzzle 拼图与 A* 路径寻找算法详解》 8 Puzzle 是一个经典的数学游戏,它由一个3x3的格子组成,其中8个格子上分别标有数字1到8,而第9个格子为空。玩家的目标是通过交换相邻的数字,将初始状态调整为预设的...

    Image Puzzle_C#8puzzlegame_picturepuzzle_

    8-puzzle,又称为滑块谜题,是一种经典的智力游戏,通常在一个3x3的网格上进行,玩家需要通过滑动方块来达到预设的目标布局。在这个4x4版本中,游戏难度有所降低,更适合初学者体验和学习。 1. **游戏设计原理**: ...

    15 puzzle C语言IDA* 求解算法

    《15 Puzzle与IDA*算法在C语言中的实现》 15 Puzzle,又称15数字谜题,是一种经典的智力游戏,玩家需要通过滑动15个数字方块,使得它们最终按照1到15的顺序排列,空白方块通常位于右下角。这个游戏的挑战在于寻找...

    Puzzle of Angular Momentum Transfer in Black Hole Accretion Disc

    黑洞吸积盘中角动量转移的疑难是由甘朝明、叶永春以及王定雄提出的,该论文探讨了黑洞吸积盘内角动量如何转移的核心问题。黑洞吸积盘是天体物理学中一个非常重要的概念,它描述了物质如何围绕黑洞旋转并逐渐靠近,...

    Flash crossword puzzle generater

    Flash based crossword puzzle generater, output format: XML

    An Elegant Puzzle of system engineering

    Will Larson's An Elegant ... An Elegant Puzzle balances structured principles and human-centric thinking to help any leader create more effective and rewarding organizations for engineers to thrive in.

    20201121_岳阳_论文展示1

    Drawing from their analysis, the authors would likely conclude that understanding the dynamics of investor beliefs is crucial for explaining the equity premium puzzle and the variation in stock ...

Global site tag (gtag.js) - Google Analytics