Tapestry 5
  1. Tapestry 5
  2. TAP5-1393

Form component shoould push the BeanValidationContext into the Environment only after onPrepare()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.4
    • Fix Version/s: 5.3
    • Component/s: tapestry-beanvalidator
    • Labels:
      None

      Description

      An exception is throw when trying to render a Form whose validate parameter is bound to a bean that is null after onActivate():

      ERROR tapestry.render.br.com.eteg.cromoup.pages.acesso.EditarPermissao - Render queue error in BeginRender[acesso/EditarPermissao:nome]: Class cannot be null

      The attached files show a scenario where the bug occur. Basically it shows an edit page that initialize a bean (that is bound to the validate parameter of the Form) at onValidate() if a not-null id is passed as the initialization context. If the id is null the bean is initialized at onPrepare(), just after the Form starts to render itself. The problem seems to happen because the "prepare" (and "prepare_to_render") event are triggered after the Form component pushes a BeanValidationContextImpl into the Environment.

      1. EditarPermissao.java
        2 kB
        Matheus Eduardo Machado Moreira
      2. EditarPermissao.tml
        2 kB
        Matheus Eduardo Machado Moreira
      3. Permissao.java
        2 kB
        Matheus Eduardo Machado Moreira
      4. stacktrace.txt
        26 kB
        Matheus Eduardo Machado Moreira

        Activity

        Hide
        Igor Drobiazko added a comment -

        Thank you for the bug report.

        Show
        Igor Drobiazko added a comment - Thank you for the bug report.
        Hide
        Matheus Eduardo Machado Moreira added a comment -

        Igor, it was a pleasure to contribute a little bit to Tapestry.

        Show
        Matheus Eduardo Machado Moreira added a comment - Igor, it was a pleasure to contribute a little bit to Tapestry.
        Hide
        Hudson added a comment -

        Integrated in tapestry-5.2-freestyle #252 (See https://hudson.apache.org/hudson/job/tapestry-5.2-freestyle/252/)

        Show
        Hudson added a comment - Integrated in tapestry-5.2-freestyle #252 (See https://hudson.apache.org/hudson/job/tapestry-5.2-freestyle/252/ )

          People

          • Assignee:
            Igor Drobiazko
            Reporter:
            Matheus Eduardo Machado Moreira
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development