On Monday 29 April 2002 02:49 pm, [EMAIL PROTECTED] wrote:

Damn, that's beautiful!  Thanks Howard, that works like a champ.  As much as 
I love Java, the less I have to write the happier I am ;)

> > I'm trying to use the Image component to show an image

> You typically define your assets as part of the
> component specification.  Tapestry tries to limit Java
> coding to interesting things.
>
> > Home.html
> >    <span jwcid="myImage"/>
>
> I tend to write this as <img jwcid="myImage"/> just to
> be clear on what I expect it to do.  Tapestry doesn't
> care ... you could say <lemon-jello jwcid="myImage"/> if
> your wanted.

Gotcha.  Use the correct tag wherever possible.

> > Home.jwc
> >    <component id="myImage" type="Image">
> >      <binding name="image" property-path="homeImage"/>
> >   < /component>
>
> Change the path to "assets.homeImage".  Every component
> exports a property, assets, that is a map of all assets
> defined for the component (in the next section).

OK - I missed that.  Gotta go back and read the docs again now that I'm 
getting an idea of how things work.

>   <private-asset name="homeImage"
> path="/package/home.gif"/>
>
> (Please check the attributes ... from memory I may make
> a mistake).

Just FYI, 'path' is 'resource-path'.

> That's it ... no Java code.
>
> Sidenote:  there are one or two places in Tapestry where
> things don't work if the code is generated in
> the "default package".  Always use a real package to
> avoid problems.

Gotcha.

> > Home.java
> >    public IAsset getHomeImage()
> >    {
> >       return getAsset( "home.gif" ) ;
> >    }
> >
> > Deployment 'classes' directory:
> >   home.gif
> >
> > This isn't working and I'm pretty sure it's because I
>
> don't have a good grip
>
> > on how to use assets.  This is a private asset I'm
>
> trying to use.  Any help
>
> > would be greatly appreciated.  I'm really enjoying
>
> learning Tapestry, but I
>
> > want to go faster!
> >
> > Thanks from a new Tapestry fan :),
> > Rowland

_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to