This should give you an idea.
Pseudo code:
create a service ie YourImageService
Inject into it AssetSource and YourDao (or however you have implemented
data access)
implement your logic:
YourImageService
{
Asset getImageAsset(location, id)
{
return assetSource.getContextAsset("images/" +
yourDao.getImageName(location, id));
}
}
@Inject YourImageService into your component.
Hope that helps.
On 3/02/2012 10:21 AM, Stephan Beltran wrote:
Hello,
I am currently trying to figure out how I may go about writing a custom
asset source specifically for retrieving images. The way we want it set up
is that we want an asset source that we can pass a location and id to, and
return an image location retrieved from the database, which will then
retrieve an Image Asset in it's place. What would be the best way to go
about doing this?
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org