私はdataTable
動的に with 列を生成しようとしているので、List<List>
a のList
内部がList
列のコンテンツである場合がありますが、それを表示しようとするとあまり表示できません。
だから、これは私のBeanのコードです:
@ManagedBean
@javax.faces.bean.ViewScoped
public class Controlador {
private List<List> estadistico;
@PostConstruct
public void inicializar(){
this.estadistico = new ArrayList<List>();
this.estadistico.add( Arrays.asList( new Integer[]{0,1,24}));
this.estadistico.add( Arrays.asList( new Integer[]{5,1,34}));
this.estadistico.add( Arrays.asList( new Integer[]{12,1,4}));
}
//getter's and setter's
}
そして、これはビューです:
<h:form>
<!-- estadistico is List<List> -->
<p:dataTable value="#{controlador.estadistico}" var="lista">
<!-- lista is List of numbers
and I suppose that value is each number
-->
<p:columns value="#{lista}" var="value" >
#{value}
</p:columns>
</p:dataTable>
</h:form>
私は次のようなものを期待していました:
---------------
0 5 12
---------------
1 1 1
---------------
24 34 4
---------------
私は何を間違っていますか?
正しい方法は何ですか?