Now a list of cheeses and a shopping cart is put into Index.html.
The imports show the components that will be added as behaviors to the Index.java in this section:
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.markup.html.list.PageableListView;
import org.apache.wicket.markup.html.navigation.paging.PagingNavigator;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
… … … … … … . section_3_2
… … … … … … … Checkout.html
… … … … … … … Checkout.java
… … … … … … … Index.html
… … … … … … … Index.java
… … … … … … … . logo.png
… … … … … … … style.css
Checkout.java is an empty class that is implemented in the next section.
Notice the <wicket:remove> block in Index.html.
This is simply markup that is there for previewing purposes only.
When the page renders, the <wicket:remove> block is stripped out.
The listing below is a partial listing of Index.html, without shopping cart and checkout button.
A ListView is rendered using the id "cheeses":





Note the use of PageableListView in Index.java

When the cart has been added to Index.html, then you can click "Add to Cart" as shown below. The Checkout button becomes visible when the cart has an entry.










