在编辑菜单的时候,因为是自己新建的应用,所以需要将菜单的名称和位置加入到CommonScreens.xml中,
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.ofbiz.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="LearningUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<set field="layoutSettings.companyName" from-field="uiLabelMap.LearningCompanyName"
global="true"/>
<set field="layoutSettings.companySubtitle" from-field="uiLabelMap.LearningCompanySubtitle" global="true"/>
<set field="layoutSettings.headerImageUrl" value="/images/ofbiz_logo.jpg" global="true"/>
<set field="activeApp" value="learning" global="true"/>
<set field="appheaderTemplate" value="component://learning/webapp/learning/includes/appheader.ftl" global="true"/>
<set field="applicationMenuName" value="TopMenu" global="true"/>
<set field="applicationMenuLocation" value="component://learning/widget/learning/LearningMenus.xml" global="true"/>
</actions>
<widgets>
<include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml "/>
</widgets>
</section>
</screen>
<screen name="login">
<section>
<widgets>
<decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific>
<html>
<html-template location="component://common/webcommon/login.ftl" />
</html>
</platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>
就是上面绿色高亮部分,不要忘记哦~~~