On Wed, 21 Mar 2001, G.L. Grobe wrote:
> I can see that for a radio tag, the property is the name of the bean that
> was mapped in the struts-config.xml file. But how does the getter method in
> the action form bean actually get called, or how does the app know which
> getter method to use?
>
> I have a working example where my action does a getXXX on the form action,
> but I don't know how it got filled in and would like to understand that.
>
Basically, Struts follows rules very similar to what the standard
<jsp:setProperty name="beanname" property="*"/>
tag does. It looks at the request parameters, and matches them up with
JavaBeans and setter methods, as long as your bean's setter methods match
the rules in the JavaBeans specification. In most cases, that means a
proeprty named "foo" will look for a setter named "setFoo" -- but see the
JavaBeans Specification for more info.
> Adv(Thnxs)ance
>
>
Craig