You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by sommeralex <al...@gmail.com> on 2012/08/14 19:27:02 UTC
images dont resolve anymore
i have tooltip images which dont show up.
see:
http://www.airwriting.com/group/show/30
the tooltip is a component, which renders via the writer:
writer.element("image",
"src", "img/icon/help.png}",
"title", text,
"id", id
);
it worked with the old tapestry, 2.6, but not with the new one. The previous
issue was solved with putting the praefix context e.g
src="${context:/img/icon/money.png}" to my image, but this does not work if
i am trying it like this:
writer.element("image",
"src", "${context:/img/icon/help.png}",
"title", text,
"id", id
);
any ideas how?
the same thing is with my custom slider component, the background url (the
slider image) is not shown in the browser.
TML:
<div xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"
id="d_slider"
style=" background: url('/img/icon/slider/slider.png') repeat-x scroll 0 0
transparent;
position:relative;
width:214px;
height:42px;">
<div id="d_slider_handle"
style=" background:url('/img/icon/slider/handle.png') no-repeat scroll
center bottom transparent;
cursor:move;
height:40px;
width:30px;
position:absolute;">
</div>
</div>
--
View this message in context: http://tapestry.1045711.n5.nabble.com/images-dont-resolve-anymore-tp5715400.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: images dont resolve anymore
Posted by sommeralex <al...@gmail.com>.
created an asset and solved it with toClientURL()
thx!
--
View this message in context: http://tapestry.1045711.n5.nabble.com/images-dont-resolve-anymore-tp5715400p5715423.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: images dont resolve anymore
Posted by sommeralex <al...@gmail.com>.
it is also not working with the slash:
writer.element("image",
"src", "/img/icon/money.png",
"title", text,
"id", id
);
the produced url is:
http://www.airwriting.com/img/icon/help.png
--
View this message in context: http://tapestry.1045711.n5.nabble.com/images-dont-resolve-anymore-tp5715400p5715421.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: images dont resolve anymore
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 14 Aug 2012 14:27:02 -0300, sommeralex
<al...@gmail.com> wrote:
> writer.element("image",
> "src", "img/icon/help.png}",
> "title", text,
> "id", id
> );
You're using a relative path. Use an absolute one (starting with a slash
or a full URL) such as /img/icon/help.png.
> it worked with the old tapestry, 2.6, but not with the new one. The
> previous
> issue was solved with putting the praefix context e.g
> src="${context:/img/icon/money.png}" to my image, but this does not work
> if
> i am trying it like this:
>
> writer.element("image",
> "src", "${context:/img/icon/help.png}",
> "title", text,
> "id", id
> );
Tapestry doesn't interpret expansions when you're writing HTML through the
API. You could use AssetSource (specifically method getContextAsset()) for
situations in which the path is dynamic.
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: images dont resolve anymore
Posted by Scott <ha...@gmail.com>.
Please remove me from this mailing list. I've made several attempts to
remove my address, but have not had any success. Thanks.