Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Cleaned up the "How to Extend" documentation.

...

That's really all there is to it. If you call new services from the requests, make sure you create your file in component://myapp/servicedef/services.xml and make sure it gets loaded in the ofbiz-component.xml file. Same with ECAs. Need new classes, create them in your src directory and don't forget to build them with ant. Keep in mind two things and maintanence maintenance of your custom application will be easier and less error prone.

...

(For instance we are extending the Marketing component.)
1) Inside webapp of your customize application create a folder the following folders for the component you want to extend, using it's component name. (marketing/WEB-INF)
2) Add Create an empty controller.xml , web.xml
3) file in this new WEB-INF folder.
In controller.xml file include the <include location="component://marketing/webapp/marketing/WEB-INF/controller.xml"/>
4) In Copy the web.xml from the component you want to extends WEB-INF folder into this new WEB-INF folder.

In you custom component's ofbiz-component.xml (hot-deploy/customize_project/)
add  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"/>

(extending marketing component here.) Now here the The basic setup for extend the component is completed, now you .  You can add your custom component specific request and view in controller.xml here. And .  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 extanded componintextended component.

Note : Please add if some of the information is missing here.

...