1

是否可以将标题(工具提示)属性添加到 Vaadin 中的 twincolselect 列表框?我尝试将 setItemCaptionPropertyId() 与 setItemCaptionMode() 一起使用,但徒劳无功。

最后,当 Vaadin 呈现页面时,生成的 html 仅具有 select 组件的 value 属性,并且不存在 title 属性。

  • 更新 - 我的问题应该被重新表述为 - 我需要在列表框或双选中的每个单独项目(单独的行)上使用工具提示。
4

1 回答 1

1

这是 Nativeselect 组件的示例

// Create the selection component
final NativeSelect mynativeselect= new NativeSelect("myLabel");

// Add some items
for (int i = 0; i < 25; ++i) {
    mynativeselect.addItem(i);
}
//set tooltip
mynativeselect.setDescription("My tooltip");
于 2012-11-16T09:00:13.117 回答