[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-1160) facelets template with css and subdirs do not render page in design and runtime

Max Andersen (JIRA) jira-events at lists.jboss.org
Wed Oct 24 11:57:01 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBIDE-1160?page=comments#action_12384154 ] 
            
Max Andersen commented on JBIDE-1160:
-------------------------------------

why don't you just use relative paths ?

The solution we could provide (down the road) would be to support users to set template values for the various properties found in EL so we can resolve them. e.g. set #{facesConect.externalContext.requestContextPath} to the empty string or e.g. /view if you had your folders in view.

> 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

        



More information about the jbosstools-issues mailing list