Re: WOResourceURL via java code
Re: WOResourceURL via java code
- Subject: Re: WOResourceURL via java code
- From: Travis Cripps <email@hidden>
- Date: Tue, 23 May 2006 14:24:46 -0700
Amadeo,
Hi, again. If you have the images in a database, you need to
retrieve them as a blob (NSData type) and you can then just hand the
data to a WOImage for display. If, instead, you're storing the path
to the image that's stored somewhere on a hard drive, you could just
get the file at that URL path.
A resource URL is to help you get access to resources within in your
project. You would use the WOResourceManager to get the correct path
url and then do something with the file at that path. You can
alternately ask the WOResourceManager for the bytes of the resource.
So, if you had an image as part of your project, you could do
something like this:
public NSData getImageData(String imageName) {
byte[] imageBytes = WOApplication.application().resourceManager
().bytesForResourceNamed(imageName, "app", nil);
return new NSData(imageBytes);
}
If your image was in a framework, you'd need to change "app" to the
framework name.
Well, have a nice day.
Travis
On May 23, 2006, at 12:06 PM, email@hidden
wrote:
Message: 6
Date: Tue, 23 May 2006 20:43:24 +0200
From: Amedeo Mantica <email@hidden>
Subject: WOResourceURL via java code
To: WebObjects Dev Apple <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
I have images in a database,
How to implement WOResourceURL via java code to get a string
containing the image url?
Thanks
Amedeo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden