WOResourceURL
Element Description
WOResourceURL enables the creation of URLs to return resources, such as images and sounds. You can use this element for a variety of purposes, but it is primarily intended to support JavaScript within a WebObjects application.
Synopsis
WOResourceURL { filename= imageFileName; [framework = frameworkBaseName | "app";] | data=dataObject; mimeType=typeString; [key=cacheKey;]... };Bindings
- filename
- Path to the resource relative to the WebServerResources directory.
- framework
- Framework that contains the resource file. This attribute
is only necessary if the file is in a different location from the
component. That is, if the component and the file are both in the application
or if the component and the file are both in the same framework,
this attribute isn't necessary. If the resource file is in a framework
and the component is in an application, specify the framework's
name here (minus the
.framework
extension). If the resource file should be in the application but the component is in a framework, specify the"app"
keyword in place of the framework name.
- data
- Specifies any resource in the form of an NSData; this data can come from a database, a file, or memory. If you specify resource data, you must specify a MIME type.
- mimeType
- A string designating a MIME resource type, such as
"image/gif"
; this type tells the client what to do with data. If you provide data but no MIME type, WebObjects will raise.
- key
- A string that functions as a key for caching the data specified in data. If you do not provide a key, the data object must be fetched each time it is needed. For further information, see the reference documentation for the WOResourceManager class, particularly that for the flushDataCache method.