Files
ofbiz-framework/framework/common/widget/SecurityScreens.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

357 lines
19 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="CreateSecurityGroup">
<section>
<actions>
<set field="titleProperty" value="NewSecurityGroup"/>
<set field="cancelPage" from-field="parameters.CANCEL_PAGE" default-value="FindSecurityGroup"/>
</actions>
<widgets>
<decorator-screen name="SecurityDecorator" location="${parameters.securityDecoratorLocation}">
<decorator-section name="body">
<container style="page-title">
<label text="${uiLabelMap.NewSecurityGroup}"/>
</container>
<include-form name="CreateSecurityGroup" location="component://common/widget/SecurityForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CreateUserLogin">
<section>
<actions>
<set field="titleProperty" value="CreateUserLogin"/>
<set field="cancelPage" from-field="parameters.CANCEL_PAGE" default-value="FindUserLogin"/>
<set field="createUserLoginURI" value="createUserLogin"/>
<set field="partyId" from-field="parameters.partyId"/>
</actions>
<widgets>
<decorator-screen name="SecurityDecorator" location="${parameters.securityDecoratorLocation}">
<decorator-section name="body">
<container style="page-title">
<label text="${uiLabelMap.CreateUserLogin}"/>
</container>
<include-form name="AddUserLogin" location="component://common/widget/SecurityForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditSecurityGroup">
<section>
<actions>
<set field="titleProperty" value="PageTitleEditSecurityGroup"/>
<set field="tabButtonItem" value="EditSecurityGroup"/>
<set field="groupId" from-field="parameters.groupId"/>
<entity-one entity-name="SecurityGroup" value-field="securityGroup"/>
</actions>
<widgets>
<decorator-screen name="SecurityDecorator" location="${parameters.securityDecoratorLocation}">
<decorator-section name="body">
<container style="page-title">
<label text="${uiLabelMap.PageTitleEditSecurityGroup} - ${groupId}"/>
</container>
<include-form name="EditSecurityGroup" location="component://common/widget/SecurityForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditSecurityGroupPermissions">
<section>
<actions>
<set field="titleProperty" value="PageTitleEditSecurityGroupPermissions"/>
<set field="tabButtonItem" value="EditSecurityGroupPermissions"/>
<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}"/>
<set field="groupId" from-field="parameters.groupId"/>
<entity-one entity-name="SecurityGroup" value-field="securityGroup"/>
</actions>
<widgets>
<decorator-screen name="SecurityDecorator" location="${parameters.securityDecoratorLocation}">
<decorator-section name="body">
<container style="page-title">
<label text="${uiLabelMap.PageTitleEditSecurityGroupPermissions} - ${groupId}"/>
</container>
<screenlet id="AddPermissionFromList" title="${uiLabelMap.AddPermissionToSecurityGroup}" collapsible="true">
<include-form name="AddSecurityGroupPermission" location="component://common/widget/SecurityForms.xml"/>
</screenlet>
<screenlet id="AddPermissionManual" title="${uiLabelMap.AddPermissionManuallyToSecurityGroup}" collapsible="true">
<include-form name="AddSecurityGroupPermissionManual" location="component://common/widget/SecurityForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.Permissions}">
<include-form name="ListSecurityGroupPermissions" location="component://common/widget/SecurityForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditSecurityGroupProtectedViews">
<section>
<actions>
<set field="titleProperty" value="AddProtectedViewToSecurityGroup"/>
<set field="tabButtonItem" value="EditSecurityGroupProtectedViews"/>
<set field="groupId" from-field="parameters.groupId"/>
<entity-one entity-name="SecurityGroup" value-field="securityGroup"/>
</actions>
<widgets>
<decorator-screen name="SecurityDecorator" location="${parameters.securityDecoratorLocation}">
<decorator-section name="body">
<container style="page-title">
<label text="${uiLabelMap.ProtectedViews} - ${groupId}"/>
</container>
<screenlet id="AddSecurityGroupProtectedViewsPanel" title="${uiLabelMap.AddProtectedViewToSecurityGroup}" collapsible="true">
<include-form name="AddSecurityGroupProtectedView" location="component://common/widget/SecurityForms.xml"/>
</screenlet>
<include-form name="ListSecurityGroupProtectedViews" location="component://common/widget/SecurityForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditSecurityGroupUserLogins">
<section>
<actions>
<set field="titleProperty" value="AddUserLoginToSecurityGroup"/>
<set field="tabButtonItem" value="EditSecurityGroupUserLogins"/>
<set field="groupId" from-field="parameters.groupId"/>
<entity-one entity-name="SecurityGroup" value-field="securityGroup"/>
</actions>
<widgets>
<decorator-screen name="SecurityDecorator" location="${parameters.securityDecoratorLocation}">
<decorator-section name="body">
<container style="page-title">
<label text="${uiLabelMap.UserLogins} - ${groupId}"/>
</container>
<screenlet id="AddSecurityGroupUserLoginsPanel" title="${uiLabelMap.AddUserLoginToSecurityGroup}" collapsible="true">
<include-form name="AddSecurityGroupUserLogin" location="component://common/widget/SecurityForms.xml"/>
</screenlet>
<include-form name="ListSecurityGroupUserLogins" location="component://common/widget/SecurityForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditUserLogin">
<section>
<actions>
<set field="titleProperty" value="UserLoginUpdateSecuritySettings"/>
<set field="tabButtonItem" value="EditUserLogin"/>
<set field="cancelPage" from-field="parameters.CANCEL_PAGE" default-value="FindUserLogin"/>
<set field="updateUserLoginSecurityURI" value="updateUserLoginSecurity"/>
<set field="updatePasswordURI" value="updatePassword"/>
<set field="userLoginId" from-field="parameters.userLoginId"/>
<entity-one entity-name="UserLogin" value-field="editUserLogin"/>
</actions>
<widgets>
<decorator-screen name="SecurityDecorator" location="${parameters.securityDecoratorLocation}">
<decorator-section name="body">
<container style="page-title">
<label text="${uiLabelMap.UserLoginUpdateSecuritySettings} - ${userLoginId}"/>
</container>
<include-form name="updateUserLoginSecurity" location="component://common/widget/SecurityForms.xml"/>
<screenlet title="${uiLabelMap.UserLoginChangePassword}">
<include-form name="updatePassword" location="component://common/widget/SecurityForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditUserLoginSecurityGroups">
<section>
<actions>
<set field="titleProperty" value="PageTitleEditUserLoginSecurityGroups"/>
<set field="tabButtonItem" value="EditUserLoginSecurityGroups"/>
<set field="addUserLoginSecurityGroupURI" value="userLogin_addUserLoginToSecurityGroup"/>
<set field="removeUserLoginSecurityGroupURI" value="userLogin_removeUserLoginFromSecurityGroup"/>
<set field="updateUserLoginSecurityGroupURI" value="userLogin_updateUserLoginToSecurityGroup"/>
<set field="userLoginId" from-field="parameters.userLoginId"/>
<entity-one entity-name="UserLogin" value-field="editUserLogin"/>
</actions>
<widgets>
<decorator-screen name="SecurityDecorator" location="${parameters.securityDecoratorLocation}">
<decorator-section name="body">
<container style="page-title">
<label text="${uiLabelMap.PageTitleEditUserLoginSecurityGroups} - ${userLoginId}"/>
</container>
<screenlet id="AddUserLoginSecurityGroupsPanel" title="${uiLabelMap.AddUserLoginToSecurityGroup}" collapsible="true">
<include-form name="AddUserLoginSecurityGroup" location="component://common/widget/SecurityForms.xml"/>
</screenlet>
<include-form name="ListUserLoginSecurityGroups" location="component://common/widget/SecurityForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditX509IssuerProvisions">
<section>
<actions>
<set field="titleProperty" value="PageTitleEditIssuerProvisions"/>
<set field="tabButtonItem" value="EditCertIssuerProvisions"/>
<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="SecurityDecorator" location="${parameters.securityDecoratorLocation}">
<decorator-section name="body">
<container style="page-title">
<label text="${uiLabelMap.PageTitleEditIssuerProvisions}"/>
</container>
<screenlet title="${uiLabelMap.PageTitleAddIssuerProvisions}">
<include-form name="ViewCertificate" location="component://common/widget/SecurityForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.CertIssuers}">
<include-form name="CertIssuerList" location="component://common/widget/SecurityForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="FindSecurityGroup">
<section>
<actions>
<set field="titleProperty" value="PageTitleFindSecurityGroup"/>
<set field="tabButtonItem" value="FindSecurityGroup"/>
<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="SecurityDecorator" location="${parameters.securityDecoratorLocation}">
<decorator-section name="body">
<container style="page-title">
<label text="${uiLabelMap.PageTitleFindSecurityGroup}"/>
</container>
<container style="button-bar">
<link target="CreateNewSecurityGroup" style="buttontext create" text="${uiLabelMap.CommonCreateNew}"/>
</container>
<include-form name="ListSecurityGroups" location="component://common/widget/SecurityForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="FindUserLogin">
<section>
<actions>
<set field="titleProperty" value="FindUserLogin"/>
<set field="tabButtonItem" value="FindUserLogin"/>
<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="SecurityDecorator" location="${parameters.securityDecoratorLocation}">
<decorator-section name="body">
<container style="page-title">
<label text="${uiLabelMap.FindUserLogin}"/>
</container>
<container style="button-bar">
<link target="createnewlogin" style="buttontext create" text="${uiLabelMap.CommonCreateNew}"/>
</container>
<include-form name="ListUserLogins" location="component://common/widget/SecurityForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="SecurityDecorator">
<section>
<actions>
<set field="headerItem" value="security"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<section>
<condition>
<if-service-permission service-name="securityPermissionCheck" main-action="VIEW"/>
</condition>
<widgets>
<include-menu name="SecurityGroupTabBar" location="component://common/widget/SecurityMenus.xml"/>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-service-permission service-name="securityPermissionCheck" main-action="VIEW"/>
</condition>
<widgets>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.SecurityViewPermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ViewCertificate">
<section>
<actions>
<set field="titleProperty" value="PageTitleImportCertificate"/>
<set field="tabButtonItem" value="EditCertIssuerProvisions"/>
</actions>
<widgets>
<decorator-screen name="SecurityDecorator" location="${parameters.securityDecoratorLocation}">
<decorator-section name="body">
<container style="page-title">
<label text="${uiLabelMap.PageTitleImportCertificate}"/>
</container>
<container style="widget-container">
<platform-specific>
<html>
<html-template location="component://common/webcommon/includes/ViewCertificate.ftl"/>
</html>
</platform-specific>
</container>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>