org.apache.struts.actions
クラス LocaleAction

java.lang.Object
  拡張org.apache.struts.action.Action
      拡張org.apache.struts.actions.LocaleAction

public final class LocaleAction
extends Action

(language, country, & page)のセットであるリクエストレベル変数に基づき、 ユーザのLocaleを変えてページにフォワードするActionの実装です。

Implementation of Action that changes the user's {@link java.util.Locale} and forwards to a page, based on request level parameters that are set (language, country, & page).

翻訳者:
棚澤 昌幸
校正者:
翻訳状況:
初稿(校正者募集中)

フィールドの概要
private  org.apache.commons.logging.Log log
          Commons Loggingインスタンス。
 
クラス org.apache.struts.action.Action から継承したフィールド
defaultLocale, servlet
 
コンストラクタの概要
LocaleAction()
           
 
メソッドの概要
 ActionForward execute(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           ActionFormの変数に基づいてユーザのLocaleを変えます。
 
クラス org.apache.struts.action.Action から継承したメソッド
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

log

private org.apache.commons.logging.Log log

Commons Loggingインスタンス。

Commons Logging instance.

コンストラクタの詳細

LocaleAction

public LocaleAction()
メソッドの詳細

execute

public ActionForward execute(ActionMapping mapping,
                             ActionForm form,
                             javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws java.lang.Exception

ActionFormの変数に基づいてユーザのLocaleを変えます。

Change the user's {@link java.util.Locale} based on {@link ActionForm} properties.

与えられたフォームのlanguagecountryプロパティをこのActionは捜して、 適切なLocaleオブジェクトを生成します。 そしてセッションのStruts Localeとしてこのオブジェクトを設定します。 DynaActionFormを含む全てのActionFormでこのプロパティを使用することが出来ます。

This Action looks for language and country properties on the given form, constructs an appropriate Locale object, and sets it as the Struts Locale for this user's session. Any ActionForm, including a {@link DynaActionForm}, may be used.

pageプロパティもまた用意された場合、 Localeを設定した後、 コントロールはURIパスにフォワードされます。 それ以外の場合、 "success"へフォワードされます。

If a page property is also provided, then after setting the Locale, control is forwarded to that URI path. Otherwise, control is forwarded to "success".

オーバーライド:
クラス Action 内の execute
パラメータ:
mapping - このインスタンスを選択する際に使用されたActionMapping
@param mapping The ActionMapping used to select this instance
form - このリクエストに対応するActionForm Bean(もしあれば)
@param form The optional ActionForm bean for this request (if any)
request - 処理中のHTTPリクエスト
@param request The HTTP request we are processing
response - 生成中のHTTPレスポンス
@param response The HTTP response we are creating
戻り値:
フォワードするAction
@return Action to forward to
例外:
java.lang.Exception - 入/出力エラーまたはサーブレット例外が生じた場合
@exception java.lang.Exception if an input/output error or servlet exception occurs


このドキュメントは、Ja-Jakartaにより訳されました。コメントがある場合は、report@jajakarta.orgまでお願いします。
Copyright (C) 2000-2004 - Apache Software Foundation