You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Chris Chiappone <ch...@gmail.com> on 2006/01/18 17:07:50 UTC

sorting contrib table noSuchPropertyException

I am trying to sort on a column in a contrib table.  My table
definition is as follows:

    <table class="TapTable" jwcid="table@contrib:Table"
	 source="ognl:page.allCompanies"
	 columns="=companyName, appCount, assessmentCount,
inprogressAssessments, compliantCount"
  rowsClass="ognl:beans.evenOdd.next" pageSize="20">
    </table>
     <span jwcid="companyNameColumnValue@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,

--
~chris

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


Re: sorting contrib table noSuchPropertyException

Posted by Chris Chiappone <ch...@gmail.com>.
Has anyone ran into this before.  Still trying to figure out what I
might be doing wrong.

Thanks...

On 1/18/06, Chris Chiappone <ch...@gmail.com> wrote:
> I am trying to sort on a column in a contrib table.  My table
> definition is as follows:
>
>     <table class="TapTable" jwcid="table@contrib:Table"
>          source="ognl:page.allCompanies"
>          columns="=companyName, appCount, assessmentCount,
> inprogressAssessments, compliantCount"
>   rowsClass="ognl:beans.evenOdd.next" pageSize="20">
>     </table>
>      <span jwcid="companyNameColumnValue@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,
>
> --
> ~chris
>


--
~chris

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


Re: sorting contrib table noSuchPropertyException

Posted by Kent Tong <ke...@cpttm.org.mo>.
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: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org