Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

StyleSheet/Stack Bug?

$
0
0
Hi everyone,

It may be that I did something wrong, but I think there is an issue with JS
Stacks in 5.4 (CSS handling). I decided to create a Stack for the
DataTables component we use instead of specifying the CSS/etc on each page.

I originally had

* @Import(stylesheet="datatables/css/dataTables.bootstrap.css") public
class Index ...*
My CSS was located in:

src/main/resources/META-INF/assets/datatables/css/dataTables.bootstrap.css *
This was working fine. However, when I created a Stack, it could no longer
find the CSS:

* Render queue error in SetupRender[Index]: Unable to locate asset
'context:datatables/css/dataTables.bootstrap.css' (the file does not
exist). *
Here is getStylesheets() from my Stack:

* public List<StylesheetLink> getStylesheets() { List<StylesheetLink>
stylesheets = new ArrayList<StylesheetLink>(); stylesheets.add(new
StylesheetLink(assetSource.getContextAsset("datatables/css/dataTables.bootstrap.css",
null))); return stylesheets; }*

I tried everything I could think of to try to make T5.4 find the CSS, but
nothing worked. Then, on a whim, I moved the CSS to:

* src/main/webapp/datatables/css/dataTables.bootstrap.css*

The Stack then started working and found the CSS.

So, my question is, shouldn't @Import(stylesheet="...") and the Stack's
getStylesheets() handle the same CSS locations/paths or was I doing
something bad?

Thanks,

mrg

PS. I tried to get the Stack to find other CSS/Less under
src/main/resources/META-INF, too, and none of those worked.

Viewing all articles
Browse latest Browse all 5648

Trending Articles