[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1060) Documentation enhancement for themes (add JSF requestContextPath to example)

Arjan van Bentem (JIRA) jira-events at lists.jboss.org
Fri Mar 16 07:11:31 EDT 2007


Documentation enhancement for themes (add JSF requestContextPath to example)
----------------------------------------------------------------------------

                 Key: JBSEAM-1060
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1060
             Project: JBoss Seam
          Issue Type: Feature Request
          Components: Documentation
    Affects Versions: 1.2.0.GA
         Environment: All
            Reporter: Arjan van Bentem
            Priority: Optional



I know the following is actually JSF related:

http://fisheye.jboss.com/browse/JBoss/jboss-seam/doc/reference/en/modules/i18n.xml?r=1.14#l278 shows the following example:

        <link href="#{theme.css}" rel="stylesheet" type="text/css" />

Maybe the following text can be added right below it:

        Or, when the page definition resides in some subdirectory:

        <link href="#{facesContext.externalContext.requestContextPath}/#{theme.css}" rel="stylesheet" type="text/css" />

So:

        <para>
            Or, when the page definition resides in some subdirectory:
        </para>
	        
        <programlisting><![CDATA[
            <link href="#{facesContext.externalContext.requestContextPath}/#{theme.css}" rel="stylesheet" type="text/css" />
        ]]></programlisting>
	

Furthermore, http://fisheye.jboss.com/browse/JBoss/jboss-seam/doc/reference/en/modules/i18n.xml?r=1.14#l264 shows

        css ../screen.css
        template template.xhtml

while http://fisheye.jboss.com/browse/JBoss/jboss-seam/doc/reference/en/modules/i18n.xml?r=1.14#l284 refers to that last line using

        <ui:composition xmlns="http://www.w3.org/1999/xhtml"
            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:f="http://java.sun.com/jsf/core"
            template="#{theme.template}">

When this ui:composition is used in a page file that resides in a subdirectory (such as /admin) then the last line needs a leading slash. One could also add that leading slash to the property file. Again, this is a JSF issue. But when the template is not found then (in my world) one does not get any meaningful error message other than a Tomcat "The requested resource (xxx.seam) is not available" when JSF cannot find the template file (while the logs show that Seam is not having any trouble setting up the components as used in that page). This might be avoided by using the leading slash in the example:

        css ../screen.css
        template /template.xhtml

So:

        <programlisting><![CDATA[css ../screen.css
        template /template.xhtml]]></programlisting>

(I actually also wonder why the css refers to some relative path in this example, but an erroneous value would only yield a broken layout when the stylesheet is not found, and is much easier solved -- especially when knowing about facesContext.externalContext.requestContextPath).

-- 
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 seam-issues mailing list