struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject RE: Using java.util.Map in place of an ActionForm?
Date Wed, 19 Jun 2002 17:14:04 GMT


On Wed, 19 Jun 2002, Kamholz, Keith   (corp-staff) USX wrote:

> Date: Wed, 19 Jun 2002 09:17:26 -0400
> From: "Kamholz, Keith   (corp-staff) USX" <kkamholz@moog.com>
> Reply-To: Struts Users Mailing List <struts-user@jakarta.apache.org>
> To: 'Struts Users Mailing List' <struts-user@jakarta.apache.org>
> Subject: RE: Using java.util.Map in place of an ActionForm?
>
> Is the DynaActionForm meant to be used as is, or is it meant to be
> subclassed like ActionForm is?  It seems to me that you use it as is.
>

If you don't need a custom reset() or validate() method, you can use
DynaActionForm directly for your form beans.

> Keith Kamholz
> Moog
> East Aurora, NY
> (716) 687-7282
> kkamholz@moog.com

Craig

>
>
> -----Original Message-----
> From: Bhattad, Nilesh [mailto:NBhattad@OneBeacon.com]
> Sent: Tuesday, June 18, 2002 5:43 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Using java.util.Map in place of an ActionForm?
>
>
> I looked at DynaActionForm. In order to use DynaActionForm, I'll have to
> specify all form field properties in struts-config.xml
> So it'll look something like this...
>
> <form-beans>
>
> 	<form-bean      	name="logonForm"
>
> type="org.apache.struts.action.DynaActionForm">
>       	<form-property name="username" type="java.lang.String"/>
>       	<form-property name="password" type="java.lang.String"/>
> 	</form-bean>
>
>
> 	<form-bean      	name="homeForm"
>
> type="org.apache.struts.action.DynaActionForm">
>       	<form-property name="firstname" type="java.lang.String"/>
>       	<form-property name="lastname" type="java.lang.String"/>
> 		<form-property name="age" type="java.lang.String"/>
> 	</form-bean>
>
> </form-beans>
>
>
> In my application, HTML field names are coming dynamically. As I don't have
> HTML field names at design time, I cannot use Struts proposed
> DynaActionForm. It needs to mention all form attributes in
> struts-config.xml.
>
> Instead my struts-config.xml looks something like..
>
> <form-beans>
>     <form-bean      name="test"
>                     type="com.test.form.DynaForm">
>     </form-bean>
> </form-beans>
>
> <action-mappings>
>     	<action    	path="/test"
>                	type="com.test.action.ActionHandler"
>                	name="test"
>                	scope="request">
>        	<forward name="index"              path="/index.jsp"/>
>        	<forward name="home"               path="/home.jsp"/>
> 	 	<forward name="changepassword"
> path="/changepassword.jsp"/>
> 	</action>
> <action-mappings>
>
> So, my Action class and Form class are common for all the JSP pages.
>
>
>
> -----Original Message-----
> From: Struts Newsgroup [mailto:struts@basebeans.com]
> Sent: Tuesday, June 18, 2002 5:25 PM
> To: struts-user@jakarta.apache.org
> Subject: Using java.util.Map in place of an ActionForm?
>
> Subject: Using java.util.Map in place of an ActionForm?
> From: "Matt Raible" <matt@raibledesigns.com>
>  ===
> I've seen talk of using a Map instead of an ActionForm for my forms.
>
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg32945.html
>
> Is this referring to DynaActionForms, or something else?
>
> Matt
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message