It doesnt work, pfff. I send you commonScreen.xml , end my mainsubheader.ftl
please watch it, please 2013/10/12 Jacques Le Roux <[email protected]> > Seems you did it the reverse way. > > Put > <property-map resource="EcommerceUiLabels" map-name="uiLabelMap" > global="true"/> > in you main screen actions and it should work for both your (visible here) > ftl templates > > Also if you use your main-decorator in other screens, better to put this > line directly in your main-decorator. > The idea is to put labels at the higher level, wich the decorators are. > > Of course, YMMV... > > Jacques > > Antony Adopo wrote: > > Please, I did all but nothing. > > > > this my screen: > > > > <screen name="mainSubHeader"> > > <section> > > <actions> > > <property-map resource="EcommerceUiLabels" map-name="uiLabelMap" > > global="true"/> > > </actions> > > <widgets> > > <platform-specific><html><html-template > > > location="component://LeTailleur/webapp/ecommerce/includes/homePage/mainSubHeader.ftl"/></html></platform-specific> > > </widgets> > > </section> > > </screen> > > > > > > I include it in the "main" screen in "CommonScreens.xml" > > > > <screen name="main"> > > <section> > > <actions> > > <!--<set field="leftbarScreenName" value="leftbar"/> > > <set field="rightbarScreenName" value="rightbar"/>--> > > <!--<set field="MainColumnStyle" value="center"/>--> > > > > > > <set field="titleProperty" value="PageTitleMain"/> > > <set field="headerItem" value="main"/> > > <set field="randomSurveyGroup" value="testSurveyGroup"/> > > > > <script > > > location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/Main.groovy"/> > > <script > > > location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy"/> > > </actions> > > <widgets> > > <decorator-screen name="main-decorator" > > location="${parameters.mainDecoratorLocation}"> > > <decorator-section name="body"> > > *<include-screen name="mainSubHeader"/>* > > <include-screen name="mainCarousel"/> > > <platform-specific><html><html-template > > > location="component://LeTailleur/webapp/ecommerce/main.ftl"/></html></platform-specific> > > </decorator-section> > > </decorator-screen> > > </widgets> > > </section> > > </screen> > > > > but it doesn't work. Please help > > > > 2013/10/11 Jacques Le Roux <[email protected]> > > > >> If you common screen is either included or used as a decorator in other > >> screens then it should work, because of the global="true" > >> Else your screens have no ideas about your labels, how could they? > >> > >> Jacques > >> > >> Antony ADOPO wrote: > >>> Ok, I will try this evening. I only put these property in common > screen , not on others "een.xml" > >>> > >>> -----Message d'origine----- > >>> De : "Jacques Le Roux" <[email protected]> > >>> Envoyé : 11/10/2013 11:21 > >>> À : "[email protected]" <[email protected]> > >>> Objet : Re: Adding new "EcommerceUiLabels" doesn't work > >>> > >>> Look for > >>> <property-map resource="EcommerceUiLabels" map-name="uiLabelMap" > global="true"/> > >>> > >>> in *een*.xml files... > >>> > >>> Also, to check what's going on with your labels, you can use the Label > Manager in Webtools > >>> > >>> Jacques > >>> > >>> Antony ADOPO wrote: > >>>> Yes, it is already include. Please send me an exemple to show tour > >> "including" way. Im sure but it doesn't work > >>>> > >>>> -----Message d'origine----- > >>>> De : "Jacques Le Roux" <[email protected]> > >>>> Envoyé : 11/10/2013 08:58 > >>>> À : "[email protected]" <[email protected]> > >>>> Objet : Re: Adding new "EcommerceUiLabels" doesn't work > >>>> > >>>> Antony, you have to be sure that you "include" the corresponding ui > >> labels file in the screen widget definition which calls the > >>>> ultimately rendered HTML source (either a widget form or a ftl > template) > >>>> So if it's in a hot-deploy component don't forget it there. See how > >> it's done in ecommerce screens... > >>>> > >>>> Jacques > >>>> > >>>> Antony Adopo wrote: > >>>>> lol, forgot it , it was just to specify that it is code. > >>>>> > >>>>> But I add only : > >>>>> <property key="EcommerceNewCollections"> > >>>>> <value xml:lang="en">New collections</value> > >>>>>> <value xml:lang="fr">Nouvelles collections</value> > >>>>> </property> > >>>>> > >>>>> It doesn't work when I call it by > ${uiLabelMap.EcommerceNewCollections} > >>>>> > >>>>> > >>>>> 2013/10/11 Jacques Le Roux <[email protected]> > >>>>> > >>>>>> It should work, but what are those <code></code> ? > >>>>>> > >>>>>> Jacques > >>>>>> > >>>>>> Antony Adopo wrote: > >>>>>>> Hello Ofbizers, > >>>>>>> > >>>>>>> I try to add new labels in EcommerceUiLabels.xml (Also > CommonUiLabels.xml) > >>>>>>> for instance : > >>>>>>> <code> > >>>>>>> <property key="EcommerceNewCollections"> > >>>>>>> <value xml:lang="en">New collections</value> > >>>>>>> <value xml:lang="fr">Nouvelles collections</value> > >>>>>>> </property> > >>>>>>> </code> > >>>>>>> > >>>>>>> But It doesn't work. Even I restart many times ofbiz and my > computer. But > >>>>>>> the first (native) Labels work . > >>>>>>> > >>>>>>> Please Help > >>>>>>> > >>>>>>> Thanks >
<?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="main-decorator"> <section> <actions> <!-- base/top/specific map first, then more common map added for shared labels --> <property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/> <!--<set field="MainColumnStyle" value="nocolumns" global="true"/>--> <!-- The default (global) shortcut icon --> <set field="layoutSettings.shortcutIcon" value="/images/ofbiz.ico" global="true"/> <!-- The default (main) java scripts --> <!-- NOTE: this should be included on each screen that uses it to avoid including it in all screens: --> <set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/> <set field="initialLocaleComplete" type="String" value="${groovy:parameters?.userLogin?.lastLocale}" default-value="${groovy:locale.toString()}"/> <set field="layoutSettings.javaScripts[+0]" value="${groovy: org.ofbiz.common.JsLanguageFilesMapping.dateTime.getFilePath(initialLocaleComplete)}" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/bootstrap/js/bootstrap.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon-1.0.5.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/js/jquery-ui-1.9.0.custom.min.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/jquery.ui.datepicker.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/validate/jquery.validate.min.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.8.2.min.js" global="true"/> <script location="component://LeTailleur/widget/EcommerceSetup.groovy"/> <!-- Get the store VisualTheme --> <set field="visualThemeId" from-field="productStore.visualThemeId" default-value="EC_DEFAULT"/> <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="headerTemplateLocation" from-field="layoutSettings.VT_HDR_TMPLT_LOC[0]" default-value="component://ecommerce/webapp/ecommerce/includes/header.ftl"/> <set field="footerTemplateLocation" from-field="layoutSettings.VT_FTR_TMPLT_LOC[0]" default-value="component://ecommerce/webapp/ecommerce/includes/footer.ftl"/> <entity-and list="webAnalyticsConfigs" entity-name="WebAnalyticsConfig"> <field-map field-name="webSiteId"/> </entity-and> <set field="layoutSettings.javaScripts[]" value="/images/miscAjaxFunctions.js" global="true" /> </actions> <widgets> <section> <condition> <not><if-empty field="globalContext.productStore"/></not> </condition> <widgets> <platform-specific><html><html-template location="component://LeTailleur/webapp/ecommerce/includes/headerHead.ftl"/></html></platform-specific> <platform-specific><html><html-template location="component://common/webcommon/includes/openhtmlbody.ftl"/></html></platform-specific> <!-- render header --> <container id="header"><platform-specific><html><html-template location="${headerTemplateLocation}"/></html></platform-specific></container> <!--<container id="ecom-mainarea">--> <container style="container"> <!-- by default will render left-bar only if left/rightbarScreenName value not empty --> <container id="div1" style="${LeftColumnStyle}"><include-screen name="${leftbarScreenName}" location="${leftbarScreenLocation}"/></container> <container id="div2" style="${RightColumnStyle}"><include-screen name="${rightbarScreenName}" location="${rightbarScreenLocation}"/></container> <!--<container id="div1" style="left"><include-screen name="${leftbarScreenName}" location="${leftbarScreenLocation}"/></container> <container id="div2" style="right"><include-screen name="${rightbarScreenName}" location="${rightbarScreenLocation}"/></container>--> <container id="div3" style="${MainColumnStyle}"> <!-- render messages --> <platform-specific><html><html-template location="component://common/webcommon/includes/messages.ftl"/></html></platform-specific> <decorator-section-include name="body"/> </container> <container id="div4" style="endcolumns"/> </container> <!-- render footer --> <container id="footer"><platform-specific><html><html-template location="${footerTemplateLocation}"/></html></platform-specific></container> <platform-specific><html><html-template location="component://common/webcommon/includes/closehtmlbody.ftl"/></html></platform-specific> </widgets> <fail-widgets> <label text="A Product Store has not been defined for this ecommerce site. A Product Store can be created using the ofbizsetup wizard."/> </fail-widgets> </section> </widgets> </section> </screen> <!-- Side Columns --> <screen name="leftbar"> <section> <widgets> <include-screen name="choosecatalog" location="component://ecommerce/widget/CatalogScreens.xml"/> <include-screen name="keywordsearchbox" location="component://ecommerce/widget/CatalogScreens.xml"/> <!--include-screen name="sidedeepcategory" location="component://ecommerce/widget/CatalogScreens.xml"/--> <include-screen name="productCategories" location="component://ecommerce/widget/CatalogScreens.xml"/> <include-screen name="LayeredNavBar" location="component://ecommerce/widget/CatalogScreens.xml"/> <include-screen name="minireorderprods" location="component://ecommerce/widget/CatalogScreens.xml"/> <include-screen name="signupforcontactlist" location="component://ecommerce/widget/EmailContactListScreens.xml"/> <include-screen name="minipoll" location="component://ecommerce/widget/ContentScreens.xml"/> <include-screen name="forums" location="component://ecommerce/widget/ForumScreens.xml"/> <include-screen name="content_categories" location="component://ecommerce/widget/ContentScreens.xml"/> <include-screen name="blogs" location="component://ecommerce/widget/blog/BlogScreens.xml"/> </widgets> </section> </screen> <screen name="rightbar"> <section> <widgets> <include-screen name="language"/> <include-screen name="minicart" location="component://ecommerce/widget/CartScreens.xml"/> <include-screen name="compareproductslist" location="component://order/widget/ordermgr/OrderEntryCatalogScreens.xml"/> <include-screen name="minipromotext" location="component://ecommerce/widget/CartScreens.xml"/> <include-screen name="miniassocprods" location="component://ecommerce/widget/CatalogScreens.xml"/> <include-screen name="factoids" location="component://ecommerce/widget/ContentScreens.xml"/> <include-screen name="minilastviewedcategories" location="component://ecommerce/widget/CatalogScreens.xml"/> <include-screen name="minilastviewedproducts" location="component://ecommerce/widget/CatalogScreens.xml"/> <include-screen name="minilastproductsearches" location="component://ecommerce/widget/CatalogScreens.xml"/> <include-screen name="recentlyviewed" location="component://ecommerce/widget/ContentScreens.xml"/> <include-screen name="populartags" location="component://ecommerce/widget/CatalogScreens.xml"/> </widgets> </section> </screen> <!-- Common Decorators --> <screen name="CommonEmptyDecorator"> <section> <actions> <set field="MainColumnStyle" value="center"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <decorator-section-include name="body"/> </decorator-section> </decorator-screen> </widgets> </section> </screen> <screen name="CommonLeftDecorator"> <section> <actions> <set field="leftbarScreenName" value="leftbar"/> <set field="MainColumnStyle" value="center"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <decorator-section-include name="body"/> </decorator-section> </decorator-screen> </widgets> </section> </screen> <screen name="CommonRightDecorator"> <section> <actions> <set field="rightbarScreenName" value="rightbar"/> <set field="MainColumnStyle" value="center"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <decorator-section-include name="body"/> </decorator-section> </decorator-screen> </widgets> </section> </screen> <screen name="CommonLeftRightDecorator"> <section> <actions> <set field="leftbarScreenName" value="leftbar"/> <set field="rightbarScreenName" value="rightbar"/> <set field="MainColumnStyle" value="center"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <decorator-section-include name="body"/> </decorator-section> </decorator-screen> </widgets> </section> </screen> <!-- forum decorator? --> <screen name="commonForumDecorator"> <section> <actions> <set field="leftbarScreenName" value="leftbar"/> <set field="rightbarScreenName" value="rightbar"/> <set field="MainColumnStyle" value="center"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <label style="head1" text="${uiLabelMap.${titleProperty}}"></label> <decorator-section-include name="body"/> </decorator-section> </decorator-screen> </widgets> </section> </screen> <screen name="CommonBlog"> <section> <actions> <set field="currentMenuItemName" from-field="currentMenuItemName" default-value="all" from-scope="user"/> <set field="leftbarScreenName" value="leftbar"/> <set field="rightbarScreenName" value="rightbar"/> <set field="MainColumnStyle" value="center"/> </actions> <widgets> <decorator-screen name="main-decorator"> <decorator-section name="body"> <container style="blogs"> <include-screen name="CommonBlogTitle" location="component://ecommerce/widget/blog/BlogScreens.xml"/> <decorator-section-include name="body"/> </container> </decorator-section> </decorator-screen> </widgets> </section> </screen> <screen name="CommonPopUpDecorator"> <section> <actions> <!-- base/top/specific map first, then more common map added for shared labels --> <property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/> <set field="MainColumnStyle" value="nocolumns" global="true"/> <!-- The default (global) shortcut icon --> <set field="layoutSettings.shortcutIcon" value="/images/ofbiz.ico" global="true"/> <!-- The default (main) java scripts --> <!-- NOTE: this should be included on each screen that uses it to avoid including it in all screens: --> <set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/validate/jquery.validate.min.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.8.2.min.js" global="true"/> <script location="component://ecommerce/widget/EcommerceSetup.groovy"/> <!-- Get the store VisualTheme --> <set field="visualThemeId" from-field="productStore.visualThemeId" default-value="EC_DEFAULT"/> <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> <platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/includes/headerHead.ftl"/></html></platform-specific> <platform-specific><html><html-template location="component://common/webcommon/includes/openhtmlbody.ftl"/></html></platform-specific> <platform-specific><html><html-template location="component://common/webcommon/includes/messages.ftl"/></html></platform-specific> <decorator-section-include name="body"/> <platform-specific><html><html-template location="component://common/webcommon/includes/closehtmlbody.ftl"/></html></platform-specific> </widgets> </section> </screen> <!-- Column Included Screens --> <screen name="language"> <section> <widgets> <platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/includes/language.ftl"/></html></platform-specific> </widgets> </section> </screen> <!-- Top Level Screens --> <screen name="main"> <section> <actions> <!--<set field="leftbarScreenName" value="leftbar"/> <set field="rightbarScreenName" value="rightbar"/>--> <!--<set field="MainColumnStyle" value="center"/>--> <property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/> <set field="titleProperty" value="PageTitleMain"/> <set field="headerItem" value="main"/> <set field="randomSurveyGroup" value="testSurveyGroup"/> <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/Main.groovy"/> <script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Category.groovy"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <include-screen name="mainSubHeader"/> <include-screen name="mainCarousel"/> <platform-specific><html><html-template location="component://LeTailleur/webapp/ecommerce/main.ftl"/></html></platform-specific> </decorator-section> </decorator-screen> </widgets> </section> </screen> <screen name="login"> <section> <actions> <set field="titleProperty" value="PageTitleLogin"/> <set field="headerItem" value="login"/> <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/Login.groovy"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <platform-specific> <html><html-template location="component://ecommerce/webapp/ecommerce/login.ftl"/></html> </platform-specific> <platform-specific> <html><html-template location="component://ecommerce/webapp/ecommerce/order/startanoncheckout.ftl"/></html> </platform-specific> </decorator-section> </decorator-screen> </widgets> </section> </screen> <screen name="loginHeader"> <section> <widgets> <platform-specific><html><html-template location="component://LeTailleur/webapp/ecommerce/includes/loginHeader.ftl"/></html></platform-specific> </widgets> </section> </screen> <screen name="mainSubHeader"> <section> <!--<actions> <property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/> </actions>--> <widgets> <platform-specific><html><html-template location="component://LeTailleur/webapp/ecommerce/includes/homePage/mainSubHeader.ftl"/></html></platform-specific> </widgets> </section> </screen> <screen name="mainCarousel"> <section> <widgets> <platform-specific><html><html-template location="component://LeTailleur/webapp/ecommerce/includes/homePage/mainCarousel.ftl"/></html></platform-specific> </widgets> </section> </screen> <screen name="requirePasswordChange"> <section> <actions> <set field="titleProperty" value="PageTitleLogin"/> <set field="headerItem" value="login"/> <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/Login.groovy"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <platform-specific> <html><html-template location="component://ecommerce/webapp/ecommerce/requirePasswordChange.ftl"/></html> </platform-specific> </decorator-section> </decorator-screen> </widgets> </section> </screen> <screen name="responseTreeLine"> <section> <actions> <service service-name="getPublicForumMessage" result-map="contentData"> <field-map field-name="contentId" from-field="rsp.contentId"/> </service> <set field="textData" from-field="contentData.resultData.electronicText.textData"/> </actions> <widgets> <section> <condition> <if-compare-field field="responseContentId" operator="equals" to-field="rsp.contentId"/> </condition> <widgets> <container style="responseSelected"> <container style="responsetext"> <platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/forum/messageDisplay.ftl"/></html></platform-specific> </container> </container> </widgets> <fail-widgets> <container> <container style="responsetext"> <platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/forum/messageDisplay.ftl"/></html></platform-specific> </container> </container> </fail-widgets> </section> </widgets> </section> </screen> <screen name="policies"> <section> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> <sub-content content-id="WebStoreCONTENT" map-key="policies"/> <sub-content content-id="WebStoreCONTENT" map-key="policies2"/> </decorator-section> </decorator-screen> </widgets> </section> </screen> </screens>
