Hi,

I have added a js file in resources in web application and set the deploy action to "deploy to target directory"

But the js file is missing when i am inspecting the web page as the file is missing under resources.

Also when i inspected whether file has been added to resources like https://current environment/application/resource it is working fine but not sure why it is not added in the project.

Pleas help me in this.

Solution

Hello Avala,

What did you to effectively ADD the file to your page?
Because putting a file in the resources is just that, put the file there. If you don't set up your page to USE this file, it won't be available in the page.

Best approach is not what you did, but instead, add the JavaScript to the JavaScript property of your theme or screen. The platform will than take care of creating and storing the file and configure the HTML to make the JavaScript available on the pages or page.

Cheers.

Solution

Eduardo Jauch wrote:

Hello Avala,

What did you to effectively ADD the file to your page?
Because putting a file in the resources is just that, put the file there. If you don't set up your page to USE this file, it won't be available in the page.

Best approach is not what you did, but instead, add the JavaScript to the JavaScript property of your theme or screen. The platform will than take care of creating and storing the file and configure the HTML to make the JavaScript available on the pages or page.

Cheers.

Thank you Eduardo,


I didn't realize that it will be just added as a resource. Thanks to you i found a way to utilize that resource in Runjavascript method.