0
Привет У меня есть переменная, какКак привязать Список Список в JSF DataTable
List<List<MyObject>> x = new ArrayList<List<MyObject>>();
Я хотел эту привязку к DataTable в JSF, которая содержит выберите
<datatable>
<column>
<Select/>
</column>
</datatable>
Возможно ли это в JSF
Код: View.xhtml
<h:dataTable id="i1" value="#{bean.listoflist}" var="list1">
<h:column>
<h:selectOneListbox value="#{bean.somestring}" >
<f:selectItems value="#{list1.?}" var="any" itemValue="#{any.??}/>"
</h:selectOneListbox>
</h:column>
</h:dataTable>`
Bean.java (имя = «боб»)
public class Bean implements Serializable
{
List<List<MyObject>> listoflist = new ArrayList<List<MyObject>>()
//--------------Getters and Setter
}
MyObject.java
public class MyObject
{
private String s1;
private String s2;
//---------------getter and setter
}