This document describes the similarities and differences between the visual beans (non-visual beans are also discussed though) in ContentConnect and EIP . Using the sample client application shipped with ContentConnect this document also shows how to migrate a client application created with the ContentConnect beans to a client application using the EIP beans.
Before reading this document, review the documentation ContentConnect
Building a Client. This document provides information about the ContentConnect
JavaBean components. With the ContentConnect toolkit
installed, you can access the documentation from the taskbar by selecting:
Start - Programs - IBM ContentConnect - Toolkit Documentation -
ContentConnect Building a Client
In addition, refer to the OO and Internet Application Programming Guide section, "Understanding and using JavaBeans". This document provides information about the EIP JavaBean components.
ContentConnect bean | EIP bean | Description |
---|---|---|
EJMSearchTemplateListTabs | CMBSearchTemplateList | Provides an interface for displaying search templates |
EJMSearchTemplateViewer | CMBSearchTemplateViewer | Provides an interface for displaying a search criterion |
EJMResultsViewer | CMBSearchResultsViewer | Provides an interface for displaying search results |
EJMFolderViewer | CMBFolderViewer | Displays the contents of one or more folders in a Windows Explorer -style presentation |
EJMPopup | default pop-up (1) | Creates a pop-up menu |
EJMLogon | CMBLogonPanel | Displays a window for logging on to the federated servers. The window allows users to change their passwords. |
EJMItemUpdateHandler | CMBItemAttributesEditor | Displays a window with which users can update index class and indexing attributes for an item |
Note:
(1)You can suppress the default pop-up menu by setting a property in the CMBSearchResultsViewer and CMBFolderViewer beans. In this way, you can replace the default pop-up with a custom pop-up menu. |
EIP includes many new events that provide greater flexibility when creating a client application. For more information about the new events provided in EIP , refer to the OO and Internet Application Programming Guide section, "Understanding and using JavaBeans - visual beans".
ContentConnect event | EIP event | Action emitting event |
---|---|---|
EJMTemplateChangeEvent | CMBTemplateSelectedEvent | Select a template |
EJMTItemsSelectedEvent | CMBViewDocumentEvent | Double-click an item in the search results viewer |
EJMPopupEvent | CMBItemsPopupEvent (1) | Right click a document in the search results viewer or folder viewer |
Note:
(1) In EIP you can create a custom pop-up menu that listens for the CMBFolderPopupEvent and CMBItemPopupEvent events. These events are emitted when a user right clicks a folder in the tree pane or a document in a details pane, respectively. If you use a custom pop-up menu, you must set to false the property DefaultPopupEnabled in the search results viewer bean and the folder viewer bean. |
In EIP the connection bean is CMBConnection and is in the Java package com.ibm.mm.beans
In EIP the viewer bean is CMBDocumentViewer and is in the Java package com.ibm.mm.beans.gui
ClientDemo.java is in the ejmroot\samples directory. ClientSampleApp.java is in the cmbroot\capp\samples directory. To follow the example in this section you might want to edit or print both ClientDemo.java and ClientSampleApp.java.
The following list summarizes the changes:
Example:searchResultsViewer.setExploreOnViewFolder(true);
Example:CMBLogon.setConnection(CMBConnection)
Note that in ContentConnect the connection bean ( FederationMgr) had a similar property: setFederationMgr(FederationMgr1), but it was only necessary to set the property for the following three beans:
Example: CMBLogonPanel logonPanel = new CMBLogonPanel(); logonPanel.addLogonCompletedListener(this); logonPanel.addLogonCancelledListener(this); private void logon() { JFrame jf=new JFrame(); logonDialog.setModal(true); logonDialog.setBounds(150, 150, 300, 300); logonDialog.getContentPane().setLayout(new BorderLayout()); logonDialog.getContentPane().add(logonPanel); logonDialog.setVisible(true); } public void onLogonCompleted(CMBLogonCompletedEvent e) { System.out.println(" logon completed close dialog"); logonDialog.dispose(); } public void onLogonCancelled(CMBLogonCancelledEvent e) { System.out.println(" Logon has been cancelled, Exiting... " ); logoff(); }
Example:searchTemplateViewer.setStartSearchButtonVisible(true); searchTemplateViewer.setStopSearchButtonVisible(true);
Unless your pop-up menu is a custom application, you can delete any mention of EJMPopup. If your pop-up menu is a custom application, you can set the property DefaultPopupEnabled to false and implement the appropriate event interfaces.
itemAttributesEditor.addEditCompletedListener(this); itemAttributesEditor.addEditCancelledListener(this); public void onEditItemAttributes(CMBEditItemAttributesEvent e) { JDialog dialog = new JDialog(); itemAttributesEditor.setItem(searchResultsViewer.getSelectedItem()); dialog.add(itemAttributesEditor); dialog.setVisible(true); } public void onEditCompleted(CMBEditCompletedEvent e) { System.out.println(" Edit has been completed, closing dialog... " ); attributesEditorDialog.dispose(); } public void onEditCancelled(CMBEditCancelledEvent e) { System.out.println(" Edit has been cancelled, closing dialog... " ); attributesEditorDialog.dispose(); }