<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://schemas.haulmont.com/cuba/screen/window.xsd"
        xmlns:c="http://schemas.haulmont.com/cuba/screen/jpql_condition.xsd"
        caption="msg://organizationBrowse.caption"
        focusComponent="organizationsTable"
        messagesPack="com.nit.helpdesk.web.screens.organization">
    <data>
        <collection id="organizationsDc"
                    class="com.nit.helpdesk.entity.Organization">
               <view extends="_local">
                  <property name="organization_department" view="_local"/>
               </view>
            <loader id="organizationsDl">
                <query>
                    <![CDATA[select e from helpdesk_Organization e]]>
                </query>
            </loader>
            <collection id="organization_departmentDc" property="organization_department"/>
        </collection>
    </data>
    <layout expand="StructuraOrganizationTabSheet"
            spacing="true">
        <tabSheet id="StructuraOrganizationTabSheet">
            <tab id="tab_1" caption="msg://OrganizationTab" margin="true" >

        <groupTable id="organizationsTable"
                    width="100%"
                    dataContainer="organizationsDc" >
            <actions>
                <action id="create" type="create"/>
                <action id="edit" type="edit"/>
                <action id="remove" type="remove"/>
            </actions>
            <columns>
                <column id="name"/>
            </columns>
            <rowsCount/>
            <buttonsPanel id="buttonsPanel"
                          alwaysVisible="true">
                <button id="createBtn" action="organizationsTable.create"/>
                <button id="editBtn" action="organizationsTable.edit"/>
                <button id="removeBtn" action="organizationsTable.remove"/>
            </buttonsPanel>
         </groupTable>
        </tab>
        <tab id="tab_2" caption="msg://DepartmentTab" margin="true" >
          <groupTable id="organization_departmentTable"  dataContainer="organization_departmentDc"
                   width="100%" >
                <actions>
                    <action id="create" type="create"/>
                    <action id="edit" type="edit"/>
                    <action id="remove" type="remove"/>
                </actions>
                <columns>
                    <column id="name"/>
                </columns>
                <buttonsPanel>
                    <button action="organization_departmentTable.create"/>
                    <button action="organization_departmentTable.edit"/>
                    <button action="organization_departmentTable.remove"/>
                </buttonsPanel>
          </groupTable>
        </tab>
        </tabSheet>
        <hbox id="lookupActions" spacing="true" visible="false">
            <button action="lookupSelectAction"/>
            <button action="lookupCancelAction"/>
        </hbox>
    </layout>
</window>
