Java Doc for DynaActionForm.java in  » Web-Framework » struts-1.3.8 » org » apache » struts » action » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Framework » struts 1.3.8 » org.apache.struts.action 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.struts.action.ActionForm
      org.apache.struts.action.DynaActionForm

All known Subclasses:   org.apache.struts.validator.DynaValidatorForm,
DynaActionForm
public class DynaActionForm extends ActionForm implements DynaBean(Code)

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.


version:
   $Rev: 471754 $ $Date: 2005-11-12 11:52:08 -0500 (Sat, 12 Nov 2005)
version:
   $
since:
   Struts 1.1


Field Summary
protected  DynaActionFormClassdynaClass
    

The DynaActionFormClass with which we are associated.

protected  HashMapdynaValues
    


Method Summary
public  booleancontains(String name, String key)
    
public  Objectget(String name)
    
public  Objectget(String name, int index)
    

Return the value of an indexed property with the specified name.

public  Objectget(String name, String key)
    

Return the value of a mapped property with the specified name, or null if there is no value for the specified key.

public  DynaClassgetDynaClass()
    
protected  DynaPropertygetDynaProperty(String name)
    
public  MapgetMap()
    

Returns the Map containing the property values.

public  StringgetString(String name)
    

Return the value of a String property with the specified name.

public  String[]getStrings(String name)
    

Return the value of a String[] property with the specified name.

public  voidinitialize(ActionMapping mapping)
    
public  voidinitialize(FormBeanConfig config)
    
protected  booleanisDynaAssignable(Class dest, Class source)
    
public  voidremove(String name, String key)
    
public  voidreset(ActionMapping mapping, ServletRequest request)
    

Reset bean properties to their default state, as needed.

public  voidreset(ActionMapping mapping, HttpServletRequest request)
    
public  voidset(String name, Object value)
    
public  voidset(String name, int index, Object value)
    
public  voidset(String name, String key, Object value)
    
 voidsetDynaActionFormClass(DynaActionFormClass dynaClass)
    
public  StringtoString()
    

Field Detail
dynaClass
protected DynaActionFormClass dynaClass(Code)

The DynaActionFormClass with which we are associated.




dynaValues
protected HashMap dynaValues(Code)

The set of property values for this DynaActionForm, keyed by property name.






Method Detail
contains
public boolean contains(String name, String key)(Code)

Indicates if the specified mapped property contain a value for the specified key value.


Parameters:
  name - Name of the property to check
Parameters:
  key - Name of the key to check true if the specified mapped property contains avalue for the specified key value; trueotherwise.
throws:
  NullPointerException - if there is no property of thespecified name
throws:
  IllegalArgumentException - if there is no mapped property of thespecified name



get
public Object get(String name)(Code)

Return the value of a simple property with the specified name.


Parameters:
  name - Name of the property whose value is to be retrieved The value of a simple property with the specified name.
throws:
  IllegalArgumentException - if there is no property of thespecified name
throws:
  NullPointerException - if the type specified for the propertyis invalid



get
public Object get(String name, int index)(Code)

Return the value of an indexed property with the specified name.


Parameters:
  name - Name of the property whose value is to be retrieved
Parameters:
  index - Index of the value to be retrieved The value of an indexed property with the specified name.
throws:
  IllegalArgumentException - if there is no property of thespecified name
throws:
  IllegalArgumentException - if the specified property exists, butis not indexed
throws:
  NullPointerException - if no array or List has beeninitialized for this property



get
public Object get(String name, String key)(Code)

Return the value of a mapped property with the specified name, or null if there is no value for the specified key.


Parameters:
  name - Name of the property whose value is to be retrieved
Parameters:
  key - Key of the value to be retrieved The value of a mapped property with the specified name, ornull if there is no value for the specified key.
throws:
  NullPointerException - if there is no property of thespecified name
throws:
  IllegalArgumentException - if the specified property exists, butis not mapped



getDynaClass
public DynaClass getDynaClass()(Code)

Return the DynaClass instance that describes the set of properties available for this DynaBean.

The DynaClass instance that describes the set ofproperties available for this DynaBean.



getDynaProperty
protected DynaProperty getDynaProperty(String name)(Code)

Return the property descriptor for the specified property name.


Parameters:
  name - Name of the property for which to retrieve the descriptor The property descriptor for the specified property name.
throws:
  IllegalArgumentException - if this is not a valid property namefor our DynaClass



getMap
public Map getMap()(Code)

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 (JSTL).

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}

The Map containing the property values.



getString
public String getString(String name)(Code)

Return the value of a String property with the specified name. This is equivalent to calling (String) dynaForm.get(name).


Parameters:
  name - Name of the property whose value is to be retrieved. The value of a String property with the specifiedname.
throws:
  IllegalArgumentException - if there is no property of thespecified name
