Reply To: Handling Multilanguage JSF Application with Rewrite

Splash Forums Rewrite Users Handling Multilanguage JSF Application with Rewrite Reply To: Handling Multilanguage JSF Application with Rewrite

#24020

You could initialize the property directly:


@ManagedBean
@RequestScoped
public class LocaleBean{          

    private String lang = "en";

    // getters / setters

}

This way the property will have a default value which will change if Rewrite or any other component calls the setter.

To change the URL in the address bar, you will have to redirect the user to a new URL. So you should execute an JSF action method and perform a redirect there.