Re: My implementation of ConfigurationPostProcessor is not called

Splash Forums PrettyFaces Users My implementation of ConfigurationPostProcessor is not called Re: My implementation of ConfigurationPostProcessor is not called

#20428

balteo
Participant

Christian,

It seems to work fine now: the “processConfiguration” method is called.

My only problem is that I don’t know how to instanciate the UrlAction properly. See my code:

@Override

public PrettyConfig processConfiguration(ServletContext sc, PrettyConfig pc) {

log.debug(“processConfiguration”);

UrlAction rootAction = new UrlAction(“???”);

UrlMapping biographieMapping = (UrlMapping) pc.getMappingById(“biographieAction”);

biographieMapping.addAction(rootAction);

return pc;

}

Can you help?

Here is the URLAction I am interested in:

@URLAction

public void changeLocale() {

log.debug(“changeLocale”);

UIViewRoot view = FacesContext.getCurrentInstance().getViewRoot();//todo locale en dur içi

if (“fr”.equals(this.language)) {

view.setLocale(Locale.FRENCH);

} else if (“en”.equals(this.language)) {

view.setLocale(Locale.ENGLISH);

}

getSuggestionOeuvreView().setSculptureSuggeree(getSuggestionOeuvreView().suggererSculpture());//refactor

}

Julien.