Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleImportant!

This tutorial is intended to be used with the latest SVN revision. It will not work with Release 4.

Parallaly with the development of this application you can watch OFBiz videos which are available at Framework Introduction Videos.

Part - 1

Note - 1 :- For any additional query and concern you can consult to Example component. You will always find the code in example component to be the most latest code of OFBiz. Take reference whenever you want to see some sample code for the development of this application.
Every new feature is first added in the Example component for the references.
Note - 2 : Before starting the development of this application you must read the contents form :
            http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practiceshttp://docs.ofbiz.org/display/OFBADMIN/Coding+Conventions and http://docs.ofbiz.org/display/OFBADMIN/Best+Practices+Guide

...

Step - 4 Create a file named "web.xml"(web.xml follows j2ee webapp specs). Contents of this file can be taken from any of the existing component e.g. example component. The Important values to change are the <display-name>, the localDispatcherName, and the mainDecoratorLocation.
For now put the value: "component://practice/widget/CommonScreens.xml" in for the location and you will see why in a while. This location is used in pointing to the main decorator location in screens like

Code Block

${parameters.mainDecoratorLocation}

. Which increases the code Independence from changing the path at many places when we need to change the main decorator location. At that time we just need to change the location there only and will work for all the screens where it has been used. One more advantage of doing this in screens is the purpose of resuability of existing screens which we can use from other components, but it decorate that screen by your decorator only as the same pattern is used at all the places and in all the components to show the mainDecoratorLocation. Concentrate on this when you add decorators in your screens in not too distant future with the development of this application.
Step - 5 Create a file named "controller.xml" (used by ofbiz webapp controller)  This file will be small and simple at first but will grow as we add functionality later on. For now insert the following code:

Code Block
<?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-2008 The Apache Software Foundation</owner>

       <!-- Request Mappings -->

       <request-map uri="main">
           <security https="false" auth="false"/>
           <response name="success" type="view" value="main"/>
       </request-map>

       <!-- end of request mappings -->

       <!-- View Mappings -->

       <view-map name="main" type="screen" page="component://practice/widget/PracticeScreens.xml#main"/>

       <!-- end of view mappings -->

</site-conf>

...

If you have followed all the steps and developed practice application from this application then this will really help you in understanding other implementations in OFBiz. These things are basic foundation of working in OFBiz. Now you know that how you can start the development in OFBiz. Don't leave the extra links provided in this tutorial as they will really help you a lot in understanding the things which are there. Parallaly with the development of this application you can watch OFBiz videos which are available at Framework Introduction Videos.

Here is another good reading will be help you a lot is available at FAQ Tips Tricks Cookbook HowTo 

...