You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by phillip rhodes <rh...@yahoo.com> on 2005/09/25 22:38:17 UTC

contrib table, sort by unviewable value?

I am using the contrib table to display a product
category.  I would like to allow the users to sort a
listing of products by popularity

Phillip Rhodeshttp://www.jsso.org Open source Java Identity and Authorization Serviceshttp://www.rhoderunner.com Open Source Java Ecommerce Suite

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


Re: contrib table, sort by unviewable value?

Posted by Mind Bridge <mi...@yahoo.com>.
Hi,

What Thomas says is one way. Here is another:

The sorting is performed according to the OGNL expression provided in 
'columns'. The appearance of the column is by default the toString() of 
that expression, but this can be overridden by defining a Block named 
'<column>ColumnValue>'.

In your case you could define you column as:

columns=".... category:popularity, ..."

and define its appearance as:

<span jwcid="categoryColumnValue@Block">
  <span jwcid="@Insert" value="ognl:components.table.tableRow.category"/>
</span>

The result will be that the 'category' column will display the category, 
but will be sorted by popularity.

-mb


phillip rhodes wrote:

>I am using the contrib table to display a product
>category.  I would like to allow the users to sort a
>listing of products by popularity
>
>Phillip Rhodeshttp://www.jsso.org Open source Java Identity and Authorization Serviceshttp://www.rhoderunner.com Open Source Java Ecommerce Suite
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>  
>

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


Re: contrib table, sort by unviewable value?

Posted by Tomáš Drenčák <to...@gmail.com>.
Create Popularity type and implement Comparable interface. Then
application should sort popularity column in predefined way...

2005/9/25, phillip rhodes <rh...@yahoo.com>:
> I am using the contrib table to display a product
> category.  I would like to allow the users to sort a
> listing of products by popularity
>
> Phillip Rhodeshttp://www.jsso.org Open source Java Identity and Authorization Serviceshttp://www.rhoderunner.com Open Source Java Ecommerce Suite
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

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