applications/commonext/widget/CommonScreens.xml
<?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="ApplicationDecorator">
<section>
<actions>
<property-map resource="CommonExtUiLabels" map-name="uiLabelMap" global="true"/>
<entity-one entity-name="PartyNameView" value-field="partyNameView">
<field-map field-name="partyId" from-field="userLogin.partyId"/>
</entity-one>
<set field="line.text" value="${uiLabelMap.CommonWelcome} ${person.firstName} ${person.middleName} ${person.lastName}"/>
<set field="line.urlText" value="[${userLogin.userLoginId}]"/>
<set field="line.url" value="/partymgr/control/viewprofile?partyId=${userLogin.partyId}"/>
<set field="layoutSettings.topLines[]" from-field="line" global="true"/>
<script location="component://commonext/webapp/ofbizsetup/organization/changeOrgPartyId.groovy"/><!-- to see ofbizsetup needs to be displayed -->
<!-- system info notes -->
<!-- SCIPIO: Deprecated
<service service-name="getLastSystemInfoNote" result-map="resultNote"/>
<set field="lastSystemInfoNote1" from-field="resultNote.lastSystemInfoNote1"/>
<set field="lastSystemInfoNote2" from-field="resultNote.lastSystemInfoNote2"/>
<set field="lastSystemInfoNote3" from-field="resultNote.lastSystemInfoNote3"/>
<set field="layoutSettings.middleTopHeader" value="${uiLabelMap.CommonLastSytemNotes}"/>
<set field="layoutSettings.middleTopMessage1" value="${groovy:lastSystemInfoNote1!=null?lastSystemInfoNote1.noteDateTime.toString().substring(0,16) + " " + lastSystemInfoNote1.noteInfo:""}"/>
<set field="layoutSettings.middleTopMessage2" value="${groovy:lastSystemInfoNote2!=null?lastSystemInfoNote2.noteDateTime.toString().substring(0,16) + " " + lastSystemInfoNote2.noteInfo:""}"/>
<set field="layoutSettings.middleTopMessage3" value="${groovy:lastSystemInfoNote3!=null?lastSystemInfoNote3.noteDateTime.toString().substring(0,16) + " " + lastSystemInfoNote3.noteInfo:""}"/>
<set field="layoutSettings.middleTopLink1" value="${lastSystemInfoNote1.moreInfoUrl}${groovy: if (lastSystemInfoNote1&&lastSystemInfoNote1.moreInfoItemName&&lastSystemInfoNote1.moreInfoItemId)"?" + lastSystemInfoNote1.moreInfoItemName + "=" + lastSystemInfoNote1.moreInfoItemId + "&id=" + lastSystemInfoNote1.moreInfoItemId;}"/>
<set field="layoutSettings.middleTopLink2" value="${lastSystemInfoNote2.moreInfoUrl}${groovy: if (lastSystemInfoNote2&&lastSystemInfoNote2.moreInfoItemName&&lastSystemInfoNote2.moreInfoItemId)"?" + lastSystemInfoNote2.moreInfoItemName + "=" + lastSystemInfoNote2.moreInfoItemId + "&id=" + lastSystemInfoNote2.moreInfoItemId;}"/>
<set field="layoutSettings.middleTopLink3" value="${lastSystemInfoNote3.moreInfoUrl}${groovy: if (lastSystemInfoNote3&&lastSystemInfoNote3.moreInfoItemName&&lastSystemInfoNote3.moreInfoItemId)"?" + lastSystemInfoNote3.moreInfoItemName + "=" + lastSystemInfoNote3.moreInfoItemId + "&id=" + lastSystemInfoNote3.moreInfoItemId;}"/>
-->
<!-- Help link actions -->
<set field="helpTopic" value="${groovy: context.webappName?.toUpperCase() + '_' + requestAttributes._CURRENT_VIEW_}"/>
<entity-and entity-name="ContentAssoc" list="pageAvail">
<field-map field-name="mapKey" from-field="helpTopic"/>
</entity-and>
<entity-and entity-name="WebAnalyticsConfig" list="layoutSettings.WEB_ANALYTICS">
<field-map field-name="webAnalyticsTypeId" value="BACKEND_ANALYTICS"/>
</entity-and>
<if>
<condition><not><if-empty field="PartyAcctgPrefAndGroupList"/></not></condition><!-- produced by changeOrgPartyId.groovy-->
<then>
<set field="defaultOrganizationPartyId" value="${userPreferences.ORGANIZATION_PARTY}" global="true"/>
<property-to-field resource="general" property="currency.uom.id.default" field="defaultCurrencyUomId"/>
<entity-one entity-name="PartyAcctgPrefAndGroup" value-field="orgParty">
<field-map field-name="partyId" from-field="defaultOrganizationPartyId"/>
<field-map field-name="roleTypeId" value="INTERNAL_ORGANIZATIO"/>
</entity-one>
<entity-one entity-name="PartyGroup" value-field="orgPartyLogoMap">
<field-map field-name="partyId" from-field="defaultOrganizationPartyId"/>
</entity-one>
<entity-and entity-name="PartyContent" list="orgPartyContentMap" filter-by-date="true">
<field-map field-name="partyId" from-field="defaultOrganizationPartyId"/>
<field-map field-name="partyContentTypeId" value="LGOIMGURL"/>
<order-by field-name="-fromDate"/>
</entity-and>
<set field="orgContentId" from-field="orgPartyContentMap[0].contentId"/>
<set field="orgPartyContent" value="${groovy: orgContentId!=null?'/content/control/stream?contentId=' + orgContentId + externalKeyParam : ''}"/>
<set field="layoutSettings.organizationLogoLinkUrl" from-field="orgPartyContent" default-value="${orgPartyLogoMap.logoImageUrl}" global="true"/>
<set field="defaultOrganizationPartyCurrencyUomId" from-field="orgParty.baseCurrencyUomId" default-value="${defaultCurrencyUomId}" global="true"/>
<set field="defaultOrganizationPartyGroupName" from-field="orgParty.groupName" global="true"/>
<set field="dropdown.hiddenFieldList" from-field="hiddenFields" global="true"/>
<set field="dropdown.action" value="setUserPreference"/>
<set field="dropdown.textBegin" value="${uiLabelMap.CommonDefaultOrganizationPartyId} :"/>
<set field="dropdown.dropDownList" from-field="PartyAcctgPrefAndGroupList"/>
<set field="dropdown.selectionName" value="userPrefValue"/>
<set field="dropdown.selectedKey" value="${defaultOrganizationPartyId}"/>
<set field="dropdown.textEnd" value="[${defaultOrganizationPartyId}]"/>
<set field="layoutSettings.topLines[]" from-field="dropdown" global="true"/>
</then>
</if>
<if>
<condition><if-empty field="PartyAcctgPrefAndGroupList"/></condition>
<then>
<!-- SCIPIO: This is counter-productive; we use app-bar-display
<set field="layoutSettings.suppressTab" value=""/><!- - enable ofbiz setup - ->
-->
</then>
</if>
</actions>
<widgets>
<!--<include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>-->
<decorator-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml" />
</widgets>
</section>
</screen>
</screens>