Find out what I'm doing, Follow Me :)

Using import in script style component


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;