Skip to Content

CCO Plugin Development

Dear Experts

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

Thanks,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

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

    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

    Add comment
    10|10000 characters needed characters exceeded