Skip to content

NGPopUpButton: empty submitted value throws NumberFormatException #70

Description

@hugithordarson

Posting an empty string as the value of an NGPopUpButton form field (instead of an option index or NO_SELECTION_OPTION_VALUE) throws java.lang.NumberFormatException: For input string: "" while taking values.

Browsers always send one of the rendered option values, so this only surfaces from scripted/non-browser clients or hand-built forms - but the failure mode is an exception page rather than a clear error.

Suggestion: treat an empty value like NO_SELECTION_OPTION_VALUE (set selection to null), or fail with a message naming the element and the offending value, in line with the deliberate out-of-range-index handling.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions