You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ralph Churchill <mr...@yahoo.com> on 2004/04/14 01:02:54 UTC

contrib:FormTable and IBasicTableModel

Hello. I'm using Tapestry-3.0-rc-3. I'm trying to use
an IBasicTableModel as the source parameter for a
contrib:FormTable. Here's my HTML (it's pretty
simple):
<html>
<body jwcid="@Body">
    <form jwcid="@Form"
listener="ognl:listeners.formSubmit">
    <table jwcid="@contrib:FormTable" width="100%"
        source="ognl:supplierTableModel"
        row="ognl:supplier"
        columns="Supplier Number:supplierNumber,
Supplier Short Name:supplierShortName, CCI
Status:cciStatus, Supplier Name:supplierName"
        />
    </form>
</body>
</html>

My .page has nothing more than the Page class
declaration. My page class returns a IBasicTableModel
from "getSupplierTableModel()". Do I need anything
else in the page class or page file?

My implementation of the IBasicTableModel is pretty
simple, too:

public class SupplierTable implements IBasicTableModel
{
    private java.util.List rows = null;
    public int getRowCount()
    {
        return (rows!=null)?rows.size():0;
    }

    public java.util.Iterator getCurrentPageRows(int
first, int pageSize,
        ITableColumn sortColumn, boolean sortOrder)
    {
        rows = new
SupplierDAO().hbGetSuppliersOrderedInRange(first,
pageSize,
        sortColumn.getColumnName(), sortOrder);
        return rows.iterator();
    }
}

However, I'm getting the following strange exception:
Unable to resolve expression
'convertedTableRowsIterator' for
org.apache.tapestry.contrib.table.components.TableFormRows$Enhance_56@1e3e7d2[Supplier2/$FormTable.tableRows].

I'm totally confused.

RMC


~


	
		
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org