Files
ofbiz-framework/framework/common/widget/CommonScreens.xml
T
Jacques Le Roux 25cfc51474 Improved: Removes ecommerce links from applications
(OFBIZ-9241)

While working on OFBIZ-9206 I remembered how the ecommerce webapp is deeply 
entrenched in some applications components. This can at least be tested with 
product and catalog webapp.

    Get to catalog/control/EditProduct?productId=GZ-1000
    Click on the "Product Page" button => ecommerce

There are much more cases (96 occurrences actually) but most of them are not 
hard dependencies.

Since the ecommerce component is now a plugin, we need to remove all ecommerce 
links from applications, I even wonder if this issue is really an improvement 
or should not be now considered a bug...

This is a temporary solution with a FIXME it was waiting for months and I
almost forgot it. There are better ideas in the Jira but nothing have been done
yet.


Thanks: Michael and Deepak for discussion and ideas

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857398 13f79535-47bb-0310-9956-ffa450edef68
2019-04-12 12:16:31 +00:00

358 lines
16 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"
xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
<!-- Included Screens -->
<screen name="states">
<section>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="states" location="${groovy:commonScreenLocations.states?commonScreenLocations.states:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="countries">
<section>
<actions>
<property-to-field field="defaultCountryGeoId" resource="general" property="country.geo.id.default" default="USA"/>
</actions>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="countries" location="${groovy:commonScreenLocations.countries?commonScreenLocations.countries:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="cctypes">
<section>
<actions>
<script location="component://common/groovyScripts/CcTypes.groovy"/>
</actions>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="cctypes" location="${groovy:commonScreenLocations.countries?commonScreenLocations.countries:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="ccmonths">
<section>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="ccmonths" location="${groovy:commonScreenLocations.ccmonths?commonScreenLocations.ccmonths:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="ccyears">
<section>
<actions>
<set field="thisDate" from-field="nowTimestamp"/>
</actions>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="ccyears" location="${groovy:commonScreenLocations.ccyears?commonScreenLocations.ccyears:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<!--
The following screen renders a generic link (implemented by an hidden form)
that can be included in other screens in the following way:
...
<section>
<actions>
<set field="genericLinkName" value="formName"/> The name of the hidden form (mandatory)
<set field="genericLinkText" value="Link message"/> The link text (mandatory)
<set field="genericLinkTarget" value="ApprovedProductRequirementsReport"/> The request name (mandatory)
<set field="genericLinkStyle" value="buttontext"/> The style of the link (optional)
<set field="genericLinkWindow" value="newWindow"/> The target window (optional): if set, a new browser window is created
<set field="excludeParameters" value="N"/> If not set to Y, the requestParameters are included in the form as hidden fields (optional, defaults to N)
</actions>
<widgets>
<include-screen name="genericLink" location="component://common/widget/CommonScreens.xml"/>
</widgets>
</section>
...
-->
<screen name="genericLink">
<section>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="genericLink" location="${groovy:commonScreenLocations.genericLink?commonScreenLocations.genericLink:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<!-- decorator used in creating a response to an ajax request -->
<screen name="AjaxGlobalDecorator">
<section>
<actions>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true" />
</actions>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="AjaxGlobalDecorator" location="${groovy:commonScreenLocations.AjaxGlobalDecorator?commonScreenLocations.AjaxGlobalDecorator:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<!--
The following screen is used to generate Ajax list of options for autocomplete fields
-->
<screen name="ajaxAutocompleteOptions">
<section>
<actions>
<set field="autocompleteOptions" from-field="parameters.autocompleteOptions" />
</actions>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="ajaxAutocompleteOptions" location="${groovy:commonScreenLocations.ajaxAutocompleteOptions?commonScreenLocations.ajaxAutocompleteOptions:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<!-- tiny screen rendering context initialization with theme and locale, intended to be included in screen decorators. Devs - please really carefull keep this simple and generic. -->
<screen name="MinimalActions">
<section>
<actions>
<script location="component://common/groovyScripts/InitTheme.groovy"/>
<set field="commonDecoratorLocation" from-field="layoutSettings.VT_COMMON_DECO_LOC" default-value="component://common-theme/widget/CommonScreens.xml" global="true"/>
<set field="initialLocaleComplete" type="String" value="${groovy:parameters?.userLogin?.lastLocale}" default-value="${groovy:locale.toString()}" global="true"/>
<!-- FIXME this is only temporary a more elaborate solution would be preferred, see OFBIZ-9241 -->
<set field="isEcommercePresent" value="${groovy:null != org.apache.ofbiz.base.util.UtilURL.fromOfbizHomePath('plugins/ecommerce/ofbiz-component.xml')}" type="Boolean" global="true"/>
</actions>
<widgets />
</section>
</screen>
<!-- Global screen rendering context initialization, intended to be included in screen decorators. Devs - please keep this simple and generic. you can sucharge it on the theme-->
<screen name="GlobalActions">
<section>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="GlobalActions" location="${groovy:commonScreenLocations.GlobalActions?commonScreenLocations.GlobalActions:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<!-- Global decorator for General Screens/Pages -->
<screen name="GlobalDecorator">
<section>
<widgets>
<include-screen name="GlobalActions" />
<include-screen name="GlobalDecorator" location="${groovy:commonScreenLocations.GlobalDecorator?commonScreenLocations.GlobalDecorator:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<!-- Global decorator for Lookup pop-up windows or layered CSS -->
<screen name="LookupDecorator">
<section>
<widgets>
<include-screen name="GlobalActions" />
<include-screen name="LookupDecorator" location="${groovy:commonScreenLocations.LookupDecorator?commonScreenLocations.LookupDecorator:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<!-- Simple decorator (no application and menu bars); it can be used:
* for printer friendly html screens (no logo and no application bar, header and footer); a print button is also available at the top of the screen
* for simple PDF report (a simple header with the logo/date is rendered and a footer with page numbers)
-->
<screen name="SimpleDecorator">
<section>
<widgets>
<include-screen name="GlobalActions" />
<include-screen name="SimpleDecorator" location="${groovy:commonScreenLocations.SimpleDecorator?commonScreenLocations.SimpleDecorator:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<!-- fo decorator for pdf documents (invoices, sales orders, purchase orders etc...). -->
<screen name="FoReportDecorator">
<section>
<actions>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<include-screen name="GlobalActions" />
<include-screen name="FoReportDecorator" location="${groovy:commonScreenLocations.FoReportDecorator?commonScreenLocations.FoReportDecorator:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<!-- Decorator for xsl-fo rendering -->
<screen name="GlobalFoDecorator">
<section>
<widgets>
<include-screen name="GlobalActions" />
<include-screen name="GlobalFoDecorator" location="${groovy:commonScreenLocations.GlobalFoDecorator?commonScreenLocations.GlobalFoDecorator:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<!-- Default "error" page for XSL-FO based output. -->
<screen name="FoError">
<section>
<actions>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="FoError" location="${groovy:commonScreenLocations.FoError?commonScreenLocations.FoError:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="login">
<section>
<actions>
<set field="titleProperty" value="PageTitleLogin" />
</actions>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="login" location="${groovy:commonScreenLocations.login?commonScreenLocations.login:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="impersonated">
<section>
<actions>
<set field="titleProperty" value="PageTitleImpersonated" />
</actions>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="impersonated" location="${groovy:commonScreenLocations.impersonated?commonScreenLocations.impersonated:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="ajaxNotLoggedIn">
<section>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="ajaxNotLoggedIn" location="${groovy:commonScreenLocations.ajaxNotLoggedIn?commonScreenLocations.ajaxNotLoggedIn:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="requirePasswordChange">
<section>
<actions>
<set field="userLoginId" from-field="parameters.USERNAME"/>
<entity-and entity-name="UserLoginSecurityQuestion" list="securityQuestions">
<field-map field-name="userLoginId" />
</entity-and>
<set field="questionEnumId" from-field="securityQuestions[0].questionEnumId" />
<entity-one entity-name="Enumeration" value-field="securityQuestion">
<field-map field-name="enumId" from-field="questionEnumId" />
</entity-one>
</actions>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="requirePasswordChange" location="${groovy:commonScreenLocations.requirePasswordChange?commonScreenLocations.requirePasswordChange:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="forgotPassword_step1">
<section>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="forgotPassword_step1" location="${groovy:commonScreenLocations.forgotPassword_step1?commonScreenLocations.forgotPassword_step1:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="forgotPassword_step2">
<section>
<actions>
<set field="userLoginId" from-field="parameters.USERNAME"/>
<entity-and entity-name="UserLoginSecurityQuestion" list="securityQuestions">
<field-map field-name="userLoginId" />
</entity-and>
<set field="questionEnumId" from-field="securityQuestions[0].questionEnumId" />
<entity-one entity-name="Enumeration" value-field="securityQuestion">
<field-map field-name="enumId" from-field="questionEnumId"/>
</entity-one>
</actions>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="forgotPassword_step2" location="${groovy:commonScreenLocations.forgotPassword_step2?commonScreenLocations.forgotPassword_step2:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="forgotPassword">
<section>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="forgotPassword" location="${groovy:commonScreenLocations.forgotPassword?commonScreenLocations.forgotPassword:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="EventMessages">
<section>
<actions>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="EventMessages" location="${groovy:commonScreenLocations.EventMessages?commonScreenLocations.EventMessages:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="FindScreenDecorator">
<section>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="FindScreenDecorator" location="${groovy:commonScreenLocations.FindScreenDecorator?commonScreenLocations.FindScreenDecorator:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="help">
<section>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="help" location="${groovy:commonScreenLocations.help?commonScreenLocations.help:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="viewBlocked">
<section>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="viewBlocked" location="${groovy:commonScreenLocations.viewBlocked?commonScreenLocations.viewBlocked:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="geoChart">
<section>
<widgets>
<include-screen name="MinimalActions" />
<include-screen name="geoChart" location="${groovy:commonScreenLocations.geoChart?commonScreenLocations.geoChart:commonDecoratorLocation}"/>
</widgets>
</section>
</screen>
</screens>