|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectAction
com.aoindustries.website.SiteSettingsAction
com.aoindustries.website.LocaleAction
public class LocaleAction
Resolves the current locale, optionally changing it with any language parameters, sets the request param locale, and calls subclass implementation.
| Constructor Summary | |
|---|---|
LocaleAction()
|
|
| Method Summary | |
|---|---|
ActionForward |
execute(ActionMapping mapping,
ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
SiteSettings siteSettings)
Selects the Locale, sets the request attribute "locale", then the subclass execute method is invoked. |
ActionForward |
execute(ActionMapping mapping,
ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
SiteSettings siteSettings,
java.util.Locale locale)
Once the locale is selected, this version of the execute method is invoked. |
static java.util.Locale |
getDefaultLocale(SiteSettings siteSettings,
javax.servlet.http.HttpServletRequest request)
Gets the default locale for the provided request. |
static java.util.Locale |
getEffectiveLocale(SiteSettings siteSettings,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Gets the effective locale for the request. |
| Methods inherited from class com.aoindustries.website.SiteSettingsAction |
|---|
execute |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocaleAction()
| Method Detail |
|---|
public final ActionForward execute(ActionMapping mapping,
ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
SiteSettings siteSettings)
throws java.lang.Exception
Locale, sets the request attribute "locale", then the subclass execute method is invoked.
execute in class SiteSettingsActionjava.lang.Exception#execute(ActionMapping,ActionForm,HttpServletRequest,HttpServletResponse,Locale)
public static java.util.Locale getEffectiveLocale(SiteSettings siteSettings,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.jsp.JspException,
java.io.IOException,
java.sql.SQLException
Gets the effective locale for the request. If the requested language is not one of the enabled languages for this site, will set to the default language (the first in the language list).
Also allows the parameter "language" to override the current settings.
This also sets the struts, JSTL, and response locales to the same value.
javax.servlet.jsp.JspException
java.io.IOException
java.sql.SQLException
public static java.util.Locale getDefaultLocale(SiteSettings siteSettings,
javax.servlet.http.HttpServletRequest request)
throws javax.servlet.jsp.JspException,
java.io.IOException,
java.sql.SQLException
javax.servlet.jsp.JspException
java.io.IOException
java.sql.SQLException
public ActionForward execute(ActionMapping mapping,
ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
SiteSettings siteSettings,
java.util.Locale locale)
throws java.lang.Exception
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||