MyFaces Core
  1. MyFaces Core
  2. MYFACES-3109

UIInput SystemEvents are called with wrong sourceBaseTyp

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.5
    • Fix Version/s: 2.0.6
    • Component/s: JSR-314
    • Labels:
      None

      Description

      Function publishEvent is called with UIComponent.class instead of source.getClass according to spec java doc application.publishEvent.

        Activity

        Hide
        Jakob Korherr added a comment -

        This is a pretty big bug. Sadly no-one recognized it so far.

        Javadoc of Application.publishEvent() says:

        sourceBaseType - The Class of the source event that must be used to lookup the listener to which this event must be published. If this argument is null the return from source.getClass() must be used as the sourceBaseType.

        Marcus found out about it, because of the Primefaces guide to style invalid input fields with jsf (see http://cagataycivici.wordpress.com/2011/04/04/styling-invalid-input-fields-with-jsf/).

        So we have to change all references to UIComponent.class to source.getClass().

        Show
        Jakob Korherr added a comment - This is a pretty big bug. Sadly no-one recognized it so far. Javadoc of Application.publishEvent() says: sourceBaseType - The Class of the source event that must be used to lookup the listener to which this event must be published. If this argument is null the return from source.getClass() must be used as the sourceBaseType. Marcus found out about it, because of the Primefaces guide to style invalid input fields with jsf (see http://cagataycivici.wordpress.com/2011/04/04/styling-invalid-input-fields-with-jsf/ ). So we have to change all references to UIComponent.class to source.getClass().
        Hide
        Jakob Korherr added a comment -

        fixed

        Show
        Jakob Korherr added a comment - fixed

          People

          • Assignee:
            Jakob Korherr
            Reporter:
            Marcus Büttner
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development