DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27439>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27439

Form definition inheritance support

           Summary: Form definition inheritance support
           Product: Struts
           Version: 1.1 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Controller
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I've created a simple class derived from FormBeanConfig, which allows to 
inherit form definitions in struts-config.xml files. For example:

<struts-config>
    <form-beans>
                <form-bean name="defaultWorkItemForm" 
type="com.elster.web_framework.forms.WorkitemDynaValidatorForm">
                        <form-property name="workitemId" 
type="java.lang.Integer"/>
                </form-bean>
                
                <form-bean name="nameForm" 
type="com.elster.web_framework.forms.WorkitemDynaValidatorForm"
                
        className="com.elster.web_framework.forms.AdvancedFormBeanConfig">
                        
                        <set-property property="inherits" 
value="defaultWorkItemForm"/>
                        <form-property name="name" type="java.lang.String"/>
                </form-bean>


In the above example, the forst form "defaultWorkItemForm" will have  a signle 
Integer property named "workitemId". The second form will be defined as 
inheriting from the "defaultWorkItemForm", and adds additional property 
String "name".

Form definitions can be overriden - if you specify a property with the same 
name that exist in the base form, it's definition will be replaced.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to