Chris Chiappone <chiappone <at> gmail.com> writes:
> <table class="TapTable" jwcid="table <at> contrib:Table"
> source="ognl:page.allCompanies"
> columns="=companyName, appCount, assessmentCount,
> inprogressAssessments, compliantCount"
> rowsClass="ognl:beans.evenOdd.next" pageSize="20">
> </table>
> <span jwcid="companyNameColumnValue <at> Block">
> <span jwcid="nameLink">
> <span jwcid="nameText"/>
> </span>
> </span>
>
> Where I want to sort by companyName. When I have the '=' in front of
> companyName I end up getting a noSuchPropertyException for
> companyName. If I do not include the '=' then the page works fine,
> along with sorting when click the header. Does anyone have an idea of
> what I'm doing wrong. Thanks,
As it works without "=", why not just keep it that way? Having
an "=" means it will call getCompany() on your page object and
expect an ITableColumn:
class YourPageClass {
public ITableColumn getCompanyName() {
return new SimpleTableColumn("cn", "company name",
new ITableColumnEvaluator() {
public Object getColumnValue(ITableColumn objColumn, Object objRow) {
return ((Company)objRow).getName();
}
}, true);
}
}
--
Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]