Hi all

I'm trying to create a table from the contrib package.

I have the html on my page as this:

<table jwcid="[EMAIL PROTECTED]:Table" source="ognl:dataItems"
columns="RegimeID, Description" pageSize="10">
<th>ID</th>
<th>Nome</th>
<th>&nbsp;</th>
</table>

I have setup my component to fill dataItems like this:

public void pageBeginRender(PageEvent event){

       list = new ArrayList();
       setModel(model);

       MySQLDAO mysql = new MySQLDAO(this.getDataSource(), model);
       ResultSet rs = mysql.selectRegime();

       if(rs != null){

           try{
               while(rs.next()){
                   list.add(rs.getInt("RegimeID"), rs.getString
("Description"));
               }
           }catch(Exception e){
               System.err.println(e.getMessage());
           }
       }

       setDataItems(list);
   }


The problem is, whenever I load my page, I can't see a thing. What is the
best way to connect my Table to my ResultSet?

--
Cumprimentos,
Rui Pacheco

Reply via email to