Using import in script style component

ColdFusion Add comments

I'm slowly migrating to writing script style components. I really started loving it. It's lot faster to write code in script style.

Anyway, today in one of my component I wanted to define the type of a property as a custom class. Since you can't write any code above property definition, on a whim, I tried the import outside of the component declaration and I was pleasantly surprised that it worked as expected!



import someClassPath.*;


component {


	property MyClassName myClass;


	public void function init() {


		return this;


	}


}


 

0 responses to “Using import in script style component”

Leave a Reply





Powered by Mango Blog. Design and Icons by N.Design Studio