You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Niall Pemberton <ni...@blueyonder.co.uk> on 2004/08/07 18:19:33 UTC

[Info] Use any kind of POJO JavaBean as an ActionForm

In the Struts Nightly build (since beginning of August) it is now possible
to plug any kind of POJO Bean (with a default "empty" constructor) straight
into Struts as an ActionForm. Simply specify the Bean class in the
struts-config.xml in the normal way:

<form-bean name="myBean"
      type="myPackage.MyBean"/>

Struts will now "wrap" the bean in a BeanValidatorForm which uses the
WrapDyanBean to "wrap" the POJO bean. As BeanValidatorForm uses extends
ValidatorForm it also uses the Struts validator framework.

To be honest I was expecting that other commiters might object to this
behaviour, but its been a week since I committed the changes and nothing so
far.

Niall



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