Re: Pretty config – from DB

Splash Forums PrettyFaces Users Pretty config – from DB Re: Pretty config – from DB

#20386

s33d
Participant

The API is really clear. It was easy for me to find how to create new mapping and add it to config. The hardest thing was how to register new config so that PrettyFaces engine can use it.

I figured out that I need to use:

servletContext.setAttribute(PrettyContext.CONFIG_FILES_ATTR, prettyConfig);

I was looking for methods like:

PrettyContext.addUrlMappingToCurrentConfig(UrlMapping);

PrettyContext.removeUrlMappingFromCurrentConfig(UrlMapping);

Or just:

PrettyContext.replaceCurrentPrettyConfig(prettyConfig);

that could set servlet attribute for me.