Could you explain more detail how it work, and how to implement?
Thank you very much.
--- El vie, 10/9/10, Oscar Westra van Holthe - Kind <os...@westravanholthe.nl>
escribió:
De: Oscar Westra van Holthe - Kind <os...@westravanholthe.nl>
Asunto: Re: [Stripes-users] The best way to separate variabls in a larger form
from the action.
Para: "Stripes Users List" <stripes-users@lists.sourceforge.net>
Fecha: viernes, 10 de septiembre, 2010 13:44
On 10-09-2010 at 10:52, andres wrote:
> What is the best way to separate variabls in a larger form the action? In
> Struts 1 you have a separate action (for the logic) and form (to use for
> fields). In Stripes have all this in action. Hope I explained well.
>
> I thought to create a class NameModel with a variabls for a form and extend
> it of BaseActionBean and then extend my NombreActionBean class of
> NameModel to separate variables (form fields) from ActionBean and can
> access to them. And use only for the logic NombreActionBean.
>
> Do you know the better way to do it? After picking up the form fields
> NameModel would have to pass them to DAO object to store in DB.
Personally, I let Stripes bind directly into my domain model. By using the
Stripersist extension and the @StrictBinding annotation.
This way, I have several advantages:
1. The action bean doesn't become cluttered with properties.
2. I do not have to maintain an extra class (which can outdated).
3. I do not have to manually load the object being changed (Stripersist
handles this).
4. Anything I don't specify/validate remains untouched (even if specified in
the request parameters), thanks to @StrictBinding
Oscar
--
,-_ Oscar Westra van Holthe - Kind http://www.xs4all.nl/~kindop/
/() )
(__ ( I disapprove of what you say, but I will defend to the death your
=/ () right to say it. -- Voltaire
-----Adjunto en línea a continuación-----
------------------------------------------------------------------------------
Automate Storage Tiering Simply
Optimize IT performance and efficiency through flexible, powerful,
automated storage tiering capabilities. View this brief to learn how
you can reduce costs and improve performance.
http://p.sf.net/sfu/dell-sfdev2dev
-----Adjunto en línea a continuación-----
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users
------------------------------------------------------------------------------
Automate Storage Tiering Simply
Optimize IT performance and efficiency through flexible, powerful,
automated storage tiering capabilities. View this brief to learn how
you can reduce costs and improve performance.
http://p.sf.net/sfu/dell-sfdev2dev
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users