MyFaces Core
  1. MyFaces Core
  2. MYFACES-3185

Support base classes as source class for SystemEvents

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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)

        Activity

        Hide
        Leonardo Uribe added a comment -

        This is an improvement that should be consider on JSF spec, so I created:

        http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1022

        For now I close this one as Not A Problem, because the current behavior is the expected one by JSF spec.

        Show
        Leonardo Uribe added a comment - This is an improvement that should be consider on JSF spec, so I created: http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1022 For now I close this one as Not A Problem, because the current behavior is the expected one by JSF spec.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development