Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/393.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
Java 不使用xhtml时填充IceFaces HtmlSelectOneListbox_Java_Jsf_Icefaces - Fatal编程技术网

Java 不使用xhtml时填充IceFaces HtmlSelectOneListbox

Java 不使用xhtml时填充IceFaces HtmlSelectOneListbox,java,jsf,icefaces,Java,Jsf,Icefaces,我正在一个动态构建IceFaces表单的应用程序中实现组合框。这里没有XHTML,我们把Java代码中的所有东西都放在一起。到目前为止,这很好,但我被HtmlSelectOneListbox绊住了。在我的代码中,我创建了一个也正确显示在表单上的项目,但我不知道如何向其中添加SelectItems HtmlSelectOneListbox combo = new HtmlSelectOneListbox(); combo.setId(id); combo.setDisabled(readOnlyW

我正在一个动态构建IceFaces表单的应用程序中实现组合框。这里没有XHTML,我们把Java代码中的所有东西都放在一起。到目前为止,这很好,但我被
HtmlSelectOneListbox
绊住了。在我的代码中,我创建了一个也正确显示在表单上的项目,但我不知道如何向其中添加
SelectItems

HtmlSelectOneListbox combo = new HtmlSelectOneListbox();
combo.setId(id);
combo.setDisabled(readOnlyWindow);

/* parent is the UIComponent instance around us*/
parent.getChildren().add(combo);

我可以创建
SelectItem
s的实例,甚至可以创建
SelectItemsTag
的实例,但是组合没有设置它们的方法。它只有一个
setValue
/
setValueExpression
,我可以将我的值绑定表达式设置为表示
{bean.value}
的对象。但是selectitems属性不应该设置在列表框上,而应该设置其嵌套的
f:selectitems
,我不知道如何创建。

我认为
UISelectItem
和/或
UISelectItems
对象应该以类似于向父组件添加combo的方式添加为HtmlSelectOneListbox的子对象