Skip to content

Commit

Permalink
Reset input field values when opening 'AddSearchFieldDialog'
Browse files Browse the repository at this point in the history
  • Loading branch information
solth committed Jul 1, 2022
1 parent 06e68fd commit 20c48fd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class AddSearchFieldDialogView {
* Default constructor.
*/
public AddSearchFieldDialogView() {
this.searchField = new SearchField();
init();
}

/**
Expand All @@ -46,4 +46,11 @@ public SearchField getSearchField() {
public void setSearchField(SearchField searchField) {
this.searchField = searchField;
}

/**
* Initialize search field.
*/
public void init() {
searchField = new SearchField();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
value="Define search fields available in this search interface"/>
<p:commandButton icon="fa fa-plus"
styleClass="secondary"
type="button"
onclick="PF('addSearchFieldDialog').show()">
<p:resetInput target=":addSearchFieldForm"/>
</p:commandButton>
action="#{addSearchFieldDialogView.init()}"
process="@this"
update="addSearchFieldDialog"
oncomplete="PF('addSearchFieldDialog').show()"/>
</div>
</p:row>
<p:row>
Expand Down

0 comments on commit 20c48fd

Please sign in to comment.