Wednesday, May 27, 2009

SAP Portal - Resource

A component can reference a Web resource packaged in its application or in another application by retrieving an IResource object for the resource from the IPortalComponentRequest object, as in the following examples:

For a resource in the same application:

request.getResource(IResource.IMAGE,"images/myImage.gif");

For a resource in another application:

request.getResource("myApp",IResource.IMAGE,"images/myImage.gif");

A component can use a Web resource, for example, to create a link to the
resource or to include it in its content.

No comments: