Tapestry 5
  1. Tapestry 5
  2. TAP5-1393

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


    • 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:


      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. stacktrace.txt
        26 kB
        Matheus Eduardo Machado Moreira
      2. Permissao.java
        2 kB
        Matheus Eduardo Machado Moreira
      3. EditarPermissao.tml
        2 kB
        Matheus Eduardo Machado Moreira
      4. EditarPermissao.java
        2 kB
        Matheus Eduardo Machado Moreira


        No work has yet been logged on this issue.


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


            • Created: