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

Activity

Show:
Jan Thielemann
October 31, 2014, 2:46 PM

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

Jan Thielemann
October 31, 2014, 3:19 PM

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

Fixed

Assignee

Jan Thielemann

Reporter

Jan Thielemann

Labels

Tested By

Hiep Lq

Priority

Major