Load custom ToolbarButton Images (IAction) from OSGi Bundle

Description

Currently in Actions.java in the method getActionImage, the image is loaded from the org.adempiere.base bundles class loader by calling:

InputStream inputStream = Actions.class.getClassLoader().getResourceAsStream(path);

This has a disadvantage since you would either have to export action.images in your bundles manifest - which can cause split package problem when having 2 or more bundles for toolbarbuttons - or you have to create a fragment holding your images.

This could be solved by loading the image directly from the osgi bundle via the actions class loader (see patch)

Environment

None

Attachments

1

Activity

Jan Thielemann 
October 31, 2014 at 3:19 PM

See also: https://groups.google.com/forum/#!topic/idempiere/BZhQdXUvf5k

Jan Thielemann 
October 31, 2014 at 2:46 PM

With the patch you don't need to export your action.images package anymore

Fixed

Details

Assignee

Reporter

Labels

Tested By

Hiep Lq

Priority

Created October 31, 2014 at 2:44 PM
Updated January 5, 2015 at 11:43 PM
Resolved November 19, 2014 at 6:52 PM