How to use custom screen for User

How can I use my custom screen for user entity. I have extended user with lot of attributes and in default screen the roles and substituted user tables are not visible. (or I can change its to scroll vertically).

Thanks

Hi! You can extend default user screen add your own logic.

default user screen i have extended successfully but as mentioned in my initial post the screen become unusable as roles and substituted user grids goes below the screen bottom (if more attributes are added to screen)

How to solve this issue. I am attaching the screen capture for your perusal.
cuba-user-edit

Any suggestion please.

Sorry for long silence.

You can not to extend descriptor, but totally replace it with your own. For example, you can copy paste original descriptor and wrap layout into scroll box. For example:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://schemas.haulmont.com/cuba/window.xsd"
        datasource="userDs"
        class="com.company.untitled16.web.screens.ExtUserEditor"
        messagesPack="com.company.untitled16.web.screens">
    <companions>
        <web class="com.haulmont.cuba.web.app.ui.security.user.UserEditorCompanion"/>
    </companions>

    <dsContext>
        <datasource id="userDs" class="com.haulmont.cuba.security.entity.User" view="user.edit">
            <collectionDatasource id="rolesDs" property="userRoles"/>
            <collectionDatasource id="substitutionsDs" property="substitutions"/>
        </datasource>
    </dsContext>

    <dialogMode height="theme://cuba.gui.dialogSize.height.xlarge"
                width="theme://cuba.gui.dialogSize.width.xlarge"
                resizable="true"/>

    <layout expand="windowActions" spacing="true">
        <scrollBox orientation="vertical" id="scrollBox">
            <groupBox id="propertiesBox">
                <grid id="propertiesGrid" width="100%" spacing="true">
                    <columns>
                        <column id="fieldGroupLeftColumn" flex="1"/>
                        <column id="fieldGroupRightColumn" flex="3"/>
                    </columns>
                    <rows>
                        <row id="propertiesRow">
                            <fieldGroup id="fieldGroupLeft" datasource="userDs" width="AUTO">
                                <column width="250px">
                                    <field id="login" required="true" requiredMessage="msg://loginMsg"/>
                                    <field id="passw" custom="true" caption="msg://password"/>
                                    <field id="confirmPassw" custom="true" caption="msg://confirmPassword"/>
                                    <field id="firstName"/>
                                    <field id="middleName"/>
                                    <field id="lastName"/>
                                    <field id="name"/>
                                    <field id="email">
                                        <validator class="com.haulmont.cuba.gui.components.validators.EmailValidator"
                                                   message="msg://email.alert"/>
                                    </field>
                                </column>
                            </fieldGroup>

                            <fieldGroup id="fieldGroupRight" datasource="userDs" width="AUTO">
                                <column width="250px">
                                    <field id="group" custom="true"/>
                                    <field id="position"/>
                                    <field id="language" custom="true"/>
                                    <field id="timeZone" custom="true"/>
                                    <field id="ipMask"/>
                                    <field id="active"/>
                                </column>
                            </fieldGroup>
                        </row>
                    </rows>
                </grid>
            </groupBox>

            <split id="split" orientation="horizontal" pos="50" width="100%" height="250px">
                <vbox id="rolesPanel" expand="rolesTable" spacing="true" margin="false,true,false,false"
                      height="100%" width="100%">
                    <label value="msg://roles" stylename="h2"/>
                    <buttonsPanel>
                        <button id="rolesTableAddBtn" action="rolesTable.add"/>
                        <button id="rolesTableEditBtn" action="rolesTable.edit"/>
                        <button id="rolesTableRemoveBtn" action="rolesTable.remove"/>
                    </buttonsPanel>
                    <table id="rolesTable" editable="false" multiselect="true" width="100%">
                        <actions>
                            <action id="add"/>
                            <action id="edit"/>
                            <action id="remove"/>
                        </actions>
                        <columns>
                            <column id="role.name" caption="msg://roleName"/>
                            <column id="role.locName" caption="msg://localizedRoleName"/>
                        </columns>
                        <rows datasource="rolesDs"/>
                    </table>
                </vbox>

                <vbox id="substPanel" expand="substTable" spacing="true" margin="false,false,false,true"
                      height="100%" width="100%">
                    <label value="msg://substUsers" stylename="h2"/>
                    <buttonsPanel>
                        <button id="substTableAddBtn" action="substTable.add"/>
                        <button id="substTableEditBtn" action="substTable.edit"/>
                        <button id="substTableRemoveBtn" action="substTable.remove"/>
                    </buttonsPanel>
                    <table id="substTable" editable="false" multiselect="true" width="100%">
                        <actions>
                            <action id="add"/>
                            <action id="edit"/>
                            <action id="remove"/>
                        </actions>
                        <columns>
                            <column id="substitutedUser.login" caption="msg://login"/>
                            <column id="substitutedUser.name" caption="msg://name"/>
                            <column id="startDate" caption="msg://startDate">
                                <formatter class="com.haulmont.cuba.gui.components.formatters.DateFormatter"
                                           type="DATE"/>
                            </column>
                            <column id="endDate" caption="msg://endDate">
                                <formatter class="com.haulmont.cuba.gui.components.formatters.DateFormatter"
                                           type="DATE"/>
                            </column>
                        </columns>
                        <rows datasource="substitutionsDs"/>
                    </table>
                </vbox>
            </split>

        </scrollBox>

        <fragment id="windowActions"
                  screen="editWindowActions"/>
    </layout>
</window>

thanks @shustanov, This help to solve my issue.

However two observations-
If scrollBox is used, the useredit shows two user forms one above other (development environment shows error that parent configuration is not same)

If scrollbox is removed the problem is solved and even it has scrolling. (why?)

thanks again

regards
Umesh