
Chapter 3
127
Creating a new info window for the desktop
version
There are various info windows in ADempiere, which provide the interface to a user to nd an
entity. Various search elds are added to allow data ltering. This window is very useful when
a user has to nd out the information about a particular entity. This recipe describes the steps
involved in creating a new info window.
How to do it...
1. Go to the client/src/org/compiere/apps/search folder of your
adempiere_360 project and create an InfoMOM class which extends Info class
and implements ActionListener interface. Make sure that the title is set to
InfoMOM.
2. Add the following line in the jbInit() method in the APanel.java class:
private AppsAction aMOMInfo;
3. Add the following code in the createMenu() method in the APanel.java class:
aMOMInfo =addAction("InfoMOM", mView, KeyStroke.
getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), false);
4. This will add an entry to the View menu.
5. Clean and build the adempiere_360 project.
6. Launch the desktop version by running the org.compiere.Adempiere.java
class.
7. Log in as GardenAdmin/GardenAdmin with the GardenWorld Admin role.
8. Launch the newly added MOM Info window from the View | MOM Info menu item.
There's more...
We saw how to create a new info window. After creation, it is equally important to ensure that
the right role has the access to the right window. Let us see how we can set up the role-based
access to the newly created window.