Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5467

NumberTextField should support "any" as valid step attribute value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.13.0
    • 6.14.0, 7.0.0-M1
    • wicket
    • wicket 6.11.0

    Description

      The NumberTextField removes the any value from step attribute added to markup.
      E.g. <input type="number" step="any" wicket:id="myNumber" />
      and add(new NumberTextField<Double>("myNumber", numModel);

      leads to markup
      <input type="number" id="myNumber" />
      but should be
      <input type="number" step="any" id="myNumber" />

      I can see 2 possbile solutions
      1. Don't remove the step attribute
      2. Add a constant ANY to NumberTextField
      public static final Number ANY = 0;
      and let this be configurable to users (setStep(ANY))

      Attachments

        1. fix-WICKET-5467-src.zip
          5 kB
          Per Newgro
        2. fix-WICKET-5467.patch
          34 kB
          Per Newgro

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            newgro Per Newgro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: