quarta-feira, 5 de agosto de 2015

JSF 2.2, MultiViewHandler, locale-config

Hi,
before jsf2, to handle the localization resources, I used the MultiViewHandler to calculate to locale of the JSF.

But this MultiViewHandler disappear in 2.2 (apis, shall be more stable...)

on new jsf2.2, we can do:

on faces-config.xml
        <view-handler>ViewHandlerLanguage</view-handler>

On Java Code

public class ViewHandlerLanguage extends ViewHandlerWrapper

    static Locale localeEn = new Locale("en");

    @Override
    public Locale calculateLocale(FacesContext context) {

                    return localeEn;
}

br

Java Obfuscate Properties

Hi there how many times we have fuckin stupid commentaries of , hey the code has a password... bullshit you can always get the password... ...