Files
ofbiz-framework/framework/webtools/widget/LabelManagerScreens.xml
T
Adrian Crum 02705185ea Refactored the Webtools Label Manager - due to a multitude of problems. Most notably:
1. Not thread safe.
2. Server files were being read/written without multi-user synchronization
3. Reads all UI labels into memory, then stores them in static memory, PLUS
4. Finds all references of those labels in project files and store those references in static memory (!!!)
5. Doesn't follow best practices for UI layout

It's amazing the original code worked. Even more amazing is the fact that this code made it into the project.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@776988 13f79535-47bb-0310-9956-ffa450edef68
2009-05-21 07:26:22 +00:00

144 lines
7.2 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="SearchLabels">
<section>
<condition>
<if-has-permission permission="LABEL_MANAGER_VIEW"/>
</condition>
<actions>
<set field="titleProperty" value="WebtoolsLabelManagerFindLabels"/>
<script location="component://webtools/webapp/webtools/WEB-INF/actions/labelmanager/LabelManager.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<container style="h1">
<label text="${uiLabelMap.WebtoolsLabelManagerFindLabels}"/>
</container>
<screenlet id="searchOptions" name="findScreenlet" collapsible="true" padded="false">
<container style="screenlet-body">
<container style="h2">
<label text="${uiLabelMap.CommonSearchOptions}"/>
</container>
<container id="search-options">
<platform-specific><html><html-template location="component://webtools/webapp/webtools/labelmanager/SearchLabels.ftl"/></html></platform-specific>
</container>
</container>
</screenlet>
<container style="screenlet">
<container style="screenlet-body">
<container style="h2">
<label text="${uiLabelMap.CommonSearchResults}"/>
</container>
</container>
<container id="search-results">
<platform-specific><html><html-template location="component://webtools/webapp/webtools/labelmanager/ViewLabels.ftl"/></html></platform-specific>
</container>
</container>
<!--
<screenlet id="ViewHardcodedLabelsPanel" title="${uiLabelMap.WebtoolsLabelManagerHardcoded}" collapsible="false">
<platform-specific><html><html-template location="component://webtools/webapp/webtools/labelmanager/ViewHardcodedLabels.ftl"/></html></platform-specific>
</screenlet>
-->
</decorator-section>
</decorator-screen>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.WebtoolsLabelManagerSecuryError}</label>
</fail-widgets>
</section>
</screen>
<screen name="UpdateLabel">
<section>
<condition>
<if-has-permission permission="LABEL_MANAGER_VIEW"/>
</condition>
<actions>
<set field="titleProperty" value="WebtoolsLabelManagerAddNew"/>
<script location="component://webtools/webapp/webtools/WEB-INF/actions/labelmanager/UpdateManager.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<container style="h1">
<label text="${uiLabelMap.WebtoolsLabelManagerAddNew}"/>
</container>
<platform-specific><html><html-template location="component://webtools/webapp/webtools/labelmanager/UpdateLabel.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.WebtoolsLabelManagerSecuryError}</label>
</fail-widgets>
</section>
</screen>
<screen name="ViewReferences">
<section>
<condition>
<if-has-permission permission="LABEL_MANAGER_VIEW"/>
</condition>
<actions>
<set field="titleProperty" value="WebtoolsLabelManagerViewReferences"/>
<script location="component://webtools/webapp/webtools/WEB-INF/actions/labelmanager/ViewReferences.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://webtools/webapp/webtools/labelmanager/ViewReferences.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.WebtoolsLabelManagerSecuryError}</label>
</fail-widgets>
</section>
</screen>
<screen name="ViewFile">
<section>
<condition>
<if-has-permission permission="LABEL_MANAGER_VIEW"/>
</condition>
<actions>
<set field="titleProperty" value="WebtoolsLabelManagerViewFile"/>
<script location="component://webtools/webapp/webtools/WEB-INF/actions/labelmanager/ViewFile.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet id="ViewFilePanel" title="${uiLabelMap.WebtoolsLabelManagerViewFile}">
<platform-specific><html><html-template location="component://webtools/webapp/webtools/labelmanager/ViewFile.ftl"/></html></platform-specific>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.WebtoolsLabelManagerSecuryError}</label>
</fail-widgets>
</section>
</screen>
</screens>