You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Christopher Corde <cc...@yahoo.com> on 2004/08/13 17:17:30 UTC

Sorting within Tables

Hey,

  I am having trouble with table sorting now that I
have converted my tables to the new format. I have a
table component defined in the page file:

 <component id="table" type="contrib:Table">
  <binding name="source" expression="corresList"/>
  <binding name="columns">
   'date:Date/Time:formattedEntryDate,
clientCode:Client:code, user:Entered
By:user.formattedName'
  </binding>        
  <binding name="row" expression="currentRow"/>
  <binding name="rowsClass"
expression="evenOdd.next"/>
</component>

  The "formattedEntryDate" field is a String
representation of a Timestamp object (to allow easy
printing). When I was creating the column model
myself, I simply set a comparator on the column to
make the sorting work correctly:

 column = new ExpressionTableColumn("Date/Time",
"formattedEntryDate", true);
 column.setComparator(new DateComparator());
 columns.add(column);

  How do I mimic the same functionality when defining
the column model within the .page file directly?

Thanks,
Chris Corde



		
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail 

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


Re: Sorting within Tables

Posted by "Julio C. Rivera" <ju...@ya.com>.
I did a similar question some days ago: 
http://article.gmane.org/gmane.comp.java.tapestry.user/11380

And MindBrige answers this: 
http://article.gmane.org/gmane.comp.java.tapestry.user/11381

I think it can to help you to find a solution to your problem.

Regards.
    Julio.

At 08:17 13/08/2004 -0700, you wrote:
>Hey,
>
>   I am having trouble with table sorting now that I
>have converted my tables to the new format. I have a
>table component defined in the page file:
>
>  <component id="table" type="contrib:Table">
>   <binding name="source" expression="corresList"/>
>   <binding name="columns">
>    'date:Date/Time:formattedEntryDate,
>clientCode:Client:code, user:Entered
>By:user.formattedName'
>   </binding>
>   <binding name="row" expression="currentRow"/>
>   <binding name="rowsClass"
>expression="evenOdd.next"/>
></component>
>
>   The "formattedEntryDate" field is a String
>representation of a Timestamp object (to allow easy
>printing). When I was creating the column model
>myself, I simply set a comparator on the column to
>make the sorting work correctly:
>
>  column = new ExpressionTableColumn("Date/Time",
>"formattedEntryDate", true);
>  column.setComparator(new DateComparator());
>  columns.add(column);
>
>   How do I mimic the same functionality when defining
>the column model within the .page file directly?
>
>Thanks,
>Chris Corde
>
>
>
>
>__________________________________
>Do you Yahoo!?
>Read only the mail you want - Yahoo! Mail SpamGuard.
>http://promotions.yahoo.com/new_mail
>
>---------------------------------------------------------------------
>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