Re: Pretty config – from DB

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

#20382

s33d
Participant

Did it something like this:

PrettyConfigBuilder builder = new PrettyConfigBuilder();

UrlMapping mapping = new UrlMapping();

// CREATE MAPPING

builder.addMapping(mapping);

PrettyConfig build = builder.build();

ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();

servletContext.setAttribute(PrettyContext.CONFIG_FILES_ATTR, build);