Hello. I'm doing an excercies from the tutorial:
https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide#OFBizTutorial-ABeginnersDevelopmentGuide-Nowitsthetimetoshowpracticeapplicationintheappbar

The problem is:
1) Labels resource 'config/PracticeUiLabels.xml' doesn't load.
2) The error message is given only if <property-map> statement with failed_resource 
is placed as a first <property-map> statement. If it placed as a second statement, 
then error message isn't shown.
For example, this is a snippet of a <screen> when error message is shown:
                    <actions>
                        <property-map resource="PracticeUiLabels" map-name="uiLabelMap" 
global="true"/>
                        <property-map resource="CommonUiLabels" map-name="uiLabelMap" 
global="true"/>       
                        <set field="layoutSettings.companyName" 
from-field="uiLabelMap.PracticeCompanyName" global="true"/>
                        <set field="activeApp" value="practice" global="true"/>
                        <set field="applicationMenuName" value="PracticeAppBar" 
global="true"/>
                        <set field="applicationMenuLocation" 
value="component://practice/widget/PracticeMenus.xml" global="true"/>
                    </actions>

And this is the snippet of a <screen> when error isn't shown (just 2 lines 
swaped):
                    <actions>
                        <property-map resource="CommonUiLabels" map-name="uiLabelMap" 
global="true"/>       
                        <property-map resource="PracticeUiLabels" map-name="uiLabelMap" 
global="true"/>
                        <set field="layoutSettings.companyName" 
from-field="uiLabelMap.PracticeCompanyName" global="true"/>
                        <set field="activeApp" value="practice" global="true"/>
                        <set field="applicationMenuName" value="PracticeAppBar" 
global="true"/>
                        <set field="applicationMenuLocation" 
value="component://practice/widget/PracticeMenus.xml" global="true"/>
                    </actions>

Also, when debugging the application the system property 
'System.getProperty("java.class.path")' equals to:
(java.lang.String) /home/user/soft/livegarden/ofbiz.15.12/ofbiz.jar
I don't really understand what actually does (where is stores the classpath) the 
<classpath> element of the component definition file.
I'm using OfBiz 15.12. The screen definition file, the resource file and the 
compopent definition files are attached.
<?xml version="1.0" encoding="UTF-8"?>
<ofbiz-component name="practice"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd";>
      <resource-loader   name="main" type="component"/>
      
    <classpath type="dir" location="config"/>
    
    <webapp name="practice"
       title="Practice"
       server="default-server"
       base-permission="OFBTOOLS"
       location="webapp/practice"
       mount-point="/practice"
       app-bar-display="true"/>
       
</ofbiz-component>
<?xml version="1.0" encoding="UTF-8"?>
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd";>
	<property key="PracticeApplication">
	    <value xml:lang="en">### This is first  practice ###</value>
	</property>
	<property key="PracticeCompanyName">
	    <value xml:lang="en">### OFBiz: Practice ###</value>
	</property>
</resource>
<?xml version="1.0" encoding="UTF-8"?>
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
     xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd";>
	<screen name="CommonPracticeDecorator">
	    <section>
	        <widgets>
	             <include-menu location="component://practice/widget/PracticeMenus.xml" name="PracticeAppBar"/>
	<include-screen name="main-decorator" location="component://practice/widget/CommonScreens.xml"/>
	             <decorator-section-include name="body"/>                     
	        </widgets>
	    </section>
	</screen>
	<screen name="main-decorator">
	        <section>
	            <actions>
	                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>	
	                <property-map resource="PracticeUiLabels" map-name="uiLabelMap" global="true"/>
	                <set field="layoutSettings.companyName" from-field="uiLabelMap.PracticeCompanyName" global="true"/>
	                <set field="activeApp" value="practice" global="true"/>
	                <set field="applicationMenuName" value="PracticeAppBar" global="true"/>
	                <set field="applicationMenuLocation" value="component://practice/widget/PracticeMenus.xml" global="true"/>
	            </actions>
	            <widgets>
	                <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
	            </widgets>
	        </section>
	</screen>
</screens>

Reply via email to