Adding FormBean Definitions

 < Day Day Up > 



The <form-bean> sub-element is used to describe an instance of a FormBean that is later bound to an Action. The syntax of the <form-bean> sub-element is:

 <form-beans>   <form-bean name="name used to uniquely identify a FormBean"     type="fully qualified class name of FormBean" /> </form-beans> 

start sidebar

All <form-bean> sub-elements must be nested within a single <form-beans> element. The <form-beans> element is used only as a container for <form-bean> sub-elements.

end sidebar

Table 15.4 describes the attributes of a <form-bean> sub-element.

Table 15.4: The Attributes of a <form-bean> Sub-Element

Attribute

Description

name

Contains the unique identifier that identifies this bean. This value is used in an action mappings element to bind a FormBean to an Action. (required)

type

Specifies the fully qualified class name of the FormBean class. (required)

This code snippet uses the <form-bean> sub-element:

 <form-beans>   <form-bean name="lookupForm"     type="wrox.LookupForm" /> </form-beans> 

start sidebar

The <form-bean> sub-element contains no body. It is configured using only its two attributes.

end sidebar



 < Day Day Up > 



Professional Jakarta Struts
Professional Jakarta Struts (Programmer to Programmer)
ISBN: 0764544373
EAN: 2147483647
Year: 2003
Pages: 183

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net