BTT Electronic Journal Viewer (EJV) provides an EJViewerComposite
wrapped org.eclipse.swt.widgets.Composite, containing the query GUI
and result presentation GUI. To use the BTT EJV, add the EJV Composite to
the BTT RCP framework. Perform the following steps to use the EJV:
- Add an EJV activity. Open the BTT RCP framework, extend com.ibm.btt.rcp.activity.activities,
and add activity EJViewer. The following figure displays the Extension
Element Details panel:The com.ibm.btt.bc.common.activity.BCActivity class
is in the com.ibm.btt.bc.common plugin, and shared as activity class
for nearly all BTT Business Components. The parameter of the EJ Viewer activity
is a string integrated by two parts. The first part is com.ibm.btt.bc.ej.viewer.impl.EJViewerCompositeFactory which
is provided by BTT EJV, and the second is ejvconfig which is the ID
of EJViewerConfigurationObject you have configured in the XML file.
- Add the navigation item for EJV. Extend com.ibm.btt.rcp.navigator.items,
and add an item. The following figure displays the Extension Element Details panel:The activityId is
the ID of the EJ Viewer activity
- Add a few code. In the start method of Activitor, the following
code should be added to initialize the BTT Element Factory for Busniess Component:
InitManager.reset("jar:///btt/btt.xml");
BasicElementFactory ejFactory = new BasicElementFactory("jar:///com/ibm/btt/bc/ej/viewer/ut/ej.xml");
BTTFactory.setElementFactory(ejFactory);
Now the EJV can be used in the RCP application. Input the query conditions,
click the
query button, and then the result is displayed in the table.