Does DI/1 respect invokeImplicitAccessor / triggerDataMember ?

31 views
Skip to first unread message

Shawn Holmes

unread,
Apr 3, 2018, 6:05:19 PM4/3/18
to framework-one
Assume car.cfc:

component accessors=true {

  property make;
  property model;

}

While in my FW/1 application, If I grab an instance of a CFC via the bean factory (DI/1):

var car = fw.getBeanFactory().getBean( 'car' );

as opposed to invoking the component by hand:

var car = CreateObject('component','car');

can I expect to call the properties directly on the object, and have their getters/setters invoked implicitly? (provided invokeImplicitAccessor or triggerDataMember is true on the Application.cfc):

writeOutput(car.make); // error? or will it call car.getMake()?

Sean Corfield

unread,
Apr 3, 2018, 7:35:02 PM4/3/18
to framework-one
That's a good question! Why don't you try it and see what happens and then post back here and tell us what you found?

Also, is this on ColdFusion or Lucee? I believe they both have similar options (but slightly different -- of course!).

Thanks,
Sean

Shawn Holmes

unread,
Apr 3, 2018, 7:41:52 PM4/3/18
to framew...@googlegroups.com
As luck would have it, I did, which led me to this post: https://dev.lucee.org/t/triggerdatamember-invokeimplicitaccessor-issue/3718/4. Initially, I thought this was a Lucee bug, but then, I was able to create a brand new bare CFC, instantiate it, and access the properties without issue...

...which is what led me to bring it up here. Maybe it's not a Lucee/ACF issue at all...maybe it's FW/1?

--
FW/1 documentation: http://framework-one.github.io
FW/1 source code: http://github.com/framework-one/fw1
FW/1 chat / support: https://gitter.im/framework-one/fw1
FW/1 mailing list: http://groups.google.com/group/framework-one
---
You received this message because you are subscribed to the Google Groups "framework-one" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-one+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/framework-one.
For more options, visit https://groups.google.com/d/optout.

Sean Corfield

unread,
Apr 4, 2018, 4:18:31 PM4/4/18
to framew...@googlegroups.com

Please put together the smallest, completely self-contained example that you can, which reproduces the bug, and put it up on GitHub where I can take a look.

 

I’ve never used the implicit accessor stuff because it isn’t portable (and I seem to recall when trying to test it originally, it did not work as I expected anyway).

 

Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

 


From: framew...@googlegroups.com <framew...@googlegroups.com> on behalf of Shawn Holmes <shawn.a...@gmail.com>
Sent: Tuesday, April 3, 2018 4:41:49 PM
To: framew...@googlegroups.com
Subject: Re: [framework-one] Re: Does DI/1 respect invokeImplicitAccessor / triggerDataMember ?
 
To unsubscribe from this group and stop receiving emails from it, send an email to framework-on...@googlegroups.com.

Shawn Holmes

unread,
Apr 4, 2018, 10:54:13 PM4/4/18
to framework-one
Ok! Give this a go:


1. Initial reads of both accessors and properties should display without error
2. Attempting to pass the bean to a save method causes...something...strange to happen...
To unsubscribe from this group and stop receiving emails from it, send an email to framework-on...@googlegroups.com.
Visit this group at https://groups.google.com/group/framework-one.
For more options, visit https://groups.google.com/d/optout.

Sean Corfield

unread,
Apr 6, 2018, 1:54:15 AM4/6/18
to framew...@googlegroups.com

Yup, repro’d with Lucee. It works fine with ACF 2016 tho’. Bug in Lucee.

 

Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

 

Sent: Wednesday, April 4, 2018 7:54:13 PM
To: framework-one
Reply all
Reply to author
Forward
0 new messages