You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by Irv Salisbury <ir...@gmail.com> on 2006/09/20 04:05:47 UTC

common areas

In shale, what is the best way to handle common areas of the page?  So, if I
had something like

    <html>
        <head>
            <link href="css/PCX.css" rel="stylesheet"
type="text/css"></link>
            <!-- Now I want subpages to be able to put stuff here such as
the line below -->
            <link href="css/mainPage.css" rel="stylesheet"
type="text/css"></link>
            <!-- I want each subpage to control the title, so this needs to
be a "callback" as well -->
            <title>Some title</title>
            <script language="JavaScript" type="text/JavaScript"
src="js/PCX.js"></script>

            <script language="JavaScript" type="text/JavaScript"
src="js/mainPage.js"></script>
        </head>
        <body id="main" class="main">
            <div class="mainOuterDiv">

Re: common areas

Posted by Irv Salisbury <ir...@gmail.com>.
Ok, so gmail just sent the above without me getting to finish. I must have
hit some weird quick key...

Would I just setup multiple .jspf pages and include them at the appropriate
time?  Or is there a way to do:

<html>
    <head>
         <link href="mycss.css"></link>
         <@renderPageCss>
         <ti...@pageTitle></title>

etc.

(I have done things like this with Tapestry and XSL)  I just want the shale
/ JSF way to do it.  It is really templating....

Irv

On 9/19/06, Irv Salisbury <ir...@gmail.com> wrote:
>
> In shale, what is the best way to handle common areas of the page?  So, if
> I had something like
>
>     <html>
>         <head>
>             <link href="css/PCX.css" rel="stylesheet"
> type="text/css"></link>
>             <!-- Now I want subpages to be able to put stuff here such as
> the line below -->
>             <link href="css/mainPage.css" rel="stylesheet"
> type="text/css"></link>
>             <!-- I want each subpage to control the title, so this needs
> to be a "callback" as well -->
>             <title>Some title</title>
>             <script language="JavaScript" type="text/JavaScript"
> src="js/PCX.js"></script>
>
>             <script language="JavaScript" type="text/JavaScript"
> src="js/mainPage.js"></script>
>         </head>
>         <body id="main" class="main">
>             <div class="mainOuterDiv">
>
>