Ticket #101 (closed defect: worksforme)

Opened 20 years ago

Last modified 16 years ago

Autowire Code Should Walk the Inheritance Tree

Reported by: joshuascott74@… Owned by: joshuascott74@…
Priority: normal Milestone:
Version: 2.0.304 Severity: normal
Keywords: Inheritance Tree, autowire Cc: seancorfield@…

Description

The mg autowire code should automatically initialize controllers regardless of their presence in ModelGlue?.xml file. In the dependency controller I wrote I have to have an entry for the controller:

<controller name="DependencyController?" type="CAMSymphony.controller.DependencyController?" />

Even though it does not have any listener and a completely background controller.

Change History

Changed 20 years ago by joe.rinehart

  • owner changed from joe.rinehart@… to joshuascott74@…

As far as I can tell, it does. I've tried it out by creating a fresh copy of the app template, creating BaseController?.cfc with a simple setFoo(). Then, I made Controller.cfc extend the BaseController? (which extended ModelGlue?.unity.controller.Controller). I set up a Foo bean in ColdSpring? pointing to Foo.cfc. After adding a <cfdump var="#arguments.foo#"><cfabort /> to setFoo(), it was getting set in there fine.

The autowire code in XmlConfigurationLoader? doesn't use CF metadata to find setter functions. It loops over the controller instance as a struct, checking to see if each element is a method. This originally was in place to support autowiring via <cfinclude>-based mixins, but seems to help with inheritance as well.

Are you on MX6 or MX7? I had to rebuild this box, and haven't deployed a 6.1 instance yet.

Changed 20 years ago by joe.rinehart

  • status changed from new to closed
  • resolution set to worksforme

Changed 16 years ago by cfgrok

  • milestone Feature Requests deleted

Milestone Feature Requests deleted

Note: See TracTickets for help on using tickets.