Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-4667

UIData#invokeOnComponent does not find components

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3.10
    • None
    • None
    • None

    Description

      While working an a bug in mojarra implementation] I found an old primefaces issue which was somehow related to my issue. Using the reproducer of that PF issue, I was able to really find the root cause of the issue and that even myfaces is affected - contrary to what was assumed at the time.

       

      What happens?
      A p:datatable with p:column*s* was updated by the backend using PrimeFaces#Ajax#update. The implementation used UIComponent#invokeOnComponent to find the component of the given clientId. As p:dataTable relies on UIData of myfaces, p:columns won't be handled. Nothing could be found and PrimeFaces#Ajax#update falls back to just forwarding the given clientId.

      Why does it happen?
      Like mojarra, myfaces filters the children on processing using instanceof UIColumn. But p:columns does not extend that class. Therefore p:columns is not a candiate and is simply ignored.

      Possible fix (not yet tested)
      Remove the check.

      How to reproduce
      Use the reproducer and change the PROJECT_STAGE to Development. Run the project using the myfaces23 profile. You should get a lot of logging entries like

      Mai 21, 2024 2:53:41 PM org.primefaces.PrimeFaces$Ajax update
      WARNUNG: PrimeFaces.current().ajax().update() called but component cant be resolved! Expression will just be added to the renderIds: {0}

      Attachments

        Activity

          People

            Unassigned Unassigned
            fanste SteGr
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: