org.apache.struts.action
クラス ActionErrors

java.lang.Object
  拡張org.apache.struts.action.ActionMessages
      拡張org.apache.struts.action.ActionErrors
すべての実装インタフェース:
java.io.Serializable

public class ActionErrors
extends ActionMessages
implements java.io.Serializable

ActionFormvalidate()メソッドが報告するエラーメッセージをカプセル化するクラスです。 バリデーションエラーは関連するActionForm Bean全体でグローバル、 またはある特定のBeanプロパティに固有 (すなわち、対応するフォームの特定入力フィールドに固有) です。

A class that encapsulates the error messages being reported by the validate() method of an ActionForm. Validation errors are either global to the entire ActionForm bean they are associated with, or they are specific to a particular bean property (and, therefore, a particular input field on the corresponding form).

個々のエラーはActionMessageオブジェクトで記述されます。 このオブジェクトは、 (適切なメッセージリソースデータベースを検索するための)メッセージキーを含み、 メッセージ内のパラメータの置換に用いられる4つまでのプレースホルダ引数を持ちます。

Each individual error is described by an ActionMessage object, which contains a message key (to be looked up in an appropriate message resources database), and up to four placeholder arguments used for parametric substitution in the resulting message.

実装上の注意 - これらのオブジェクトはシングルスレッドのコンテキスト内でのみ生成・操作されることを前提としています。 従って、内部のコレクションにアクセスする際に同期化する必要はありません。

IMPLEMENTATION NOTE - It is assumed that these objects are created and manipulated only within the context of a single thread. Therefore, no synchronization is required for access to internal collections.

バージョン:
$Revision: 1.8 $ $Date: 2005/04/02 13:52:09 $
関連項目:
直列化された形式
翻訳者:
横田 健彦, 棚澤 昌幸
校正者:
高橋 達男
翻訳状況:
校了

入れ子クラスの概要
 
クラス org.apache.struts.action.ActionMessages から継承した入れ子クラス
ActionMessages.ActionMessageItem
 
フィールドの概要
static java.lang.String GLOBAL_ERROR
          推奨されていません。 代わりにActionMessages.GLOBAL_MESSAGEを使ってください。 これはStruts 1.2.より後に削除されます。
@deprecated Use ActionMessages.GLOBAL_MESSAGE instead. This will be removed after Struts 1.2.
 
クラス org.apache.struts.action.ActionMessages から継承したフィールド
accessed, GLOBAL_MESSAGE, iCount, messages
 
コンストラクタの概要
ActionErrors()
          空のActionErrorsオブジェクトを生成します。
ActionErrors(ActionErrors messages)
          与えられたメッセージで初期化されたActionErrorsオブジェクトを生成します。
 
メソッドの概要
 void add(java.lang.String property, ActionError error)
          推奨されていません。 代わりにadd(String, ActionMessage)を使ってください。 これはStruts 1.2.より後に削除されます。
@deprecated Use add(String, ActionMessage) instead. This will be removed after Struts 1.2.
 
クラス org.apache.struts.action.ActionMessages から継承したメソッド
add, add, clear, get, get, isAccessed, isEmpty, properties, size, size, toString
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

GLOBAL_ERROR

public static final java.lang.String GLOBAL_ERROR
推奨されていません。 代わりにActionMessages.GLOBAL_MESSAGEを使ってください。 これはStruts 1.2.より後に削除されます。
@deprecated Use ActionMessages.GLOBAL_MESSAGE instead. This will be removed after Struts 1.2.

特定のプロパティに関連するエラーとは対照的な、 グローバルエラーに使用する"プロパティ名"マーカ。

The "property name" marker to use for global errors, as opposed to those related to a specific property.

関連項目:
定数フィールド値
コンストラクタの詳細

ActionErrors

public ActionErrors()

空のActionErrorsオブジェクトを生成します。

Create an empty ActionErrors object.


ActionErrors

public ActionErrors(ActionErrors messages)

与えられたメッセージで初期化されたActionErrorsオブジェクトを生成します。

Create an ActionErrors object initialized with the given messages.

パラメータ:
messages - このオブジェクトに最初に追加されるメッセージ。 このパラメータはnullも可能です。
@param messages The messages to be initially added to this object. This parameter can be null.
導入されたバージョン:
Struts 1.1
メソッドの詳細

add

public void add(java.lang.String property,
                ActionError error)
推奨されていません。 代わりにadd(String, ActionMessage)を使ってください。 これはStruts 1.2.より後に削除されます。
@deprecated Use add(String, ActionMessage) instead. This will be removed after Struts 1.2.

指定されたプロパティに関するエラーのセットにエラーメッセージを追加します。

Add an error message to the set of errors for the specified property.

パラメータ:
property - プロパティ名(またはActionErrors.GLOBAL_ERROR)
@param property Property name (or ActionErrors.GLOBAL_ERROR)
error - 追加するエラーメッセージ
@param error The error message to be added


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