Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show pagination format error #5660

Merged
merged 2 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -337,18 +337,23 @@ public void startPaginationClick() {
logger.info(e.getMessage());
}
List<Separator> pageSeparators = Separator.factory(ConfigCore.getParameter(ParameterCore.PAGE_SEPARATORS));
String initializer = paginationTypeSelectSelectedItem.format(selectPaginationModeSelectedItem.getValue(),
try {
String initializer = paginationTypeSelectSelectedItem.format(selectPaginationModeSelectedItem.getValue(),
paginationStartValue, fictitiousCheckboxChecked, pageSeparators.get(0).getSeparatorString());
Paginator paginator = new Paginator(initializer);
List<PhysicalDivision> physicalDivisions = dataEditor.getWorkpiece().getAllPhysicalDivisionChildrenFilteredByTypePageAndSorted();
if (selectPaginationScopeSelectedItem) {
for (int i = paginationSelectionSelectedItems.get(0); i < physicalDivisions.size(); i++) {
physicalDivisions.get(i).setOrderlabel(paginator.next());
}
} else {
for (int i : paginationSelectionSelectedItems) {
physicalDivisions.get(i).setOrderlabel(paginator.next());
Paginator paginator = new Paginator(initializer);
List<PhysicalDivision> physicalDivisions = dataEditor.getWorkpiece()
.getAllPhysicalDivisionChildrenFilteredByTypePageAndSorted();
if (selectPaginationScopeSelectedItem) {
for (int i = paginationSelectionSelectedItems.get(0); i < physicalDivisions.size(); i++) {
physicalDivisions.get(i).setOrderlabel(paginator.next());
}
} else {
for (int i : paginationSelectionSelectedItems) {
physicalDivisions.get(i).setOrderlabel(paginator.next());
}
}
} catch (NumberFormatException e) {
Helper.setErrorMessage("paginationFormatError", new Object[] { paginationStartValue });
}
paginationSelectionSelectedItems = new ArrayList<>();
preparePaginationSelectionItems();
Expand Down
1 change: 1 addition & 0 deletions Kitodo/src/main/resources/messages/errors_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ errorOccurred=Es ist ein Fehler aufgetreten:
errorParsingFile=Parsingfehler: verschiedene {0} in der Datei (''{1}'' & ''{2}'').
errorParsingName="Parsingfehler: Vorname nicht mit Komma vom Nachnamen getrennt ('" {0} "')".
errorProjectNoTitleGiven=Kein Titel angegeben. Ein Projekt kann nicht ohne Titel gespeichert werden.
paginationFormatError=Der Paginierungsstartwert "{0}" ist nicht dem gew\u00E4hlten Paginierungstyp entsprechend formatiert.
parameterMissing=Pflichtparameter {ID} nicht gefunden.
passwordsDontMatchOld=Das eingegebene Passwort stimmt nicht mit dem alten Passwort \u00FCberein!
processAssignedError=Diese Produktionsvorlage kann nicht gel\u00F6scht werden, da dieser Vorg\u00E4nge zugewiesen sind.
Expand Down
1 change: 1 addition & 0 deletions Kitodo/src/main/resources/messages/errors_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ errorOccurred=An error has occurred:
errorParsingFile=Error parsing: various {0} in the file (''{1}'' & ''{2}'').
errorParsingName="Error parsing: First name not separated by comma from last name ('" {0} "')".
errorProjectNoTitleGiven=No project title was given. You cannot save a project without a title.
paginationFormatError=The pagination start value "{0}" is malformed according to selected pagination type.
parameterMissing=Mandatory parameter {ID} not found.
processAssignedError=The template could not be deleted because there are already assigned processes.
processCreationErrorFieldIsEmpty={0} contains no value.
Expand Down