throws:
  NullPointerException - if the type specified for the propertyis invalid
throws:
  ClassCastException - if the property is not a String.
since:
   Struts 1.2



getStrings
public String[] getStrings(String name)(Code)

Return the value of a String[] property with the specified name. This is equivalent to calling (String[]) dynaForm.get(name).


Parameters:
  name - Name of the property whose value is to be retrieved. The value of a String[] property with thespecified name.
throws:
  IllegalArgumentException - if there is no property of thespecified name
throws:
  NullPointerException - if the type specified for the propertyis invalid
throws:
  ClassCastException - if the property is not a String[].
since:
   Struts 1.2



initialize
public void initialize(ActionMapping mapping)(Code)

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


Parameters:
  mapping - The mapping used to select this instance



initialize
public void initialize(FormBeanConfig config)(Code)

Initialize the specified form bean.


Parameters:
  config - The configuration for the form bean to initialize.



isDynaAssignable
protected boolean isDynaAssignable(Class dest, Class source)(Code)

Indicates if an object of the source class is assignable to the destination class.


Parameters:
  dest - Destination class
Parameters:
  source - Source class true if the source is assignable to thedestination; false otherwise.



remove
public void remove(String name, String key)(Code)

Remove any existing value for the specified key on the specified mapped property.


Parameters:
  name - Name of the property for which a value is to be removed
Parameters:
  key - Key of the value to be removed
throws:
  NullPointerException - if there is no property of thespecified name
throws:
  IllegalArgumentException - if there is no mapped property of thespecified name



reset
public void reset(ActionMapping mapping, ServletRequest request)(Code)

Reset bean properties to their default state, as needed. This method is called before the properties are repopulated by the controller.

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


Parameters:
  mapping - The mapping used to select this instance
Parameters:
  request - The servlet request we are processing



reset
public void reset(ActionMapping mapping, HttpServletRequest request)(Code)

Reset the properties to their initial value if their reset configuration is set to true or if reset is set to a list of HTTP request methods that includes the method of given request object.


Parameters:
  mapping - The mapping used to select this instance
Parameters:
  request - The servlet request we are processing



set
public void set(String name, Object value)(Code)

Set the value of a simple property with the specified name.


Parameters:
  name - Name of the property whose value is to be set
Parameters:
  value - Value to which this property is to be set
throws:
  ConversionException - if the specified value cannot beconverted to the type required forthis property
throws:
  IllegalArgumentException - if there is no property of thespecified name
throws:
  NullPointerException - if the type specified for the propertyis invalid
throws:
  NullPointerException - if an attempt is made to set aprimitive property to null



set
public void set(String name, int index, Object value)(Code)

Set the value of an indexed property with the specified name.


Parameters:
  name - Name of the property whose value is to be set
Parameters:
  index - Index of the property to be set
Parameters:
  value - Value to which this property is to be set
throws:
  ConversionException - if the specified value cannot beconverted to the type required forthis property
throws:
  NullPointerException - if there is no property of thespecified name
throws:
  IllegalArgumentException - if the specified property exists, butis not indexed
throws:
  IndexOutOfBoundsException - if the specified index is outside therange of the underlying property



set
public void set(String name, String key, Object value)(Code)

Set the value of a mapped property with the specified name.


Parameters:
  name - Name of the property whose value is to be set
Parameters:
  key - Key of the property to be set
Parameters:
  value - Value to which this property is to be set
throws:
  NullPointerException - if there is no property of thespecified name
throws:
  IllegalArgumentException - if the specified property exists, butis not mapped



setDynaActionFormClass
void setDynaActionFormClass(DynaActionFormClass dynaClass)(Code)

Set the DynaActionFormClass instance with which we are associated.


Parameters:
  dynaClass - The DynaActionFormClass instance for this bean



toString
public String toString()(Code)

Render a String representation of this object.

A string representation of this object.



Fields inherited from org.apache.struts.action.ActionForm
protected transient MultipartRequestHandler multipartRequestHandler(Code)(Java Doc)
protected transient ActionServlet servlet(Code)(Java Doc)

Methods inherited from org.apache.struts.action.ActionForm
public MultipartRequestHandler getMultipartRequestHandler()(Code)(Java Doc)
protected ActionServlet getServlet()(Code)(Java Doc)
public ActionServletWrapper getServletWrapper()(Code)(Java Doc)
public void reset(ActionMapping mapping, ServletRequest request)(Code)(Java Doc)
public void reset(ActionMapping mapping, HttpServletRequest request)(Code)(Java Doc)
public void setMultipartRequestHandler(MultipartRequestHandler multipartRequestHandler)(Code)(Java Doc)
public void setServlet(ActionServlet servlet)(Code)(Java Doc)
public ActionErrors validate(ActionMapping mapping, ServletRequest request)(Code)(Java Doc)
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.