You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Toby Hobson <to...@btinternet.com> on 2008/05/02 23:04:04 UTC

Dynamic asset

I am developing a photo sharing application and i would like to display a photo whose url is retrieved dynamically. I have a property "photo" on my ViewPhoto page and my ViewPhoto.tml is:

<img src=${photo.url}" /> but this causes the onActivate(Long) method to fall over. I've also tried <img src="${asset:context:photo.url}" /> but this doesn't work because tapestry then looks for a file called photo.url. I know I can inject a static asset into my page but how do I handle an asset which is determined at runtime?

Thanks

Toby


Re: Dynamic asset

Posted by Josh Canfield <jo...@thedailytube.com>.
> <img src=${photo.url}" /> but this causes the onActivate(Long) method to fall over.

How are you generating the url? It sounds like it's relative to the
current page, and it should not be. Does <img src="/${photo.url}"/> do
what you want?

Josh

On Fri, May 2, 2008 at 2:04 PM, Toby Hobson <to...@btinternet.com> wrote:
> I am developing a photo sharing application and i would like to display a photo whose url is retrieved dynamically. I have a property "photo" on my ViewPhoto page and my ViewPhoto.tml is:
>
> <img src=${photo.url}" /> but this causes the onActivate(Long) method to fall over. I've also tried <img src="${asset:context:photo.url}" /> but this doesn't work because tapestry then looks for a file called photo.url. I know I can inject a static asset into my page but how do I handle an asset which is determined at runtime?
>
> Thanks
>
> Toby
>
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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