org.apache.struts.action
クラス DynaActionForm

java.lang.Object
  拡張org.apache.struts.action.ActionForm
      拡張org.apache.struts.action.DynaActionForm
すべての実装インタフェース:
org.apache.commons.beanutils.DynaBean, java.io.Serializable
直系の既知のサブクラス:
DynaValidatorForm

public class DynaActionForm
extends ActionForm
implements org.apache.commons.beanutils.DynaBean

Specialized subclass of ActionForm that allows the creation of form beans with dynamic sets of properties, without requiring the developer to create a Java class for each type of form bean.

USAGE NOTE - Since Struts 1.1, the reset() method no longer initializes property values to those specified in <form-property> elements in the Struts module configuration file. If you wish to utilize that behavior, the simplest solution is to subclass DynaActionForm and call the initialize() method inside it.

導入されたバージョン:
Struts 1.1
バージョン:
$Revision: 1.2 $ $Date: 2003/12/09 13:46:16 $
作成者:
Craig R. McClanahan
関連項目:
直列化された形式
翻訳者:
校正者:
翻訳状況:
訳者募集中
翻訳更新日:

フィールドの概要
protected  DynaActionFormClass dynaClass
          The DynaActionFormClass with which we are associated.
protected  java.util.HashMap dynaValues
          The set of property values for this DynaActionForm, keyed by property name.
 
クラス org.apache.struts.action.ActionForm から継承したフィールド
multipartRequestHandler, servlet
 
コンストラクタの概要
DynaActionForm()
           
 
メソッドの概要
 boolean contains(java.lang.String name, java.lang.String key)
          Indicates if the specified mapped property contain a value for the specified key value.
 java.lang.Object get(java.lang.String name)
          Return the value of a simple property with the specified name.
 java.lang.Object get(java.lang.String name, int index)
          Return the value of an indexed property with the specified name.
 java.lang.Object get(java.lang.String name, java.lang.String key)
          Return the value of a mapped property with the specified name, or null if there is no value for the specified key.
 org.apache.commons.beanutils.DynaClass getDynaClass()
          Return the DynaClass instance that describes the set of properties available for this DynaBean.
protected  org.apache.commons.beanutils.DynaProperty getDynaProperty(java.lang.String name)
          Return the property descriptor for the specified property name.
 java.util.Map getMap()
          Returns the Map containing the property values.
 void initialize(ActionMapping mapping)
          Initialize all bean properties to their initial values, as specified in the FormPropertyConfig elements associated with the definition of this DynaActionForm.
