Re: T5: Handling of images

2007-08-30 Thread Nick Westgate
An even better solution IMO is to revive the Img component, but move the domain into another parameter defaulted to "context". Source here, renamed Image: http://wiki.apache.org/tapestry/Tapestry5ImageComponent E.g. Cheers, Nick. Nick Westgate wrote: Situations like this are exactly where i

Re: T5: Handling of images

2007-08-30 Thread Nick Westgate
Situations like this are exactly where it's needed. I think it was removed prematurely. You can just re-add the component and use it: http://wiki.apache.org/tapestry/Tapestry5AnyComponent There are another couple of example uses there. Cheers, Nick. Ted Steen wrote: Actually I dont think the

Re: T5: Handling of images

2007-08-30 Thread Ted Steen
Actually I dont think the Any component exists anymore.. its not needed because of expansions in attributes. 2007/8/30, Nick Westgate <[EMAIL PROTECTED]>: > Sorry, that should be (still not ideal) ... > > > Cheers, > Nick. > > > Nick Westgate wrote: > > Why don't you read about it here: > > http:

Re: T5: Handling of images

2007-08-30 Thread Nick Westgate
Sorry, that should be (still not ideal) ... Cheers, Nick. Nick Westgate wrote: Why don't you read about it here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/assets.html For instance, assets can be localized. Also, the Any component can be used to help previewability, e.g: Che

Re: T5: Handling of images

2007-08-30 Thread Nick Westgate
Why don't you read about it here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/assets.html For instance, assets can be localized. Also, the Any component can be used to help previewability, e.g: Cheers, Nick. Angelo Chen wrote: Hi, Both of your suggestions work, thanks, I was

Re: T5: Handling of images

2007-08-30 Thread Angelo Chen
Hi, Both of your suggestions work, thanks, I was doing it hard way. btw, what's the difference: ${asset:context:img/ok0.gif} and img/ok0.gif A.C. Filip S. Adamsen-2 wrote: > > You can also specify assets inline using the asset prefix, that is: > > ${asset:context:img/ok0.gif} > > Wor

Re: T5: Handling of images

2007-08-30 Thread Filip S. Adamsen
You can also specify assets inline using the asset prefix, that is: width="37"/> Works like a charm. Robin Helgelin skrev: On 8/30/07, Erik Vullings <[EMAIL PROTECTED]> wrote: Hi Angelo, Can't you just use (in the HTML part of your page): and put the ok0.gif image in the src/main/webapp

Re: T5: Handling of images

2007-08-30 Thread Robin Helgelin
On 8/30/07, Erik Vullings <[EMAIL PROTECTED]> wrote: > Hi Angelo, > > Can't you just use (in the HTML part of your page): > > > and put the ok0.gif image in the src/main/webapp/img folder. You could, but then you would get a wrong url when you are using an action or something on your page, such a

Re: T5: Handling of images

2007-08-30 Thread Erik Vullings
Hi Angelo, Can't you just use (in the HTML part of your page): and put the ok0.gif image in the src/main/webapp/img folder. Cheers Erik On 8/30/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > > > Hi, > > Everytime I need to display an image, I have to do something like this: > > @Inject >

RE: T5: Handling of images

2007-08-30 Thread Kolesnikov, Alexander GNI
Well, this is the price for having no XML specification ;) -Original Message- From: Angelo Chen [mailto:[EMAIL PROTECTED] Sent: 30 August 2007 10:17 To: users@tapestry.apache.org Subject: T5: Handling of images Hi, Everytime I need to display an image, I have to do something like

T5: Handling of images

2007-08-30 Thread Angelo Chen
Hi, Everytime I need to display an image, I have to do something like this: @Inject @Path("context:/images/logo3.jpg") private Asset logo; public Asset getLogo() { return logo; } then in the template: ${logo} Is there an easier way? example, I can directl