Is there a service/utility that can be used by a page/component to
retrieve an asset by relative path?

I've got it working using the following code:

private IAsset getPrivateAsset(String relativePath) {

  String path = "/path/to/my/class/" + relativePath;

  // resolver is a DefaultClassResolver
  // the asset service is injected
  return new PrivateAsset(new ClasspathResource(resolver, path),
        getAssetService(), this.getLocation());
}

But it smells like a hack.

Thanks,
-Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to