没有合适的资源?快使用搜索试试~ 我知道了~
首页Apache OFBiz Development The Beginner's Tutorial
Apache OFBiz is a community-driven open source project. That means, no licensing fees. For many, OFBiz is also the best e-commerce and Enterprise Resource Planning (ERP) software available.
资源详情
资源评论
资源推荐


Table of Content
Preface 1
Chapter 1: Getting Started with OFBiz 9
Getting the OFBiz Code 9
Downloading and Installing SVN 10
Downloading TortoiseSVN 10
Using SVN to Get OFBiz 11
Our OFBiz Workspace—First Look 13
Installing the Java Development Kit (JDK) 14
Downloading JDK 5.0 14
Installing JDK 5.0 15
Downloading OFBiz Ready to Launch 16
Setting Up an Eclipse Project 16
Using Derby—the OFBiz Stock Database 19
Compiling OFBiz and Loading the Data 20
Verifying the Installation Process 20
The Compilation Portion 20
The Data Loading Portion 21
Some Pre-Ignition Processes we won't do Twice 21
Backing Up the Derby Data Files 22
Running OFBiz 22
Allocating Memory for OFBiz 22
Starting OFBiz and Verifying the Start-Up Process 24
Seeing the Logs in Real Time 25
Possible Problems with Start-Up 25
Switching Off OFBiz 25
Our First Tour of OFBiz 26
Accessing OFBiz 26
Exploring the Webapp "ecommerce" 28
Let's Buy Something 28
Exploring the Webapp "order" 32

Table of Contents
[ ii ]
Receiving Payment 32
Fulfilling the Order 34
Invoice Automatically Generated with Payment Applied 34
End-to-End Tour Completed 34
Summary 35
Chapter 2: Working with OFBiz 37
Adding Our First Field 37
Changing the Data 39
Editing the Entity Definition 39
Updating the Database 40
Changing the Looks 40
Editing the User-Interface 41
Checking Our Changes 41
Changing the Flow 42
Rewiring the "Save" (Update Postal Address) Button 42
Creating the New Widget Screen 43
Creating the FTL File 44
More to the Flow 45
Some Changes Possible with Engines Running 47
Resetting Our Play Area Quickly 48
Skipping Some Pre-Ignition Processes 49
Restoring Derby Data Files 49
Removing the Web Server (Catalina) Work Files 49
Updating the Database with Our Data Entity Changes 49
Showing Off Our Spanking New OFBiz Installation 50
Tripping Up Our Plan 50
Storing a Save-Point to Dramatically Ease Testing 50
Archiving Derby Data Files and Web Server Work Files 51
Restoring a Save-Point 52
Restoring the Derby Data Files 52
Restoring the Web Server Work Files 52
Computer, Run Scenario A from Last Save-Point 52
The Structure of OFBiz in General 53
Components in OFBiz 53
Referencing Components in OFBiz 54
Creating Our Own OFBiz Component 55
Creating the Component 55
Using Our Component 55
Cleaning Up Our Mess in the "party" Component 56
Converting the BeanShell to a Java Event 57
Clean Extension Strategies Employed 59
Checking that Our Move was Successful 60
A Bit More Mess Remains 60
Webapps in OFBiz 60
Creating Our First Webapp 61

Table of Contents
[ iii ]
Webapp URIs in this Book 62
Testing Our First Webapp 63
The Model-View-Controller Architectural Pattern 63
The MVC in Plain English 63
The Model in OFBiz 64
The View in OFBiz 64
The Controller in OFBiz 65
Other Files in an OFBiz Component 66
Summary 67
Chapter 3: Screen Widgets 69
Equipping Our Webapp with a Screen Widget View Handler 69
Using the Screen Widget View Handler 71
Files and Locations 71
Creating Our First Screen Widget 71
Defining a Screen Widget 71
Informing the Control Servlet about the Screen Widget 72
Referencing Screen Widgets 73
Uniform Pattern of Flow in OFBiz 73
Seeing Our First Screen Widget 74
The Anatomy of the <section> Element 74
Our First Conditional Screen Widget 74
Element Order in the controller.xml 75
Inform the Control Servlet about the Screen Widget 75
If-Then-Else Structure 75
The <if-condition> Element 76
The Then—<actions> and <widgets> Elements 76
The Else—<fail-widgets> Element 78
The Minimum <section> 78
Sending Parameters with Requests 79
Seeing Our Conditional Screen Widget 79
Screen Widget Context and Variables 79
Utility Objects in Context 80
Nested Sections for Nested Conditions 85
Organizing a Large Screen into Smaller Screens 88
The Global Context Revisited 90
Outer Contexts Visible to Nested Ones 92
Screen Widget's Integration with FreeMarker 93
Cleaning Up in the "party" Component 94
Commenting Changes to the Core Code 96
Screen Widgets as Templates 97
A Candidate for Templating 97
Creating the Header 98
Creating the Footer 98

Table of Contents
[ iv ]
Using Our Header and Footer 99
Seeing Our First Well-Formed XHTML Document 99
Using Decorator Screen Widgets for Templating 100
Creating a XHTML Decorator Screen 100
Using the XHTML Decorator Screen 100
Seeing Our First Decorator in Action 101
Multiple Content Slots 102
Creating the First Half of the Header 102
Creating the Second Half of the Header 102
Adding a Content Slot to a Decorator 103
Using Our Multi-Slot Decorator 103
Seeing Our First Multi-Slot Decorator 104
Nesting Decorators 104
Top-Down Approach (delegation) 104
The Bottom-Up Approach (Vertical Stack) 106
Using Both Approaches 107
Summary 109
Chapter 4: Form Widgets 111
Files and Locations 112
Creating Our First Form Widget 112
Creating the Containing Screen Widget 112
Referencing Form Widgets 113
Create the Form Widget 113
Seeing Our First Form 114
Understanding the Form Attributes 114
Minimum Requirements to Use Form Widgets 115
Including the Minimal Requirements 116
Form Processing via Request Event 116
Java Events 117
Submitting and Processing Our First Form 118
The "list" Type Form Widget 119
Creating the Containing Screen 119
Adding Form Processing Code 120
Publishing the Form 121
Seeing Our First "list" Type Form 122
The "multi" Type Form Widget 122
Creating the Containing Screen 122
Loading Data for the Form 123
Publishing the Form 124
Creating the Form-Processing Logic 125
Seeing Our First "multi" Type Form 125
Alternative Targets in Two-Target Forms 126
Creating the Form 126
剩余453页未读,继续阅读














安全验证
文档复制为VIP权益,开通VIP直接复制

评论8