// Create a required text field with a max length of 30 characters
// that edits the book's title
final TextField<String> title = new TextField<String>("title");
title.setRequired(true);
title.add(StringValidator.maximumLength(30));
final FormComponentFeedbackBorder titleFeedback = new FormComponentFeedbackBorder(
"titleFeedback");
add(titleFeedback);
titleFeedback.add(title);
// Create a required text field that edits the book's author
final TextField<String> author = new TextField<String>("author");
author.setRequired(true);
final FormComponentFeedbackBorder authorFeedback = new FormComponentFeedbackBorder(
"authorFeedback");
add(authorFeedback);
authorFeedback.add(author);
// Add fiction checkbox
add(new CheckBox("fiction"));
// Books is everything but otherBook