|
Processing... Sort the data by clicking the column
Description & Source Code
This sample demonstrates the sorting functionalities built in the Listbox and Grid components, saving developers from comparator implementations. Other then sorting alphabetically or numerically on entries, sorting can be made with respect to the fields in a POJO. See Demo For more detail on this feature, please consult ZK Component Reference. auto_sort.zul
<zk> <listbox id="box" width="100%" > <listhead > <listheader label="Author" sort="auto" /> <listheader label="Title" sort="auto" /> <listheader label="Publisher" sort="auto" /> <listheader label="Hardcover" sort="auto" /> </listhead> <listitem> <listcell label="Philip Hensher" /> <listcell label="The Northern Clemency" /> <listcell label="Knopf (October 30, 2011)" /> <listcell label="608 pages" /> </listitem> <listitem> <listcell label="Philip Hensher" /> <listcell label="The Fit" /> <listcell label="HarperPerennial (April 4, 2005)" /> <listcell label="240 pages" /> </listitem> <listitem> <listcell label="Philip Hensher" /> <listcell label="Kitchen Venom" /> <listcell label="Flamingo (May 19, 2003)" /> <listcell label="336 pages" /> </listitem> <listitem> <listcell label="Michael Greenberg" /> <listcell label="Hurry Down Sunshine" /> <listcell label="Other Press (September 9, 2011)" /> <listcell label="240 pages" /> </listitem> <listitem> <listcell label="Michael Greenberg" /> <listcell label="Painless Vocabulary (Painless)" /> <listcell label="Barron's Educational Series (September 1, 2001)" /> <listcell label="292 pages" /> </listitem> <listitem> <listcell label="Rick Perlstein" /> <listcell label="Nixonland: The Rise of a President and the Fracturing of America" /> <listcell label="Scribner; 1st Scribner Hardcover Ed edition (May 13, 2011)" /> <listcell label="896 pages" /> </listitem> <listitem> <listcell label="Rick Perlstein" /> <listcell label="Nixonland" /> <listcell label="Simon & Schuster (May 13, 2011)" /> <listcell label="896 pages" /> </listitem> </listbox> </zk>
Copyright © 2005-2024 Potix Corporation All rights reserved.
|
Processing... |