coldbox-modules / cbwire

CBWIRE is a ColdBox module that makes building reactive, modern apps easy using HTML-over-the-wire technologies and CFML.
https://cbwire.ortusbooks.com
Other
28 stars 5 forks source link

Automatically populate data properties with passed parameters when onMount() isn't defined #132

Closed mrigsby closed 1 year ago

mrigsby commented 1 year ago

Building on box products' love of conventions, if onMount() does not exist, we check that each parameter is a string, boolean, numeric, date, array, or struct and if they are we populate the component using scope population instead of setters.

131

mrigsby commented 1 year ago

Absolutely! Can do. I don't do enough testing... I gotta work on that!

mrigsby commented 1 year ago

I created a few tests, more than two. In the process of testing I figured out that isStruct() returns true for a CFML component so I added the check for isObject() as well as isCustomFunction() while I was at it.

mrigsby commented 1 year ago

@grantcopley No problem at all. Thank you for all your hard work on cbwire, it's great. Glad I can contribute.

grantcopley commented 10 months ago

@mrigsby Released in CBWIRE 3.2. https://www.ortussolutions.com/blog/cbwire-32-released

Thank you for your contributions!