ilscipio/scipio-erp

View on GitHub
framework/webtools/widget/EntityScreens.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is subject to the terms and conditions defined in the
files 'LICENSE' and 'NOTICE', which are part of this source
code package.
-->

<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">

    <screen name="EntitySQLProcessor" transaction-timeout="7200" transaction-timeout-param="true"><!-- SCIPIO: Added timeout -->
        <section>
            <actions>
                <set field="titleProperty" value="PageTitleEntitySQLProcessor"/>
                <set field="activeSubMenuItem" value="EntitySQLProcessor"/>
                <set field="labelTitleProperty" value="PageTitleEntitySQLProcessor"/>
                <set field="sqlCommand" from-field="parameters.sqlCommand"/>
                <set field="selGroup" from-field="parameters.group"/>
                <set field="rowLimit" from-field="parameters.rowLimit" type="Integer"/>
                <!-- SCIPIO: Has no effect because transaction already started -> added to screen element instead
                <set field="parameters.TRANSACTION_TIMEOUT" value="7200"/>-->

                <script location="component://webtools/webapp/webtools/WEB-INF/actions/entity/EntitySQLProcessor.groovy"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonEntityDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <platform-specific>
                            <html><html-template location="component://webtools/webapp/webtools/entity/EntitySQLProcessor.ftl"/></html>
                        </platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
    <screen name="EntityExportAll">
        <section>
            <actions>
                <set field="titleProperty" value="PageTitleEntityExportAll"/>
                <set field="activeSubMenuItem" value="entityExportAll"/>
                <!-- SCIPIO: Has no effect because transaction already started + not needed for this screen
                <set field="parameters.TRANSACTION_TIMEOUT" value="7200"/>-->
                <set field="results" from-field="parameters.results"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonImportExportDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet>
                            <platform-specific>
                                <html><html-template location="component://webtools/webapp/webtools/entity/EntityExportAll.ftl"/></html>
                            </platform-specific>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
    <screen name="ProgramExport">
        <section>
            <actions>
                <set field="titleProperty" value="PageTitleEntityExportAll"/>
                <set field="activeSubMenuItem" value="programExport"/>
                <!-- SCIPIO: conditions -->
                <property-to-field resource="webtools" property="dev.script.tools.enabled" field="tmplTestEnabled"/>
                <set field="tmplTestEnabled" from-field="tmplTestEnabled" type="Boolean"/>
                <condition-to-field field="hasTmplTestPerm" type="Boolean">
                    <and>
                        <if-has-permission permission="OFBTOOLS" action="_VIEW"/>
                        <if-has-permission permission="ENTITY_DATA_ADMIN"/><!-- SUPER/FULLADMIN only, for security reasons -->
                        <if-true field="tmplTestEnabled"/>
                    </and>
                </condition-to-field>
                <script location="component://webtools/webapp/webtools/WEB-INF/actions/entity/ProgramExport.groovy"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonImportExportDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <section>
                            <condition>
                                <and>
                                    <if-has-permission permission="OFBTOOLS" action="_VIEW"/>
                                    <if-has-permission permission="ENTITY_DATA_ADMIN"/><!-- SUPER/FULLADMIN only, for security reasons -->
                                </and>
                            </condition>
                            <widgets>
                                <section>
                                    <condition>
                                        <not><if-true field="tmplTestEnabled"/></not>
                                    </condition>
                                    <widgets>
                                        <label style="common-msg-warning">${uiLabelMap.CommonFunctionIsDisabled}</label>
                                    </widgets>
                                </section>
                                <screenlet>
                                    <include-form name="ProgramExport" location="component://webtools/widget/MiscForms.xml"/>
                                </screenlet>
                                <screenlet>
                                    <platform-specific>
                                        <html><html-template location="component://webtools/webapp/webtools/entity/ProgramExport.ftl"/></html>
                                    </platform-specific>
                                </screenlet>
                            </widgets>
                            <fail-widgets>
                                <label style="common-msg-error-perm">${uiLabelMap.WebtoolsPermissionError}</label>
                            </fail-widgets>
                        </section>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
    <screen name="EntityImportDir">
        <section>
            <actions>
                <set field="titleProperty" value="PageTitleEntityImportDir"/>
                <set field="activeSubMenuItem" value="entityImportDir"/>
                <!-- SCIPIO: Has no effect because transaction already started + not needed for this screen
                <set field="parameters.TRANSACTION_TIMEOUT" value="7200"/>-->

                <set field="messages" from-field="parameters.messages"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonImportExportDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet>
                            <platform-specific>
                                <html><html-template location="component://webtools/webapp/webtools/entity/EntityImportDir.ftl"/></html>
                            </platform-specific>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
    <screen name="EntityImport">
        <section>
            <actions>
                <set field="titleProperty" value="PageTitleEntityImport"/>
                <set field="activeSubMenuItem" value="entityImport"/>
                <!-- SCIPIO: Has no effect because transaction already started + not needed for this screen
                <set field="parameters.TRANSACTION_TIMEOUT" value="7200"/>-->

                <set field="messages" from-field="parameters.messages"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonImportExportDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet>
                            <platform-specific>
                                <html><html-template location="component://webtools/webapp/webtools/entity/EntityImport.ftl"/></html>
                            </platform-specific>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
    <screen name="EntityImportReaders">
        <section>
            <actions>
                <set field="titleProperty" value="PageTitleEntityImportReaders"/>
                <set field="activeSubMenuItem" value="entityImportReaders"/>
                <!-- SCIPIO: Has no effect because transaction already started + not needed for this screen
                <set field="parameters.TRANSACTION_TIMEOUT" value="7200"/>-->

                <set field="messages" from-field="parameters.messages"/>
                
                <!-- SCIPIO -->
                <script lang="groovy"><![CDATA[
                    import org.ofbiz.entity.config.model.EntityConfig;
                    context.allReaderNames = EntityConfig.getInstance().getEntityDataReaderNames() as List;
                ]]></script>
            </actions>
            <widgets>
                <decorator-screen name="CommonImportExportDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet><!-- title="${uiLabelMap.WebtoolsImportToDataSource}" -->
                            <platform-specific>
                                <html><html-template location="component://webtools/webapp/webtools/entity/EntityImportReaders.ftl"/></html>
                            </platform-specific>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

    <screen name="EntityMaint">
        <section>
            <actions>
                <set field="titleProperty" value="WebtoolsEntityDataMaintenance"/>
                <set field="activeSubMenuItem" value="entitymaint"/>
                <script location="component://webtools/webapp/webtools/WEB-INF/actions/entity/EntityMaint.groovy"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonEntityDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <platform-specific>
                            <html><html-template location="component://webtools/webapp/webtools/entity/EntityMaint.ftl"/></html>
                        </platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

    <screen name="FindGeneric">
        <section>
            <condition>
                <if-has-permission permission="ENTITY_MAINT"/>
            </condition>
            <actions>
                <script location="component://webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy"/>
                <property-map resource="CommonUiLabels" map-name="uiLabelMap"/>
                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap"/>
                <set field="title" value="${uiLabelMap.WebtoolsFindValues} ${uiLabelMap.WebtoolsForEntity}: ${entityName}"/>
                <set field="commonDisplaying" value="${uiLabelMap.CommonDisplaying}"/>
                <set field="activeSubMenuItem" value="entitymaint"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonEntityDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <section><!-- SCIPIO: check entity exists -->
                            <condition>
                                <not><if-empty field="modelEntity"/></not>
                            </condition>
                            <widgets>
                                <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
                                    <decorator-section name="menu-bar">
                                        <!-- SCIPIO: links merged into a sub tab bar -->
                                        <include-menu name="EntitySubTabBar" location="component://webtools/widget/Menus.xml"/><!-- SCIPIO: links merged into a sub tab bar -->
                                    </decorator-section>
                                    <decorator-section name="search-options">
                                        <platform-specific>
                                            <html><html-template location="component://webtools/webapp/webtools/entity/FindGeneric.ftl"/></html>
                                        </platform-specific>
                                    </decorator-section>
                                    <decorator-section name="search-results">
                                        <platform-specific>
                                            <html><html-template location="component://webtools/webapp/webtools/entity/ListGeneric.ftl"/></html>
                                        </platform-specific>
                                    </decorator-section>
                                </decorator-screen>
                            </widgets>
                            <fail-widgets>
                                <include-menu name="EntitySubTabBar" location="component://webtools/widget/Menus.xml"/>
                                <!--<section>
                                    <condition>
                                        <not><if-empty field="entityName"/></not>
                                    </condition>
                                    <widgets>
                                        <label style="common-msg-error">${uiLabelMap.WebtoolsEntityNotFoundSpecified}.</label>
                                    </widgets>
                                </section>-->
                            </fail-widgets>
                        </section>
                    </decorator-section>
                </decorator-screen>
            </widgets>
            <fail-widgets>
                <label style="common-msg-error-perm">${uiLabelMap.WebtoolsPermissionError}</label>
            </fail-widgets>
        </section>
    </screen>
    <screen name="ViewGeneric">
        <section>
            <condition>
                <if-has-permission permission="ENTITY_MAINT"/>
            </condition>
            <actions>
                <script location="component://webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy"/>
                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap"/>
                <set field="title" value="${uiLabelMap.WebtoolsViewValue}: ${entityName}"/>
                <set field="activeSubMenuItem" value="entitymaint"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonEntityDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <platform-specific>
                            <html><html-template location="component://webtools/webapp/webtools/entity/ViewGeneric.ftl"/></html>
                        </platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
            <fail-widgets>
                <label style="common-msg-error-perm">${uiLabelMap.WebtoolsPermissionError}</label>
            </fail-widgets>
        </section>
    </screen>
    <screen name="ViewRelations">
        <section>
            <condition>
                <if-has-permission permission="ENTITY_MAINT"/>
            </condition>
            <actions>
                <script location="component://webtools/webapp/webtools/WEB-INF/actions/entity/ViewRelations.groovy"/>
                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap"/>
                <set field="title" value="${uiLabelMap.WebtoolsRelations}: ${entityName}"/>
                <set field="activeSubMenuItem" value="entitymaint"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonEntityDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <platform-specific>
                            <html><html-template location="component://webtools/webapp/webtools/entity/ViewRelations.ftl"/></html>
                        </platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
            <fail-widgets>
                <label style="common-msg-error-perm">${uiLabelMap.WebtoolsPermissionError}</label>
            </fail-widgets>
        </section>
    </screen>
    <screen name="EntityRef">
        <section>
            <condition>
                <if-has-permission permission="ENTITY_MAINT"/>
            </condition>
            <actions>
                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="titleProperty" value="WebtoolsEntityReferenceChart"/>
                <script location="component://webtools/webapp/webtools/WEB-INF/actions/entity/EntityRef.groovy"/>
            </actions>
            <widgets>
                <platform-specific>
                    <html>
                        <html-template location="component://webtools/webapp/webtools/entity/EntityRef.ftl"/>
                    </html>
                </platform-specific>
            </widgets>
            <fail-widgets>
                <label style="common-msg-error-perm">${uiLabelMap.WebtoolsPermissionError}</label>
            </fail-widgets>
        </section>
    </screen>
    <screen name="EntityRefMain">
        <section>
            <condition>
                <if-has-permission permission="ENTITY_MAINT"/>
            </condition>
            <actions>
                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="titleProperty" value="WebtoolsEntityReferenceChart"/>
                <service service-name="getEntityRefData" result-map="result"/>
                <set field="numberOfEntities" from-field="result.numberOfEntities"/>
                <set field="packagesList" from-field="result.packagesList"/>
            </actions>
            <widgets>
                <platform-specific>
                    <html>
                        <html-template location="component://webtools/webapp/webtools/entity/EntityRefMain.ftl"/>
                    </html>
                </platform-specific>
            </widgets>
            <fail-widgets>
                <label style="common-msg-error-perm">${uiLabelMap.WebtoolsPermissionError}</label>
            </fail-widgets>
        </section>
    </screen>
    <screen name="EntityRefList">
        <section>
            <condition>
                <if-has-permission permission="ENTITY_MAINT"/>
            </condition>
            <actions>
                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="titleProperty" value="WebtoolsEntityReference"/>
                <script location="component://webtools/webapp/webtools/WEB-INF/actions/entity/EntityRefList.groovy"/>
            </actions>
            <widgets>
                <platform-specific>
                    <html>
                        <html-template location="component://webtools/webapp/webtools/entity/EntityRefList.ftl"/>
                    </html>
                </platform-specific>
            </widgets>
            <fail-widgets>
                <label style="common-msg-error-perm">${uiLabelMap.WebtoolsPermissionError}</label>
            </fail-widgets>
        </section>
    </screen>
    <screen name="EntityRefReport">
        <section>
            <actions>
                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="titleProperty" value="WebtoolsEntityReferenceChart"/>
                <service service-name="getEntityRefData" result-map="result"/>
                <set field="numberOfEntities" from-field="result.numberOfEntities"/>
                <set field="packagesList" from-field="result.packagesList"/>
            </actions>
            <widgets>
                <platform-specific>
                    <xsl-fo>
                        <html-template location="component://webtools/webapp/webtools/entity/EntityRefReport.fo.ftl"/>
                    </xsl-fo>
                </platform-specific>
            </widgets>
        </section>
    </screen>

    <screen name="EntityEoModelBundle">
        <section>
            <actions>
                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="titleProperty" value="PageTitleEntityEoModelBundle"/>
                <set field="activeSubMenuItem" value="entityEoModelBundle"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonImportExportDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet>
                            <include-form name="EntityEoModelBundle" location="component://webtools/widget/EntityForms.xml"/>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

    <screen name="CheckDb">
        <section>
            <actions>
                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="titleProperty" value="WebtoolsCheckUpdateDatabase"/>
                <set field="activeSubMenuItem" value="checkDb"/>
                <script location="component://webtools/webapp/webtools/WEB-INF/actions/entity/CheckDb.groovy"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonEntityDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet>
                            <platform-specific><html><html-template location="component://webtools/webapp/webtools/entity/CheckDb.ftl"/></html></platform-specific>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
    <screen name="EntityPerformanceTest">
        <section>
            <condition>
                <if-has-permission permission="ENTITY_MAINT"/>
            </condition>
            <actions>
                <set field="titleProperty" value="WebtoolsPerformanceTests"/>
                <set field="activeSubMenuItem" value="entityPerformanceTest"/>
                <script location="component://webtools/webapp/webtools/WEB-INF/actions/entity/EntityPerformanceTest.groovy"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonEntityDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet>
                            <label>${uiLabelMap.WebtoolsNotePerformanceResultsMayVary}</label>
                            <include-form name="ListPerformanceResults" location="component://webtools/widget/EntityForms.xml"/>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
            <fail-widgets>
                <label style="common-msg-error-perm">${uiLabelMap.WebtoolsPermissionMaint}</label>
            </fail-widgets>
        </section>
    </screen>
    <screen name="xmldsdump">
        <section>
            <actions>
                <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="titleProperty" value="PageTitleEntityExport"/>
                <set field="activeSubMenuItem" value="xmlDsDump"/>
                <set field="entityFrom" from-field="parameters.entityFrom" type="Timestamp"/>
                <set field="entityThru" from-field="parameters.entityThru" type="Timestamp"/>
                <script location="component://webtools/webapp/webtools/WEB-INF/actions/entity/XmlDsDump.groovy"/>
                <entity-condition entity-name="EntityExport" list="exportList">
                    <order-by field-name="-createdStamp"/>
                </entity-condition>
            </actions>
            <widgets>
                <decorator-screen name="CommonImportExportDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet>
                            <platform-specific><html><html-template location="component://webtools/webapp/webtools/entity/xmldsdump.ftl"/></html></platform-specific>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

    <screen name="ConnectionPoolStatus">
        <section>
            <actions>
                <set field="titleProperty" value="ConnectionPoolStatus"/>
                <set field="activeSubMenuItem" value="ConnectionPoolStatus"/>
                <set field="labelTitleProperty" value="ConnectionPoolStatus"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonEntityDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <platform-specific>
                            <html><html-template location="component://webtools/webapp/webtools/entity/ConnectionPoolStatus.ftl"/></html>
                        </platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
    
    <!-- SCIPIO: new -->
    <screen name="EntityUtilityServices">
        <section>
            <actions>
                <property-map resource="SolrUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="titleProperty" value="WebtoolsEntityUtilityServices"/>
                <set field="activeSubMenuItem" value="EntityUtilityServices"/>                
            </actions>
            <widgets>
                <decorator-screen name="CommonEntityDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <platform-specific>
                            <html><html-template location="component://webtools/webapp/webtools/entity/EntityUtilityServices.ftl"/></html>
                        </platform-specific>
                        <!--
                        <section>
                            <actions>
                                <script location="component://webtools/script/com/ilscipio/demoDataGenerator/DemoDataGeneratorList.groovy"/>
                            </actions>
                            <widgets>
                                <platform-specific>
                                    <html><html-template location="component://webtools/webapp/webtools/demoDataGenerator/DemoDataGeneratorList.ftl"/></html>
                                </platform-specific>                            
                            </widgets>
                        </section>
                        -->
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

    <!-- Scipio 3.0 -->
    <screen name="ExcelImport">
        <section>
            <actions>
                <set field="titleProperty" value="EntityExcelImport"/>
                <set field="activeSubMenuItem" value="EntityExcelImport"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonImportExportDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <platform-specific>
                            <html><html-template location="component://webtools/webapp/webtools/entity/excelimport.ftl"/></html>
                        </platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
</screens>