MyFaces Core
  1. MyFaces Core
  2. MYFACES-3319

Make create AjaxBehavior accessible in AjaxHandler

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.3
    • Fix Version/s: 2.0.10, 2.1.4
    • Component/s: JSR-314
    • Labels:
      None

      Description

      I'm currently trying to create a custom ajax tag that is based on f:ajax but supports an additional attribute. For this, I wanted to create a new tag handler that extends AjaxHandler.

      What I found out is, that it is VERY hard to do so. The creation of the AjaxBehavior is buried inside applyAttachedObject(). The only reasonable way I found to set an additional value expression on the created AjaxBehavior is to pass in a wrapped FacesContext/Application from the derived class.

      It would be so much easier, if, for instance, creating the behavior would be done in a protected method. Then the behavior would be accessible in derived classes.

        Activity

        Hide
        Michael Kurz added a comment -

        Provided possible patch.

        Show
        Michael Kurz added a comment - Provided possible patch.
        Hide
        Leonardo Uribe added a comment -

        Thanks to Michael Kurz for provide this patch

        Show
        Leonardo Uribe added a comment - Thanks to Michael Kurz for provide this patch

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Michael Kurz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development