Extending the web version of the toolbar
This recipe presents the steps to accomplish exactly what we had done in the previous recipe, but for the web version of ADempiere.
How to do it...
1. Add a
btnMail
as a member of theorg.adempiere.webui.component. CWindowToolbar
class by adding the following line:private ToolBarButton btnMail;
2. Add the following code in to the
init
method in theCWindowToolbar.java
class:btnMail = createButton("SendMail", "SendMail","SendMail"); //Line# 156 btnMail.setVisible(true); btnMail.setDisabled(false); //Line#168 after all the toolbar buttons are initialized
3. Add the following code in to the
configureKeyMap
method in theCWindowToolbar.java
class:ctrlKeyMap.put(VK_M, btnMail);//Line# 277
4. Add the following method in to the
org.adempiere.webui.event.ToolbarListener
class:/** * Send Mail */ public void onSendMail();
5. Clean and build the
adempiere_360
project.6. Add the following code in to the
actionPerformed
method in theAPanel.java
class:else if...