Francesco

I think you'd need to read the result set into something you can
display as judging by the message myfaces ResultSetDataModel isn't
implemenated in myfaces yet..

That or use sun's implemenation which I imagine does. Myfaces
componants (at least the ones i've tried) work with sun's
implementation. But I imagine a list will should work just fine.

private List userList = new ArrayList();


UserBean user;;
while(rs... ) {
      user = new UserBean()
      user.setCognome(.. );
       this.userList.add(user);
.. 
}

public List getUsers() {
   return this.userList;
}


<h:dataTable var="userBean" value="#{mb.users}">
<h:column>
� <h:outputText value="#{userBean.cognome}"/>
</h:column>


Mark

On Tue,  2 Nov 2004 15:55:25 +0100, Francesco Consumi
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> when I connect a ResultSet to a DataTable, I obtain this error:
> 
> javax.faces.FacesException: Not yet
> implemented:javax.faces.model.ResultSetDataModel
> 
> these are the code fragments:
> ...bean.java
> 
>        try {
>           rs1 = st.executeQuery("SELECT * FROM UTENTI"));
>        } catch(SQLException e) {
>            System.out.print(e.getMessage());
>        }
>      }
> .....
> 
> index.jsf
> 
> <h:dataTable var="rows" value="#{mb.rs1}">
> <h:column id="c1">
>    <h:outputText value="#{rows.COGNOMENOME}"/>
> </h:column>
> 
> .....
> 
> ideas ?
> thanks.
> 
> --
> Francesco Consumi
> Ufficio Sistemi informativi
> Istituto degli Innocenti
> Piazza SS.Annunziata, 12
> 50122 Firenze
> consumi at istitutodeglinnocenti.it
> Tel. +39 055 2037320
> ICQ# 12516133
> 
>

Reply via email to