Path parameter injection before @PostConstruct

Splash Forums PrettyFaces Users Path parameter injection before @PostConstruct

This topic contains 5 replies, has 4 voices, and was last updated by  Christian Kaltepoth 10 years, 8 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #17791


    Is it possible to get path parameter so it can be used in a method annotated with @PostConstruct ?

    I am using spring over jsf 1.2

    Thanks in advance.


    No, I don’t think this is possible. This would require a tight integration with Spring.

    What is your usecase? Typically code that processes path parameters should be placed in a page action method.


    Unfortunately that would be outside the scope of PrettyFaces. @PostConstruct is intentionally run immediately after bean creation, and should always be the first thing run after bean creation. This is the responsibility of whatever bean-container you are using (CDI, Spring, Guice, Seam, EJB) etc… and cannot be changed unless that bean-container is patched.

    The simple answer is: PrettyFaces just follows the rules and does injections/actions after @PostConstruct.



    That was exactly my assumption just wanted to be sure.




    Is there are ways to control that injection?


    I don’t think it is possible to have more control over this. As Lincoln already said this would require a strong integration with the bean container you are using.

    I prefer to use PrettyFaces’ @UrlAction instead of @PostConstruct. This one will always been called after the injection.

Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘PrettyFaces Users’ is closed to new topics and replies.

Comments are closed.