Page 1 of 1

Sortable Table

Posted: Fri Oct 23, 2015 5:53 pm
by ssmelche
Hello,

I'm using LSPS 3.0.1014 and trying to make a sortable table. I followed the instructions at https://docs.whitestein.com/lsps/3_0/fo ... tabletable, but clicking on the sort icon on the table's column doesn't do anything other than change the sort icon arrow's direction.

What I'm unclear about is how does clicking on the columns update the List<OrderEnumeration> variable that is passed to the query?

How does the Table Column know which Enumeration to use for descending order when the user toggles the sort icon on the table column? I seem to only be able to put one enumeration value in the Ordering property of the Table Column.

I have attached screenshots of the query, the form variables, the table properties, and the table column properties for one of the columns that should be sortable.

Re: Sortable Table

Posted: Fri Nov 06, 2015 9:38 pm
by Byron Glueck
Hello and thank you for your message.

Please refer to the current LSPS 3.x guidance for Table column sorting/ordering:
https://docs.whitestein.com/lsps/3_0/fo ... a_ordering

As an example, consider the following data type:

Screen Shot 2015-11-06 at 2.32.54 PM.png
Screen Shot 2015-11-06 at 2.32.54 PM.png (57.73 KiB) Viewed 2427 times


A Table component may be added to a Form with 2 Table Columns.
Detail: The Table Data Kind is set to Book.
Ordering: Infer Ordering is unmarked

Screen Shot 2015-11-06 at 2.33.35 PM.png
Screen Shot 2015-11-06 at 2.33.35 PM.png (114.24 KiB) Viewed 2427 times


The Title column may be ordered using Property: Book.title. The Author column may be ordered using Expression: { b:Book -> b.author.name }

Screen Shot 2015-11-06 at 2.33.54 PM.png
Screen Shot 2015-11-06 at 2.33.54 PM.png (91.62 KiB) Viewed 2427 times