O'Reilly logo

ADempiere 3.6 Cookbook by Ajit Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 the org.adempiere.webui.component. CWindowToolbar class by adding the following line:
    private ToolBarButton btnMail;
    
  2. Add the following code in to the init method in the CWindowToolbar.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 the CWindowToolbar.java class:
    ctrlKeyMap.put(VK_M, btnMail);//Line# 277
    
  4. Add the following method ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required