为什么Play Framework表单帮助程序使用“额外"标签? [英] Why Do Play Framework Form Helpers Use 'Extra' Tags?

查看:99
本文介绍了为什么Play Framework表单帮助程序使用“额外"标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么Play的表单助手会生成dldtdd标签?他们似乎不必要.

Why do Play's Form Helpers generate the dl,dt, and dd tags? They seem unnecessary.

   <dl class="error" id="email_field">
        <dt><label for="email">Email:</label></dt>
        <dd><input type="text" name="email" id="email" value=""></dd>
        <dd class="error">This field is required!</dd>
        <dd class="error">Another error</dd>
        <dd class="info">Required</dd>
        <dd class="info">Another constraint</dd>
    </dl>

https://www.playframework.com/documentation/2.3.x/JavaFormHelpers

推荐答案

尽管Maxime承认了自己,但请记住,这只是默认的帮助者.如果他们是.只是纯领域的人们会开始为什么不使用某些结构;)

Although Maxime confessed himself, remember that's just default helpers. If they were ie. just pure fields people would start to why it doesn't use some structure ;)

所有人都记得Play可以让您轻松创建自定义构造函数,这在

Besides all remember that Play allows you to create custom constructors easily which is perfectly showed in official documentation.

这篇关于为什么Play Framework表单帮助程序使用“额外"标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