You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Heligon Sandra <sa...@thomson.net> on 2003/03/11 16:15:11 UTC
How define a DynaActionForm to display a collection ?
I would like to define a DynaActionForm that is used to display
a collection in a JSP page.
For example the DTO object of the business tier is a
CustomerObject with the following properties:
- First Name
- Last Name
- Age
- Country
- Identifier
For a customer detail view I have the following DynaActionForm:
<form-bean name="customerForm" dynamic="true"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="firstName" type="java.lang.String"
initial="" />
<form-property name="lastName" type="java.lang.String"
initial="" />
<form-property name="age" type="java.lang.String" initial="" />
<form-property name="country" type="java.lang.String"
initial="" />
<form-property name="identifier" type="java.lang.String"
initial="" />
</form-bean>
How must I define/declare the DynaActionForm associated to the JSP
page that display
the list of customers ?
<form-bean name="customerListForm" dynamic="true"
type="org.apache.struts.validator.DynaValidatorForm">
I can perhaps use the same DynaActionForm for the two pages ?
In this case which is the code to update or create the collection of
DTO object (CustomerObject ) ?
-----------------------------------------------------------
As of February 12, 2003 Thomson unifies its email addresses on a worldwide
basis.Please note my new email address: sandra.heligon@thomson.net
Thomson is the leader in solutions and technologies for the entertainment
and media industries and serves its customers under its four strategic
brands: Technicolor, Grass Valley, RCA and THOMSON.
More about Thomson: http://www.thomson.net/videochain
Re: How define a DynaActionForm to display a collection ?
Posted by Mark Lowe <ml...@officinedigitali.it>.
<form-bean name="NewsLetterRegistration"
type="org.apache.struts.validator.DynaValidatorActionForm">
<form-property name="email" type="java.lang.String"/>
<form-property name="password" type="java.lang.String"/>
<form-property name="confirmPassword" type="java.lang.String"/>
</form-bean>
in action
DynaActionForm theForm = (DynaActionForm) form;
theForm.set("firstName",myValue);
that should be what you need
cheers mark
Martedì, 11 mar 2003, alle 16:15 Europe/Rome, Heligon Sandra ha scritto:
>
> I would like to define a DynaActionForm that is used to display
> a collection in a JSP page.
>
> For example the DTO object of the business tier is a
> CustomerObject with the following properties:
>
> - First Name
> - Last Name
> - Age
> - Country
> - Identifier
>
> For a customer detail view I have the following DynaActionForm:
> <form-bean name="customerForm" dynamic="true"
> type="org.apache.struts.validator.DynaValidatorForm">
> <form-property name="firstName" type="java.lang.String"
> initial="" />
> <form-property name="lastName" type="java.lang.String"
> initial="" />
> <form-property name="age" type="java.lang.String" initial="" />
> <form-property name="country" type="java.lang.String"
> initial="" />
> <form-property name="identifier" type="java.lang.String"
> initial="" />
> </form-bean>
>
> How must I define/declare the DynaActionForm associated to the JSP
> page that display
> the list of customers ?
>
> <form-bean name="customerListForm" dynamic="true"
> type="org.apache.struts.validator.DynaValidatorForm">
>
> I can perhaps use the same DynaActionForm for the two pages ?
>
> In this case which is the code to update or create the collection of
> DTO object (CustomerObject ) ?
>
>
>
> -----------------------------------------------------------
> As of February 12, 2003 Thomson unifies its email addresses on a
> worldwide
> basis.Please note my new email address: sandra.heligon@thomson.net
>
> Thomson is the leader in solutions and technologies for the
> entertainment
> and media industries and serves its customers under its four strategic
> brands: Technicolor, Grass Valley, RCA and THOMSON.
> More about Thomson: http://www.thomson.net/videochain
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org