BrightSide Workbench Full Report + Source Code
org.turro.zkoss.locale.LocaleProvider Class Reference
Inheritance diagram for org.turro.zkoss.locale.LocaleProvider:
Collaboration diagram for org.turro.zkoss.locale.LocaleProvider:

Public Member Functions

void request (Session sess, Object request, Object response)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 33 of file LocaleProvider.java.

Member Function Documentation

◆ request()

void org.turro.zkoss.locale.LocaleProvider.request ( Session  sess,
Object  request,
Object  response 
)

Definition at line 36 of file LocaleProvider.java.

36  {
37  final Cookie[] cookies = ((HttpServletRequest) request).getCookies();
38  if (cookies != null) {
39  for (int j = cookies.length; --j >= 0;) {
40  if (cookies[j].getName().equals("lang")) {
41  String val = cookies[j].getValue();
42  if(val != null) {
43  //sess.removeAttribute(Attributes.PREFERRED_LOCALE);
44  if(val.startsWith("_")) val = val.substring(1);
45  Locale locale = org.zkoss.util.Locales.getLocale(val);
46  sess.setAttribute(Attributes.PREFERRED_LOCALE, locale);
47  }
48  break;
49  }
50  }
51  }
52  ZkossElephant.instance((HttpServletRequest) request, (HttpServletResponse) response);
53  }
void request(Session sess, Object request, Object response)
Here is the call graph for this function:

The documentation for this class was generated from the following file: