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

AbstractTextComponent requires itself to be rendered before conversion happens

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0-final
    • Fix Version/s: 1.3.2
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      wicket 1.3-final

      Description

      The bug is reproduced as follows:

      1. Use StatelessForm.
      2. Use compound model, eg CompoundPropertyModel. In this case, form components are not initially aware of their model types.
      3. Use any text component inside, eg TextField

      What happens:

      1. In StatelessForm, form processing occurs BEFORE components were actually rendered.
      2. BUT AbstractTextComponent guesses its model type ONLY in onBeforeRender().
      3. onBeforeRender() never gets called, so text component doesn't know its actual type and cannot convert properly.
      4. Everything crashes because of incorrect type (validators and form submission is working wrong).

      Obviously, this processing sequence needs to be fixed (eg retrieve model type early or check for stateless forms explicitly).

        Attachments

          Activity

            People

            • Assignee:
              jcompagner Johan Compagner
              Reporter:
              snekoval Serge P. Nekoval
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: