Files
ofbiz-framework/applications/accounting/widget/GlobalGlAccountsScreens.xml
T
Jacques Le Roux 53ccd2ceb7 Fixes "Overview of routings does not paginate" https://issues.apache.org/jira/browse/OFBIZ-5322 and more
Actually it does paginate but the value is not dependent on widget property widget.form.defaultViewSize which default value is 20. It uses a default value of 50 which is defined by

<set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="3"/>

You can easily test it using https://localhost:8443/manufacturing/control/FindRouting?VIEW_SIZE=3

This is legacy from pre Apache era. I found 143 cases where a default-value is defined in screens for VIEW_SIZE.

I did not look into details for the 143 cases but I believe most are also legacy.
There are few default values: 10, 20, 30, 50, 500 and even an extreme case of 10000 for InventoryItemTotalsExport!
There is only one comment for LookupBulkAddProducts which is also legacy: <!-- 10 rows seems more appropriate given screen size, etc. -->

I suggest to OOTB replace all those by the widget.form.defaultViewSize value.
Things will then be consistent and easily changeable on a global scale using the widget property.
Or if really needed forcing the default-value as it's done now.

So this would be applied on the 143 cases (I checked, viewSizeDefaultValue does not exist in any screen)

<property-to-field resource="widget" property="widget.form.defaultViewSize" field="viewSizeDefaultValue"/>
<set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="${viewSizeDefaultValue}"/>

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526387 13f79535-47bb-0310-9956-ffa450edef68
2013-09-26 05:55:32 +00:00

383 lines
20 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
<screen name="GenericDecorator">
<section>
<actions>
<set field="headerItem" value="chartofaccounts"/>
</actions>
<widgets>
<!-- main defines the regions of the HTML page -->
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<!-- body is the primary display for this page and is called recursively -->
<decorator-section name="body">
<section>
<widgets>
<include-menu name="GlAccountTabBar" location="component://accounting/widget/AccountingMenus.xml"/>
<!-- label style="h1">List Accounts</label -->
<label style="h1">${uiLabelMap[labelTitleProperty]}</label>
<!-- Now call the SimpleScreen form -->
<decorator-section-include name="body"/>
</widgets>
<!--
<fail-widgets>
<label style="h3">${uiLabelMap.XxxxViewPermissionError}</label>
</fail-widgets>
-->
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CommonAccountDecorator">
<section>
<actions>
<set field="glAccountId" from-field="parameters.glAccountId"/>
<entity-one entity-name="GlAccount" value-field="glAccount"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
<!-- do check for CATALOG, _VIEW permission -->
<!-- condition>
<if-has-permission permission="CATALOG" action="_VIEW"/>
</condition -->
<widgets>
<include-menu name="GlAccountTabBar" location="component://accounting/widget/AccountingMenus.xml"/>
<label style="h1">${uiLabelMap[labelTitleProperty]} ${product.internalName} [${uiLabelMap.CommonId}:${productId}]</label>
<decorator-section-include name="body"/>
</widgets>
<!--
<fail-widgets>
<label style="h3">${uiLabelMap.XxxxViewPermissionError}</label>
</fail-widgets>
-->
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="AssignGlAccount">
<section>
<actions>
<set field="titleProperty" value="AcctgAssignGlAccount"/>
<set field="tabButtonItem" value="Chartofaccounts"/>
<set field="tabButtonItem2" value="AssignGlAccount"/>
<set field="labelTitleProperty" value="AcctgAssignGlAccount"/>
<!-- <set field="accountId" from-field="parameters.accountId"/> -->
</actions>
<widgets>
<decorator-screen name="GlobalGLSettingsDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-menu name="GlSettingTabBar" location="component://accounting/widget/AccountingMenus.xml"/>
<screenlet title="${uiLabelMap.AcctgAssignGlAccount}">
<include-form name="AssignGlAccount" location="component://accounting/widget/GlobalGlAccountsForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="GlAccountNavigate">
<section>
<actions>
<set field="titleProperty" value="AcctgNavigateAccts"/>
<set field="tabButtonItem" value="Chartofaccounts"/>
<set field="tabButtonItem2" value="GlAccountNavigate"/>
<set field="labelTitleProperty" value="AcctgNavigateAccts"/>
<!-- parameters includes requestAttributes and parameter map -->
<!-- requestParameters is just the parameter map -->
<set field="glAccountId" from-field="requestParameters.glAccountId"/>
<set field="trail" from-field="requestParameters.trail"/>
<entity-one entity-name="GlAccount" value-field="glAccount"/>
</actions>
<widgets>
<decorator-screen name="GlobalGLSettingsDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-menu name="GlSettingTabBar" location="component://accounting/widget/AccountingMenus.xml"/>
<screenlet title="${uiLabelMap.AcctgNavigateAccts}">
<include-tree name="GlAccountTree" location="component://accounting/widget/AccountingTrees.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.PageTitleEditGlAccount}">
<include-form name="EditGlAccount" location="component://accounting/widget/GlobalGlAccountsForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<!-- the next two screens list out the AcctgTransEntries, either from a GL Account or from an acctgTrans -->
<screen name="ListGlAccountEntries">
<section>
<actions>
<set field="titleProperty" value="PageTitleViewGlAccountEntries"/>
<set field="tabButtonItem" value="ListGlAccountOrganization"/>
<set field="glAccountId" from-field="requestParameters.glAccountId"/>
<entity-and entity-name="AcctgTransEntry" list="entries">
<field-map field-name="glAccountId"/>
</entity-and>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.PageTitleViewGlAccountEntries}">
<include-tree name="ListGlAccountTree" location="component://accounting/widget/AccountingTrees.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.PageTitleViewGlAccountEntries}">
<include-form name="ListAcctgTransEntries" location="component://accounting/widget/GlobalGlAccountsForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ListAcctgTransEntries">
<section>
<actions>
<set field="titleProperty" value="PageTitleViewAccountingTransaction"/>
<set field="headerItem" value="chartofaccounts"/>
<set field="acctgTransId" from-field="requestParameters.acctgTransId"/>
<entity-and entity-name="AcctgTransEntry" list="entries">
<field-map field-name="acctgTransId"/>
</entity-and>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-menu name="GlAccountTabBar" location="component://accounting/widget/AccountingMenus.xml"/>
<screenlet title="${uiLabelMap.PageTitleViewAccountingTransaction}">
<include-tree name="ListGlAccountTree" location="component://accounting/widget/AccountingTrees.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.PageTitleViewAccountingTransaction}">
<include-form name="ListAcctgTransEntries" location="component://accounting/widget/GlobalGlAccountsForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="AddGlAccount">
<section>
<actions>
<set field="titleProperty" value="PageTitleAddGlAccount"/>
<set field="tabButtonItem" value=""/>
<set field="labelTitleProperty" value=""/>
<set field="glAccount" value=""/><!-- make sure glAccountId field is shown -->
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.PageTitleAddGlAccount}">
<include-form name="EditGlAccount" location="component://accounting/widget/GlobalGlAccountsForms.xml"/>
</screenlet>
<!-- include-screen screen-name="ListGlAccounts" name="ListGlAccounts" / -->
<!-- tree name="ListGlAccountTree" location="component://accounting/widget/AccountingTrees.xml"/ -->
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ListGlAccounts">
<section>
<actions>
<set field="titleProperty" value="PageTitleListAccounts"/>
<set field="labelTitleProperty" value="PageTitleListAccounts"/>
<set field="tabButtonItem" value="Chartofaccounts"/>
<!-- no longer works requies a fieldMap entity-and entity-name="GlAccount" list="entityList" use-cache="true" >
<limit-range start="0" size="20"/>
</entity-and -->
<set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" default-value="0"/>
<property-to-field resource="widget" property="widget.form.defaultViewSize" field="viewSizeDefaultValue"/>
<set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="${viewSizeDefaultValue}"/>
</actions>
<widgets>
<decorator-screen name="GlobalGLSettingsDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-menu name="GlSettingTabBar" location="component://accounting/widget/AccountingMenus.xml"/>
<screenlet title="${uiLabelMap[labelTitleProperty]}">
<container style="button-bar">
<link target="ListGlAccountsReport" text="${uiLabelMap.CommonPrint}" style="buttontext"/>
<link target="ListGlAccountsExport" text="${uiLabelMap.CommonExport}" style="buttontext"/>
</container>
<include-form name="ListGlAccount" location="component://accounting/widget/GlobalGlAccountsForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ListGlAccountsReport">
<section>
<actions>
<property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
<set field="titleProperty" value="PageTitleListAccounts"/>
<set field="pageLayoutName" value="simple-landscape"/>
<set field="paginate" value="false"/>
</actions>
<widgets>
<decorator-screen name="SimpleDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="body">
<include-form name="ListGlAccount" location="component://accounting/widget/GlobalGlAccountsForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="GlAccountDetail">
<section>
<actions>
<entity-one entity-name="GlAccount" value-field="currentValue" use-cache="true">
<field-map field-name="glAccountId"/>
</entity-one>
</actions>
<widgets>
<label text="${uiLabelMap.FormFieldTitle_accountName}: ${currentValue.accountName}"/>
</widgets>
</section>
</screen>
<screen name="EditGlobalGlAccount">
<section>
<actions>
<!-- <set field="title" value="Edit GlAccount"/>
<set field="titleProperty" value=""/>
<set field="tabButtonItem" value=""/>
<set field="labelTitleProperty" value=""/> -->
<set field="glAccountId" from-field="parameters.glAccountId"/>
<entity-one entity-name="GlAccount" value-field="glAccount"/>
</actions>
<widgets>
<decorator-screen name="CommonAccountDecorator">
<decorator-section name="body">
<include-form name="EditGlAccount" location="component://accounting/widget/GlobalGlAccountsForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ViewRateAmounts">
<section>
<actions>
<property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
<set field="titleProperty" value="AccountingRateAmounts"/>
<set field="labelTitleProperty" value="${uiLabelMap.AccountingRateAmounts}"/>
<set field="tabButtonItem" value="ViewRateAmounts"/>
</actions>
<widgets>
<decorator-screen name="GlobalGLSettingsDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.AccountingUpdateRateAmount}" navigation-form-name="ListRateAmounts">
<include-form name="updateRateAmount" location="component://accounting/widget/GlobalGlAccountsForms.xml"/>
</screenlet>
<include-form name="ListRateAmounts" location="component://accounting/widget/GlobalGlAccountsForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<!-- Screen to view and manage foreign exchange conversions -->
<screen name="ViewFXConversions">
<section>
<actions>
<property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
<set field="titleProperty" value="AccountingFX"/>
<set field="labelTitleProperty" value="${uiLabelMap.AccountingFX}"/>
<set field="tabButtonItem" value="ViewFXConversions"/>
<property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
<!-- TODO: If UomConversionDated is ever used for another type of conversion besides currencies or if some currencies are
stored in UomConversion, we need to change the logic here -->
<entity-condition entity-name="UomConversionDated" list="conversions">
<order-by field-name="uomId"/>
<order-by field-name="uomIdTo"/>
<order-by field-name="fromDate"/>
</entity-condition>
</actions>
<widgets>
<decorator-screen name="GlobalGLSettingsDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet id="FxConversionPanel" title="${uiLabelMap.AccountingUpdateFX}" collapsible="true">
<include-form name="updateFXConversion" location="component://accounting/widget/GlSetupForms.xml"/>
</screenlet>
<include-form name="ListConversions" location="component://accounting/widget/GlSetupForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CostCenters">
<section>
<actions>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
<set field="titleProperty" value="FormFieldTitle_costCenters"/>
<set field="tabButtonItem" value="CostCenters"/>
</actions>
<widgets>
<decorator-screen name="GlobalGLSettingsDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
<actions>
<set field="organizationPartyId" from-field="parameters.organizationPartyId" default-value="${defaultOrganizationPartyId}"/>
<service service-name="getGlAcctgAndAmountPercentage" result-map="result">
<field-map field-name="organizationPartyId"/>
</service>
<set field="glAcctgAndAmountPercentageList" from-field="result.glAcctgAndAmountPercentageList" type="List"/>
<set field="glAccountCategories" from-field="result.glAccountCategories" type="List"/>
</actions>
<widgets>
<screenlet title="${uiLabelMap.FormFieldTitle_costCenters}">
<platform-specific>
<html>
<html-template location="component://accounting/webapp/accounting/ledger/CostCenters.ftl"/>
</html>
</platform-specific>
</screenlet>
</widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>