struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmk...@earthlink.net (David M. Karr)
Subject Re: dynamic input fields
Date Sun, 24 Feb 2002 18:12:25 GMT
>>>>> "Michael" == Michael Press <Press> writes:

    Michael> I just did this.  I based my solution on the Dynamic Properties solution by
    Michael> Kevin Wang
    Michael> (http://www.mail-archive.com/struts-user@jakarta.apache.org/msg01374.html),
    Michael> but I needed to do it without modifying/extending Struts itself.

    Michael> I created a BaseActionForm that my ActionForms extend.  The Base class has
a
    Michael> method that takes the HTTP request, and for each parameter in the request
    Michael> that doesn't have a setter method in the form (determined via reflection),
    Michael> it adds it to a hashtable.  It also provides methods to retrieve the
    Michael> hashtable or one named dynamic property.

    Michael> Then, my Action classes first call form.setDynamicMethods(request), and then
    Michael> they can retrieve the parameters from the known getter methods or from
    Michael> getDynamicProperty() or getDynamicProperties().

I could be mistaken, but isn't this basically what the recently added Dynamic
Action Form does?

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net


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


Mime
View raw message