Openbiz Eclipse Plugin User Manual

Openbiz Eclipse Plugin User Manual

  1. Installation
  2. Work on openbiz project
    2.1 Create openbiz project
    2.2 Create and edit a BizObj
    2.3 Create and edit a BizForm
    2.4 Create and edit a BizView
    2.5 Test BizView on browser

1. Installation

Openbiz Eclipse Plugin assists openbiz users to develop openbiz application in Eclipse environment.

First remove older Openbiz Eclipse plugin installation. Download openbiz_eclipse_0.9.x.zip from openbiz sourceforge web site. Same as installation of other eclipse plugins, just unzip it to your eclipse directory. Then restart eclipse. Openbiz plugin works with Eclipse 3.x.

To make sure that openbiz plugin can connect to your database (which is required for openbiz development), please edit config.xml under ECLIPSE_ROOT/plugins/org.openbiz.metadata_0.9.x/config. A pre-configured database element in the file is to connect local MySql database using connect/j JDBC driver. Please make change on it to point to correct jdbc driver and database url.

The pre-configure database element in config.xml

<Database DriverFile="D:\java\eclipse\plugins\org.openbiz.metadata_0.9.x\lib\mysql-connector-java-3.1.10-bin.jar" DriverClass="com.mysql.jdbc.Driver" ConnectURL="jdbc:mysql://localhost:3306/demo" Schema="" User="root" Password="root"/>

To configure a database element, the following attributes must be filled correctly.

  • DriverFile - the location of jdbc driver jar file
  • DriverClass - jdbc driver class
  • ConnectURL - database server jdbc connection URL
  • Schema - schema name supported by some database types (i.e. Oracle).
  • User - user name used to connect to database server
  • Password - password used to connect to database server

2. Work on Openbiz Project

2.1 Create openbiz project

With help of eclipse, openbiz directory can be managed under an eclipse project. User can create a project that points to the openbiz (or openbiz/metadata) directory. Then the openbiz project tree should appear on the eclipse Navigator view.

2.2 Create a BizDataObj - the object maps to database table

Click the File -> New -> Others... from the menu, or right click on the item of openbiz project, select New -> Others..., a window pops up. Select Openbiz Metadata Object -> BizDataObj metadata file.

 

Then do the following tasks in the rest pages.

  1. Type in a metadata file name
  2. Select a database from the database list that is read from config.xml
  3. Select a database table to be the BizDataObj base table
  4. Select table columns mapping to the BizFields

After you click Finish button, the new metadata file is opened in the editor area. The editor looks like eclipse Plug-in Menifest Editor. The overview page shows the information of root xml element of the metadata object, the rest pages show the second level xml elements. 

The plugin provides three wasy to edit the metadata file, 

  • Add, delete or move elements
  • Type in value in editbox or select value in comboBox
  • Clicking on buttons with "..." pops up a selection dialog for users to pick a value such as table, column or metadata object

2.3 Create a BizForm - the UI object maps to BizDataObj

Like creating a BizDataObj, click the File -> New -> Others... from the menu, or right click on the item of openbiz project, select New -> Others..., a window pops up. Select Openbiz Metadata Object -> BizForm metadata file.

Then do the following tasks in the rest pages.

  1. Type in a metadata file name
  2. Select a BizDataObj that BizForm depends on 
  3. Select BizDataObj's BizFields mapping to the BizForm's BizCtrls
  4. Create Toolbar controls and Navigation bar controls
  5. Add event handlers to controls and BizCtrls

Screenshot: right click mouse on a control, select Add EventHanlder menu item

Screenshot: edit event handler of a control

After you click Finish button, the new metadata file is opened in the editor area. 

2.4 Create a BizView - BizForm Container

Like creating a BizDataObj, click the File -> New -> Others... from the menu, or right click on the item of openbiz project, select New -> Others..., a window pops up. Select Openbiz Metadata Object -> BizView metadata file.

Then Type in a metadata file name and click Finish button.

After you click Finish button, the new metadata file is opened in the editor area.

2.5 Test BizView on browser

A BizView can be accessed with url as following format:

openbiz_root_path/bin/controller.php?view=package.viewname

For example, http://localhost/demoapp/bin/controller.php?view=shared.SignupView

Back to top