使用spring.fremarker模板中的formInput时出错

发布于 2025-02-10 02:54:20 字数 374 浏览 1 评论 0原文

我正在尝试使用,

<@spring.formInput "searchForm.frm_surName" 
   maxlength=40 
   class='form-control form-control-sm' 
   placeholder="Last Name"
/> 

但是当我在标签启动时使用'@'时,它会给我错误,当我删除它并且没有错误时,它会接受。 另外,CSS不起作用,例如占位符不显示输出,输入框仅显示,但使用不活跃。 任何建议。 不活动输入框图像

I am trying to use

<@spring.formInput "searchForm.frm_surName" 
   maxlength=40 
   class='form-control form-control-sm' 
   placeholder="Last Name"
/> 

but it gives me error when I use '@' in starting of the tag, it accepts when I remove it and no error.
Also the CSS does not work for example the placeholder does not show in output and input box just shows up but is not active to use.
Any suggestions.
Inactive input box image

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

伴我心暖 2025-02-17 02:54:20

要使用弹簧输入和绑定,我们必须为freemarker导入spring.ftl文件。速度框架不需要这种导入,但是freemarker确实需要。因此,只需使用下面的代码导入文件。

<#import "/spring.ftl" as spring/>

To use spring inputs and bindings we have to import spring.ftl file for freemarker. Velocity framework does not need such import but freemarker does. So just import the file by using code below.

<#import "/spring.ftl" as spring/>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文