Hi,

I'd just like to throw in my two cents on how ActionForms with dynamic
properties could be implemented within Struts:

If a setter (or getter) method cannot be found in the ActionForm, try to
find a method like setActionFormProperty(String key, String value) (or
getActionFormProperty respectively) and use that one instead. So just one
more step before failing. Easy to implement in Struts and also easy to
implement in subclasses of ActionForm (i.e. using a HashMap for the
fields).

However, I appreciate that steps are taken towards ActionForms with dynamic
properties, no matter how the implementation is done.

Ciao,
     Rolf





Please respond to [EMAIL PROTECTED]

To:   <[EMAIL PROTECTED]>
cc:

Subject:  ActionForms With Dynamic Properties


Hello list, Craig

I have more or less implemented ActionForms With Dynamic Properties as
mentioned in the ToDo list. I would be happy to contribute the code to
Struts.

A quick description of what I have done: A dynamic action form implements a
method to return a PropertyDescriptor for each dynamic property. I have
changed the methods PropertyUtils.getProperty() and
PropertyUtils.setProperty() to work with dynamic properties. Now when a
form
is submitted the dynamic properties of the action form will be populated
through the setProperty() method. The dynamic property values will also be
displayed in the JSP assuming the tags uses PropertyUtils.getProperty()
method to obtain the property value.

Please let me know if you are interested in the code, and how to proceed
from here.

Regards,
Jan Sorensen
aragost








Reply via email to