This reminds me, I think Struts should be more flexible supporting the
configuration of other types of forms or extensions to existing forms
(like the aforementioned modification to the dynaform).  While you can
specify any form class, you cannot pass properties to that instance making
it difficult to develop generic, powerful forms, like dynaforms, outside
the Struts framework.

For example, I've been working with an extension of ActionForm that uses
XML as its model, allowing the XML to be modified directly through Struts
saving heaps of mapping code.  In addition to naming my class, I'd like to
specify the XML file it should use as a model.  Currently, I do this
although it is admittedly a hack:

<form-bean
    name="UserForm"
    type="com.oroad.stxx.xform.DOMForm">
    <form-property
        name="xml"
        type="/WEB-INF/models/user.xml"
</form-bean>

In addition, in order to have control over the form population, I have to
extend RequestProcessor and override processPopulate().

Therefore, I think there should be a way to:

1. Pass parameters to a form in the configuration
2. Explicitly handle form population.

Perhaps there are strong reasons why this wouldn't be a good idea, but I'd
like to hear them.  I apologize if this topic has already been dealt with.

Don

On Fri, 15 Aug 2003, Ted Husted wrote:

> In terms of simplifying the maintenance of DynaActionForms, I was
> wondering if we had tried anything like this yet?
>
> <form-bean name="inputBean"
>    type="org.apache.struts.validator.DynaValidatorForm"
>    proxy="com.mycompany.project.businessBean" />
>
> where the proxy class would be introspected, and String or boolean
> dynaproperties generated for each public property? (Rather than specify
> them ourselves as XML.)
>
> -Ted.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to