createUIComponents is ignored - ish
After setting a component in a form to use custom initialisation code, the new method gets called but seems to be called before the actual default form initialisation code resulting in very non-custom initialisation code! Not sure whether this is a recent bug or not but it is pretty severe! Any chance this can be rectified before 8.1 final?
Please sign in to leave a comment.
Hello Saqib,
The createUIComponents() method is indeed called before the other setup code.
This has always been this way, and we aren't going to change this in 8.1
final (but maybe later). Why do you need to reference other components from
createUIComponents()
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hi Dmitri,
I wanted to set an icon for a button but I have worked around the custom initialisation code problem. But, if a component is marked as having custom init code then should it not rely completely on the createUIComponent method to set it up? Or am I mis-understanding its purpose?
Hello Saqib,
The purpose of createUIComponents() is to do custom creation of the component
instance (for example, if the component must be created by a factory method).
If you simply need to set some properties in a custom way, just write the
initialization code in the constructor - you don't need to use the custom
create option.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Ah - cool. Completely mis-understood then! :-|