Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Cleaned up the instructions

...

Anchor
ExtendExistingComponent
ExtendExistingComponent

How to Extend an

...

Existing Component

Scenario: For any customized application under hot-deploy if it is needed to extend the existing component then changes in following files are required.(For instance You can extend any of the existing applications via a custom component in the hot-deploy directory.  In the following example we are extending the Marketing component via our custom component called mycomponent.)

  1. First we need to create a new WEB-INF folder inside your custom component's webapp directory ($OFBIZ_HOME/hot-deploy/mycomponent/webapp).  To create

    Inside webapp of your customize application create the following

    folders for the component you want to extend,

    using it's component name. (marketing/WEB-INF)

    use the name of the component you want to extend: ( OFBIZ_HOME is the location of the root directory of OFBiz)

    Code Block
    languagebash
    $ cd $OFBIZ_HOME/hot-deploy/mycomponent/webapp
    $ mkdir -p marketing/WEB-INF

    You should have the a new WEB-INF directory: $OFBIZ_HOME/hot-deploy/mycomponent/webapp/marketing/WEB-INF


  2. Create an empty controller.xml file in this new WEB-INF folder:

    Code Block
    languagebash
    $ touch $OFBIZ_HOME/hot-deploy/mycomponent/webapp/marketing/WEB-INF/controller.xml
  3. In

    controller.xml file include the <include

    this new controller.xml file include the controller.xml file from the marketing component:

    Code Block
    languagexml
    <?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://marketing/webapp/marketing/WEB-INF/controller.xml"/>
    </site-conf>
  4. Copy the marketing component's web.xml from the

    component you want to extends WEB-INF folder into this

    marketing component's WEB-INF directory ($OFBIZ_HOME/applications/marketing/webapp/marketing/WEB-INF) into the new WEB-INF folder:

    Code Block
    languagebash
    $ cp $OFBIZ_HOME/applications/marketing/webapp/marketing/WEB-INF/web.xml $OFBIZ_HOME/hot-deploy/mycomponent/webapp/marketing/WEB-INF/
  5. In you custom component's ofbiz-component.xml ($OFBIZ_HOME/hot-deploy/customize_projectmycomponent/) add following code:

    Code Block
    languagexml
    titleextending marketing component here
    <webapp name="marketing" title="Marketing-Customized" server="default-server" location="webapp/marketing" base-permission="OFBTOOLS,MARKETING" mount-point="/marketing"/>

The basic setup for extend extending the component is completed.  You can add your custom component specific request and view in controller.xml.  You can add other items such as SECAs in secas.xml and have them triggered on services in the component you want to extend. You can also create screens in the extended component.Note : Please add if some of the information is missing here.

Anchor
HowToSetSSL
HowToSetSSL

...