On Fri, 09 Nov 2012 16:07:02 -0200, o3005659 <o3005...@rtrtr.com> wrote:

OK, I have tried following.

private AssetSource assetSource;


and in method


public String getImagePath()
{
Asset asset;
if(article.getImage() == null || article.getImag().isEmpty())
{
  asset=assetSource.getAsset(null,"context:/gfx/"+article.getImage(),null);
  return asset.toClientURL();
}
 asset=assetSource.getAsset(null,"context:/gfx/Test.png",null);
  return asset.toClientURL();
}

AssetSource doesn't understand bindings (and 'context' is one of them). For context assets, use the getContextAsset() method: assetSource.getAsset("/gfx/"+article.getImage(),null);

--
Thiago H. de Paula Figueiredo

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

Reply via email to