[
http://jira.jboss.com/jira/browse/JBIDE-1160?page=comments#action_12384250 ]
Ronald van Kuijk commented on JBIDE-1160:
-----------------------------------------
I cannot use relative paths because the css (defined in the template) is loaded relative
to the page, not relative to the template. This is a facelets 'thing' not
something I specifically want. So because of this, the relative path is/should always be
different and that is not possible. e.g. style/style.css for the home.xhtml,
../style/style.css for page1.1.xhtml and page2.1.xhtml)
I could use/make multiple templates that inherit from one another in one way or another,
but that is also additional maintenance
Being able to set properties in EL would be great. Bij /view you mean what currently is
the WTP WebContent dir? That is already 'ignored'
facelets template with css and subdirs do not render page in design
and runtime
-------------------------------------------------------------------------------
Key: JBIDE-1160
URL:
http://jira.jboss.com/jira/browse/JBIDE-1160
Project: JBoss Tools
Issue Type: Bug
Affects Versions: 2.0.0.Beta4
Environment: Windows 2000, jdk 1.5, eclipse 3.3
Reporter: Ronald van Kuijk
Assigned To: Sergey Vasilyev
Priority: Minor
I have a (seam) project which uses facelets. The folder structure is like this:
root
|- layout
| |- template.xhtml
|- style
| |- style.css
|- folder1
| |- page1.1.xhtml
|- folder2
| |- page2.1.xhtml
|- home.xhtml
All pages reference this template in a ui:composition tag. The template contains a link
to the css like
<link rel="stylesheet" type="text/css" media="all"
href="/style/style.css" />
This way, all pages look good when designing them.
But when I publish my app on a none root folder in my appserver e.g.
http://localhost:8080/myApp
none of the pages use the stylesheet. It is loaded from /style instead of /myApp/style
Using
<link rel="stylesheet" type="text/css" media="all"
href="style/style.css" /> (no initial slash in the href)
only the homepage looks good in both design time and runtime
Getting all the pages working runtime, I changed the link to
<link rel="stylesheet" type="text/css" media="all"
href="#{facesContext.externalContext.requestContextPath}/style/style.css" />
This works great in runtime, but makes designing the pages in the correct look and feel
impossible.
It would be great if the designer could 'ignore' the
#{facesContext.externalContext.requestContextPath} part of the href. so pages look good
both design and runtime.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira