TextField<String> periodName = new TextField<String>("name", new PropertyModel<String>(getModel(), "name"));
add(periodName);
// Ensure that no two periods in the same site have the same name.
periodName.add(new UniqueDataFieldValidator<String>(Period.class, "name").limitScope("site", ISISession.get().getCurrentSiteModel()));
periodName.add(new SimpleAttributeModifier("maxlength", "32"));
periodName.setRequired(true);
periodName.setOutputMarkupId(true);
final FeedbackPanel feedback = new FeedbackPanel("feedback", new ContainerFeedbackMessageFilter(this));
feedback.setMaxMessages(1);