You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by RR <se...@gmail.com> on 2004/09/22 00:56:07 UTC

jwcid=$remove$ question

Have a question about using <span jwcid="$remove$">. Isn't the idea
behind this that the designer can go about creating real HTML pages
with the remove wrapped around things that Tapestry eliminates?

My problem is that the pages I've been given have a bunch of
stylesheets, etc in the head content. I've eliminated the need for
that with a custom component. When I wrap the <span jwcid="$remove$">
above <html> and end it beneath the </head>, it works nicely. BUT,
when I wrap it around the </html>, I get this nasty message:
Closing tag </html> on line 152 is improperly nested with tag <span>
on line 151.

Any ideas as to how to get around this but still keep the page intact
for the designers?

Thanks,
-RR

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


Re: jwcid=$remove$ question

Posted by Terry Poot <tp...@goldenvoid.com>.
Drew Davidson wrote:

> The way that I do it is to use a custom Border component that does the 
> actual <html> shell, etc. and include that via <span jwcid="@Border" 
> ...>.
>
> For previewability I use the construct:
>
> <html jwcid="$content$">
> <head jwcid="$remove$"><link rel="stylesheet" type="text/css" 
> href="../../context/css/site.css"/></head>
> <body jwcid="$content$">
> <div id="contentPreview" jwcid="@Border" title="Parent Information" 
> buttons="ognl:components.buttons">
>   ... page content here ...
> </div>
> </body>
> </html>
>
> The advantages of this approach are:
>    * The @Shell is contained by my Border component, so I can maintain 
> the <html> and <head> behaviour in one place
>    * The css is properly loaded by the HTML editor (GoLive, 
> Dreamweaver is what we use) and gives correct preview because of the 
> relative path
>    * The "contentPreview" id of the div is not emitted to the output 
> but allows me to preview this div (the Border makes a div with 
> id="content" in the actual output), allowing me to compensate for 
> development differences in the preview.
>
> What I really want is a Dreamweaver and GoLive plugin that knows about 
> Tapestry components and can run a servlet container for preview so I 
> don't have to include this mess in my code anymore.
>
> - Drew
>
Drew: It seems like you would get the behavior you want if you removed 
the first $content$ and then removed the $remove$ entirely (but not the 
elements they're attached to). $content$ basically says to throw away 
the element containing it and everything outside of that element, 
leaving only the body. Your second $content$ (on the <body> element) 
encloses your Border component, and everything else just needs to go 
away. The $content$ on the <body> tag enclosing it should do that. If it 
isn't, I'm wondering if that's because you have 2 nested $content$ 
"components". Does the parser know how to handle that, or does it only 
honor the first one, then process the $remove$, and leave that 
extraneous <body> element behind?

The "contentPreview" is a neat idea. :)

Editor plugins would be nice. HTMLTidy does horrible things to Tapestry 
html templates as well.

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


Re: jwcid=$remove$ question

Posted by Drew Davidson <dr...@ognl.org>.
Terry Poot wrote:

> It sounds like you are wrapping things in a way that makes them 
> improperly nested. I don't know exactly where and when that will break 
> Tapestry or anything else, but since it does seem to be breaking 
> things, that would be my first suspicion as to where the problem comes 
> from. Here's an example of removing the Head for Tapestry purposes. 
> Done this way, everything nests properly as written, and also when the 
> removed element pair and its contents are actually removed.
>
> <html jwcid="@Shell">
> <head jwcid="$remove$">
> stylesheet stuff that Tapestry needs to do away with
> </head>
> <body>
> ...
> </body>
> </html>


The way that I do it is to use a custom Border component that does the 
actual <html> shell, etc. and include that via <span jwcid="@Border" ...>.

For previewability I use the construct:

<html jwcid="$content$">
<head jwcid="$remove$"><link rel="stylesheet" type="text/css" 
href="../../context/css/site.css"/></head>
<body jwcid="$content$">
<div id="contentPreview" jwcid="@Border" title="Parent Information" 
buttons="ognl:components.buttons">
   ... page content here ...
</div>
</body>
</html>

The advantages of this approach are:
    * The @Shell is contained by my Border component, so I can maintain 
the <html> and <head> behaviour in one place
    * The css is properly loaded by the HTML editor (GoLive, Dreamweaver 
is what we use) and gives correct preview because of the relative path
    * The "contentPreview" id of the div is not emitted to the output 
but allows me to preview this div (the Border makes a div with 
id="content" in the actual output), allowing me to compensate for 
development differences in the preview.

What I really want is a Dreamweaver and GoLive plugin that knows about 
Tapestry components and can run a servlet container for preview so I 
don't have to include this mess in my code anymore.

- Drew

-- 
+---------------------------------+
< Drew Davidson | OGNL Technology >
+---------------------------------+
|  Email: drew@ognl.org          /
|    Web: http://www.ognl.org   /
|    Vox: (520) 531-1966       <
|    Fax: (520) 531-1965        \
| Mobile: (520) 405-2967         \
+---------------------------------+


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


Re: jwcid=$remove$ question

Posted by Terry Poot <tp...@goldenvoid.com>.
It sounds like you are wrapping things in a way that makes them 
improperly nested. I don't know exactly where and when that will break 
Tapestry or anything else, but since it does seem to be breaking things, 
that would be my first suspicion as to where the problem comes from. 
Here's an example of removing the Head for Tapestry purposes. Done this 
way, everything nests properly as written, and also when the removed 
element pair and its contents are actually removed.

<html jwcid="@Shell">
<head jwcid="$remove$">
stylesheet stuff that Tapestry needs to do away with
</head>
<body>
...
</body>
</html>

RR wrote:

>Have a question about using <span jwcid="$remove$">. Isn't the idea
>behind this that the designer can go about creating real HTML pages
>with the remove wrapped around things that Tapestry eliminates?
>
>My problem is that the pages I've been given have a bunch of
>stylesheets, etc in the head content. I've eliminated the need for
>that with a custom component. When I wrap the <span jwcid="$remove$">
>above <html> and end it beneath the </head>, it works nicely. BUT,
>when I wrap it around the </html>, I get this nasty message:
>Closing tag </html> on line 152 is improperly nested with tag <span>
>on line 151.
>
>Any ideas as to how to get around this but still keep the page intact
>for the designers?
>
>Thanks,
>-RR
>
>---------------------------------------------------------------------
>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


Re: jwcid=$remove$ question

Posted by Howard Lewis Ship <hl...@gmail.com>.
Please investigate <span jwcid="$content$">  This allows you to "trim"
the page above and below a tag. You nest the tag for your custom
Border component inside.


On Tue, 21 Sep 2004 16:56:07 -0600, RR <se...@gmail.com> wrote:
> Have a question about using <span jwcid="$remove$">. Isn't the idea
> behind this that the designer can go about creating real HTML pages
> with the remove wrapped around things that Tapestry eliminates?
> 
> My problem is that the pages I've been given have a bunch of
> stylesheets, etc in the head content. I've eliminated the need for
> that with a custom component. When I wrap the <span jwcid="$remove$">
> above <html> and end it beneath the </head>, it works nicely. BUT,
> when I wrap it around the </html>, I get this nasty message:
> Closing tag </html> on line 152 is improperly nested with tag <span>
> on line 151.
> 
> Any ideas as to how to get around this but still keep the page intact
> for the designers?
> 
> Thanks,
> -RR
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 



-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com

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