Skip to Content
0
Former Member
Jul 02, 2009 at 10:57 AM

Abstract Portal Component: How to inclue a HTML file into the response?

67 Views

Hi experts,

i am currently working on the problem, that i want to access KM inside my AbstractPortalComponent in order to retrieve a HTML File.Afterwars i want to include this file into my IPortalComponentResponse.

IPortalComponentResponse offers the method include(IPortalComponentResponse , IResource)

Is it possible to use this method to achieve my goal?

I have tried this approach:

IResourceContext resourceContext = new ResourceContext(requester);

RID rid = RID.getRID("/documents/test.gif");

IResource resource = ResourceFactory.getInstance().getResource(rid,resourceContext);

response.include(request,resource);

But the problem is that this IResource doesn't match the IResource that is needed for this method.

My IResource belongs to com.sapportals.wcm.repository.IResource

But the Methos just works with com.sapportals.portal.prt.resource.IResource

So can you help me on this one?:)

With Best Regards

Marcus