diff --git a/Kitodo/src/main/java/org/kitodo/production/forms/AddSearchFieldDialogView.java b/Kitodo/src/main/java/org/kitodo/production/forms/AddSearchFieldDialogView.java index 6315e241d8d..fc9d90424a5 100644 --- a/Kitodo/src/main/java/org/kitodo/production/forms/AddSearchFieldDialogView.java +++ b/Kitodo/src/main/java/org/kitodo/production/forms/AddSearchFieldDialogView.java @@ -26,7 +26,7 @@ public class AddSearchFieldDialogView { * Default constructor. */ public AddSearchFieldDialogView() { - this.searchField = new SearchField(); + init(); } /** @@ -46,4 +46,11 @@ public SearchField getSearchField() { public void setSearchField(SearchField searchField) { this.searchField = searchField; } + + /** + * Initialize search field. + */ + public void init() { + searchField = new SearchField(); + } } diff --git a/Kitodo/src/main/webapp/WEB-INF/templates/includes/importConfigurationEdit/rows/searchFieldRows.xhtml b/Kitodo/src/main/webapp/WEB-INF/templates/includes/importConfigurationEdit/rows/searchFieldRows.xhtml index 6ef860d09e1..5b65cdd4751 100644 --- a/Kitodo/src/main/webapp/WEB-INF/templates/includes/importConfigurationEdit/rows/searchFieldRows.xhtml +++ b/Kitodo/src/main/webapp/WEB-INF/templates/includes/importConfigurationEdit/rows/searchFieldRows.xhtml @@ -63,10 +63,10 @@ value="Define search fields available in this search interface"/> - - + action="#{addSearchFieldDialogView.init()}" + process="@this" + update="addSearchFieldDialog" + oncomplete="PF('addSearchFieldDialog').show()"/>