Extending my own screens from studio

Hi
I see it is possible to create a screen through extending an existing screen from base project.
I think it should be possible to extend one of my own screens through coding (like described in the documentation) but is there a way to do so directly from studio ?
Michael

We don’t support extending the project’s screens in Studio intentionally because there is better alternative for code reuse - composition with Frames. It is more natural and less error prone. Extending should be the last resort when you need to change a screen from a base project.

Understood. My requirement would be to be able to alter an existing screen from my project depending on some configuration.
For instance masking some fields. I guess I have to rely on coding then - altering visibility in the init method of the screen (right ?)

Yes, you can alter visibility or create components via ComponentsFactory, bind to datasources if needed and add them to the screen. For example:


@Inject
private ComponentsFactory componentsFactory;

@Override
public void init(Map<String, Object> params) {
    LookupField lookupField = componentsFactory.createComponent(LookupField.class);
    lookupField.setDatasource(someDs, "someProperty");
    lookupField.setOptionsDatasource(someOptionsDs);
    someGroupBox.add(lookupField);
}

You can also add frames to your screen dynamically, like in this sample project.