protected  boolean isDynaAssignable(java.lang.Class dest, java.lang.Class source)
          Indicates if an object of the source class is assignable to the destination class.
 void remove(java.lang.String name, java.lang.String key)
          Remove any existing value for the specified key on the specified mapped property.
 void reset(ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          Reset all bean properties to their default state.
 void reset(ActionMapping mapping, javax.servlet.ServletRequest request)
          Reset all bean properties to their default state.
 void set(java.lang.String name, int index, java.lang.Object value)
          Set the value of an indexed property with the specified name.
 void set(java.lang.String name, java.lang.Object value)
          Set the value of a simple property with the specified name.
 void set(java.lang.String name, java.lang.String key, java.lang.Object value)
          Set the value of a mapped property with the specified name.
(パッケージプライベート)  void setDynaActionFormClass(DynaActionFormClass dynaClass)
          Set the DynaActionFormClass instance that we are associated with.
 java.lang.String toString()
          Render a String representation of this object.
 
クラス org.apache.struts.action.ActionForm から継承したメソッド
getMultipartRequestHandler, getServlet, getServletWrapper, setMultipartRequestHandler, setServlet, validate, validate
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

dynaClass

protected DynaActionFormClass dynaClass
The DynaActionFormClass with which we are associated.


dynaValues

protected java.util.HashMap dynaValues
The set of property values for this DynaActionForm, keyed by property name.

コンストラクタの詳細

DynaActionForm

public DynaActionForm()
メソッドの詳細

initialize

public void initialize(ActionMapping mapping)

Initialize all bean properties to their initial values, as specified in the FormPropertyConfig elements associated with the definition of this DynaActionForm.

パラメータ:
mapping - The mapping used to select this instance
導入されたバージョン:
Struts 1.1

reset

public void reset(ActionMapping mapping,
                  javax.servlet.ServletRequest request)

Reset all bean properties to their default state. This method is called before the properties are repopulated by the controller servlet.

The default implementation attempts to forward to the HTTP version of this method.

オーバーライド:
クラス ActionForm 内の reset
パラメータ:
mapping - The mapping used to select this instance
request - The servlet request we are processing

reset

public void reset(ActionMapping mapping,
                  javax.servlet.http.HttpServletRequest request)

Reset all bean properties to their default state. This method is called before the properties are repopulated by the controller servlet.

The default implementation (since Struts 1.1) does nothing. Subclasses may override this method to reset bean properties to default values, or the initialize() method may be used to initialize property values to those provided in the form property configuration information (which was the previous behavior of this method).

オーバーライド:
クラス ActionForm 内の reset
パラメータ:
mapping - The mapping used to select this instance
request - The servlet request we are processing

contains

public boolean contains(java.lang.String name,
                        java.lang.String key)
Indicates if the specified mapped property contain a value for the specified key value.

定義:
インタフェース org.apache.commons.beanutils.DynaBean 内の contains
パラメータ:
name - Name of the property to check
key - Name of the key to check
例外:
java.lang.IllegalArgumentException - if there is no property of the specified name

get

public java.lang.Object get(java.lang.String name)
Return the value of a simple property with the specified name.

定義:
インタフェース org.apache.commons.beanutils.DynaBean 内の get
パラメータ:
name - Name of the property whose value is to be retrieved
例外:
java.lang.IllegalArgumentException - if there is no property of the specified name
java.lang.NullPointerException - if the type specified for the property is invalid

get

public java.lang.Object get(java.lang.String name,
                            int index)
Return the value of an indexed property with the specified name.

定義:
インタフェース org.apache.commons.beanutils.DynaBean 内の get
パラメータ:
name - Name of the property whose value is to be retrieved
index - Index of the value to be retrieved
例外:
java.lang.IllegalArgumentException - if there is no property of the specified name
java.lang.IllegalArgumentException - if the specified property exists, but is not indexed
java.lang.IndexOutOfBoundsException - if the specified index is outside the range of the underlying property
java.lang.NullPointerException - if no array or List has been initialized for this property

get

public java.lang.Object get(java.lang.String name,
                            java.lang.String key)
Return the value of a mapped property with the specified name, or null if there is no value for the specified key.

定義:
インタフェース org.apache.commons.beanutils.DynaBean 内の get
パラメータ:
name - Name of the property whose value is to be retrieved
key - Key of the value to be retrieved
例外:
java.lang.IllegalArgumentException - if there is no property of the specified name
java.lang.IllegalArgumentException - if the specified property exists, but is not mapped

getDynaClass

public org.apache.commons.beanutils.DynaClass getDynaClass()
Return the DynaClass instance that describes the set of properties available for this DynaBean.

定義:
インタフェース org.apache.commons.beanutils.DynaBean 内の getDynaClass

getMap

public java.util.Map getMap()
Returns the Map containing the property values. This is done mostly to facilitate accessing the DynaActionForm through JavaBeans accessors, in order to use the JavaServer Pages Standard Tag Library.

For instance, the normal JSTL EL syntax for accessing an ActionForm would be something like this:

  ${formbean.prop}
The JSTL EL syntax for accessing a DynaActionForm looks something like this (because of the presence of this getMap() method):
  ${dynabean.map.prop}


remove

public void remove(java.lang.String name,
                   java.lang.String key)
Remove any existing value for the specified key on the specified mapped property.

定義:
インタフェース org.apache.commons.beanutils.DynaBean 内の remove
パラメータ:
name - Name of the property for which a value is to be removed
key - Key of the value to be removed
例外:
java.lang.IllegalArgumentException - if there is no property of the specified name

set

public void set(java.lang.String name,
                java.lang.Object value)
Set the value of a simple property with the specified name.

定義:
インタフェース org.apache.commons.beanutils.DynaBean 内の set
パラメータ:
name - Name of the property whose value is to be set
value - Value to which this property is to be set
例外:
org.apache.commons.beanutils.ConversionException - if the specified value cannot be converted to the type required for this property
java.lang.IllegalArgumentException - if there is no property of the specified name
java.lang.NullPointerException - if the type specified for the property is invalid
java.lang.NullPointerException - if an attempt is made to set a primitive property to null

set

public void set(java.lang.String name,
                int index,
                java.lang.Object value)
Set the value of an indexed property with the specified name.

定義:
インタフェース org.apache.commons.beanutils.DynaBean 内の set
パラメータ:
name - Name of the property whose value is to be set
index - Index of the property to be set
value - Value to which this property is to be set
例外:
org.apache.commons.beanutils.ConversionException - if the specified value cannot be converted to the type required for this property
java.lang.IllegalArgumentException - if there is no property of the specified name
java.lang.IllegalArgumentException - if the specified property exists, but is not indexed
java.lang.IndexOutOfBoundsException - if the specified index is outside the range of the underlying property

set

public void set(java.lang.String name,
                java.lang.String key,
                java.lang.Object value)
Set the value of a mapped property with the specified name.

定義:
インタフェース org.apache.commons.beanutils.DynaBean 内の set
パラメータ:
name - Name of the property whose value is to be set
key - Key of the property to be set
value - Value to which this property is to be set
例外:
org.apache.commons.beanutils.ConversionException - if the specified value cannot be converted to the type required for this property
java.lang.IllegalArgumentException - if there is no property of the specified name
java.lang.IllegalArgumentException - if the specified property exists, but is not mapped

toString

public java.lang.String toString()
Render a String representation of this object.


setDynaActionFormClass

void setDynaActionFormClass(DynaActionFormClass dynaClass)
Set the DynaActionFormClass instance that we are associated with.

パラメータ:
dynaClass - The DynaActionFormClass instance for this bean

getDynaProperty

protected org.apache.commons.beanutils.DynaProperty getDynaProperty(java.lang.String name)
Return the property descriptor for the specified property name.

パラメータ:
name - Name of the property for which to retrieve the descriptor
例外:
java.lang.IllegalArgumentException - if this is not a valid property name for our DynaClass

isDynaAssignable

protected boolean isDynaAssignable(java.lang.Class dest,
                                   java.lang.Class source)
Indicates if an object of the source class is assignable to the destination class.

パラメータ:
dest - Destination class
source - Source class


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