You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by kiuma <ki...@usa.net> on 2002/10/11 11:15:34 UTC
help with
hello,
Can s1 tell me how to convert the following tag
<link rel="stylesheet" href="/webapointments/css/common.css"
TYPE="text/css"/>
in something like
<html:link rel="stylesheet" page="/css/common.css" TYPE="text/css"/>??
I know that this is not the correct form ;-)!
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: help with
Posted by James Mitchell <jm...@telocity.com>.
There are many ways to do it, here's what I do.
1. Add this to your custom tag's tld:
<tag>
<name>styleSheet</name>
<tagclass>org.opentools.struts.taglib.StyleSheetTag</tagclass>
<info>
Generate a stylesheet tag
href - URI to stylesheet (example: '/style/style.css')
</info>
<attribute>
<name>href</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
2. Include the attached file when you build your project.
3. Use the tag when referencing your .css file.
Example: (I use tiles, so in my layout.jsp I do this)
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tld/tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tld/struts-atlanta.tld" prefix="util" %>
<html:html>
<head>
<title><bean:message key="global.title"/></title>
<util:styleSheet href="/stylesheets/struts-atlanta.css"/>
</head>
<body>
<table class="tilesLayout">
<tr>
This example is from the code that runs the Struts-Atlanta web site
(http://www.open-tools.org/struts-atlanta). The source is available to
anyone who asks.
Hope that helps you.
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org
> -----Original Message-----
> From: kiuma [mailto:kiuma@usa.net]
> Sent: Friday, October 11, 2002 5:16 AM
> To: Struts Users Mailing List
> Subject: help with <link rel=....
>
>
> hello,
>
> Can s1 tell me how to convert the following tag
> <link rel="stylesheet" href="/webapointments/css/common.css"
> TYPE="text/css"/>
> in something like
>
> <html:link rel="stylesheet" page="/css/common.css" TYPE="text/css"/>??
>
> I know that this is not the correct form ;-)!
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>