Thanks for using the tutorial and reporting the issue, this part of tutorial has been updated so beginners don't get confused.
Thanks & Regards -- Pranay Pandey On Mar 13, 2012, at 4:13 PM, 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"?> > <!-- > 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. > --> > <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 Mappings --> > <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> > <!-- end of request mappings --> > <!-- View Mappings --> > <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"/> > <!-- end of view mappings --> > </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
