Can you give me an example of your factory?

Regards,
 
 
PQ
 
"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-----Original Message-----
From: Robert Taylor [mailto:[EMAIL PROTECTED]] 
Sent: January 22, 2003 7:56 AM
To: Struts Users Mailing List
Subject: RE: Struts-config.xml and DynaBeans

MJ,

using Digester and org.apache.commons.beanutils package, its not
that difficult to do this.

In our most recent project, we leverage DynaBeans heavily for creating
view objects to avoid having to physically create them (RowSetDynaClass
was not around). We define them in an xml file and read them into
memory at run time. So when we need a view it looks something like this:

ViewFactory vf = ViewFactory.getInstance();
DynaBean view = vf.getView("myView");

Adding a new view is as simple as adding a few lines of XML. This approach
allows use to leverage DynaBeans and not necessarily be dependent on Struts.

robert




> -----Original Message-----
> From: MJ McLaren, Information Systems and Computing
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 7:30 AM
> To: [EMAIL PROTECTED]
> Subject: Struts-config.xml and DynaBeans
>
>
> Hi,
>
> This is my very first contribution.  I am new to Struts and fairly new to
> JSP (so go easy on me).  I am working on a project that is considering
> using Struts 1.1.  So far I am very impressed, anything that reduces the
> amount of Java code I need to write gets my vote.
>
> I have been looking at dynabeans and the struts version of
> DynaActionFormClass.  I noted that in the Struts configuration file the
> section for describing form-beans.  This is great but being a very lazy
> programmer, what about a section for describing any type of DynaBean and
> not just form-beans specifically.
>
> The temptation is to write any DynaBean that I use in my web
> application as
> a "form-bean" in the Struts-Config file even when I have no intention of
> making it an actual "form-bean" i.e. writing a validate method or
> using it
> via a form.
>
> Other than that fact that it make my Struts configuration file confusing,
> any reason why I should not be doing this?
>
> Thanks,
>
> Mark
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

Reply via email to