Hi,
I am trying to display data retreived via a hibernate DAO in an adf table. Here is my code.
Backing bean:
public class SectionBean {
private Session sess = null;
private List listo;
}
public void setList(List listi) {
SessionFactory sessionFactory =
new Configuration().configure().buildSessionFactory();
sess = sessionFactory.openSession();
listi = new ArrayList();
listi =
sess.createSQLQuery("SELECT * FROM subsection").addScalar("ID", Hibernate.LONG).addScalar("NAME",
Hibernate.STRING).addScalar("DESCRIPTION",
Hibernate.STRING).list();
this.listo = list;
}
public List getList() {
return listo;
}
public void endSession() {
sess.close();
}
}
AF table:
<af:table summary="tbsm" var="ss"
value="#{backing_lb.listo}" rowBandingInterval="0" id="t1"
>
<af:column rowHeader="true" sortable="false" headerText="Description" align="start"
id="c1">
<af:outputText value="#{ss.DESCRIPTION}" id="ot4"/>
</af:column>
<af:column rowHeader="true" sortable="false" headerText="Name" align="start"
id="c2">
<af:outputText value="#{ss.NAME}" id="ot5"/>
</af:column>
</af:table>
The DAO works fine by itself, it retrieves the data. but the table does not display the information.
Thanks.