myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henry Chang" <henrychan...@hotmail.com>
Subject RE: [Trinidad] How to use <tr:document>?
Date Thu, 10 Jul 2008 05:00:28 GMT
Richard,

I see. Thank you very much. But one thing to mention is that as with JSF
1.2, it is not necessary to put <f:verbatim> around normal HTML tags. This
is known as content interweaving in JSF 1.2.


-Henry Chang

-----Original Message-----
From: Richard Yee [mailto:richard.k.yee@gmail.com] 
Sent: Thursday, July 10, 2008 11:30 AM
To: MyFaces Discussion
Subject: Re: [Trinidad] How to use <tr:document>?

Henry,
This is how I put a link to an external stylesheet in my .jspx files

<?xml version='1.0' encoding='ISO-8859-1'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:c="http://java.sun.com/jstl/core"
          xmlns:trh="http://myfaces.apache.org/trinidad/html"
          xmlns:tr="http://myfaces.apache.org/trinidad">
  <jsp:directive.page contentType="text/html;charset=ISO-8859-1"/>
  <f:view>
    <tr:document title="index">
    <f:verbatim>
      <link rel="stylesheet" href="Path to CSS file"/>
    </f:verbatim>
.
.
.
  </tr:document>
</tr:view>

-Richard

On Wed, Jul 9, 2008 at 6:41 PM, Henry Chang <henrychang04@hotmail.com>
wrote:
> Hi all,
>
>
>
> Can anybody show me the correct way of using the <tr:document> with a link
> to an external CSS style sheet and JavaScript file? The documentation says
> that it will automatically create each of the standard root elements of an
> HTML page such as <html>, <body> and <head>. But there is no attribute
in
> controlling any of these tags. For example, I would like to write:
>
>
>
> < head title="Page Title">
>
>     <link href="css/app.css" rel="stylesheet" type="text/css" />
>
> </head>
>
>
>
> This links to an external CSS style sheet. How do I do that with only
> <tr:document>? Currently all my pages do not use <tr:document>, but
instead
> use the following:
>
>
>
> <f:view>
>
>   <trh:html>
>
>     <trh:head title="Page Title">
>
>       <link href="css/app.css" rel="stylesheet" type="text/css" />
>
>     </trh:head>
>
>     <trh:body>
>
>                ...
>
>     </trh:body>
>
>   </trh:html>
>
> </f:view>
>
>
>
> Is this the right way to use Trinidad?
>
>
>
> Best Regards,
>
> Henry Chang
>
>


Mime
View raw message