Make link an "any" component. Then change href to be:
href="prop:cssFile"
Tapestry will "do the right thing" for you.
Or, more completely:
<link t:type="Any" href="prop:cssFile" .... />
Robert
On May 3, 2007, at 5/32:03 PM , Fidel Chavarria wrote:
I want to use the asset component instead of <link rel="stylesheet"
type="text/css" media="screen" href="css/screen.css"/>
what i should do?
********My component class ******
package net.caimito.savila.tapestry.components;
import org.apache.tapestry.Asset;
import org.apache.tapestry.annotations.Inject;
/**
* @author mailto:[EMAIL PROTECTED] Fidel Chavarria
*
*/
public class ActionLayout {
@Inject("context:css/screen.css")
private Asset cssFile;
public Asset getCssFile() {
return cssFile;
}
}
********** component Template ******
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<head>
<link rel="stylesheet" type="text/css" media="screen"
href="css/screen.css"/>
</head>
--
View this message in context: http://www.nabble.com/-T5--How-to-
call--Asserts-in-component-template-tf3688366.html#a10311227
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]