You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Chaitanya Laxminarayan <Ch...@webifyinc.com> on 2003/06/06 23:36:58 UTC

classpath question

<span jwcid="@Script" script="/css/contents.script"/>

what does "/" refer to in the classpath? Is it WEB-INF/classes?

Chaitanya

-----Original Message-----
From: Mindbridge [mailto:mindbridgeweb@yahoo.com]
Sent: Friday, June 06, 2003 4:06 PM
To: Tapestry users
Subject: Re: how do you link in stylesheets/javascript


Hi,


Stylesheet:

The following line seems to define what you need properly:

<span jwcid="@Shell" stylesheet="ognl:assets.stylesheet" title="Webify
Health Services Network">

What the "ognl:assets.stylesheet" means, however, is that you need to
declare an 'asset'  called 'stylesheet' that points to your stylesheet. You
can do that in your .page file using the following line:

<context-asset name="stylesheet" path="css/claimsnet.css"/>

There are different types of assets, this one refers to files in the web
application context (where the web pages typically reside). There is
probably a simpler way to do that, but I have not followed this part of the
framework development (someone else help out?)


Script:

Again, your code is correct with one small exception:

<span jwcid="@Script" script="/css/contents.script"/>

The path that is passed here refers to the classpath (where the Java classes
usually reside), rather than the context path. I am guessing that in your
case this file is not on the classpath, but in the context instead.


Btw, here is a link to Component Reference (in case you don't already use it
:)

http://jakarta.apache.org/tapestry/doc/ComponentReference/index.html

It contains info on the standard Tapestry components and may be helpful in
similar situations.

Best regards,
-mb

----- Original Message ----- 
From: "Chaitanya Laxminarayan" <Ch...@webifyinc.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Friday, June 06, 2003 8:47 PM
Subject: how do you link in stylesheets/javascript


How do I link in stylesheets/javascript in my pages? Here is the code I am
using. Please be detailed in your answer. I am a newbie to Tapestry.

Here is my html template. It render properly but with out the style sheets
or javascript?

<html>
<head>
 <link rel="stylesheet" type="text/css" href="css/claimsnet.css"
title="style">
 <title>Webify Health Services Network</title>
</head>

<span jwcid="$content$">
<span jwcid="@Shell" stylesheet="ognl:assets.stylesheet" title="Webify
Health Services Network">
<body jwcid="@Body">
<span jwcid="@Script" script="/css/contents.script"/>
</body>
</span>
</span>
</html>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org