DynaValidatorForm

The following is intercerpted from the struts-config.xml file:


*<struts-config>*
...
*<form-beans>*
<!-- Logon form bean -->
<form-bean name="logonForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="username" type="java.lang.String"/>
<form-property name="password" type="java.lang.String"/>
</form-bean>
...

<action-mappings>

]]>

...

</struts-config>


One can see that the logonForm (DynaValidatorForm) is a form bean for the action /logon. What is the purpose of using the DynaValidatorForm logonForm? Normally a form bean will do some checking. But I did see any of that function here.


Thanks.


Eugene

1 comment

scotttiger2004 wrote:

The following is intercerpted from the struts-config.xml file:


*<struts-config>*
..
*<form-beans>*
<!-- Logon form bean -->
<form-bean name="logonForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="username" type="java.lang.String"/>
<form-property name="password" type="java.lang.String"/>
</form-bean>
..

<action-mappings>

<action path="/logon"
type="org.apache.struts.webapp.example.LogonAction"
name="logonForm"
scope="session"
input="logon">
<exception
key="expired.password"
type="org.apache.struts.webapp.example.ExpiredPasswordException"
path="/changePassword.jsp"/>
</action>

..

</struts-config>


One can see that the logonForm (DynaValidatorForm) is a form bean for the action /logon. What is the purpose of using the DynaValidatorForm logonForm? Normally a form bean will do some checking. But I did see any of that function here.


The DynaVlidatorForm is a dynamic form which is created at runtime.
Hence you can not find the LoginForm class as would normally be created
along with the action class.

It can be used for simple forms.

regards

Anders Holmbech Nielsen


Thanks.


Eugene

0

Please sign in to leave a comment.