TextField<String> regexField = new RequiredTextField<String>("regex", BindingModel.of(ruleForm.getModel(),
Binding.artifactNotificationRule().regex()));
regexField.setLabel(new ResourceModel("artifact.rules.field.regex"));
ruleForm.add(regexField);
ArtifactNotificationRuleTypeDropDownChoice typeField = new ArtifactNotificationRuleTypeDropDownChoice("type",
BindingModel.of(ruleForm.getModel(), Binding.artifactNotificationRule().type()));
typeField.setLabel(new ResourceModel("artifact.rules.field.type"));
typeField.setRequired(true);
ruleForm.add(typeField);
return body;
}