Use Extend MainScreen from AppComponent

Hi CUBA Team,

I’m extending Main Screen to do some customization at Project A.

Project B include Project A.

Is that possible if we use main screen of Project A at Project B?

I tried that I couldn’t specify main screen of project A at web-app.properties of Project B

web-app.properties of Project B

cuba.web.loginScreenId=projectAMainScreen

What I do as temporary solution is copy main screen of project A into project B.
If possible, I don’t want to duplicate code.

Regards,
CK

We have the same situation and it works fine.
There is a BasicComponent and there is an AdvancedProject that includes a BasicComponent.
Now on the 7.1 platform, but it used to work on the 6.8 platform.

It’s done just like yours.
But if you want in Project B use MainScreen from Project A, that is, an error in your example of web-approvals of Project B
There must be cuba.web.mainScreenId=projectAMainScreen but not cuba.web.loginScreenId.

1 Like

Hi Andrey,

Good day to You.

Thank You for pointing out the mistake. Ya, I did it wrong at my examples. In fact, the coding I tested is

ProjectB

cuba.web.loginScreenId=loginScreenOfProjectA
cuba.web.mainScreenId=extMainScreenOfProjectA

There is a BasicComponent and there is an AdvancedProject that includes a BasicComponent.
Now on the 7.1 platform, but it used to work on the 6.8 platform.
–> Could you share me the location or link?

Thank You :slight_smile:

Regards,
CK

testprojecta.zip (88.1 KB)
ProjectA with custom main screen.
Open project and install as component (Cuba/ Advanced/ install app component)

testprojectb.zip (78.0 KB)
ProjectB - blank project with dependencie from ProjectA,
Run ProjectB and you see custom main screen from ProjectA
image

2 Likes