super(ureq, wControl);
mainVc = createVelocityContainer("cssjsdemo");
// the first demo has a css (which must be removed if not used) and a js lib
modalVc1 = createVelocityContainer("modal1");
JSAndCSSComponent jscss1 = new JSAndCSSComponent("jsAndCssForDemo", this.getClass(), new String[]{"js1.js","js1b.js"}, "style1.css", true);
modalVc1.put("jsAndCssForDemo", jscss1); // we attach it to the modalComponent, so that it is activated when this component shows up on screen.
// the second demo has a css (which is not removed even if not used anymore) and a js lib
modalVc2 = createVelocityContainer("modal2");
JSAndCSSComponent jscss2 = new JSAndCSSComponent("jsAndCssForDemo", this.getClass(), new String[]{"js2.js","js2b.js"}, "style2.css", false);
modalVc2.put("jsAndCssForDemo", jscss2); // we attach it to the modalComponent, so that it is activated when this component shows up on screen.
// js functions override test
linkjs1 = LinkFactory.createButtonSmall("link.js1", mainVc, this);
jsVc1 = createVelocityContainer("jstest1");
JSAndCSSComponent jstest1 = new JSAndCSSComponent("jstest1includes", this.getClass(), new String[]{"jsfuncdef1.js"}, null, false);
jsVc1.put("jstest1includes", jstest1);
linkjs2 = LinkFactory.createButtonSmall("link.js2", mainVc, this);
jsVc2 = createVelocityContainer("jstest2");
JSAndCSSComponent jstest2 = new JSAndCSSComponent("jstest1includes", this.getClass(), new String[]{"jsfuncdef2.js"}, null, false);
jsVc2.put("jstest2includes", jstest2);
jsTestP = new Panel("jstestP");
mainVc.put("jstestpanel", jsTestP);