On Mar 5, 2008, at 10:26 AM, Christian Koeberl wrote:
will render the <html> tags (outside the <t:container>) every time
the
component is used (in another component, in my case).
I just tried this out with 5.0.10 - with my test it doesn't render the
<html> tags.
I checked in jumpstart 3.3.3 as well, and it has the same problem
(see
BasicCustomComponent).
I don't understand what this has to do with BasicCustomComponent!?
BasicCustomComponent demonstrates a simple component, which also
produces the extraneous html tags when rendered:
<html><head><link href="../../assets/tapestry/default.css"
rel="stylesheet" type="text/css"></head><body><h1>Basic Custom
Component</h1>
This page shows how simple a component can be.
Here we've created one called BoldItalicDisplay and used it to display
a message in bold type and
italics:<br><br><html><body><strong><em>This message was generated in
getMessage() on Tue Mar 04 19:22:44 MST 2008.</em></strong></body></
html><br><br>
The BoldItalicDisplay component has a java ...
I tried your code verbatim and I here's what I get rendered:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
"><html xmlns="http://www.w3.org/1999/xhtml"><head><link href="assets/
tapestry/default.css" rel="stylesheet" type="text/css"><title>Test</
title></head><body><h1>Test</h1><html>
<a accesskey="a" class="x" href="start" id="pagelink"
title="Hello">Start</a>
</html></body></html>
This is with both 5.0.10 and 5.0.11-SNAPSHOT, so now I'm a little
flummoxed.
J
Here's my code which doesn't render the tags:
TestComponent.tml (in components):
<html>
<t:container xmlns:t=
"http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<a t:type="PageLink" page="${page}" href="#" accesskey="$
{accessKey}"
title="${title}" class="${cssClass}">${page}</a>
</t:container>
</html>
TestComponent.java (in components):
public class TestComponent
{
@Parameter
private String page;
@Parameter
private String accessKey;
@Parameter
private String title;
@Parameter
private String cssClass;
// getters
}
Start.tml (in pages):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<head>
<title>Test</title>
</head>
<body>
<h1>Test</h1>
<a t:id="testComponent"></a>
</body>
</html>
Start.java (in pages):
public class Start
{
@Component(parameters = {"page=literal:Start",
"accessKey=literal:a", "title=literal:Hello", "cssClass=literal:x"})
private TestComponent testComponent;
}
Produces this output:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="/assets/tapestry/default.css" rel="stylesheet"
type="text/css">
<title>
Test
</title>
</head>
<body>
<h1>
Test
</h1>
<a accesskey="a" class="x" href="/start" id="pagelink" title="Hello">
Start
</a>
</body>
</html>
--
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]