struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Mistroni" <mmistr...@waersystems.com>
Subject RE: Problem Dynamically creating form properties
Date Tue, 17 Feb 2004 17:06:04 GMT
That sounds great (I hate write lot of set/get methods.. :-) )!

One further enquiry: so the actual DynaBean TO PersistenceObject
'transformation' is done where the DynaBean is 'created' (persistence
layer
I guess....)?
Since as far as I understood that is the only place that knows about
properties stored in the DynaBean..

Regards
	marco

-----Original Message-----
From: Guillermo Meyer [mailto:gmeyer@interbanking.com.ar] 
Sent: 17 February 2004 15:44
To: 'Struts Users Mailing List'
Subject: RE: Problem Dynamically creating form properties

Our DynamicBean holds java.util.Calendar, not java.util.Date nor
java.sql.Date.

We have a persistence framework that converts ResultSet in a collection
of DynamicBeans, so our Business layer doesn't use java.sql.Date but
Calendar.

We use DynamicBean as DTO from UI (used by DynamicForm) to persistence
layer, where we have transformers from DtynamicBean to
PersistenceObjects, which are mapped to tables by our persistence
framework.

This is a sequence of saving a data in a database:
1) Browser submits a post.
2) Struts populate this parameters to the DynamicBean
3) Action uses (DynamicForm)form).getModel() and passes it to a service
(JMX service)
3) the service recives DynamicBean and returns DynamicBean. Uses input
DynamicBean to validate rules.
4) the service passes the validated DynamicBean to the persistence
layer, where DynamicBean is transformed to Persistence Object.
5) Persistence framework persists this object in the database.

Regards.
Guillermo.

-----Original Message-----
From: Mark Lowe [mailto:mark.lowe@talk21.com] 
Sent: Martes, 17 de Febrero de 2004 12:34 p.m.
To: Struts Users Mailing List
Subject: Re: Problem Dynamically creating form properties



Should java.sql.Date belong in an form bean?



On 17 Feb 2004, at 16:15, Marco Mistroni wrote:

> Hi Guillermo,	
> 	I have one question: will 'your trick' work also if I have
properties 
> of type, for example, Short, or Integer, or java.sql.Date?
>
> Thanx and regards
> 	marco
>
> -----Original Message-----
> From: Guillermo Meyer [mailto:gmeyer@interbanking.com.ar]
> Sent: 17 February 2004 12:43
> To: 'Struts Users Mailing List'
> Subject: RE: Problem Dynamically creating form properties
>
> I previuosly posted a mail to this list asking why DynaForms are 
> called Dynamic if you have to declare them statically in 
> Struts-Config. But there was no answer :(
>
> We created in our project a DynamicBean (previous DynaBean release and

> when Struts 1.1 was no available) and extended ActionForm to be a 
> holder of DynamicBean (somethind like this: 
> ((DynamicForm)form).getModel() returns a DynamicBean with all 
> properties.)
>
> So, we add html:text fields to the JSP and these are populated to this

> DynamicForm without the need of declaring this property anywhere. And 
> we have optionall Contract asserter to verify properties in a 
> DynamicBean when needed (usually when using DynamicBean as a DTO 
> between Actions and
> Business delegates)
>
> Cheers.
> Guillermo.
>
>
> -----Original Message-----
> From: Bernard Gaughran [mailto:bernardgaughran@yahoo.ie]
> Sent: Martes, 17 de Febrero de 2004 07:11 a.m.
> To: struts-user@jakarta.apache.org
> Subject: Problem Dynamically creating form properties
>
>
> Can someone PLEASE help?
>
> I need to create a User Interface (in JSP) which
> presents the user with a number of input fields. The
> number of input fields is not known until run-time
> (based on user selections in a previous screens).
>
> The 2 issues I see are:
> 1. generating the JSP dynamically with the correct
> number of properties
> 2. accessing these form fields in the action class.
>
> Normally, form property definitions need to be
> defined at compile time (whether you use Action Forms
> or DynaForms)
>
> Ideally, I'd like to use the struts framework to avail
> of Validator,etc,etc. Also, I would like to use Struts
> Dyna Forms.
>
> Can anyone advise a suitable approach & sample code?
>
> Bernard Gaughran
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing online. 
> http://taxes.yahoo.com/filing.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
> NOTA DE CONFIDENCIALIDAD
> Este mensaje (y sus anexos) es confidencial, esta dirigido 
> exclusivamente a las personas direccionadas en el mail y puede 
> contener informacion (i)de propiedad exclusiva de Interbanking S.A. o 
> (ii) amparada por el secreto profesional. Cualquier opinion en el 
> contenido, es exclusiva de su autor y no representa necesariamente la 
> opinion de Interbanking S.A. El acceso no autorizado, uso, 
> reproduccion, o divulgacion esta prohibido. Interbanking S.A no 
> asumira responsabilidad ni obligacion legal alguna por cualquier 
> informacion incorrecta o alterada contenida en este mensaje. Si usted 
> ha recibido este mensaje por error, le rogamos tenga la amabilidad de 
> destruirlo inmediatamente junto con todas las copias del mismo, 
> notificando al remitente. No debera utilizar, revelar, distribuir, 
> imprimir o copiar este mensaje ni ninguna de sus partes si usted no es

> el destinatario. Muchas gracias.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido
exclusivamente a las personas direccionadas en el mail y puede contener
informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii)
amparada por el secreto profesional. Cualquier opinion en el contenido,
es exclusiva de su autor y no representa necesariamente la opinion de
Interbanking S.A. El acceso no autorizado, uso, reproduccion, o
divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad
ni obligacion legal alguna por cualquier informacion incorrecta o
alterada contenida en este mensaje. Si usted ha recibido este mensaje
por error, le rogamos tenga la amabilidad de destruirlo inmediatamente
junto con todas las copias del mismo, notificando al remitente. No
debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni
ninguna de sus partes si usted no es el destinatario. Muchas gracias.



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


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


Mime
View raw message