You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Josh Joy <jo...@yahoo.com> on 2007/03/30 02:22:00 UTC
spans leaving behind extra whitespace after page generation
Hi,
I generate a lot of dynamic content using @If and
@Else and @For within
span tags. Within these span tags is the actual
content that becomes
generated. This works, no issues so far. My only
concern, is that these
span tags containing the jwcid with the various tags
leave behind empty
lines, whitespace. While they obviously generate the
content, tapestry
is not removing this whitespace perse. When used in
conjuction with img
tags, the extra whitespace does become an issue on
browsers as they will
actually translate the whitespace between my img tags
as intended
whitespace rather than ignore them, thus introducing
unwanted spacing
between my images.
My question is, for my span tags with jwcid
atttributes, after Tapestry
processses these can I somehow ask it to remove the
tag and the
whitespace, rather than just removing the tag and
leaving behind
whitespace in it's place?
I'm using tapestry 4.0.2
Thanks,
Josh
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: spans leaving behind extra whitespace after page generation
Posted by Howard Lewis Ship <hl...@gmail.com>.
Tapestry 4 doesn't have any real knowledge of the content of your
page. It leaves a lot of excess whitespace in place because it can't
tell if it is significant (and if you use, say <pre>, it might be).
I tend to put extra whitespace INSIDE the tags, i.e.:
<span jwcid="@If" ...
>Something</span
><span jwcid="@Else"
>Alternative</span
>
Looks ugly, but works. Also <span jwcid="$remove$"> is useful.
On 3/29/07, Josh Joy <jo...@yahoo.com> wrote:
> Hi,
>
> I generate a lot of dynamic content using @If and
> @Else and @For within
> span tags. Within these span tags is the actual
> content that becomes
> generated. This works, no issues so far. My only
> concern, is that these
> span tags containing the jwcid with the various tags
> leave behind empty
> lines, whitespace. While they obviously generate the
> content, tapestry
> is not removing this whitespace perse. When used in
> conjuction with img
> tags, the extra whitespace does become an issue on
> browsers as they will
> actually translate the whitespace between my img tags
> as intended
> whitespace rather than ignore them, thus introducing
> unwanted spacing
> between my images.
> My question is, for my span tags with jwcid
> atttributes, after Tapestry
> processses these can I somehow ask it to remove the
> tag and the
> whitespace, rather than just removing the tag and
> leaving behind
> whitespace in it's place?
>
> I'm using tapestry 4.0.2
>
> Thanks,
> Josh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org