Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gwt 如何将选项添加到下拉列表中,但仅用于显示_Gwt_Listbox - Fatal编程技术网

Gwt 如何将选项添加到下拉列表中,但仅用于显示

Gwt 如何将选项添加到下拉列表中,但仅用于显示,gwt,listbox,Gwt,Listbox,我需要在GWT的下拉列表中添加一个标签(称为Title)。标签“Title”可以出现在选项列表中,但如果选择了“Title”,则不应将其保留到数据库中,或者只传递null而不是“Title”。我可以使用ValueListBox执行此操作吗?禁用它: list.getElement().getElementsByTagName("Title")[0].setAttribute("disabled", "disabled"); 除非真的有必要,否则它将变为空

我需要在GWT的下拉列表中添加一个标签(称为Title)。标签“Title”可以出现在选项列表中,但如果选择了“Title”,则不应将其保留到数据库中,或者只传递null而不是“Title”。我可以使用ValueListBox执行此操作吗?

禁用它:

list.getElement().getElementsByTagName("Title")[0].setAttribute("disabled", "disabled");
除非真的有必要,否则它将变为空