Book Search Example
The example below provides a search form you can use to search for books. Clicking Search (it's not necessary to enter any search criteria, though you can if you wish) triggers a mock fetch from an XMLServiceAdaptor, and renders a page that displays the results in a navigable ListView with fancy pagination controls.
Notes on this Example
Each of the 'body rows' presented in the ListView is actually an entire Book Detail table containing its own headings and subheadings as well as an arbitrary number of edition rows.
The pagination section of the footer is an XHTML component that is shared with the Customer Search example.
The ListView is managed by an instance of SLListViewAction, rather than by an Action subclass local to the example project. Similarly, though a local ActionForm subclass is used, it implements no properties of its own, and only a single method used to calculate sizes for rowspans; for all the rest it depends on SLListViewForm, of which it is a subclass. There are only 131 source lines of Java code in the entire Book Search example, plus 168 lines of XHTML (not counting the Introduction and Notes sections of this page), and 27 lines of XML.
You can remove rows from the ListView by selecting one or more checkboxes on the left and clicking the Remove Selected button. Clicking Undo Changes refetches the original list.