我需要在html模板中设置一个文本区,并将其用作vaadin中的自定义组件。html代码片段如下所示
<table>
<tr>
<td>
JUNK SENTENCE
</td>
<td>
<div location="HEADIN"></div>
<div location="Details"></div>
<div location="Attachment"></div>
</td>
<td>
<p>School of more than 50 students univer versities.</p>
</td>
</tr>
</table>
所有占位符都在工作并显示数据,但"details“占位符应该是文本区域。由于文本在那里很多,所以我尝试了下面的方法,但它只是将占位符转换为文本,vaadin无法操作/识别“详细信息”占位符。我尝试了下面设置文本区域标签的方法。
<textarea rows="4" cols="50">
</textarea>
我再一次尝试了这种方法,但也不起作用。
<textarea rows="4" cols="50" location="Details">
</textarea>
我正在从formfeildfactory设置所需的值,这些值是通过实现Vaadin自定义字段类来设置的(以防它有助于更多的识别)
发布于 2014-06-07 17:20:15
您必须为您的表单元素创建vaadin文本区域和文本字段。然后,您必须通过"customLayout.addComponent(component,"locationName")“方法将它们放置在自定义布局中
它将删除您的标记,如下所述:
https://vaadin.com/book/vaadin7/-/page/layout.customlayout.html
https://stackoverflow.com/questions/24095017
复制相似问题