Author: nmalin
Date: Fri Aug 25 09:31:58 2017 New Revision: 1806137 URL: http://svn.apache.org/viewvc?rev=1806137&view=rev Log: Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme) Five step WARNING these step is separate on many commit break all the UI #1 Prepare the common screens to retrieve widget.properties, VisualThemeRessources and common screen location from the modelTheme Modified: ofbiz/ofbiz-framework/trunk/framework/common/groovyScripts/InitTheme.groovy ofbiz/ofbiz-framework/trunk/framework/common/widget/CommonScreens.xml ofbiz/ofbiz-framework/trunk/framework/common/widget/HelpScreens.xml ofbiz/ofbiz-framework/trunk/framework/common/widget/LookupScreens.xml Modified: ofbiz/ofbiz-framework/trunk/framework/common/groovyScripts/InitTheme.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/groovyScripts/InitTheme.groovy?rev=1806137&r1=1806136&r2=1806137&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/common/groovyScripts/InitTheme.groovy (original) +++ ofbiz/ofbiz-framework/trunk/framework/common/groovyScripts/InitTheme.groovy Fri Aug 25 09:31:58 2017 @@ -17,29 +17,22 @@ * under the License. */ -import org.apache.ofbiz.base.util.UtilProperties +import org.apache.ofbiz.base.util.UtilMisc +import org.apache.ofbiz.widget.model.ModelTheme +import org.apache.ofbiz.widget.model.ThemeFactory +import org.apache.ofbiz.widget.renderer.VisualTheme -def globalContext = context.globalContext; -if (!globalContext.userPreferences) { - Map userPreferencesResult = run service: 'getUserPreferenceGroup', with: ['userPrefGroupTypeId': 'GLOBAL_PREFERENCES'] - globalContext.userPreferences = userPreferencesResult.userPrefMap -} - -if (!globalContext.generalProperties) { - globalContext.generalProperties = UtilProperties.getResourceBundleMap('general', context.locale, context) -} - -if (!globalContext.visualThemeId) { - globalContext.visualThemeId = userPreferences.VISUAL_THEME ? userPreferences.VISUAL_THEME : generalProperties.VISUAL_THEME -} +VisualTheme visualTheme = ThemeFactory.resolveVisualTheme(request) +if (visualTheme) { + ModelTheme modelTheme = visualTheme.getModelTheme() + globalContext.commonScreenLocations = modelTheme.getModelCommonScreens() + globalContext.visualTheme = visualTheme + globalContext.modelTheme = modelTheme -if (!globalContext.themeResources) { - Map themeResourcesResult = run service: 'getVisualThemeResources', with: ['visualThemeId': globalContext.visualThemeId] - globalContext.themeResources = themeResourcesResult.themeResources - if (globalContext.layoutSettings) { - globalContext.layoutSettings.putAll(themeResourcesResult.themeResources) + if (globalContext.layoutSettings && globalContext.layoutSettings instanceof Map) { + globalContext.layoutSettings.putAll(modelTheme.getThemeResources()) } else { - globalContext.layoutSettings = themeResourcesResult.themeResources + globalContext.layoutSettings = UtilMisc.makeMapWritable(modelTheme.getThemeResources()) } } context.globalContext = globalContext Modified: ofbiz/ofbiz-framework/trunk/framework/common/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/widget/CommonScreens.xml?rev=1806137&r1=1806136&r2=1806137&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/common/widget/CommonScreens.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/common/widget/CommonScreens.xml Fri Aug 25 09:31:58 2017 @@ -26,7 +26,7 @@ under the License. <section> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="GlobalDecorator" location="${commonDecoratorLocation}"/> + <include-screen name="states" location="${groovy:commonScreenLocations.states?commonScreenLocations.states:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -37,7 +37,7 @@ under the License. </actions> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="GlobalDecorator" location="${commonDecoratorLocation}"/> + <include-screen name="countries" location="${groovy:commonScreenLocations.countries?commonScreenLocations.countries:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -49,7 +49,7 @@ under the License. </actions> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="GlobalDecorator" location="${commonDecoratorLocation}"/> + <include-screen name="cctypes" location="${groovy:commonScreenLocations.countries?commonScreenLocations.countries:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -57,7 +57,7 @@ under the License. <section> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="GlobalDecorator" location="${commonDecoratorLocation}"/> + <include-screen name="ccmonths" location="${groovy:commonScreenLocations.ccmonths?commonScreenLocations.ccmonths:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -68,7 +68,7 @@ under the License. </actions> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="GlobalDecorator" location="${commonDecoratorLocation}"/> + <include-screen name="ccyears" location="${groovy:commonScreenLocations.ccyears?commonScreenLocations.ccyears:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -95,7 +95,7 @@ under the License. <section> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="genericLink" location="${commonDecoratorLocation}"/> + <include-screen name="genericLink" location="${groovy:commonScreenLocations.genericLink?commonScreenLocations.genericLink:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -107,7 +107,7 @@ under the License. </actions> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="AjaxGlobalDecorator" location="${commonDecoratorLocation}"/> + <include-screen name="AjaxGlobalDecorator" location="${groovy:commonScreenLocations.AjaxGlobalDecorator?commonScreenLocations.AjaxGlobalDecorator:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -121,7 +121,7 @@ under the License. </actions> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="ajaxAutocompleteOptions" location="${commonDecoratorLocation}"/> + <include-screen name="ajaxAutocompleteOptions" location="${groovy:commonScreenLocations.ajaxAutocompleteOptions?commonScreenLocations.ajaxAutocompleteOptions:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -131,7 +131,7 @@ under the License. <section> <actions> <script location="component://common/groovyScripts/InitTheme.groovy"/> - <set field="commonDecoratorLocation" from-field="layoutSettings.VT_COMMON_DECO_LOC[0]" default-value="component://common-theme/widget/CommonScreens.xml" global="true"/> + <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"/> </actions> <widgets /> @@ -143,7 +143,7 @@ under the License. <section> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="GlobalActions" location="${commonDecoratorLocation}"/> + <include-screen name="GlobalActions" location="${groovy:commonScreenLocations.GlobalActions?commonScreenLocations.GlobalActions:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -153,7 +153,7 @@ under the License. <section> <widgets> <include-screen name="GlobalActions" /> - <include-screen name="GlobalDecorator" location="${commonDecoratorLocation}"/> + <include-screen name="GlobalDecorator" location="${groovy:commonScreenLocations.GlobalDecorator?commonScreenLocations.GlobalDecorator:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -163,7 +163,7 @@ under the License. <section> <widgets> <include-screen name="GlobalActions" /> - <include-screen name="LookupDecorator" location="${commonDecoratorLocation}"/> + <include-screen name="LookupDecorator" location="${groovy:commonScreenLocations.LookupDecorator?commonScreenLocations.LookupDecorator:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -176,7 +176,7 @@ under the License. <section> <widgets> <include-screen name="GlobalActions" /> - <include-screen name="SimpleDecorator" location="${commonDecoratorLocation}"/> + <include-screen name="SimpleDecorator" location="${groovy:commonScreenLocations.SimpleDecorator?commonScreenLocations.SimpleDecorator:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -189,7 +189,7 @@ under the License. </actions> <widgets> <include-screen name="GlobalActions" /> - <include-screen name="FoReportDecorator" location="${commonDecoratorLocation}"/> + <include-screen name="FoReportDecorator" location="${groovy:commonScreenLocations.FoReportDecorator?commonScreenLocations.FoReportDecorator:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -199,7 +199,7 @@ under the License. <section> <widgets> <include-screen name="GlobalActions" /> - <include-screen name="GlobalFoDecorator" location="${commonDecoratorLocation}"/> + <include-screen name="GlobalFoDecorator" location="${groovy:commonScreenLocations.GlobalFoDecorator?commonScreenLocations.GlobalFoDecorator:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -212,7 +212,7 @@ under the License. </actions> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="FoError" location="${commonDecoratorLocation}"/> + <include-screen name="FoError" location="${groovy:commonScreenLocations.FoError?commonScreenLocations.FoError:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -224,7 +224,7 @@ under the License. </actions> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="login" location="${commonDecoratorLocation}"/> + <include-screen name="login" location="${groovy:commonScreenLocations.login?commonScreenLocations.login:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -233,7 +233,7 @@ under the License. <section> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="ajaxNotLoggedIn" location="${commonDecoratorLocation}"/> + <include-screen name="ajaxNotLoggedIn" location="${groovy:commonScreenLocations.ajaxNotLoggedIn?commonScreenLocations.ajaxNotLoggedIn:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -252,7 +252,7 @@ under the License. </actions> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="requirePasswordChange" location="${commonDecoratorLocation}"/> + <include-screen name="requirePasswordChange" location="${groovy:commonScreenLocations.requirePasswordChange?commonScreenLocations.requirePasswordChange:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -261,7 +261,7 @@ under the License. <section> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="forgotPassword_step1" location="${commonDecoratorLocation}"/> + <include-screen name="forgotPassword_step1" location="${groovy:commonScreenLocations.forgotPassword_step1?commonScreenLocations.forgotPassword_step1:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -280,7 +280,7 @@ under the License. </actions> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="forgotPassword_step2" location="${commonDecoratorLocation}"/> + <include-screen name="forgotPassword_step2" location="${groovy:commonScreenLocations.forgotPassword_step2?commonScreenLocations.forgotPassword_step2:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -289,7 +289,7 @@ under the License. <section> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="forgotPassword" location="${commonDecoratorLocation}"/> + <include-screen name="forgotPassword" location="${groovy:commonScreenLocations.forgotPassword?commonScreenLocations.forgotPassword:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -301,7 +301,7 @@ under the License. </actions> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="EventMessages" location="${commonDecoratorLocation}"/> + <include-screen name="EventMessages" location="${groovy:commonScreenLocations.EventMessages?commonScreenLocations.EventMessages:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -310,7 +310,7 @@ under the License. <section> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="FindScreenDecorator" location="${commonDecoratorLocation}"/> + <include-screen name="FindScreenDecorator" location="${groovy:commonScreenLocations.FindScreenDecorator?commonScreenLocations.FindScreenDecorator:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -319,7 +319,7 @@ under the License. <section> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="help" location="${commonDecoratorLocation}"/> + <include-screen name="help" location="${groovy:commonScreenLocations.help?commonScreenLocations.help:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -328,7 +328,7 @@ under the License. <section> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="viewBlocked" location="${commonDecoratorLocation}"/> + <include-screen name="viewBlocked" location="${groovy:commonScreenLocations.viewBlocked?commonScreenLocations.viewBlocked:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -337,7 +337,7 @@ under the License. <section> <widgets> <include-screen name="MinimalActions" /> - <include-screen name="geoChart" location="${commonDecoratorLocation}"/> + <include-screen name="geoChart" location="${groovy:commonScreenLocations.geoChart?commonScreenLocations.geoChart:commonDecoratorLocation}"/> </widgets> </section> </screen> Modified: ofbiz/ofbiz-framework/trunk/framework/common/widget/HelpScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/widget/HelpScreens.xml?rev=1806137&r1=1806136&r2=1806137&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/common/widget/HelpScreens.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/common/widget/HelpScreens.xml Fri Aug 25 09:31:58 2017 @@ -21,191 +21,48 @@ 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"> - <screen name="LookupDecorator"> + <screen name="LookupDecorator"><!--This screen is deprecated use LookupHelpDecorator instead--> + <section> + <widgets><include-screen name="LookupHelpDecorator"/></widgets> + </section> + </screen> + <screen name="LookupHelpDecorator"> <section> - <actions> - <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> - <property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/> - <service service-name="getUserPreferenceGroup" result-map="prefResult"> - <field-map field-name="userPrefGroupTypeId" value="GLOBAL_PREFERENCES"/> - </service> - <set field="userPreferences" from-field="prefResult.userPrefMap" global="true"/> - <set field="lookupType" value="HELP"/> - <set field="visualThemeId" from-field="userPreferences.VISUAL_THEME" global="true"/> - <service service-name="getVisualThemeResources"> - <field-map field-name="visualThemeId"/> - <field-map field-name="themeResources" from-field="layoutSettings"/> - </service> - <set field="layoutSettings" from-field="themeResources" default-value="${layoutSettings}" global="true"/> - <set field="messagesTemplateLocation" from-field="layoutSettings.VT_MSG_TMPLT_LOC[0]" default-value="component://common-theme/template/includes/Messages.ftl"/> - </actions> <widgets> - <platform-specific><html><html-template location="component://common-theme/template/includes/Lookup.ftl"/></html></platform-specific> - <platform-specific><html><html-template location="${messagesTemplateLocation}"/></html></platform-specific> - <container style="contentarea"> - <container id="column-container"> - <!-- by default will render left-bar only if leftbarScreen value not empty --> - <include-screen name="${leftbarScreenName}" location="${leftbarScreenLocation}"/> - <container id="content-main-section" style="${MainColumnStyle}"> - <decorator-section-include name="body"/> - </container> - </container> - </container> - <container style="clear"></container> - - <platform-specific><html><html-template location="component://common-theme/template/includes/LookupFooter.ftl"/></html></platform-specific> + <include-screen name="MinimalActions" location="component://common/widget/CommonScreens.xml"/> + <include-screen name="LookupHelpDecorator" location="${groovy:commonScreenLocations.LookupHelpDecorator?commonScreenLocations.LookupHelpDecorator:commonDecoratorLocation}"/> </widgets> </section> </screen> <screen name="ShowHelp"> <section> - <condition> - <and> - <if-compare field="parameters.helpTopic" operator="equals" value="navigateHelp"/> - <if-empty field="parameters.portalPageId"/> - </and> - </condition> <widgets> - <include-screen name="navigateHelp"/> + <include-screen name="MinimalActions" location="component://common/widget/CommonScreens.xml"/> + <include-screen name="ShowHelp" location="${groovy:commonScreenLocations.ShowHelp?commonScreenLocations.ShowHelp:commonDecoratorLocation}"/> </widgets> - <fail-widgets> - <section> - <condition> - <if-empty field="parameters.portalPageId"/> - </condition> - <actions> - <entity-condition entity-name="ContentAssoc" list="contentAssocs"> - <condition-list> - <condition-expr field-name="mapKey" from-field="parameters.helpTopic"/> - <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/> - <condition-list combine="or"> - <condition-expr field-name="thruDate" operator="greater-equals" from-field="nowTimestamp"/> - <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/> - </condition-list> - </condition-list> - <order-by field-name="sequenceNum"/> - </entity-condition> - <set field="contentId" from-field="contentAssocs[0].contentIdTo"/> - <entity-one entity-name="Content" value-field="content"/> - </actions> - <widgets> - <section> - <condition> - <if-empty field="content"/> - </condition> - <widgets> - <include-screen name="navigateHelp"/> - </widgets> - <fail-widgets> - <decorator-screen name="LookupDecorator"> - <decorator-section name="body"> - <screenlet title="${uiLabelMap.CommonExtHelpTitle}" navigation-menu-name="lookupMenu"> - <include-menu name="lookupMenu" location="component://content/widget/content/ContentMenus.xml"/> - <iterate-section entry="contentAssoc" list="contentAssocs"> - <section> - <actions> - <set field="contentId" from-field="contentAssoc.contentIdTo"/> - </actions> - <widgets> - <include-screen name="showDocument"/> - </widgets> - </section> - </iterate-section> - </screenlet> - </decorator-section> - </decorator-screen> - </fail-widgets> - </section> - </widgets> - <fail-widgets> - <section> - <actions> - <!-- Read portalPage to retrieve helpContentId, - if portalPage.originalPortalPageId is not null retrieve originalPortalPage--> - <entity-one entity-name="PortalPage" value-field="portalPageTmp" use-cache="true"/> - <set field="originalPortalPageId" from-field="portalPageTmp.originalPortalPageId" default-value="${parameters.portalPageId}"/> - <entity-one entity-name="PortalPage" value-field="portalPage" use-cache="true"> - <field-map field-name="portalPageId" from-field="originalPortalPageId"/> - </entity-one> - </actions> - <widgets> - <decorator-screen name="LookupDecorator"> - <decorator-section name="body"> - <screenlet title="${uiLabelMap.CommonExtHelpTitle}" navigation-menu-name="lookupMenu"> - <include-menu name="lookupMenu" location="component://content/widget/content/ContentMenus.xml"/> - <content content-id="${portalPage.helpContentId}"/> - </screenlet> - <screenlet title="${uiLabelMap.CommonSelectPortletToHelp}"> - <include-form name="PortletList" location="component://common/widget/PortalPageForms.xml"/> - </screenlet> - </decorator-section> - </decorator-screen> - </widgets> - </section> - </fail-widgets> - </section> - </fail-widgets> </section> </screen> - - <screen name="showDocument"> + + <screen name="showDocument"><!--This screen is deprecated use showDocumentHelp instead--> + <section> + <widgets><include-screen name="showDocumentHelp"/></widgets> + </section> + </screen> + <screen name="showDocumentHelp"> <section> - <actions> - <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> - <property-map resource="CommonExtUiLabels" map-name="uiLabelMap" global="true"/> - <set field="contentId" from-field="parameters.contentId" default-value="${contentId}"/> - <set field="visualThemeId" from-field="userPreferences.VISUAL_THEME" global="true"/> - <service service-name="getVisualThemeResources"> - <field-map field-name="visualThemeId"/> - <field-map field-name="themeResources" from-field="layoutSettings"/> - </service> - <set field="layoutSettings" from-field="themeResources" default-value="${layoutSettings}" global="true"/> - </actions> <widgets> - <container id="Document"> - <content content-id="${contentId}" /> - </container> + <include-screen name="MinimalActions" location="component://common/widget/CommonScreens.xml"/> + <include-screen name="showDocumentHelp" location="${groovy:commonScreenLocations.showDocumentHelp?commonScreenLocations.showDocumentHelp:'test'}"/> </widgets> </section> </screen> <screen name="navigateHelp"> <section> - <actions> - <set field="titleProperty" value="PageTitleNavigateContent"/> - <entity-condition entity-name="ContentAssoc" list="contentAssoc"> - <condition-list> - <condition-expr field-name="contentId" value="HELP_ROOT"/> - <condition-expr field-name="contentAssocTypeId" value="TREE_CHILD"/> - <condition-expr field-name="fromDate" operator="less-equals" from-field="nowTimestamp"/> - <condition-list combine="or"> - <condition-expr field-name="thruDate" operator="greater-equals" from-field="nowTimestamp"/> - <condition-expr field-name="thruDate" operator="equals" from-field="nullField"/> - </condition-list> - </condition-list> - <order-by field-name="sequenceNum"/> - </entity-condition> - <set field="contentId" from-field="parameters.contentId" default-value="HELP_ROOT"/> - </actions> <widgets> - <decorator-screen name="LookupDecorator"> - <decorator-section name="body"> - <section> - <widgets> - <screenlet title="${uiLabelMap.PageTitleNavigateContent}" > - <container style="left-border"> - <container id="EditDocumentTree"/> - <platform-specific><html><html-template location="component://content/template/content/DisplayContentNav.ftl"/></html></platform-specific> - </container> - <container style="leftonly"> - <include-screen name="showDocument"/> - </container> - </screenlet> - </widgets> - </section> - </decorator-section> - </decorator-screen> + <include-screen name="MinimalActions" location="component://common/widget/CommonScreens.xml"/> + <include-screen name="navigateHelp" location="${groovy:commonScreenLocations.navigateHelp?commonScreenLocations.navigateHelp:commonDecoratorLocation}"/> </widgets> </section> </screen> Modified: ofbiz/ofbiz-framework/trunk/framework/common/widget/LookupScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/widget/LookupScreens.xml?rev=1806137&r1=1806136&r2=1806137&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/common/widget/LookupScreens.xml (original) +++ ofbiz/ofbiz-framework/trunk/framework/common/widget/LookupScreens.xml Fri Aug 25 09:31:58 2017 @@ -28,7 +28,7 @@ under the License. <set field="title" value="${uiLabelMap.PageTitleLookupGeo}"/> <set field="queryString" from-field="result.queryString"/> <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/> - <property-to-field resource="widget" property="widget.form.defaultViewSize" field="viewSizeDefaultValue"/> + <set field="viewSizeDefaultValue" value="${groovy: modelTheme.getDefaultViewSize()}" type="Integer"/> <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="${viewSizeDefaultValue}"/> <!-- entries needed for lookup ajax auto completer --> @@ -65,7 +65,7 @@ under the License. <set field="title" value="${uiLabelMap.PageTitleLookupGeo}"/> <set field="queryString" from-field="result.queryString"/> <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/> - <property-to-field resource="widget" property="widget.form.defaultViewSize" field="viewSizeDefaultValue"/> + <set field="viewSizeDefaultValue" value="${groovy: modelTheme.getDefaultViewSize()}" type="Integer"/> <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="${viewSizeDefaultValue}"/> <!-- entries needed for lookup ajax auto completer --> @@ -100,20 +100,9 @@ under the License. <!-- Locales Lookup Screen --> <screen name="ListLocales"> <section> - <actions> - <set field="title" value="${uiLabelMap.CommonChooseLanguage}"/> - <set field="parameters.presentation" value="window"/> - </actions> <widgets> - <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml"> - <decorator-section name="body"> - <platform-specific> - <html> - <html-template location="component://common-theme/template/includes/ListLocales.ftl"/> - </html> - </platform-specific> - </decorator-section> - </decorator-screen> + <include-screen name="MinimalActions" location="component://common/widget/CommonScreens.xml"/> + <include-screen name="ListLocales" location="${groovy:commonScreenLocations.ListLocales?commonScreenLocations.ListLocales:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -121,24 +110,9 @@ under the License. <!-- Companies Lookup Screen --> <screen name="ListSetCompanies"> <section> - <actions> - <set field="titleProperty" value="CommonCompany"/> - <entity-condition entity-name="PartyAcctgPrefAndGroup" list="companyList" distinct="true"> - <condition-list> - <condition-expr field-name="roleTypeId" operator="equals" value="INTERNAL_ORGANIZATIO"/> - </condition-list> - <select-field field-name="partyId"/> - <select-field field-name="groupName"/> - </entity-condition> - </actions> <widgets> - <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml"> - <decorator-section name="body"> - <platform-specific> - <html><html-template location="component://common-theme/template/includes/listCompanies.ftl"/></html> - </platform-specific> - </decorator-section> - </decorator-screen> + <include-screen name="MinimalActions" location="component://common/widget/CommonScreens.xml"/> + <include-screen name="ListSetCompanies" location="${groovy:commonScreenLocations.ListSetCompanies?commonScreenLocations.ListSetCompanies:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -146,20 +120,9 @@ under the License. <!-- Timezones Lookup Screen --> <screen name="ListTimezones"> <section> - <actions> - <set field="title" value="${uiLabelMap.CommonTime}"/> - <set field="parameters.presentation" value="window"/> - </actions> <widgets> - <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml"> - <decorator-section name="body"> - <platform-specific> - <html> - <html-template location="component://common-theme/template/includes/ListTimezones.ftl"/> - </html> - </platform-specific> - </decorator-section> - </decorator-screen> + <include-screen name="MinimalActions" location="component://common/widget/CommonScreens.xml"/> + <include-screen name="ListTimezones" location="${groovy:commonScreenLocations.ListTimezones?commonScreenLocations.ListTimezones:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -167,25 +130,9 @@ under the License. <!-- Visual Themes Lookup Screen --> <screen name="ListVisualThemes"> <section> - <actions> - <set field="title" value="${uiLabelMap.CommonVisualThemes}"/> - <set field="parameters.presentation" value="window"/> - <entity-one entity-name="WebSite" value-field="webSite"/> - <set field="visualThemeSetId" from-field="webSite.visualThemeSetId" default-value="BACKOFFICE" /> - <entity-condition entity-name="VisualTheme" list="visualThemes"> - <condition-expr field-name="visualThemeSetId" from-field="visualThemeSetId" /> - </entity-condition> - </actions> <widgets> - <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml"> - <decorator-section name="body"> - <platform-specific> - <html> - <html-template location="component://common-theme/template/includes/ListVisualThemes.ftl"/> - </html> - </platform-specific> - </decorator-section> - </decorator-screen> + <include-screen name="MinimalActions" location="component://common/widget/CommonScreens.xml"/> + <include-screen name="ListVisualThemes" location="${groovy:commonScreenLocations.ListVisualThemes?commonScreenLocations.ListVisualThemes:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -193,20 +140,9 @@ under the License. <!-- Time Duration Screen --> <screen name="TimeDuration"> <section> - <actions> - <set field="title" value="${uiLabelMap.CommonTime}"/> - <set field="parameters.presentation" value="window"/> - </actions> <widgets> - <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml"> - <decorator-section name="body"> - <platform-specific> - <html> - <html-template location="component://common-theme/template/includes/TimeDuration.ftl"/> - </html> - </platform-specific> - </decorator-section> - </decorator-screen> + <include-screen name="MinimalActions" location="component://common/widget/CommonScreens.xml"/> + <include-screen name="TimeDuration" location="${groovy:commonScreenLocations.TimeDuration?commonScreenLocations.TimeDuration:commonDecoratorLocation}"/> </widgets> </section> </screen> @@ -220,7 +156,7 @@ under the License. <property-map resource="SecurityUiLabels" map-name="uiLabelMap" global="true"/> <set field="title" value="${uiLabelMap.LookupUserLogin}"/> <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="viewSizeDefaultValue" value="${groovy: modelTheme.getDefaultViewSize()}" type="Integer"/> <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="${viewSizeDefaultValue}"/> </actions> <widgets> @@ -261,7 +197,7 @@ under the License. <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> <set field="title" value="${uiLabelMap.CommonLookupLocale}"/> <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="viewSizeDefaultValue" value="${groovy: modelTheme.getDefaultViewSize()}" type="Integer"/> <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="${viewSizeDefaultValue}"/> <set field="inputFields" from-field="parameters"/> <script location="component://common/groovyScripts/GetLocaleList.groovy"/> |
Free forum by Nabble | Edit this page |