You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Daniel Hinz <da...@coremedia.com> on 2002/06/21 16:55:04 UTC

Dynamic Property Dispatch

Hi,

i've a feature request for org.apache.struts.action.ActionForm for a little
bit more dynamic dispatch of properties. The current state is that for each
property A the corresonding setA / getA methods are invoked upon read/write.
There's nothing wrong with that. However i must deploy form fields that are
unknown to me at compile-time. Thus i cannot write a Bean with the
appropriate methods. A simple solution would be to introduce methods with
the following signature:

public void setProperty(String propertyName, Object propertyValue)
public Object getProperty(String propertyName)

which is of course not terribly type safe but would solve my problem.

And forgive me if this has already been discussed (i couldn't find anything
in the Archives).

Regards,

Daniel Hinz

--
Daniel Hinz
Software Engineer
daniel.hinz@coremedia.com
www.coremedia.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic Property Dispatch

Posted by James Holmes <jh...@yahoo.com>.
Daniel,

Take a look at the DynaActionForm stuff in Struts 1.1b
or the nightly builds.  The DynaActionForm can handle
dynamic form fields.

There has been much discussion about this lately on
the user list.  Take a look at the archives to find
past messages.

http://www.mail-archive.com/struts-user%40jakarta.apache.org/

-james
james@jamesholmes.com
http://www.jamesholmes.com/struts/




--- Daniel Hinz <da...@coremedia.com> wrote:
> Hi,
> 
> i've a feature request for
> org.apache.struts.action.ActionForm for a little
> bit more dynamic dispatch of properties. The current
> state is that for each
> property A the corresonding setA / getA methods are
> invoked upon read/write.
> There's nothing wrong with that. However i must
> deploy form fields that are
> unknown to me at compile-time. Thus i cannot write a
> Bean with the
> appropriate methods. A simple solution would be to
> introduce methods with
> the following signature:
> 
> public void setProperty(String propertyName, Object
> propertyValue)
> public Object getProperty(String propertyName)
> 
> which is of course not terribly type safe but would
> solve my problem.
> 
> And forgive me if this has already been discussed (i
> couldn't find anything
> in the Archives).
> 
> Regards,
> 
> Daniel Hinz
> 
> --
> Daniel Hinz
> Software Engineer
> daniel.hinz@coremedia.com
> www.coremedia.com
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>