Declarative design and custom field that requires special constructor param

Hello,
we use declarative design for many screen definitions but I’m still not sure how to use custom components(fields) that require some additional parameters when ceating component instance. As an example there is database related picklist field that requires some database binidings etc. We have many examples (custom CKEditor field, custom file upload / download fields with MongoDB GridFS support etc.) that requires some aditional params when inititalized. Is there any example how to handle this scenario idiomaticly?

BTW. Declarative design is amazing. With created a custom DSL using Kotlin language that allow us define layout in code in type safe way with all IDE code hints …

David

It turned out that there is Design.setComponentFactory(ComponentFactory cf) where custom ComponentFactory can produce Component instances completely on our own.