I'm not sure why there is a difference, and it should probably be looked into. But if you have a method that expects an argument, as you clearly do, then you should have a cfargument tag for that method. This is just good coding practice and helps with self-documenting code.
On Thu, Mar 13, 2008 at 6:30 AM, <[EMAIL PROTECTED]> wrote: > > Hi all, quick question... > > When using a bean definition like so: > > <beans> > <bean id="Logger" class="Log" /> > > <bean id="DoCoolStuff" class="DoCoolStuff"> > <property name="Logger"> > <ref bean="Logger"/> > </property> > </bean> > </beans> > > I found that you can leave out the <cfargument .... type="Log"> in > DoCoolStuff's setLogger method. > > However, when using autowiring: > > <beans default-autowire="byName"> > > <bean id="Logger" class="Log" /> > > <bean id="DoCoolStuff" class="DoCoolStuff" /> > > </beans> > > > the <cfargument> can NOT be left out of setLogger() ! > > I was wondering why this was, so if anyone can shed some light on it please > do so. > > Tnx. > >
