<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://schemas.haulmont.com/cuba/window.xsd"
        caption="msg://editCaption"
        class="com.company.taxi.gui.carservicecenter.CarServiceCenterEdit"
        datasource="carServiceCenterDs"
        focusComponent="fieldGroup"
        messagesPack="com.company.taxi.gui.carservicecenter">
    <dsContext>
        <datasource id="carServiceCenterDs"
                    allowCommit="false"
                    class="com.company.taxi.entity.CarServiceCenter"
                    view="_local"/>
        <collectionDatasource id="employeesDs"
                              class="com.company.taxi.entity.Employee"
                              view="_local">
            <query>
                <![CDATA[select o from taxi$Employee o 
where o.carcervicecenter.id =:ds$carServiceCenterDs]]>
            </query>
        </collectionDatasource>
    </dsContext>
    <layout expand="windowActions"
            spacing="true">
        <fieldGroup id="fieldGroup"
                    datasource="carServiceCenterDs">
            <column width="250px">
                <field id="name"
                       datasource="carServiceCenterDs"/>
                <field id="phone"
                       datasource="carServiceCenterDs"/>
                <field id="address"
                       datasource="carServiceCenterDs"/>
            </column>
        </fieldGroup>
        <frame id="windowActions"
               height="41px"
               screen="editWindowActions"/>
        <buttonsPanel>
            <button id="button"
                    action="employeesTable.create"
                    caption="msg://create"
                    invoke="onButtonClick"/>
            <button id="butedit"
                    action="employeesTable.edit"
                    caption="msg://edit"
                    invoke="onButeditClick"/>
            <button action="employeesTable.remove"/>
        </buttonsPanel>
        <table id="employeesTable"
               aggregatable="true"
               editable="true"
               height="261px"
               multiLineCells="true"
               multiselect="true"
               presentations="true"
               width="100%">
            <actions>
                <action id="create"
                        caption="msg://Create"
                        openType="NEW_TAB"/>
                <action id="edit"
                        caption="msg://edit"
                        openType="THIS_TAB"/>
                <action id="remove"
                        caption="msg://Remove"/>
            </actions>
            <columns>
                <column id="firstname"/>
                <column id="lastname"/>
                <column id="salary"/>
                <column id="birthDate"/>
                <column id="email"/>
            </columns>
            <rows datasource="employeesDs"/>
        </table>
    </layout>
</window>
