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

Support base classes as source class for SystemEvents

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.0.6, 2.0.7
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Registering a system event listener in the faces-config need a concrete class like HtmlInputText. If you wan't to register a listener for let's say all UIInputs you need to explicit configure all subclasses.

      <system-event-listener>
      <system-event-listener-class>view.RequiredValidationListener</system-event-listener-class>
      <system-event-class>javax.faces.event.PostValidateEvent</system-event-class>
      <source-class>javax.faces.component.html.HtmlInputText</source-class>
      </system-event-listener>

      <system-event-listener>
      <system-event-listener-class>view.RequiredValidationListener</system-event-listener-class>
      <system-event-class>javax.faces.event.PostValidateEvent</system-event-class>
      <source-class>javax.faces.component.html.HtmlInputSecret</source-class>
      </system-event-listener>

      etc.

      Supporting base classes would be great:

      <system-event-listener>
      <system-event-listener-class>view.RequiredValidationListener</system-event-listener-class>
      <system-event-class>javax.faces.event.PostValidateEvent</system-event-class>
      <source-class>javax.faces.component.UIInput</source-class>
      </system-event-listener>

      a fine-grained configuration would be still possible through SystemEventListener.isListenerForSource(Object source)

        Attachments

          Activity

            People

            • Assignee:
              lu4242 Leonardo Uribe
              Reporter:
              cadimmek Carsten Dimmek
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: