Is there something like @UrlAction in PrettyFaces for Rewrite?

Splash Forums Rewrite Users Is there something like @UrlAction in PrettyFaces for Rewrite?

This topic contains 3 replies, has 2 voices, and was last updated by  Christian Kaltepoth 2 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26063

    austinian
    Participant

    I’m just wondering if it’s possible to use an annotation to invoke a method after parameter injection similar to the way @UrlAction is used in PrettyFaces instead of @PostConstruct when the method needs the parameters properly defined.
    Currently I’m using f:event to call the method before the rest of the page renders, which works, I’d just like to keep all of the “constructor” logic in one place to cut down on accidents with refactoring/changes.
    I’m using Rewrite 2.0.10, rewrite-integration-faces 2.0.10, and faces 2.2.5.

    • This topic was modified 2 years, 4 months ago by  austinian.
    • This topic was modified 2 years, 4 months ago by  austinian.
    #26066

    Sure, you can use @RequestAction for that.

    Have a look at the PrettyFaces Migration guide:

    http://ocpsoft.org/rewrite/docs/migration/prettyfaces3

    Please note that you usually also have to add @Deferred to the method which ensures that the method is called withing the JSF lifecycle.

    #26067

    austinian
    Participant

    Ah, awesome! That’s just what I was looking for. I think that after I’m done with this project I should look into helping you guys update some of the Rewrite documentation.

    #26068

    That would be absolutely awesome. I know the documentation isn’t in a very good shape at the moment. But unfortunately Lincoln and I don’t find much time for it at the moment. 🙁

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

You must be logged in to reply to this topic.

Comments are closed.