【发布时间】:2016-01-23 01:27:30
【问题描述】:
我想通过 wicket 生成这个表头
<tr>
<th>Actions</th>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Home Phone</th>
<th>Cell Phone</th>
</tr>
标头名称保存在arrayList中的位置
我尝试这样的事情。它生成我想要的,但在 html 代码中显示警告
- Invalid location of tag (div).
好在生成的 html 代码中没有显示 div 标签。
当我只想要th 而没有span 标签时,我不知道应该使用什么标签
<tr>
<div wicket:id="seasonNames"><th wicket:id="season">[season]</th></div>
</tr>
【问题讨论】:
-
你不能直接在
中添加任何html代码而不是 和 。这是错误的 是的,我知道。但是使用 id=seasonNames 添加 wicket 组件的正确解决方案是什么?在中有季节名称。有什么问题吗? 是的,因为 seasonNames 是值列表,但值在 id=season 的组件中但你需要单曲中的所有季节吗?对吗?