I get resultset base on JdbcTemplate in spring here is my sourcecode //////////////////////////////////////////////////////////////////////////////////////////////////////////// public class JdbcPageTableModel implements IBasicTableModel { .......... public Iterator getCurrentPageRows(int nFirst, int nPageSize, ITableColumn arg2, boolean arg3) { List list = new JdbcTemplate(dataSource).queryForList("select login_name,password from user_info "); for(int i=0;i<list.size();i++){ Map map = (Map)list.get(i); System.out.println("============"+map.get("login_name")); } return list.iterator(); } ....................
} public abstract class StockDetail extends BasePage{ ................................ public ITableModel getMyTableModel(){ Object[] columns = { "user_name","user name","user_name",new Boolean(false) ,"password","password","password",new Boolean(false) }; ExpressionTableColumnModel columnModel = new ExpressionTableColumnModel(columns,new ExpressionEvaluatorImpl()); return new BasicTableModelWrap(getJdbcPageTableModel(),columnModel); } ........................................... } StockDetail.html <span jwcid="[EMAIL PROTECTED]:TableView" tableModel="ognl:myTableModel" pageSize="ognl:10"> <table width="800" border="1"> <tr> <td height="24" bgcolor="#FCA632" align="center" jwcid="@Contrib:TableColumns"></td> </tr> <tr jwcid="[EMAIL PROTECTED]:TableRows"> <td bgcolor="#FFF1E1" height="24" align="center" jwcid="@Contrib:TableValues"> </td> </tr> </table> <table width ="100%"><tr><td align="center"> <span jwcid="@Contrib:TableFormPages" pagesDisplayed="ognl:10"/> </td></tr></table> </span> /////////////////////////////////////////////////////////////////////////////////// the system can print out "=============Green" "==============John" but the page StockDetail just display the title row of the table and other rows with no content the system print errors like this: ERROR org.apache.tapestry.contrib.table.model.ognl.OgnlTableColumnEvaluator - Cannot use column expression 'password' in row java.lang.NullPointerException at org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.read( ExpressionEvaluatorImpl.java:82) at org.apache.tapestry.contrib.table.model.ognl.OgnlTableColumnEvaluator.getColumnValue (OgnlTableColumnEvaluator.java:56) at org.apache.tapestry.contrib.table.model.simple.SimpleTableColumn.getColumnValue (SimpleTableColumn.java:208 what is my wrong