feat(form-fill): add CSV and XLSX extraction for form fields, improve file ID handling (#5776)

This commit is contained in:
Balázs Szücs
2026-02-23 21:17:58 +01:00
committed by GitHub
parent 340224b40b
commit 549f796e47
9 changed files with 321 additions and 64 deletions

View File

@@ -258,7 +258,9 @@ public class JobExecutorService {
// GlobalExceptionHandler (either directly or wrapped)
Throwable cause = e.getCause();
if (e instanceof IllegalArgumentException
|| cause instanceof stirling.software.common.util.ExceptionUtils.BaseAppException
|| cause
instanceof
stirling.software.common.util.ExceptionUtils.BaseAppException
|| cause
instanceof
stirling.software.common.util.ExceptionUtils

View File

@@ -132,7 +132,7 @@ public class FormUtils {
continue;
}
String currentValue = safeValue(terminalField);
String currentValue = safeFieldValue(terminalField);
boolean required = field.isRequired();
int pageIndex = resolveFirstWidgetPageIndex(document, terminalField, annotationPageMap);
List<String> options = resolveOptions(terminalField);
@@ -203,7 +203,7 @@ public class FormUtils {
continue;
}
String currentValue = safeValue(terminalField);
String currentValue = safeFieldValue(terminalField);
boolean required = field.isRequired();
boolean readOnly = field.isReadOnly();
List<String> options = resolveOptions(terminalField);
@@ -1234,7 +1234,11 @@ public class FormUtils {
return states;
}
private String safeValue(PDTerminalField field) {
public String safeValue(String value) {
return value != null ? value : "";
}
private String safeFieldValue(PDTerminalField field) {
try {
// PDChoice.getValueAsString() returns a raw COS string representation
// that doesn't reliably reflect the selected value. Use getValue()