PacktLib: Apache OFBiz Development: The Beginner's Tutorial

Apache OFBiz Development

Credits

About the Authors

About the Reviewers

Preface

Getting Started with OFBiz

Getting the OFBiz Code

Downloading and Installing SVN

Installing the Java Development Kit (JDK)

Downloading OFBiz Ready to Launch

Setting Up an Eclipse Project

Using Derby—the OFBiz Stock Database

Running OFBiz

Switching Off OFBiz

Our First Tour of OFBiz

Summary

Working with OFBiz

Adding Our First Field

Resetting Our Play Area Quickly

The Structure of OFBiz in General

The Model-View-Controller Architectural Pattern

Summary

Screen Widgets

Equipping Our Webapp with a Screen Widget View Handler

Using the Screen Widget View Handler

Files and Locations

Creating Our First Screen Widget

The Anatomy of the

Element

Nested Sections for Nested Conditions

Organizing a Large Screen into Smaller Screens

Screen Widget's Integration with FreeMarker

Cleaning Up in the "party" Component

Commenting Changes to the Core Code

Screen Widgets as Templates

Summary

Form Widgets

Files and Locations

Creating Our First Form Widget

Form Processing via Request Event

Java Events

Submitting and Processing Our First Form

The "list" Type Form Widget

The "multi" Type Form Widget

Alternative Targets in Two-Target Forms

Row-Level Actions

Summary

Other View Element Types in Screen Widgets

Menu Widgets

FreeMarker

Bringing it All Together

Summary

The Controller

How OFBiz Hears Our Requests—The Control Servlet

Programming a Control Servlet

Summary

Entities, View Entities, and Extended Entities

Entities

View Entities

Extending Entities

Summary

Accessing the Entities and View Entities

Setting-Up Our Playground

GenericValue Objects

Creating a Database Record

Updating Database Records

Deleting Database Records

Retrieving Database Records

Using the Entity Engine Cache

Dynamic View Entities

Paginating Using the EntityListIterator

Functions and Dynamic View Entities

Summary

The Events

Java Events

Working with the Database

Summary

The Service Engine

Defining a Service

Creating the Java Code for the Service

Testing Our First Service

Service Parameters

The DispatchContext

Service Security and Access Control

Calling Services from Java Code

Implementing Interfaces

Synchronous and Asynchronous Services.

Using the Job Scheduler

Quickly Running a Service

Naming a Service and the Service Reference

Event Condition Actions (ECA)

Summary

Permissions and the Service Engine

Simple Permissions

Two-Part Permissions and Special "_ADMIN" Permissions

Role Checks

Combining Multiple Checks

Nested Checks

Complex Permissions

Summary

Minilang

What is Minilang?

Defining a Simple Service

Simple Events

Validating and Converting Fields

Checking Security in Minilang

Invoking from Minilang

Minilang in Screen Widgets

Summary

Tying Up the Loose Ends

The OFBiz Look and Feel

Using FreeMarker

OFBiz Utilities

Outputting Different Formats

Summary

Tips and Techniques

Debugging Techniques

Debugging Java Code

Managing a Project Using Subversion

Apache HTTP Server and OFBiz using mod_proxy_ajp

Development Tips

Summary

Simple Method User's Guide

Simple Method User's Guide