If you have a page in the same package you could (this is ugly)
Ipage page = cycle.getPage("foo");
page.getSpecification().getSpecificationLocation().getRelativeResource()....
yada yada
of course you could inject a component in the same package and do the same.
In fact, if you used an absolute path in getRelativeResource you could
inject *any* component in the classpath.
Geoff
On 3/24/06, Mike Snare <[EMAIL PROTECTED]> wrote:
> Yep. I'm using the DefaultClassResolver in the current implementation
> (see the OP).
>
> The images folder is relative to the location of the component. If
> the component is in /com/components/MyComponent, then the images are
> all in /com/components/images.
>
> It seems that the ideal solution would be a service that takes two
> parameters: a component and a relative path and returns an IAsset. I
> just don't know how to write such a component.
>
> For now I'm hardcoding the path to "/com/components/images/" +
> imageName. It works but (as you were quick to agree) it smells like a
> hack.
>
> -Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
The Spindle guy. http://spindle.sf.net
Blog: http://jroller.com/page/glongman
Other interests: http://www.squidoo.com/spaceelevator/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]