Skip to Content
0

CCO Plugin Development

Dec 05, 2017 at 07:44 AM

38

avatar image
Former Member

Dear Experts

How Can I inject multiple JS files in The sales Screen ?

Thanks,

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
avatar image
Former Member
Dec 05, 2017 at 11:27 AM
0

Hi Mohamed,

The easiest way to do that, is simply to use the @JSInject annotation several times.

Like in the example below:

	@JSInject(targetScreen = TargetScreens.SALES_SCREEN)
	public InputStream jsInject1() {
		return PluginBackend.class.getResourceAsStream("/PluginFrontEnd.js");
	}
	
	@JSInject(targetScreen = TargetScreens.SALES_SCREEN)
	public InputStream jsInject2() {
		return PluginBackend.class.getResourceAsStream("/PluginFrontEnd2.js");
	}
	
	@JSInject(targetScreen = TargetScreens.SALES_SCREEN)
	public InputStream jsInject3() {
		return PluginBackend.class.getResourceAsStream("/PluginFrontEnd3.js");
	}

Best Regards

Michael

Share
10 |10000 characters needed characters left characters exceeded