Plugin-Development: loading JS oder CSS-Files

Description
DreiBaer
Posts: 9
Joined: Thu Oct 18, 2018 9:52 am

Plugin-Development: loading JS oder CSS-Files

Postby DreiBaer » Tue Nov 13, 2018 4:10 pm

Hello,

in my plugin development I have some Java-Code generating H>TML-Code for a widget of a Live-Report. I just want to load the JS-File oder CSS-File which are in any folder in parallel to my Java-Files:
src/com.polarion.myPlugin/view
src/com.polarion.myplugin/view/styles/style.css
src/com.polarion.myplugin/view/scripts/script.js

Code: Select all

Java-Code

....

   private static final String STYLE_CSS = "style.css";

....

   /*--------------------------------------------
        * include Stylesheets
        * ---------------------------------------- */
      HtmlTagBuilder link = builder.tag().byName("link");
      link.attributes().byName("rel", "stylesheet");
      link.attributes().byName("type", "text/css");
      link.attributes().byName("href", myContext.resourceUrl(STYLE_CSS));
...



But when I load the HTLM in browser the js and css could not be found.
1. How can check where Polarion is going to search for these files?
2. Or: What do I have to do, to get these files loaded or at least distributetd to the server?


Best Regards
DreiBaer

Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 9 guests