I am trying to fill a DataTable with a List that was filled by a result queried by a native sql.
Object array defines the value of each columns, for expample Object[0] is the value of the first column.
My dataTable is something like this
<p:dataTable id="dataTable1RQ" var="item" value="#{reportQuestionMBean.dataTable}">
<p:column id="modelHeader">
<f:facet name="header">
Market
</f:facet>
<h:outputText value="#{reportQuestionMBean.market.name}" />
</p:column>
<p:column>
<f:facet name="header">
Form
</f:facet>
<h:outputText value="#{reportQuestionMBean.form.name}" />
</p:column>
<p:column>
<f:facet name="header">
Question
</f:facet>
<h:outputText value="#{item}" />
</p:column>
</p:dataTable>
I want to fill the column 'Question' but I cannot reach the index of the Object array in the List. If it was a specific class instead of Object[], it would be easy to fill by implementing like this
<h:outputText value="#{item.name}" />
But it is not. So if you know how to reach the index of an array in a list, your help will make me preciated.
Thanks.