some questions

Splash Forums PrettyFaces Users some questions

This topic contains 3 replies, has 2 voices, and was last updated by  Lincoln Baxter III 11 years, 1 month ago.

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


    My questions are:

    1. Where can i find JavaDoc? Docs are quite useful.

    2. I want to use PrettyConfigBuilder to add and remove entries programmatically. In real system one wants to add mapping and remove it when needed. So there is method to add UrlMapping but there isn’t for remove it ;).


    I recommend using prettyContext.setCurrentConfig(PrettyConfig config) if you really want to change things around at runtime. Note, however, that PrettyContext requires an active HTTPSession in order to get a handle; however, if that is unappealing, you could also use this approach:

    servletContext.getAttribute(PrettyContext.CONFIG_KEY) – as long as PrettyFaces has started up, the config should be set in that location. This is not really recommended, however, since it might cause threading issues when modifying the PrettyConfig during web-requests.



    So, how can I force to create PrettyContext? I want to achieved loading UrlMapping’s from database and load to PrettyConfig at runtime. When is created PrettyContext in application lifecycle?


    In an active HttpRequest, you can use the following static method to get a handle to the current PrettyContext:

    PrettyContext.getCurrentInstance(HttpRequest request)

    PrettyContext is created when the request is handled by PrettyFilter (should be before any of your application logic.)

    It depends… when do you want to load the mappings from the Database? At what point during runtime?

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

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

Comments are closed.