MyFaces CODI
  1. MyFaces CODI
  2. EXTCDI-46

request-lifecycle callbacks via view configs

    Details

      Description

      EXTCDI-11 is based on the event system of cdi
      that means esp. in large applications there might be different kinds of possible problems.
      (currently there might be also issues in combination with @View and custom scopes)

      it should be possible to annotate methods with @BeforePhase and @AfterPhase (methods without parameters or with javax.faces.event.PhaseEvent as parameter).
      they will be invoked if the bean is used as page-bean for the current view (see typesafe view configs)

      @BeforePhase(PhaseId.RESTORE_VIEW) as well as @BeforePhase(PhaseId.ANY_PHASE) aren't supported.
      (in case of restore view you have to use phase-observer-methods (see EXTCDI-11))

      examples:
      @BeforePhase(RENDER_RESPONSE)
      protected void preRendering(PhaseEvent phaseEvent)

      { //... }

      @AfterPhase(PhaseId.UPDATE_MODEL_VALUES)
      protected void postModelUpdate(){ //... }

        Activity

        Gerhard Petracek created issue -
        Gerhard Petracek made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.0.0-SNAPSHOT [ 12314885 ]
        Resolution Fixed [ 1 ]
        Gerhard Petracek made changes -
        Summary request-lifecycle callbacks via view definitions request-lifecycle callbacks via view configs
        Description EXTCDI-11 is based on the event system of cdi
        that means esp. in large applications there might be different kinds of possible problems.
        (currently there might be also issues in combination with @View and custom scopes)

        it should be possible to annotate methods with @BeforePhase and @AfterPhase (methods without parameters or with javax.faces.event.PhaseEvent as parameter).
        they will be invoked if the bean is used as page-bean for the current view (see typesafe view definitions)

        @BeforePhase(PhaseId.RESTORE_VIEW) as well as @BeforePhase(PhaseId.ANY_PHASE) aren't supported.
        (in case of restore view you have to use phase-observer-methods (see EXTCDI-11))

        examples:
        @BeforePhase(RENDER_RESPONSE)
        protected void preRendering(PhaseEvent phaseEvent)
        {
          //...
        }

        @AfterPhase(PhaseId.UPDATE_MODEL_VALUES)
        protected void postModelUpdate()
        {
          //...
        }
        EXTCDI-11 is based on the event system of cdi
        that means esp. in large applications there might be different kinds of possible problems.
        (currently there might be also issues in combination with @View and custom scopes)

        it should be possible to annotate methods with @BeforePhase and @AfterPhase (methods without parameters or with javax.faces.event.PhaseEvent as parameter).
        they will be invoked if the bean is used as page-bean for the current view (see typesafe view configs)

        @BeforePhase(PhaseId.RESTORE_VIEW) as well as @BeforePhase(PhaseId.ANY_PHASE) aren't supported.
        (in case of restore view you have to use phase-observer-methods (see EXTCDI-11))

        examples:
        @BeforePhase(RENDER_RESPONSE)
        protected void preRendering(PhaseEvent phaseEvent)
        {
          //...
        }

        @AfterPhase(PhaseId.UPDATE_MODEL_VALUES)
        protected void postModelUpdate()
        {
          //...
        }
        Gerhard Petracek made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gerhard Petracek made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Assignee Gerhard Petracek [ gpetracek ]
        Gerhard Petracek made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Gerhard Petracek
            Reporter:
            Gerhard Petracek
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development