MyFaces Core
  1. MyFaces Core
  2. MYFACES-3125

ValidatorTagHandlerDelegate does not invoke next handler in partial processing mode, which damages the component structure

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.6, 2.1.0
    • Component/s: None
    • Labels:
      None

      Description

      In my particular example (which I may or may not be able to extract and reproduce), I have:

      <h:form>
      <f:validateBean>
      <h:inputText />
      ...
      </f:validateBean>
      </h:form>

      In this example, the form's children are marked for deletion; then, when ValidatorTHDelegate sees that the parent is not a new component, it bails out, thus failing to invoke the next handler and re-add the child components. When the deletion is finalized the form is left with no children, which incidentally makes it impossible to complete the AJAX request as designed, since the component to re-render no longer exists! I believe this would only be a problem in wrapping mode. I have verified that removing the validateBean tag causes the form's structure to be preserved.

        Activity

        Hide
        Leonardo Uribe added a comment -

        Yes, it is a bug. The solution is do the same pattern AjaxHandler has to handle wrap mode: don't call ComponentHandler.isNew, instead check if the component has been found on ComponentTagHandlerDelegate. I added some try{} finally{} blocks to handle push/pop from stack stuff.

        Show
        Leonardo Uribe added a comment - Yes, it is a bug. The solution is do the same pattern AjaxHandler has to handle wrap mode: don't call ComponentHandler.isNew, instead check if the component has been found on ComponentTagHandlerDelegate. I added some try{} finally{} blocks to handle push/pop from stack stuff.
        Hide
        Matt Benson added a comment -

        I hadn't yet had any luck reproducing this in a submittable example project, but hoped that my initial description would be enough to go on. Thanks for the fix!

        Show
        Matt Benson added a comment - I hadn't yet had any luck reproducing this in a submittable example project, but hoped that my initial description would be enough to go on. Thanks for the fix!
        Hide
        Leonardo Uribe added a comment -

        It could be good if you can confirm the issue is fixed. I'm sure it is, but it is better if someone else can check this one too.

        Show
        Leonardo Uribe added a comment - It could be good if you can confirm the issue is fixed. I'm sure it is, but it is better if someone else can check this one too.
        Hide
        Matt Benson added a comment -

        I plan to do a build from trunk later and check; will report back.

        Show
        Matt Benson added a comment - I plan to do a build from trunk later and check; will report back.
        Hide
        Leonardo Uribe added a comment -

        Thanks! that would be a big help.

        Show
        Leonardo Uribe added a comment - Thanks! that would be a big help.
        Hide
        Matt Benson added a comment -

        Took awhile for me to get back to this, but yes--latest 2.1.0-SNAPSHOT fixes my problem. Thanks Leo!

        Show
        Matt Benson added a comment - Took awhile for me to get back to this, but yes--latest 2.1.0-SNAPSHOT fixes my problem. Thanks Leo!

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Matt Benson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development