Hi folks,
I have a Seam-gen project with the following structure:
view/stylesheet/theme.css
| view/layout/template.xhtml
|
| view/home.xhtml (uses template.xhtml)
| view/admin/home.xhtml (uses template.xhtml)
The template references the stylesheet as follows:
<link rel="stylesheet" type="text/css"
href="#{request.contextPath}/stylesheet/theme.css"/>
This works well at runtime, but not within the Visual Editor, which doesn't pick up
the stylesheet. Giving the href a relative location like './stylesheet/theme.css'
works well for views within the root 'view' folder, but not for views within
sub-folders.
My current workaround is to add the relative path to the stylesheet within the template.
<!-- This href enables pages in first-level sub-folders to access the css -->
| <link rel="stylesheet" type="text/css"
href="../stylesheet/theme.css"/>
|
| <!-- This href enables root folders to access the css -->
| <link rel="stylesheet" type="text/css"
href="./stylesheet/theme.css"/>
My question is: Is there any way to avoid such a 'hack' to enable the visual
editor to view styled pages within sub-folders. Is there any way to e.g. specify the
absolute location of the stylesheet/template?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4187984#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...