ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Foxworthy <p...@cohsoft.com.au>
Subject Re: A Error about "OFBiz Tutorial - A Beginners Development Guide" - maybe a bug.
Date Wed, 14 Mar 2012 03:42:19 GMT
Hi Jizheng,

The example assumes you already have a service named updatePracticePerson.
The error message seems to imply that you don't. You could use the Web Tools
to check the names of your services.

Cheers

Paul Foxworthy


Ji Zheng JZ Zhang wrote
> 
> Dear,
>     We are from IBM CRL, try to use OFBiz to setup a ERP like usage, learn
> it by this sample, in Part 2 "Now moving to create a form for showing the
> content of Person entity on the screen (Using Form Widget)", we meet such
> error:
>                               :ERROR MESSAGE:
> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen
> [component://practice/widget/CommonScreens.xml#CommonPracticeDecorator]:
> java.lang.RuntimeException: Error rendering included form named
> [ListPersons] at location [component://practice/widget/PracticeForms.xml]:
> java.lang.IllegalArgumentException: Error finding Service with name
> updatePracticePerson for auto-fields-service in a form widget (Error
> rendering included form named [ListPersons] at location
> [component://practice/widget/PracticeForms.xml]:
> java.lang.IllegalArgumentException: Error finding Service with name
> updatePracticePerson for auto-fields-service in a form widget)
> 
> -- My PracticeForms.xml
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xsi:noNamespaceSchemaLocation=
> "http://ofbiz.apache.org/dtds/widget-form.xsd">
> 	<form name="ListPersons" type="list" list-name="persons"
> list-entry-name="person" target="updatePracticePerson" paginate-target=
> "personForm">
> 	        <auto-fields-service service-name="updatePracticePerson"
> default-field-type="display" map-name="person"/>
> 	</form>
> </forms>
> 
> -- controller,xml --
> <?xml version="1.0" encoding="UTF-8"?>
> <site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xsi:noNamespaceSchemaLocation=
> "http://ofbiz.apache.org/dtds/site-conf.xsd">
>        <include location=
> "component://common/webcommon/WEB-INF/common-controller.xml"/>
>        <description>Practice Component Site Configuration
> File</description
>>
>        <owner>Copyright 2001-2009 The Apache Software Foundation</owner>
>        <handler name="screen" type="view" class=
> "org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
>        
>        <request-map uri="main">
>            <security https="false" auth="false"/>
>            <response name="success" type="view" value="main"/>
>        </request-map>
>        <request-map uri="person">
>            <security https="false" auth="false"/>
>            <response name="success" type="view" value="person"/>
>        </request-map>
>        <request-map uri="personForm">
>            <security https="false" auth="false"/>
>            <response name="success" type="view" value="personForm"/>
>        </request-map>
>        
>        
>        <view-map name="main" type="screen" page=
> "component://practice/widget/PracticeScreens.xml#main"/>
>        <view-map name="person" type="screen" page=
> "component://practice/widget/PracticeScreens.xml#person"/>
>        <view-map name="personForm" type="screen" page=
> "component://practice/widget/PracticeScreens.xml#personForm"/>
>        
> </site-conf>
> 
> --- PracticeScreens.xml --
> <?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="main">
>         <section>
>             <widgets>
>                 <label text="This is first practice"/>
>             </widgets>
>         </section>
>     </screen>
> 
>     <screen name="person">
>         <section>
>             <actions>
>                 <script location=
> "component://practice/webapp/practice/WEB-INF/actions/Person.groovy"/>
>             </actions>
>             <widgets>
>                 <decorator-screen name="CommonPracticeDecorator" location=
> "${parameters.mainDecoratorLocation}">
>                     <decorator-section name="body">
>                         <platform-specific>
>                             <html>
>                                 <html-template location=
> "component://practice/webapp/practice/Person.ftl"/>
>                             </html>
>                         </platform-specific>
>                     </decorator-section>
>                 </decorator-screen>
>             </widgets>
>         </section>
>     </screen>
> 
> 	<screen name="personForm">
> 	        <section>
> 	            <actions>
> 	                <set field="headerItem" value="personForm"/>
> 	                <set field="titleProperty" value=
> "PageTitlePracticePersonForm"/>
> 	                <entity-condition entity-name="Person" list="persons"
> />
> 	            </actions>
> 	            <widgets>
> 	                <decorator-screen name="CommonPracticeDecorator"
> location="${parameters.mainDecoratorLocation}">
> 	                    <decorator-section name="body">
> 	                        <label text="Person List" style="h2"/>
> 	                        <include-form name="ListPersons" location=
> "component://practice/widget/PracticeForms.xml"></include-form>
> 	                    </decorator-section>
> 	                </decorator-screen>
> 	            </widgets>
> 	        </section>
> 	</screen>
> </screens>
> -- PracticeMenu.xml --
> <?xml version="1.0" encoding="UTF-8"?>
> <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation=
> "http://ofbiz.apache.org/dtds/widget-menu.xsd">
>     <menu name="MainAppBar" title="PracticeApplication" extends=
> "CommonAppBarMenu" extends-resource=
> "component://common/widget/CommonMenus.xml">
>         <menu-item name="person" title="Person"><link target="person"/></
> menu-item>
>         <menu-item name="main" title="Main"><link target="main"/></
> menu-item>
>         <menu-item name="personForm" title="personForm"><link target=
> "personForm"/></menu-item>
>     </menu>
> </menus>
> 
> 
> Really thanks a lot!
> Jizheng
> CRL IOT
> 


-----
--
Coherent Software Australia Pty Ltd
http://www.cohsoft.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/

--
View this message in context: http://ofbiz.135035.n4.nabble.com/A-Error-about-OFBiz-Tutorial-A-Beginners-Development-Guide-maybe-a-bug-tp4469311p4470980.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Mime
View raw message