in src/main/java/org/apache/nutch/webui/pages/crawls/CrawlPanel.java [57:89]
public CrawlPanel(String markupId) {
super(markupId);
header(Model.of("Crawl"));
notificationPanel = new NotificationPanel("notificationPanel");
notificationPanel.setOutputMarkupId(true);
add(notificationPanel);
form = new BootstrapForm<>("crawlForm");
form.add(new Label("crawlId"));
form.add(new TextField<String>("crawlName").setRequired(true));
form.add(new DropDownChoice<>("numberOfRounds", getNumbersOfRounds()));
form.add(new DropDownChoice<>("seedList",
seedListService.findAll(), new ChoiceRenderer<>("name"))
.setRequired(true));
addButton(new AjaxSubmitLink("button", form) {
private static final long serialVersionUID = 7258690721871500708L;
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> ajaxForm) {
crawlService.saveCrawl(form.getModelObject());
target.add(this.getPage());
}
protected void onError(AjaxRequestTarget target, Form<?> form) {
target.add(notificationPanel);
};
}.setBody(Model.of("Save")));
add(form);
}