get Locale in JSF
public Locale getLocale()
{
FacesContext fc=FacesContext.getCurrentInstance();
UIViewRoot vr= fc.getViewRoot();
Locale lc=vr.getLocale();
return lc;
}
sharing some tech problems and soln
public Locale getLocale()
{
FacesContext fc=FacesContext.getCurrentInstance();
UIViewRoot vr= fc.getViewRoot();
Locale lc=vr.getLocale();
return lc;
}
Posted by
Sajjad
at
3:57 pm
0
comments
Labels: JSF
public void validateName(FacesContext fc, UIComponent c, Object value) {
if ( ((String)value).contains("_") )
throw new ValidatorException(
new FacesMessage("Name cannot contain underscores"));
Posted by
Sajjad
at
2:57 am
0
comments
url:http://localhost:8080/Jfa/faces/profile.xhtml?user=tom
<f:metadata>
<f:viewParam name="user" value="#{student.getx}"/>
</f:metadata>
Posted by
Sajjad
at
10:20 pm
0
comments